Skip to content

Commit 96b5c92

Browse files
committed
render: D3D12 Xbox does not have COMPARISON_FUNC_NONE yet
1 parent b74ba62 commit 96b5c92

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/render/direct3d12/SDL_render_d3d12.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,7 +2877,15 @@ static D3D12_CPU_DESCRIPTOR_HANDLE *D3D12_GetSamplerState(D3D12_RenderData *data
28772877
samplerDesc.AddressW = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
28782878
samplerDesc.MipLODBias = 0.0f;
28792879
samplerDesc.MaxAnisotropy = 1;
2880+
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
2881+
// FIXME: Xbox doesn't support FUNC_NONE as of the October 2025 GDK, but
2882+
// at the same time it fixes validation issues on Windows. It's probably
2883+
// the more appropriate value, so get rid of this when GDK catches up.
2884+
// -flibit
2885+
samplerDesc.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
2886+
#else
28802887
samplerDesc.ComparisonFunc = D3D12_COMPARISON_FUNC_NONE;
2888+
#endif
28812889
samplerDesc.MinLOD = 0.0f;
28822890
samplerDesc.MaxLOD = D3D12_FLOAT32_MAX;
28832891
switch (scale_mode) {

0 commit comments

Comments
 (0)