summaryrefslogtreecommitdiff
path: root/cogl/cogl-pipeline-fragend-arbfp.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2011-01-24 14:28:00 +0000
committerNeil Roberts <neil@linux.intel.com>2011-01-24 15:45:45 +0000
commitc4a94439de2700c550da742143c46ee7e72e7f62 (patch)
treef4536965d9f9dcdbb834a59cf342a61a8f7c530d /cogl/cogl-pipeline-fragend-arbfp.c
parent4bb08ba00b4d572b3201a833377304b88f66e3c3 (diff)
downloadcogl-c4a94439de2700c550da742143c46ee7e72e7f62.tar.gz
cogl-debug: Split the flags to support more than 32
The CoglDebugFlags are now stored in an array of unsigned ints rather than a single variable. The flags are accessed using macros instead of directly peeking at the cogl_debug_flags variable. The index values are stored in the enum rather than the actual mask values so that the enum doesn't need to be more than 32 bits wide. The hope is that the code to determine the index into the array can be optimized out by the compiler so it should have exactly the same performance as the old code.
Diffstat (limited to 'cogl/cogl-pipeline-fragend-arbfp.c')
-rw-r--r--cogl/cogl-pipeline-fragend-arbfp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cogl/cogl-pipeline-fragend-arbfp.c b/cogl/cogl-pipeline-fragend-arbfp.c
index 834f994d..15dacdfc 100644
--- a/cogl/cogl-pipeline-fragend-arbfp.c
+++ b/cogl/cogl-pipeline-fragend-arbfp.c
@@ -262,7 +262,7 @@ _cogl_pipeline_fragend_arbfp_start (CoglPipeline *pipeline,
/* If we haven't yet found an existing program then before we resort to
* generating a new arbfp program we see if we can find a suitable
* program in the arbfp_cache. */
- if (G_LIKELY (!(cogl_debug_flags & COGL_DEBUG_DISABLE_PROGRAM_CACHES)))
+ if (G_LIKELY (!(COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_PROGRAM_CACHES))))
{
arbfp_program_state = g_hash_table_lookup (ctx->arbfp_cache, authority);
if (arbfp_program_state)
@@ -891,7 +891,7 @@ _cogl_pipeline_fragend_arbfp_end (CoglPipeline *pipeline,
"MOV result.color,output;\n");
g_string_append (arbfp_program_state->source, "END\n");
- if (G_UNLIKELY (cogl_debug_flags & COGL_DEBUG_SHOW_SOURCE))
+ if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_SHOW_SOURCE)))
g_message ("pipeline program:\n%s", arbfp_program_state->source->str);
GE (glGenPrograms (1, &arbfp_program_state->gl_program));
@@ -914,7 +914,7 @@ _cogl_pipeline_fragend_arbfp_end (CoglPipeline *pipeline,
arbfp_program_state->source = NULL;
- if (G_LIKELY (!(cogl_debug_flags & COGL_DEBUG_DISABLE_PROGRAM_CACHES)))
+ if (G_LIKELY (!(COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_PROGRAM_CACHES))))
{
CoglPipeline *key;