mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-27 21:48:29 +00:00
gpu: Check shader format support in PrepareDriver
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
Reference in New Issue
Block a user