From 6669d6ff0a615c3e68b54337de835e9b17e572b5 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 30 Jul 2020 11:05:06 -0400 Subject: [PATCH] mesa/st: flag ST_NEW_CONSTANTS upon running nir_lower_point_size_mov MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this reduces to a load_ubo after optimization, so we need to ensure that the constant data is put in a buffer instead of relying on it happening coincidentally Reviewed-by: Marek Olšák Part-of: --- src/mesa/state_tracker/st_program.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 1a075619297..5424fc204fd 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -699,6 +699,7 @@ st_create_vp_variant(struct st_context *st, _mesa_add_state_reference(params, point_size_state); NIR_PASS_V(state.ir.nir, nir_lower_point_size_mov, point_size_state); + stvp->affected_states |= ST_NEW_VS_CONSTANTS; finalize = true; } @@ -1713,6 +1714,10 @@ st_get_common_variant(struct st_context *st, _mesa_add_state_reference(params, point_size_state); NIR_PASS_V(state.ir.nir, nir_lower_point_size_mov, point_size_state); + if (prog->Base.info.stage == MESA_SHADER_TESS_EVAL) + prog->affected_states |= ST_NEW_TES_CONSTANTS; + else if (prog->Base.info.stage == MESA_SHADER_GEOMETRY) + prog->affected_states |= ST_NEW_GS_CONSTANTS; finalize = true; } state.stream_output = prog->state.stream_output;