X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Famd%2Fvulkan%2Fradv_shader.h;h=f6486863f88b0a973d1898982034aa69d76d1ff2;hb=258ebe79a0c2133e362035b76f3cf3243880926f;hp=952594a18e08de49db23189910923234cf016bdd;hpb=ce03c119ce00f2341930d1fa8d26a43019a124e8;p=mesa.git diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 952594a18e0..f6486863f88 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -28,6 +28,7 @@ #ifndef RADV_SHADER_H #define RADV_SHADER_H +#include "radv_debug.h" #include "radv_private.h" #include "nir/nir.h" @@ -103,10 +104,6 @@ void radv_shader_variant_destroy(struct radv_device *device, struct radv_shader_variant *variant); -uint32_t -radv_shader_stage_to_user_data_0(gl_shader_stage stage, bool has_gs, - bool has_tess); - const char * radv_get_shader_name(struct radv_shader_variant *var, gl_shader_stage stage); @@ -116,4 +113,13 @@ radv_shader_dump_stats(struct radv_device *device, gl_shader_stage stage, FILE *file); +static inline bool +radv_can_dump_shader(struct radv_device *device, + struct radv_shader_module *module) +{ + /* Only dump non-meta shaders, useful for debugging purposes. */ + return device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS && + module && !module->nir; +} + #endif