llvmpipe: put fs variant dumping in a function
authorKeith Whitwell <keithw@vmware.com>
Tue, 24 Aug 2010 19:08:13 +0000 (20:08 +0100)
committerKeith Whitwell <keithw@vmware.com>
Tue, 7 Sep 2010 12:22:54 +0000 (13:22 +0100)
src/gallium/drivers/llvmpipe/lp_state_fs.c
src/gallium/drivers/llvmpipe/lp_state_fs.h

index 60cf98aae954b58a1c8699fa3afd1e5c7ee17f06..d43b2f63589b9c1cceac5f3cf57fa4e86a87b94a 100644 (file)
@@ -794,6 +794,16 @@ dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
 }
 
 
+void
+lp_debug_fs_variant(const struct lp_fragment_shader_variant *variant)
+{
+   debug_printf("llvmpipe: Fragment shader #%u variant #%u:\n", 
+                variant->shader->no, variant->no);
+   tgsi_dump(variant->shader->base.tokens, 0);
+   dump_fs_variant_key(&variant->key);
+   debug_printf("variant->opaque = %u\n", variant->opaque);
+   debug_printf("\n");
+}
 
 static struct lp_fragment_shader_variant *
 generate_variant(struct llvmpipe_context *lp,
@@ -815,10 +825,7 @@ generate_variant(struct llvmpipe_context *lp,
    memcpy(&variant->key, key, shader->variant_key_size);
 
    if (gallivm_debug & GALLIVM_DEBUG_IR) {
-      debug_printf("llvmpipe: Creating fragment shader #%u variant #%u:\n", 
-                  shader->no, variant->no);
-      tgsi_dump(shader->base.tokens, 0);
-      dump_fs_variant_key(key);
+      lp_debug_fs_variant(variant);
    }
 
    generate_fragment(lp, shader, variant, RAST_WHOLE);
index f2c46a6405e6c9fdf656b9bd30f92991d3ab4273..f3364f5cf353e8e5e4254b51c8b65fa731c469c1 100644 (file)
@@ -104,4 +104,8 @@ struct lp_fragment_shader
 };
 
 
+void
+lp_debug_fs_variant(const struct lp_fragment_shader_variant *variant);
+
+
 #endif /* LP_STATE_FS_H_ */