X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Famd%2Fvulkan%2Fradv_shader.h;h=59497891ffd219912317fea5a3fec8a33e5c1c99;hb=HEAD;hp=adf5620ef23f8e2ac79bf7554889e5b624ae2321;hpb=f038b3a136175c0afcc6545b886238a7b5dcf515;p=mesa.git diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index adf5620ef23..59497891ffd 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -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) {