mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +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:
parent
524ba0a4ad
commit
b82b1f416f
1 changed files with 5 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue