From: Keith Whitwell Date: Tue, 24 Aug 2010 19:08:13 +0000 (+0100) Subject: llvmpipe: put fs variant dumping in a function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71e27ef21c4a24aeadadb85f60774ec48a7e3cff;p=mesa.git llvmpipe: put fs variant dumping in a function --- 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_ */