Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / amd / vulkan / radv_shader.h
index adf5620ef23f8e2ac79bf7554889e5b624ae2321..59497891ffd219912317fea5a3fec8a33e5c1c99 100644 (file)
@@ -129,6 +129,11 @@ struct radv_shader_variant_key {
        bool has_multiview_view_index;
 };
 
+enum radv_compiler_debug_level {
+       RADV_COMPILER_DEBUG_LEVEL_PERFWARN,
+       RADV_COMPILER_DEBUG_LEVEL_ERROR,
+};
+
 struct radv_nir_compiler_options {
        struct radv_pipeline_layout *layout;
        struct radv_shader_variant_key key;
@@ -143,10 +148,18 @@ struct radv_nir_compiler_options {
        bool has_ls_vgpr_init_bug;
        bool use_ngg_streamout;
        bool enable_mrt_output_nan_fixup;
+       bool disable_optimizations; /* only used by ACO */
        enum radeon_family family;
        enum chip_class chip_class;
        uint32_t tess_offchip_block_dw_size;
        uint32_t address32_hi;
+
+       struct {
+               void (*func)(void *private_data,
+                            enum radv_compiler_debug_level level,
+                            const char *message);
+               void *private_data;
+       } debug;
 };
 
 enum radv_ud_index {
@@ -467,6 +480,7 @@ radv_shader_variant_compile(struct radv_device *device,
                            const struct radv_shader_variant_key *key,
                            struct radv_shader_info *info,
                            bool keep_shader_info, bool keep_statistic_info,
+                           bool disable_optimizations,
                            struct radv_shader_binary **binary_out);
 
 struct radv_shader_variant *
@@ -474,7 +488,11 @@ radv_create_gs_copy_shader(struct radv_device *device, struct nir_shader *nir,
                           struct radv_shader_info *info,
                           struct radv_shader_binary **binary_out,
                           bool multiview,  bool keep_shader_info,
-                          bool keep_statistic_info);
+                          bool keep_statistic_info,
+                          bool disable_optimizations);
+
+struct radv_shader_variant *
+radv_create_trap_handler_shader(struct radv_device *device);
 
 void
 radv_shader_variant_destroy(struct radv_device *device,
@@ -495,12 +513,6 @@ const char *
 radv_get_shader_name(struct radv_shader_info *info,
                     gl_shader_stage stage);
 
-void
-radv_shader_dump_stats(struct radv_device *device,
-                      struct radv_shader_variant *variant,
-                      gl_shader_stage stage,
-                      FILE *file);
-
 bool
 radv_can_dump_shader(struct radv_device *device,
                     struct radv_shader_module *module,
@@ -510,6 +522,11 @@ bool
 radv_can_dump_shader_stats(struct radv_device *device,
                           struct radv_shader_module *module);
 
+VkResult
+radv_dump_shader_stats(struct radv_device *device,
+                      struct radv_pipeline *pipeline,
+                      gl_shader_stage stage, FILE *output);
+
 static inline unsigned
 shader_io_get_unique_index(gl_varying_slot slot)
 {