llvmpipe: put variant print/debug code into separate function
This commit is contained in:
@@ -882,22 +882,17 @@ generate_fragment(struct llvmpipe_context *lp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct lp_fragment_shader_variant *
|
static void
|
||||||
generate_variant(struct llvmpipe_context *lp,
|
dump_fs_variant_key(const struct lp_fragment_shader_variant_key *key)
|
||||||
struct lp_fragment_shader *shader,
|
|
||||||
const struct lp_fragment_shader_variant_key *key)
|
|
||||||
{
|
{
|
||||||
struct lp_fragment_shader_variant *variant;
|
|
||||||
|
|
||||||
if (gallivm_debug & GALLIVM_DEBUG_IR) {
|
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
tgsi_dump(shader->base.tokens, 0);
|
|
||||||
if (key->depth.enabled) {
|
if (key->depth.enabled) {
|
||||||
debug_printf("depth.format = %s\n", util_format_name(key->zsbuf_format));
|
debug_printf("depth.format = %s\n", util_format_name(key->zsbuf_format));
|
||||||
debug_printf("depth.func = %s\n", util_dump_func(key->depth.func, TRUE));
|
debug_printf("depth.func = %s\n", util_dump_func(key->depth.func, TRUE));
|
||||||
debug_printf("depth.writemask = %u\n", key->depth.writemask);
|
debug_printf("depth.writemask = %u\n", key->depth.writemask);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 2; ++i) {
|
for (i = 0; i < 2; ++i) {
|
||||||
if (key->stencil[i].enabled) {
|
if (key->stencil[i].enabled) {
|
||||||
debug_printf("stencil[%u].func = %s\n", i, util_dump_func(key->stencil[i].func, TRUE));
|
debug_printf("stencil[%u].func = %s\n", i, util_dump_func(key->stencil[i].func, TRUE));
|
||||||
@@ -908,10 +903,12 @@ generate_variant(struct llvmpipe_context *lp,
|
|||||||
debug_printf("stencil[%u].writemask = 0x%x\n", i, key->stencil[i].writemask);
|
debug_printf("stencil[%u].writemask = 0x%x\n", i, key->stencil[i].writemask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key->alpha.enabled) {
|
if (key->alpha.enabled) {
|
||||||
debug_printf("alpha.func = %s\n", util_dump_func(key->alpha.func, TRUE));
|
debug_printf("alpha.func = %s\n", util_dump_func(key->alpha.func, TRUE));
|
||||||
debug_printf("alpha.ref_value = %f\n", key->alpha.ref_value);
|
debug_printf("alpha.ref_value = %f\n", key->alpha.ref_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key->blend.logicop_enable) {
|
if (key->blend.logicop_enable) {
|
||||||
debug_printf("blend.logicop_func = %u\n", key->blend.logicop_func);
|
debug_printf("blend.logicop_func = %u\n", key->blend.logicop_func);
|
||||||
}
|
}
|
||||||
@@ -952,6 +949,20 @@ generate_variant(struct llvmpipe_context *lp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static struct lp_fragment_shader_variant *
|
||||||
|
generate_variant(struct llvmpipe_context *lp,
|
||||||
|
struct lp_fragment_shader *shader,
|
||||||
|
const struct lp_fragment_shader_variant_key *key)
|
||||||
|
{
|
||||||
|
struct lp_fragment_shader_variant *variant;
|
||||||
|
|
||||||
|
if (gallivm_debug & GALLIVM_DEBUG_IR) {
|
||||||
|
tgsi_dump(shader->base.tokens, 0);
|
||||||
|
dump_fs_variant_key(key);
|
||||||
|
}
|
||||||
|
|
||||||
variant = CALLOC_STRUCT(lp_fragment_shader_variant);
|
variant = CALLOC_STRUCT(lp_fragment_shader_variant);
|
||||||
if(!variant)
|
if(!variant)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user