Skip to content

Commit

Permalink
disable OpenXR by default for now until CMake shenanigans are cleared up
Browse files Browse the repository at this point in the history
  • Loading branch information
Beyley committed Dec 17, 2024
1 parent 0af1e05 commit 5623fc0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors
set_option(SDL_CCACHE "Use Ccache to speed up build" OFF)
set_option(SDL_CLANG_TIDY "Run clang-tidy static analysis" OFF)
set_option(SDL_GPU_DXVK "Build SDL_GPU with DXVK support" OFF)
set_option(SDL_GPU_OPENXR "Build SDL_GPU with OpenXR support" ON)
set_option(SDL_GPU_OPENXR "Build SDL_GPU with OpenXR support" OFF)

set(SDL_VENDOR_INFO "" CACHE STRING "Vendor name and/or version to add to SDL_REVISION")

Expand Down
22 changes: 11 additions & 11 deletions src/gpu/vulkan/SDL_gpu_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -11303,7 +11303,7 @@ static Uint8 VULKAN_INTERNAL_CreateXRInstance(VulkanRenderer *renderer, XrVersio
&renderer->supportsDebugUtils,
&renderer->supportsColorspace)) {
SDL_stack_free((char *)instanceExtensionNames);
SET_STRING_ERROR_AND_RETURN("Required Vulkan instance extensions not supported", false)
SET_STRING_ERROR_AND_RETURN("Required Vulkan instance extensions not supported", false);
}

if (renderer->supportsDebugUtils) {
Expand Down Expand Up @@ -11364,7 +11364,7 @@ static Uint8 VULKAN_INTERNAL_CreateXRInstance(VulkanRenderer *renderer, XrVersio
SDL_stack_free((char *)instanceExtensionNames);

if (vulkanResult != VK_SUCCESS) {
CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateInstance, 0)
CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateInstance, 0);
}

return 1;
Expand Down Expand Up @@ -11904,7 +11904,7 @@ static Uint8 VULKAN_INTERNAL_CreateXRLogicalDevice(
}

SDL_stack_free((void *)deviceExtensions);
CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateDevice, 0)
CHECK_VULKAN_ERROR_AND_RETURN(vulkanResult, vkCreateDevice, 0);

// Load vkDevice entry points

Expand Down Expand Up @@ -12269,7 +12269,7 @@ static bool VULKAN_CreateXRDevice(SDL_GPUDevice **gpu_device, XrInstance *xrInst
SDL_Vulkan_UnloadLibrary();
SDL_OPENXR_UnloadLoaderSymbols();
SDL_free(renderer->xr);
SET_STRING_ERROR_AND_RETURN("Failed to initialize Vulkan!", false)
SET_STRING_ERROR_AND_RETURN("Failed to initialize Vulkan!", false);
}

SDL_LogInfo(SDL_LOG_CATEGORY_GPU, "SDL_GPU Driver: Vulkan");
Expand Down Expand Up @@ -12299,7 +12299,7 @@ static bool VULKAN_CreateXRDevice(SDL_GPUDevice **gpu_device, XrInstance *xrInst
SDL_Vulkan_UnloadLibrary();
SDL_OPENXR_UnloadLoaderSymbols();
SDL_free(renderer->xr);
SET_STRING_ERROR_AND_RETURN("Failed to create logical device!", false)
SET_STRING_ERROR_AND_RETURN("Failed to create logical device!", false);
}

// FIXME: just move this into this function
Expand Down Expand Up @@ -12381,47 +12381,47 @@ static bool VULKAN_CreateXRDevice(SDL_GPUDevice **gpu_device, XrInstance *xrInst
VULKAN_INTERNAL_CommandPoolHashFunction,
VULKAN_INTERNAL_CommandPoolHashKeyMatch,
VULKAN_INTERNAL_CommandPoolHashNuke,
false);
false, false);

renderer->renderPassHashTable = SDL_CreateHashTable(
(void *)renderer,
64,
VULKAN_INTERNAL_RenderPassHashFunction,
VULKAN_INTERNAL_RenderPassHashKeyMatch,
VULKAN_INTERNAL_RenderPassHashNuke,
false);
false, false);

renderer->framebufferHashTable = SDL_CreateHashTable(
(void *)renderer,
64,
VULKAN_INTERNAL_FramebufferHashFunction,
VULKAN_INTERNAL_FramebufferHashKeyMatch,
VULKAN_INTERNAL_FramebufferHashNuke,
false);
false, false);

renderer->graphicsPipelineResourceLayoutHashTable = SDL_CreateHashTable(
(void *)renderer,
64,
VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashFunction,
VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashKeyMatch,
VULKAN_INTERNAL_GraphicsPipelineResourceLayoutHashNuke,
false);
false, false);

renderer->computePipelineResourceLayoutHashTable = SDL_CreateHashTable(
(void *)renderer,
64,
VULKAN_INTERNAL_ComputePipelineResourceLayoutHashFunction,
VULKAN_INTERNAL_ComputePipelineResourceLayoutHashKeyMatch,
VULKAN_INTERNAL_ComputePipelineResourceLayoutHashNuke,
false);
false, false);

renderer->descriptorSetLayoutHashTable = SDL_CreateHashTable(
(void *)renderer,
64,
VULKAN_INTERNAL_DescriptorSetLayoutHashFunction,
VULKAN_INTERNAL_DescriptorSetLayoutHashKeyMatch,
VULKAN_INTERNAL_DescriptorSetLayoutHashNuke,
false);
false, false);

// Initialize fence pool

Expand Down

0 comments on commit 5623fc0

Please sign in to comment.