diff options
author | Keith Whitwell <[email protected]> | 2010-08-24 20:08:13 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-09-07 13:22:54 +0100 |
commit | 71e27ef21c4a24aeadadb85f60774ec48a7e3cff (patch) | |
tree | 7dd70fd1b0e9682eadc8419f2db96232ddfd05e3 /src | |
parent | 98e277111bd6f6e5bcbbcd663e42e18ce449b533 (diff) |
llvmpipe: put fs variant dumping in a function
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 15 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.h | 4 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 60cf98aae95..d43b2f63589 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -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); diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.h b/src/gallium/drivers/llvmpipe/lp_state_fs.h index f2c46a6405e..f3364f5cf35 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.h +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.h @@ -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_ */ |