From e19c623128ef07c778f5f587864361c1ff383695 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 18 Oct 2017 17:28:19 -0700 Subject: 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 Reviewed-by: Kristian H. Kristensen --- src/compiler/spirv/nir_spirv.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'src/compiler/spirv/nir_spirv.h') diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h index 83577fb5d23..234b0ce3444 100644 --- a/src/compiler/spirv/nir_spirv.h +++ b/src/compiler/spirv/nir_spirv.h @@ -42,24 +42,26 @@ struct nir_spirv_specialization { }; }; -struct nir_spirv_supported_extensions { - bool float64; - bool image_ms_array; - bool tessellation; - bool draw_parameters; - bool image_read_without_format; - bool image_write_without_format; - bool int64; - bool multiview; - bool variable_pointers; +struct spirv_to_nir_options { + struct { + bool float64; + bool image_ms_array; + bool tessellation; + bool draw_parameters; + bool image_read_without_format; + bool image_write_without_format; + bool int64; + bool multiview; + bool variable_pointers; + } caps; }; nir_function *spirv_to_nir(const uint32_t *words, size_t word_count, struct nir_spirv_specialization *specializations, unsigned num_specializations, gl_shader_stage stage, const char *entry_point_name, - const struct nir_spirv_supported_extensions *ext, - const nir_shader_compiler_options *options); + const struct spirv_to_nir_options *options, + const nir_shader_compiler_options *nir_options); #ifdef __cplusplus } -- cgit v1.2.3