From 71e27ef21c4a24aeadadb85f60774ec48a7e3cff Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Tue, 24 Aug 2010 20:08:13 +0100 Subject: [PATCH] llvmpipe: put fs variant dumping in a function --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 15 +++++++++++---- 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_ */ -- 2.30.2