mesa/st: flag ST_NEW_CONSTANTS upon running nir_lower_point_size_mov

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5885>
This commit is contained in:
Mike Blumenkrantz 2020-07-30 11:05:06 -04:00 committed by Marge Bot
parent 7eb5fd98fd
commit 6669d6ff0a

View file

@ -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;