mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
nir/validate: Assert txf(_ms) matches dimension
We can't txf_ms on non-MS images and we can't txf on MS images. This would have caught a regression on Asahi. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23892>
This commit is contained in:
parent
5099137612
commit
e81b5b972e
1 changed files with 8 additions and 0 deletions
|
|
@ -930,6 +930,14 @@ validate_tex_instr(nir_tex_instr *instr, validate_state *state)
|
|||
}
|
||||
}
|
||||
|
||||
bool msaa = (instr->sampler_dim == GLSL_SAMPLER_DIM_MS ||
|
||||
instr->sampler_dim == GLSL_SAMPLER_DIM_SUBPASS_MS);
|
||||
|
||||
if (msaa)
|
||||
validate_assert(state, instr->op != nir_texop_txf);
|
||||
else
|
||||
validate_assert(state, instr->op != nir_texop_txf_ms);
|
||||
|
||||
if (instr->op != nir_texop_tg4)
|
||||
validate_assert(state, instr->component == 0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue