diff options
author | Samuel Pitoiset <[email protected]> | 2017-11-30 22:16:09 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-12-01 11:38:26 +0100 |
commit | 921986b580d32ac0195d4ba348c408d952e7e20c (patch) | |
tree | cb901cd2ce0d7f68d6f7155921f0fcfd99dc09b1 /src/amd/vulkan/radv_shader.h | |
parent | 4e7f6437b5359fe41a48fbba510f46ac69db8653 (diff) |
radv: do not dump meta shaders with RADV_DEBUG=shaders
It's really annoying and this pollutes the output especially
when a bunch of non-meta shaders are compiled.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_shader.h')
-rw-r--r-- | src/amd/vulkan/radv_shader.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 9bdbe848c8f..91f2e7f2a12 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" @@ -112,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 !module->nir && + device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS; +} + #endif |