mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-03 08:28:29 +00:00
Fixed Vulkan validation error
VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782(ERROR / SPEC): msgNum: -316906200 - Validation Error: [ VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782 ] | MessageID = 0xed1c6528 | vkCreateGraphicsPipelines(): pCreateInfos[0].pRasterizationState->depthClampEnable is VK_TRUE, but the depthClamp feature was not enabled. The Vulkan spec states: If the depthClamp feature is not enabled, depthClampEnable must be VK_FALSE (https://vulkan.lunarg.com/doc/view/1.3.268.0/windows/1.3-extensions/vkspec.html#VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782)
This commit is contained in:
@@ -6384,7 +6384,11 @@ static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
|
||||
rasterizationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
|
||||
rasterizationStateCreateInfo.pNext = NULL;
|
||||
rasterizationStateCreateInfo.flags = 0;
|
||||
rasterizationStateCreateInfo.depthClampEnable = !createinfo->rasterizer_state.enable_depth_clip;
|
||||
if (renderer->desiredDeviceFeatures.depthClamp) {
|
||||
rasterizationStateCreateInfo.depthClampEnable = !createinfo->rasterizer_state.enable_depth_clip;
|
||||
} else {
|
||||
rasterizationStateCreateInfo.depthClampEnable = VK_FALSE;
|
||||
}
|
||||
rasterizationStateCreateInfo.rasterizerDiscardEnable = VK_FALSE;
|
||||
rasterizationStateCreateInfo.polygonMode = SDLToVK_PolygonMode(
|
||||
renderer,
|
||||
|
Reference in New Issue
Block a user