summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-10-28 22:37:33 +0200
committerMarek Olšák <[email protected]>2016-11-15 20:23:40 +0100
commit537b897f51690aa11089bec0d82e89ca712b1469 (patch)
treeec4d51c76368fccf05065104b205c0000c0ec356 /src/mesa/state_tracker
parent72217d433599041f28bc30bb8e184647e7679e39 (diff)
glsl_to_tgsi: lower small branches based on the CAP
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 64a68e00aa9..7f19839d30e 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -6783,6 +6783,8 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED);
bool have_dfrexp = pscreen->get_shader_param(pscreen, ptarget,
PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED);
+ unsigned if_threshold = pscreen->get_shader_param(pscreen, ptarget,
+ PIPE_SHADER_CAP_LOWER_IF_THRESHOLD);
/* If there are forms of indirect addressing that the driver
* cannot handle, perform the lowering pass.
@@ -6865,7 +6867,8 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
|| progress;
progress = lower_if_to_cond_assign((gl_shader_stage)i, ir,
- options->MaxIfDepth) || progress;
+ options->MaxIfDepth, if_threshold) ||
+ progress;
} while (progress);