Skip to content

Commit 3ebc5f4

Browse files
committed
Fix debug mode being set too late
-Early error messages were always being skipped
1 parent bada266 commit 3ebc5f4

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
@@ -12256,6 +12256,9 @@ static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this, SDL_PropertiesID props)
1225612256

1225712257
renderer = (VulkanRenderer *)SDL_calloc(1, sizeof(*renderer));
1225812258
if (renderer) {
12259+
// This needs to be set early for log filtering
12260+
renderer->debugMode = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN, false);
12261+
1225912262
// Opt out device features (higher compatibility in exchange for reduced functionality)
1226012263
renderer->desiredVulkan10DeviceFeatures.samplerAnisotropy = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_FEATURE_ANISOTROPY_BOOLEAN, true) ? VK_TRUE : VK_FALSE;
1226112264
renderer->desiredVulkan10DeviceFeatures.depthClamp = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_FEATURE_DEPTH_CLAMPING_BOOLEAN, true) ? VK_TRUE : VK_FALSE;

0 commit comments

Comments
 (0)