Mesa (master): anv: Use intel_debug_flag_for_shader_stage()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 21 22:16:21 UTC 2020


Module: Mesa
Branch: master
Commit: 7df5d36078a8e0eeffa935a5d1a267cb431ca4db
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7df5d36078a8e0eeffa935a5d1a267cb431ca4db

Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date:   Wed Feb 19 13:55:44 2020 -0800

anv: Use intel_debug_flag_for_shader_stage()

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3911>

---

 src/intel/vulkan/anv_pipeline.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index e6958c40ce6..2dbb2eac0a7 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -87,15 +87,6 @@ void anv_DestroyShaderModule(
 
 #define SPIR_V_MAGIC_NUMBER 0x07230203
 
-static const uint64_t stage_to_debug[] = {
-   [MESA_SHADER_VERTEX] = DEBUG_VS,
-   [MESA_SHADER_TESS_CTRL] = DEBUG_TCS,
-   [MESA_SHADER_TESS_EVAL] = DEBUG_TES,
-   [MESA_SHADER_GEOMETRY] = DEBUG_GS,
-   [MESA_SHADER_FRAGMENT] = DEBUG_WM,
-   [MESA_SHADER_COMPUTE] = DEBUG_CS,
-};
-
 struct anv_spirv_debug_data {
    struct anv_device *device;
    const struct anv_shader_module *module;
@@ -240,7 +231,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
 
    free(spec_entries);
 
-   if (unlikely(INTEL_DEBUG & stage_to_debug[stage])) {
+   if (unlikely(INTEL_DEBUG & intel_debug_flag_for_shader_stage(stage))) {
       fprintf(stderr, "NIR (from SPIR-V) for %s shader:\n",
               gl_shader_stage_name(stage));
       nir_print_shader(nir, stderr);



More information about the mesa-commit mailing list