summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-10-18 17:28:19 -0700
committerJason Ekstrand <[email protected]>2017-12-02 08:09:11 -0800
commite19c623128ef07c778f5f587864361c1ff383695 (patch)
treea555c61ff96823ac171d15cab6c7401ab1a07806 /src/amd
parent6bd876dcaa4403b30eedd5ebe66bfadcef1f1a0c (diff)
spirv: Convert the supported_extensions struct to spirv_options
This is a bit more general and lets us pass additional options into the spirv_to_nir pass beyond what capabilities we support. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_shader.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index 5464d3a58e9..4a3fdfa80ec 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -196,19 +196,22 @@ radv_shader_compile_to_nir(struct radv_device *device,
spec_entries[i].data32 = *(const uint32_t *)data;
}
}
- const struct nir_spirv_supported_extensions supported_ext = {
- .draw_parameters = true,
- .float64 = true,
- .image_read_without_format = true,
- .image_write_without_format = true,
- .tessellation = true,
- .int64 = true,
- .multiview = true,
- .variable_pointers = true,
+ const struct spirv_to_nir_options spirv_options = {
+ .caps = {
+ .draw_parameters = true,
+ .float64 = true,
+ .image_read_without_format = true,
+ .image_write_without_format = true,
+ .tessellation = true,
+ .int64 = true,
+ .multiview = true,
+ .variable_pointers = true,
+ },
};
entry_point = spirv_to_nir(spirv, module->size / 4,
spec_entries, num_spec_entries,
- stage, entrypoint_name, &supported_ext, &nir_options);
+ stage, entrypoint_name,
+ &spirv_options, &nir_options);
nir = entry_point->shader;
assert(nir->info.stage == stage);
nir_validate_shader(nir);