mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 20:09:38 +08:00
Add missing type suffix to SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION prop
This commit is contained in:
@@ -2309,7 +2309,7 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
|
|||||||
*
|
*
|
||||||
* With the Vulkan backend:
|
* With the Vulkan backend:
|
||||||
*
|
*
|
||||||
* - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION`: By
|
* - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN`: By
|
||||||
* default, Vulkan device enumeration includes drivers of all types, including
|
* default, Vulkan device enumeration includes drivers of all types, including
|
||||||
* software renderers (for example, the Lavapipe Mesa driver). This can be
|
* software renderers (for example, the Lavapipe Mesa driver). This can be
|
||||||
* useful if your application _requires_ SDL_GPU, but if you can provide your
|
* useful if your application _requires_ SDL_GPU, but if you can provide your
|
||||||
@@ -2346,7 +2346,7 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
|
|||||||
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
|
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
|
||||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
|
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
|
||||||
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
|
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
|
||||||
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
|
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN "SDL.gpu.device.create.vulkan.requirehardwareacceleration"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys a GPU context previously returned by SDL_CreateGPUDevice.
|
* Destroys a GPU context previously returned by SDL_CreateGPUDevice.
|
||||||
|
|||||||
@@ -11828,7 +11828,7 @@ static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this, SDL_PropertiesID props)
|
|||||||
renderer->desiredDeviceFeatures.sampleRateShading = VK_TRUE;
|
renderer->desiredDeviceFeatures.sampleRateShading = VK_TRUE;
|
||||||
renderer->desiredDeviceFeatures.imageCubeArray = VK_TRUE;
|
renderer->desiredDeviceFeatures.imageCubeArray = VK_TRUE;
|
||||||
|
|
||||||
renderer->requireHardwareAcceleration = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION, false);
|
renderer->requireHardwareAcceleration = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN, false);
|
||||||
|
|
||||||
result = VULKAN_INTERNAL_PrepareVulkan(renderer);
|
result = VULKAN_INTERNAL_PrepareVulkan(renderer);
|
||||||
if (result) {
|
if (result) {
|
||||||
@@ -11879,7 +11879,7 @@ static SDL_GPUDevice *VULKAN_CreateDevice(bool debugMode, bool preferLowPower, S
|
|||||||
renderer->desiredDeviceFeatures.sampleRateShading = VK_TRUE;
|
renderer->desiredDeviceFeatures.sampleRateShading = VK_TRUE;
|
||||||
renderer->desiredDeviceFeatures.imageCubeArray = VK_TRUE;
|
renderer->desiredDeviceFeatures.imageCubeArray = VK_TRUE;
|
||||||
|
|
||||||
renderer->requireHardwareAcceleration = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION, false);
|
renderer->requireHardwareAcceleration = SDL_GetBooleanProperty(props, SDL_PROP_GPU_DEVICE_CREATE_VULKAN_REQUIRE_HARDWARE_ACCELERATION_BOOLEAN, false);
|
||||||
|
|
||||||
if (!VULKAN_INTERNAL_PrepareVulkan(renderer)) {
|
if (!VULKAN_INTERNAL_PrepareVulkan(renderer)) {
|
||||||
SET_STRING_ERROR("Failed to initialize Vulkan!");
|
SET_STRING_ERROR("Failed to initialize Vulkan!");
|
||||||
|
|||||||
Reference in New Issue
Block a user