From 149cb7682e37ce719d693f120e68dde60ba73bdf Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 1 Jun 2010 16:28:45 +0100 Subject: llvmpipe: Don't waste time interpolating unused input channels. --- src/gallium/drivers/llvmpipe/lp_state_fs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c') diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 21e90fe00ec..d3f2eb2421e 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -760,7 +760,7 @@ generate_fragment(struct llvmpipe_context *lp, generate_pos0(builder, x, y, &x0, &y0); lp_build_interp_soa_init(&interp, - shader->base.tokens, + &shader->info, key->flatshade, builder, fs_type, a0_ptr, dadx_ptr, dady_ptr, @@ -1013,8 +1013,20 @@ llvmpipe_create_fs_state(struct pipe_context *pipe, shader->base.tokens = tgsi_dup_tokens(templ->tokens); if (LP_DEBUG & DEBUG_TGSI) { + unsigned attrib; debug_printf("llvmpipe: Create fragment shader %p:\n", (void *) shader); tgsi_dump(templ->tokens, 0); + debug_printf("usage masks:\n"); + for (attrib = 0; attrib < shader->info.num_inputs; ++attrib) { + unsigned usage_mask = shader->info.input_usage_mask[attrib]; + debug_printf(" IN[%u].%s%s%s%s\n", + attrib, + usage_mask & TGSI_WRITEMASK_X ? "x" : "", + usage_mask & TGSI_WRITEMASK_Y ? "y" : "", + usage_mask & TGSI_WRITEMASK_Z ? "z" : "", + usage_mask & TGSI_WRITEMASK_W ? "w" : ""); + } + debug_printf("\n"); } return shader; -- cgit v1.2.3