diff options
author | José Fonseca <[email protected]> | 2010-06-01 16:28:45 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2010-06-01 16:39:03 +0100 |
commit | 149cb7682e37ce719d693f120e68dde60ba73bdf (patch) | |
tree | 05c5bdefb18624cf2f3f2f0f9035e7147426bce5 /src/gallium/drivers/llvmpipe/lp_state_fs.c | |
parent | abe4f3d1aa68aec70d329447abc890b3eaaba9cb (diff) |
llvmpipe: Don't waste time interpolating unused input channels.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 14 |
1 files changed, 13 insertions, 1 deletions
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; |