Skip to content

Commit cbcb145

Browse files
TheSniperFanslouken
authored andcommitted
Fix debug mode being set too late
-Early error messages were always being skipped
1 parent d635a06 commit cbcb145

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gpu/vulkan/SDL_gpu_vulkan.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11774,6 +11774,9 @@ static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this, SDL_PropertiesID props)
1177411774

1177511775
renderer = (VulkanRenderer *)SDL_calloc(1, sizeof(*renderer));
1177611776
if (renderer) {
11777+
// This needs to be set early for log filtering
11778+
renderer->debugMode = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN, false);
11779+
1177711780
// Opt out device features (higher compatibility in exchange for reduced functionality)
1177811781
renderer->desiredDeviceFeatures.samplerAnisotropy = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN, true) ? VK_TRUE : VK_FALSE;
1177911782
renderer->desiredDeviceFeatures.depthClamp = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN, true) ? VK_TRUE : VK_FALSE;

0 commit comments

Comments
 (0)