On 12/16/2012 07:49 AM, Brian Paul wrote:
On Sat, Dec 15, 2012 at 11:09 PM, Paul Berry <stereotype...@gmail.com> wrote:
The rather unweildy logic for determining this condition was repeated
in a large number of places. This patch consolidates it to a single
inline function.
@@ -111,4 +113,11 @@ _mesa_PauseTransformFeedback(void);
extern void GLAPIENTRY
_mesa_ResumeTransformFeedback(void);
+static inline bool
+is_transform_feedback_active_and_unpaused(struct gl_context *ctx)
+{
+ return ctx->TransformFeedback.CurrentObject->Active &&
+ !ctx->TransformFeedback.CurrentObject->Paused;
+}
Non-private core Mesa functions should have the _mesa_ prefix. It's a
long name already. Maybe use the "xfb" abbreviation?
The ctx parameter could be const-qualified.
Yeah, I like both those suggestions.
I had also been thinking of 'really_active' instead of
'active_and_unpaused'. _mesa_is_xfb_really_active() doesn't seem to
lose and clarity from _mesa_is_xfb_active_and_unpaused(). I'm not too
hung up on it, though. *shrug*
Reviewed-by: Brian Paul <bri...@vmware.com>
With Brian's suggestions incorporated, it's
Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev