gpu: Check shader format support in PrepareDriver

This commit is contained in:
Ethan Lee
2025-05-19 08:56:29 -04:00
committed by Sam Lantinga
parent 8289656a4e
commit 510126ee63
5 changed files with 37 additions and 32 deletions

View File

@@ -11605,6 +11605,10 @@ static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this, SDL_PropertiesID props)
VulkanRenderer *renderer;
bool result = false;
if (!SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN, false)) {
return false;
}
if (_this->Vulkan_CreateSurface == NULL) {
return false;
}
@@ -11987,7 +11991,6 @@ static SDL_GPUDevice *VULKAN_CreateDevice(bool debugMode, bool preferLowPower, S
SDL_GPUBootstrap VulkanDriver = {
"vulkan",
SDL_GPU_SHADERFORMAT_SPIRV,
VULKAN_PrepareDriver,
VULKAN_CreateDevice
};