vc4/v3d: stop adding NORAST when SHADERDB debug option is used

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>
This commit is contained in:
Alejandro Piñeiro 2022-07-28 13:39:56 +02:00 committed by Marge Bot
parent 6929ccedff
commit 106b33405e
5 changed files with 0 additions and 19 deletions

View 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;
}

View 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

View 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 */

View 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);

View 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