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 <kenneth@whitecape.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
This commit is contained in:
@@ -132,20 +132,22 @@ anv_shader_compile_to_nir(struct anv_pipeline *pipeline,
|
||||
}
|
||||
}
|
||||
|
||||
const struct nir_spirv_supported_extensions supported_ext = {
|
||||
.float64 = device->instance->physicalDevice.info.gen >= 8,
|
||||
.int64 = device->instance->physicalDevice.info.gen >= 8,
|
||||
.tessellation = true,
|
||||
.draw_parameters = true,
|
||||
.image_write_without_format = true,
|
||||
.multiview = true,
|
||||
.variable_pointers = true,
|
||||
struct spirv_to_nir_options spirv_options = {
|
||||
.caps = {
|
||||
.float64 = device->instance->physicalDevice.info.gen >= 8,
|
||||
.int64 = device->instance->physicalDevice.info.gen >= 8,
|
||||
.tessellation = true,
|
||||
.draw_parameters = true,
|
||||
.image_write_without_format = true,
|
||||
.multiview = true,
|
||||
.variable_pointers = true,
|
||||
},
|
||||
};
|
||||
|
||||
nir_function *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_shader *nir = entry_point->shader;
|
||||
assert(nir->info.stage == stage);
|
||||
nir_validate_shader(nir);
|
||||
|
Reference in New Issue
Block a user