mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 06:40:08 +01:00
spirv/nir: Add support for shadow samplers that return vec4
While SPIR-V technically doesn't support "old style" shadow, the shadow-compare gather instruction does return a vec4 so we need to be able to set the old_style_shadow bit in NIR. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-dev@lists.freedesktop.org>
This commit is contained in:
parent
2ddefd03b7
commit
7c7acf53b2
1 changed files with 2 additions and 1 deletions
|
|
@ -1479,7 +1479,8 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
|
|||
instr->sampler_dim = glsl_get_sampler_dim(image_type);
|
||||
instr->is_array = glsl_sampler_type_is_array(image_type);
|
||||
instr->is_shadow = glsl_sampler_type_is_shadow(image_type);
|
||||
instr->is_new_style_shadow = instr->is_shadow;
|
||||
instr->is_new_style_shadow = instr->is_shadow &&
|
||||
glsl_get_components(ret_type->type) == 1;
|
||||
|
||||
if (has_coord) {
|
||||
switch (instr->sampler_dim) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue