summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/spirv')
-rw-r--r--src/compiler/spirv/nir_spirv.h1
-rw-r--r--src/compiler/spirv/spirv_to_nir.c5
-rw-r--r--src/compiler/spirv/vtn_variables.c5
3 files changed, 9 insertions, 2 deletions
diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
index e0ebc625844..e43e9b53825 100644
--- a/src/compiler/spirv/nir_spirv.h
+++ b/src/compiler/spirv/nir_spirv.h
@@ -49,6 +49,7 @@ struct nir_spirv_supported_extensions {
bool image_ms_array;
bool tessellation;
bool draw_parameters;
+ bool image_write_without_format;
};
nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
index db3a19fb49e..7e7874a5e49 100644
--- a/src/compiler/spirv/spirv_to_nir.c
+++ b/src/compiler/spirv/spirv_to_nir.c
@@ -2664,7 +2664,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
case SpvCapabilityMinLod:
case SpvCapabilityTransformFeedback:
case SpvCapabilityStorageImageReadWithoutFormat:
- case SpvCapabilityStorageImageWriteWithoutFormat:
vtn_warn("Unsupported SPIR-V capability: %s",
spirv_capability_to_string(cap));
break;
@@ -2700,6 +2699,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
spv_check_supported(draw_parameters, cap);
break;
+ case SpvCapabilityStorageImageWriteWithoutFormat:
+ spv_check_supported(image_write_without_format, cap);
+ break;
+
default:
unreachable("Unhandled capability");
}
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 098cfb5de7a..d7d882e0184 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1054,8 +1054,12 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var,
assert(nir_var->constant_initializer != NULL);
nir_var->data.read_only = true;
break;
+ case SpvDecorationNonReadable:
+ nir_var->data.image.write_only = true;
+ break;
case SpvDecorationNonWritable:
nir_var->data.read_only = true;
+ nir_var->data.image.read_only = true;
break;
case SpvDecorationComponent:
nir_var->data.location_frac = dec->literals[0];
@@ -1107,7 +1111,6 @@ apply_var_decoration(struct vtn_builder *b, nir_variable *nir_var,
case SpvDecorationAliased:
case SpvDecorationVolatile:
case SpvDecorationCoherent:
- case SpvDecorationNonReadable:
case SpvDecorationUniform:
case SpvDecorationStream:
case SpvDecorationOffset: