mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 10:40:22 +01:00
glsl/nir: set new_style_shadow for sparse tex ops as necessary
this needs the sparse result type, which is not the ir type Fixes:f4a972b748("glsl/nir: convert sparse ir_texture to nir") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16097> (cherry picked from commita6a4bf0f1e)
This commit is contained in:
parent
75ff747837
commit
86d6875fe1
2 changed files with 3 additions and 3 deletions
|
|
@ -4,7 +4,7 @@
|
|||
"description": "glsl/nir: set new_style_shadow for sparse tex ops as necessary",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"because_sha": "f4a972b74837a9f7992b93a808115541bf20589b"
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2486,12 +2486,12 @@ nir_visitor::visit(ir_texture *ir)
|
|||
(glsl_sampler_dim) ir->sampler->type->sampler_dimensionality;
|
||||
instr->is_array = ir->sampler->type->sampler_array;
|
||||
instr->is_shadow = ir->sampler->type->sampler_shadow;
|
||||
if (instr->is_shadow)
|
||||
instr->is_new_style_shadow = (ir->type->vector_elements == 1);
|
||||
|
||||
const glsl_type *dest_type
|
||||
= ir->is_sparse ? ir->type->field_type("texel") : ir->type;
|
||||
assert(dest_type != glsl_type::error_type);
|
||||
if (instr->is_shadow)
|
||||
instr->is_new_style_shadow = (dest_type->vector_elements == 1);
|
||||
instr->dest_type = nir_get_nir_type_for_glsl_type(dest_type);
|
||||
instr->is_sparse = ir->is_sparse;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue