mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-03 16:36:25 +00:00
Revert "Fixed Vulkan validation error"
This reverts commit b82b1f416f
.
The renderer should not be enabling depth clamping.
This commit is contained in:
@@ -6384,11 +6384,7 @@ static SDL_GPUGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
|
|||||||
rasterizationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
|
rasterizationStateCreateInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
|
||||||
rasterizationStateCreateInfo.pNext = NULL;
|
rasterizationStateCreateInfo.pNext = NULL;
|
||||||
rasterizationStateCreateInfo.flags = 0;
|
rasterizationStateCreateInfo.flags = 0;
|
||||||
if (renderer->desiredDeviceFeatures.depthClamp) {
|
rasterizationStateCreateInfo.depthClampEnable = !createinfo->rasterizer_state.enable_depth_clip;
|
||||||
rasterizationStateCreateInfo.depthClampEnable = !createinfo->rasterizer_state.enable_depth_clip;
|
|
||||||
} else {
|
|
||||||
rasterizationStateCreateInfo.depthClampEnable = VK_FALSE;
|
|
||||||
}
|
|
||||||
rasterizationStateCreateInfo.rasterizerDiscardEnable = VK_FALSE;
|
rasterizationStateCreateInfo.rasterizerDiscardEnable = VK_FALSE;
|
||||||
rasterizationStateCreateInfo.polygonMode = SDLToVK_PolygonMode(
|
rasterizationStateCreateInfo.polygonMode = SDLToVK_PolygonMode(
|
||||||
renderer,
|
renderer,
|
||||||
|
@@ -87,6 +87,7 @@ static SDL_GPUGraphicsPipeline *MakePipeline(SDL_GPUDevice *device, GPU_Shaders
|
|||||||
pci.rasterizer_state.cull_mode = SDL_GPU_CULLMODE_NONE;
|
pci.rasterizer_state.cull_mode = SDL_GPU_CULLMODE_NONE;
|
||||||
pci.rasterizer_state.fill_mode = SDL_GPU_FILLMODE_FILL;
|
pci.rasterizer_state.fill_mode = SDL_GPU_FILLMODE_FILL;
|
||||||
pci.rasterizer_state.front_face = SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE;
|
pci.rasterizer_state.front_face = SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE;
|
||||||
|
pci.rasterizer_state.enable_depth_clip = true;
|
||||||
|
|
||||||
SDL_GPUVertexBufferDescription vertex_buffer_desc;
|
SDL_GPUVertexBufferDescription vertex_buffer_desc;
|
||||||
SDL_zero(vertex_buffer_desc);
|
SDL_zero(vertex_buffer_desc);
|
||||||
|
Reference in New Issue
Block a user