Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove depth bounds test #49

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions include/SDL3/SDL_gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -583,15 +583,12 @@ typedef struct SDL_GpuDepthStencilState
SDL_bool depthTestEnable;
SDL_bool depthWriteEnable;
SDL_GpuCompareOp compareOp;
SDL_bool depthBoundsTestEnable;
SDL_bool stencilTestEnable;
SDL_GpuStencilOpState backStencilState;
SDL_GpuStencilOpState frontStencilState;
Uint32 compareMask;
Uint32 writeMask;
Uint32 reference;
float minDepthBounds;
float maxDepthBounds;
} SDL_GpuDepthStencilState;

typedef struct SDL_GpuColorAttachmentDescription
Expand Down
4 changes: 0 additions & 4 deletions src/gpu/d3d11/SDL_gpu_d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,10 +1349,6 @@ static ID3D11DepthStencilState *D3D11_INTERNAL_FetchDepthStencilState(
dsDesc.StencilReadMask = depthStencilState.compareMask;
dsDesc.StencilWriteMask = depthStencilState.writeMask;

if (depthStencilState.depthBoundsTestEnable) {
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "D3D11 does not support Depth Bounds tests!");
}

res = ID3D11Device_CreateDepthStencilState(
renderer->device,
&dsDesc,
Expand Down
1 change: 0 additions & 1 deletion src/gpu/metal/SDL_gpu_metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ static void METAL_ReleaseGraphicsPipeline(

/* Depth Stencil */

/* FIXME: depth min/max? */
if (pipelineCreateInfo->attachmentInfo.hasDepthStencilAttachment) {
pipelineDescriptor.depthAttachmentPixelFormat = SDLToMetal_SurfaceFormat[pipelineCreateInfo->attachmentInfo.depthStencilFormat];

Expand Down
9 changes: 3 additions & 6 deletions src/gpu/vulkan/SDL_gpu_vulkan.c
Original file line number Diff line number Diff line change
Expand Up @@ -6359,16 +6359,13 @@ static SDL_GpuGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
depthStencilStateCreateInfo.depthWriteEnable =
pipelineCreateInfo->depthStencilState.depthWriteEnable;
depthStencilStateCreateInfo.depthCompareOp = SDLToVK_CompareOp[pipelineCreateInfo->depthStencilState.compareOp];
depthStencilStateCreateInfo.depthBoundsTestEnable =
pipelineCreateInfo->depthStencilState.depthBoundsTestEnable;
depthStencilStateCreateInfo.depthBoundsTestEnable = VK_FALSE;
depthStencilStateCreateInfo.stencilTestEnable =
pipelineCreateInfo->depthStencilState.stencilTestEnable;
depthStencilStateCreateInfo.front = frontStencilState;
depthStencilStateCreateInfo.back = backStencilState;
depthStencilStateCreateInfo.minDepthBounds =
pipelineCreateInfo->depthStencilState.minDepthBounds;
depthStencilStateCreateInfo.maxDepthBounds =
pipelineCreateInfo->depthStencilState.maxDepthBounds;
depthStencilStateCreateInfo.minDepthBounds = 0; /* unused */
depthStencilStateCreateInfo.maxDepthBounds = 0; /* unused */

/* Color Blend */

Expand Down
Loading