summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-10-15 21:08:35 -0400
committerMarek Olšák <[email protected]>2019-10-16 20:10:47 -0400
commitf86b28dfdc2503e9bbf669f8f675b58df92d53e5 (patch)
tree0c6a9b7b9ae039752965905392f438f089229d1b /src/mesa/state_tracker/st_program.c
parent45378689e02ac8ee89ebf8b419bc0a808e57f426 (diff)
st/mesa: finalize NIR after shader variant passes for TCS/TES/GS/CS
Same as VS and FS. This might fix vertex color clamping. Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.c')
-rw-r--r--src/mesa/state_tracker/st_program.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index 0e231618044..9f0aaba4430 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1449,8 +1449,6 @@ st_translate_common_program(struct st_context *st,
/* We have already compiled to NIR so just return */
if (stcp->shader_program) {
/* No variants */
- st_finalize_nir(st, &stcp->Base, stcp->shader_program,
- stcp->tgsi.ir.nir);
if (stcp->Base.info.stage == MESA_SHADER_TESS_EVAL ||
stcp->Base.info.stage == MESA_SHADER_GEOMETRY)
st_translate_stream_output_info(&stcp->Base);
@@ -1678,6 +1676,9 @@ st_get_basic_variant(struct st_context *st,
NIR_PASS_V(tgsi.ir.nir, nir_lower_clamp_color_outputs);
tgsi.stream_output = prog->tgsi.stream_output;
+
+ st_finalize_nir(st, &prog->Base, prog->shader_program,
+ tgsi.ir.nir);
} else {
if (key->lower_depth_clamp) {
struct gl_program_parameter_list *params = prog->Base.Parameters;