Skip to content

Commit 5f03cb3

Browse files
committed
d3d12: Patched to compile with GDK builds.
Fixes #12899.
1 parent 360cc27 commit 5f03cb3

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/gpu/d3d12/SDL_gpu_d3d12.c

+4-8
Original file line numberDiff line numberDiff line change
@@ -6593,9 +6593,7 @@ static void D3D12_INTERNAL_DestroySwapchain(
65936593
{
65946594
renderer->commandQueue->PresentX(0, NULL, NULL);
65956595
for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6596-
D3D12_INTERNAL_DestroyTexture(
6597-
renderer,
6598-
windowData->textureContainers[i].activeTexture);
6596+
D3D12_INTERNAL_DestroyTexture(windowData->textureContainers[i].activeTexture);
65996597
}
66006598
}
66016599

@@ -6611,9 +6609,7 @@ static bool D3D12_INTERNAL_ResizeSwapchain(
66116609

66126610
// Clean up the previous swapchain textures
66136611
for (Uint32 i = 0; i < windowData->swapchainTextureCount; i += 1) {
6614-
D3D12_INTERNAL_DestroyTexture(
6615-
renderer,
6616-
windowData->textureContainers[i].activeTexture);
6612+
D3D12_INTERNAL_DestroyTexture(windowData->textureContainers[i].activeTexture);
66176613
}
66186614

66196615
// Create a new swapchain
@@ -8673,6 +8669,7 @@ static SDL_GPUDevice *D3D12_CreateDevice(bool debugMode, bool preferLowPower, SD
86738669

86748670
renderer = (D3D12Renderer *)SDL_calloc(1, sizeof(D3D12Renderer));
86758671

8672+
bool hasDxgiDebug = false;
86768673
#if !(defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
86778674
// Load the DXGI library
86788675
renderer->dxgi_dll = SDL_LoadObject(DXGI_DLL);
@@ -8683,12 +8680,11 @@ static SDL_GPUDevice *D3D12_CreateDevice(bool debugMode, bool preferLowPower, SD
86838680

86848681
#ifdef HAVE_IDXGIINFOQUEUE
86858682
// Initialize the DXGI debug layer, if applicable
8686-
bool hasDxgiDebug = false;
86878683
if (debugMode) {
86888684
hasDxgiDebug = D3D12_INTERNAL_TryInitializeDXGIDebug(renderer);
86898685
}
86908686
#else
8691-
bool hasDxgiDebug = true;
8687+
hasDxgiDebug = true;
86928688
#endif
86938689

86948690
// Load the CreateDXGIFactory1 function

0 commit comments

Comments
 (0)