Skip to content

Commit

Permalink
Remove depthBoundsTestEnable / minDepthBounds / maxDepthBounds (thatc…
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSpydog authored and flibitijibibo committed Jul 13, 2024
1 parent 9246c79 commit 281688f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
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

0 comments on commit 281688f

Please sign in to comment.