vc4/v3d: stop adding NORAST when SHADERDB debug option is used
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 28 Jul 2022 11:39:56 +0000 (13:39 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 29 Jul 2022 18:29:34 +0000 (18:29 +0000)
Right now if we use the option SHADERDB, NORAST is added
automatically. There's no comment justifying it, neither a lot of info
on the commits that added that. But I guess that the purpose is that
SHADERDB option is assumed to be used only to gather shader-db stats,
so setting setting NORAST would allow to get those dumps faster.

But adding debug options automatically can be confusing, as we could
get a behaviour that we were not expecting. At least I needed to check
why using SHADERDB was getting a black screen. And if we want to get
this behaviour, we can easily add manually the NORAST.

Finally, v3dv doesn't support NORAST right now (and we don't have
immediate plans to implement it), so it is somewhat inconsistent to
get different behaviour from the same debug option from the two
drivers.

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17788>

src/broadcom/common/v3d_debug.c
src/broadcom/common/v3d_debug.h
src/broadcom/vulkan/v3dv_device.c
src/gallium/drivers/v3d/v3d_screen.c
src/gallium/drivers/vc4/vc4_screen.c

index 09a5aa9..3079fbf 100644 (file)
@@ -117,12 +117,3 @@ v3d_debug_flag_for_shader_stage(gl_shader_stage stage)
         STATIC_ASSERT(MESA_SHADER_STAGES == 6);
         return flags[stage];
 }
-
-void
-v3d_process_debug_variable(void)
-{
-        V3D_DEBUG = debug_get_option_v3d_debug();
-
-        if (V3D_DEBUG & V3D_DEBUG_SHADERDB)
-                V3D_DEBUG |= V3D_DEBUG_NORAST;
-}
index c882243..4a6ae09 100644 (file)
@@ -90,8 +90,6 @@ extern uint32_t V3D_DEBUG;
 
 extern uint32_t v3d_debug_flag_for_shader_stage(gl_shader_stage stage);
 
-extern void v3d_process_debug_variable(void);
-
 #ifdef __cplusplus
 }
 #endif
index 6681ba3..88619ea 100644 (file)
@@ -225,8 +225,6 @@ v3dv_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
       return vk_error(NULL, result);
    }
 
-   v3d_process_debug_variable();
-
    instance->physicalDeviceCount = -1;
 
    /* We start with the default values for the pipeline_cache envvars */
index 6c2b2bf..fa0d5c3 100644 (file)
@@ -889,8 +889,6 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config,
 
         v3d_fence_init(screen);
 
-        v3d_process_debug_variable();
-
         v3d_resource_screen_init(pscreen);
 
         screen->compiler = v3d_compiler_init(&screen->devinfo, 0);
index 71ec213..e3cc387 100644 (file)
@@ -588,10 +588,6 @@ vc4_screen_create(int fd, struct renderonly *ro)
 
         vc4_fence_screen_init(screen);
 
-        vc4_debug = debug_get_option_vc4_debug();
-        if (vc4_debug & VC4_DEBUG_SHADERDB)
-                vc4_debug |= VC4_DEBUG_NORAST;
-
 #ifdef USE_VC4_SIMULATOR
         vc4_simulator_init(screen);
 #endif