Skip to content

Commit 360682f

Browse files
TheSpydogflibitijibibo
authored andcommitted
Remove depthBoundsTestEnable / minDepthBounds / maxDepthBounds (#49)
1 parent 0059270 commit 360682f

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

include/SDL3/SDL_gpu.h

-3
Original file line numberDiff line numberDiff line change
@@ -583,15 +583,12 @@ typedef struct SDL_GpuDepthStencilState
583583
SDL_bool depthTestEnable;
584584
SDL_bool depthWriteEnable;
585585
SDL_GpuCompareOp compareOp;
586-
SDL_bool depthBoundsTestEnable;
587586
SDL_bool stencilTestEnable;
588587
SDL_GpuStencilOpState backStencilState;
589588
SDL_GpuStencilOpState frontStencilState;
590589
Uint32 compareMask;
591590
Uint32 writeMask;
592591
Uint32 reference;
593-
float minDepthBounds;
594-
float maxDepthBounds;
595592
} SDL_GpuDepthStencilState;
596593

597594
typedef struct SDL_GpuColorAttachmentDescription

src/gpu/d3d11/SDL_gpu_d3d11.c

-4
Original file line numberDiff line numberDiff line change
@@ -1349,10 +1349,6 @@ static ID3D11DepthStencilState *D3D11_INTERNAL_FetchDepthStencilState(
13491349
dsDesc.StencilReadMask = depthStencilState.compareMask;
13501350
dsDesc.StencilWriteMask = depthStencilState.writeMask;
13511351

1352-
if (depthStencilState.depthBoundsTestEnable) {
1353-
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "D3D11 does not support Depth Bounds tests!");
1354-
}
1355-
13561352
res = ID3D11Device_CreateDepthStencilState(
13571353
renderer->device,
13581354
&dsDesc,

src/gpu/metal/SDL_gpu_metal.m

-1
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,6 @@ static void METAL_ReleaseGraphicsPipeline(
935935

936936
/* Depth Stencil */
937937

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

src/gpu/vulkan/SDL_gpu_vulkan.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -6359,16 +6359,13 @@ static SDL_GpuGraphicsPipeline *VULKAN_CreateGraphicsPipeline(
63596359
depthStencilStateCreateInfo.depthWriteEnable =
63606360
pipelineCreateInfo->depthStencilState.depthWriteEnable;
63616361
depthStencilStateCreateInfo.depthCompareOp = SDLToVK_CompareOp[pipelineCreateInfo->depthStencilState.compareOp];
6362-
depthStencilStateCreateInfo.depthBoundsTestEnable =
6363-
pipelineCreateInfo->depthStencilState.depthBoundsTestEnable;
6362+
depthStencilStateCreateInfo.depthBoundsTestEnable = VK_FALSE;
63646363
depthStencilStateCreateInfo.stencilTestEnable =
63656364
pipelineCreateInfo->depthStencilState.stencilTestEnable;
63666365
depthStencilStateCreateInfo.front = frontStencilState;
63676366
depthStencilStateCreateInfo.back = backStencilState;
6368-
depthStencilStateCreateInfo.minDepthBounds =
6369-
pipelineCreateInfo->depthStencilState.minDepthBounds;
6370-
depthStencilStateCreateInfo.maxDepthBounds =
6371-
pipelineCreateInfo->depthStencilState.maxDepthBounds;
6367+
depthStencilStateCreateInfo.minDepthBounds = 0; /* unused */
6368+
depthStencilStateCreateInfo.maxDepthBounds = 0; /* unused */
63726369

63736370
/* Color Blend */
63746371

0 commit comments

Comments
 (0)