diff --git a/src/broadcom/common/v3d_debug.c b/src/broadcom/common/v3d_debug.c index 3079fbf4460..c6de4891fdf 100644 --- a/src/broadcom/common/v3d_debug.c +++ b/src/broadcom/common/v3d_debug.c @@ -117,3 +117,9 @@ 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(); +} diff --git a/src/broadcom/common/v3d_debug.h b/src/broadcom/common/v3d_debug.h index 4a6ae0983b6..c8822439845 100644 --- a/src/broadcom/common/v3d_debug.h +++ b/src/broadcom/common/v3d_debug.h @@ -90,6 +90,8 @@ 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 diff --git a/src/broadcom/vulkan/v3dv_device.c b/src/broadcom/vulkan/v3dv_device.c index 88619ea3387..6681ba32b4e 100644 --- a/src/broadcom/vulkan/v3dv_device.c +++ b/src/broadcom/vulkan/v3dv_device.c @@ -225,6 +225,8 @@ 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 */ diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index fa0d5c398cc..6c2b2bf6f84 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -889,6 +889,8 @@ 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); diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index e3cc3875e64..840358d1873 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -588,6 +588,8 @@ vc4_screen_create(int fd, struct renderonly *ro) vc4_fence_screen_init(screen); + debug_get_option_vc4_debug(); + #ifdef USE_VC4_SIMULATOR vc4_simulator_init(screen); #endif