*
*/
-#pragma once
-
#ifndef _NIR_SPIRV_H_
#define _NIR_SPIRV_H_
};
};
-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;
+enum nir_spirv_debug_level {
+ NIR_SPIRV_DEBUG_LEVEL_INFO,
+ NIR_SPIRV_DEBUG_LEVEL_WARNING,
+ NIR_SPIRV_DEBUG_LEVEL_ERROR,
+};
+
+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;
+
+ struct {
+ void (*func)(void *private_data,
+ enum nir_spirv_debug_level level,
+ size_t spirv_offset,
+ const char *message);
+ void *private_data;
+ } debug;
};
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
}