mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nir/lower_tex: avoid adding invalid LOD to RECT textures
this is illegal Fixes:74ec2b12be("nir/lower_tex: Rework invalid implicit LOD lowering") Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15804> (cherry picked from commit6cfcf891c1)
This commit is contained in:
parent
ee46e64aa0
commit
3c0ba49a66
2 changed files with 3 additions and 1 deletions
|
|
@ -4036,7 +4036,7 @@
|
|||
"description": "nir/lower_tex: avoid adding invalid LOD to RECT textures",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"because_sha": "74ec2b12be17a7796186b3100a5a6b208be45b23"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1471,8 +1471,10 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
|
|||
/* Only fragment and compute (in some cases) support implicit
|
||||
* derivatives. Lower those opcodes which use implicit derivatives to
|
||||
* use an explicit LOD of 0.
|
||||
* But don't touch RECT samplers because they don't have mips.
|
||||
*/
|
||||
if (nir_tex_instr_has_implicit_derivative(tex) &&
|
||||
tex->sampler_dim != GLSL_SAMPLER_DIM_RECT &&
|
||||
!nir_shader_supports_implicit_lod(b->shader)) {
|
||||
lower_zero_lod(b, tex);
|
||||
progress = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue