summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2013-05-22 22:47:59 +0200
committerRoland Scheidegger <[email protected]>2013-05-22 22:57:27 +0200
commit80e2cc0f97f40c2af58980e3961c2b10b14c801e (patch)
tree6be61de576f0d2cf7b978fe3c380dd5cd9b651fc /src/gallium/drivers
parente108716429f85aca3d2a70c609248b7b82f050b4 (diff)
llvmpipe: disable simple_shader optimization
This optimization disabled mask checks if the shader is simple enough. While this should work correctly, the problem is that it can hide real issues because shaders in practice are usually complex enough (8 instructions or 1 texture is already enough) so this doesn't get used, whereas dumbed-down tests which should hit all the same code paths suddenly do something quite different. This was the reason that bug 41787 could not be easily tracked as stencil test not working correctly (piglit would in fact have failed some tests without that optimization). So disable it for now, it's unclear if it's much of a win in any case. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 98a5a497703..a20cc780bf4 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -245,9 +245,14 @@ generate_fs_loop(struct gallivm_state *gallivm,
LLVMValueRef outputs[PIPE_MAX_SHADER_OUTPUTS][TGSI_NUM_CHANNELS];
struct lp_build_for_loop_state loop_state;
struct lp_build_mask_context mask;
+ /*
+ * TODO: figure out if simple_shader optimization is really worthwile to
+ * keep. Disabled because it may hide some real bugs in the (depth/stencil)
+ * code since tests tend to take another codepath than real shaders.
+ */
boolean simple_shader = (shader->info.base.file_count[TGSI_FILE_SAMPLER] == 0 &&
shader->info.base.num_inputs < 3 &&
- shader->info.base.num_instructions < 8);
+ shader->info.base.num_instructions < 8) && 0;
const boolean dual_source_blend = key->blend.rt[0].blend_enable &&
util_blend_state_is_dual(&key->blend, 0);
unsigned attrib;