mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
mesa/st: make export_point_size shader key clobber existing psiz
this is necessary to upload the API value using the uniform constant Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15228>
This commit is contained in:
parent
9ae0cdc453
commit
fa323cb93a
1 changed files with 17 additions and 21 deletions
|
|
@ -798,29 +798,25 @@ st_create_common_variant(struct st_context *st,
|
|||
|
||||
if (key->export_point_size) {
|
||||
/* if flag is set, shader must export psiz */
|
||||
nir_shader *nir = state.ir.nir;
|
||||
/* avoid clobbering existing psiz output */
|
||||
if (!(nir->info.outputs_written & BITFIELD64_BIT(VARYING_SLOT_PSIZ))) {
|
||||
_mesa_add_state_reference(params, point_size_state);
|
||||
NIR_PASS_V(state.ir.nir, nir_lower_point_size_mov,
|
||||
point_size_state);
|
||||
_mesa_add_state_reference(params, point_size_state);
|
||||
NIR_PASS_V(state.ir.nir, nir_lower_point_size_mov,
|
||||
point_size_state);
|
||||
|
||||
switch (prog->info.stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
prog->affected_states |= ST_NEW_VS_CONSTANTS;
|
||||
break;
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
prog->affected_states |= ST_NEW_TES_CONSTANTS;
|
||||
break;
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
prog->affected_states |= ST_NEW_GS_CONSTANTS;
|
||||
break;
|
||||
default:
|
||||
unreachable("bad shader stage");
|
||||
}
|
||||
|
||||
finalize = true;
|
||||
switch (prog->info.stage) {
|
||||
case MESA_SHADER_VERTEX:
|
||||
prog->affected_states |= ST_NEW_VS_CONSTANTS;
|
||||
break;
|
||||
case MESA_SHADER_TESS_EVAL:
|
||||
prog->affected_states |= ST_NEW_TES_CONSTANTS;
|
||||
break;
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
prog->affected_states |= ST_NEW_GS_CONSTANTS;
|
||||
break;
|
||||
default:
|
||||
unreachable("bad shader stage");
|
||||
}
|
||||
|
||||
finalize = true;
|
||||
}
|
||||
|
||||
if (key->lower_ucp) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue