From 18492057331522eedfa5e53781665a4755ac3f81 Mon Sep 17 00:00:00 2001
From: Daniel Ludwig <[EMAIL REDACTED]>
Date: Sat, 7 Sep 2024 10:14:02 +0200
Subject: [PATCH] Fix GDK builds after renames done in #10730
---
src/gpu/d3d12/SDL_gpu_d3d12.c | 14 +++++++-------
src/gpu/vulkan/SDL_gpu_vulkan.c | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c
index 385d749e1b2bf..354c7c95a670e 100644
--- a/src/gpu/d3d12/SDL_gpu_d3d12.c
+++ b/src/gpu/d3d12/SDL_gpu_d3d12.c
@@ -3038,7 +3038,7 @@ static D3D12Buffer *D3D12_INTERNAL_CreateBuffer(
resourceFlags |= D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS;
}
#if (defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES))
- if (usage & SDL_GPU_BUFFERUSAGE_INDIRECT) {
+ if (usageFlags & SDL_GPU_BUFFERUSAGE_INDIRECT) {
resourceFlags |= D3D12XBOX_RESOURCE_FLAG_ALLOW_INDIRECT_BUFFER;
}
#endif
@@ -5828,8 +5828,8 @@ static bool D3D12_SupportsSwapchainComposition(
{
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
// FIXME: HDR support would be nice to add, but it seems complicated...
- return swapchain_composition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR ||
- swapchain_composition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR;
+ return swapchainComposition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR ||
+ swapchainComposition == SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR;
#else
D3D12Renderer *renderer = (D3D12Renderer *)driverData;
DXGI_FORMAT format;
@@ -5937,7 +5937,7 @@ static bool D3D12_INTERNAL_CreateSwapchain(
// Initialize the swapchain data
windowData->present_mode = present_mode;
- windowData->swapchain_composition = swapchain_composition;
+ windowData->swapchainComposition = swapchain_composition;
windowData->swapchainColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
windowData->frameCounter = 0;
windowData->swapchainWidth = width;
@@ -5999,7 +5999,7 @@ static bool D3D12_INTERNAL_ResizeSwapchainIfNeeded(
D3D12_INTERNAL_CreateSwapchain(
renderer,
windowData,
- windowData->swapchain_composition,
+ windowData->swapchainComposition,
windowData->present_mode);
}
@@ -7525,7 +7525,7 @@ static void D3D12_INTERNAL_InitBlitResources(
}
}
-static bool D3D12_PrepareDriver(SDL_VideoDevice *this)
+static bool D3D12_PrepareDriver(SDL_VideoDevice *_this)
{
#if defined(SDL_PLATFORM_XBOXONE) || defined(SDL_PLATFORM_XBOXSERIES)
return true;
@@ -7922,7 +7922,7 @@ static SDL_GPUDevice *D3D12_CreateDevice(bool debugMode, bool preferLowPower, SD
#if defined(SDL_PLATFORM_XBOXSERIES)
createDeviceParams.DisableDXR = TRUE;
#endif
- if (debug_mode) {
+ if (debugMode) {
createDeviceParams.ProcessDebugFlags = D3D12XBOX_PROCESS_DEBUG_FLAG_DEBUG;
}
diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c
index 6b13e82a6f2a4..1dd4ab0cc5ffa 100644
--- a/src/gpu/vulkan/SDL_gpu_vulkan.c
+++ b/src/gpu/vulkan/SDL_gpu_vulkan.c
@@ -4461,17 +4461,17 @@ static bool VULKAN_INTERNAL_CreateSwapchain(
bool hasValidSwapchainComposition, hasValidPresentMode;
Sint32 drawableWidth, drawableHeight;
Uint32 i;
- SDL_VideoDevice *this = SDL_GetVideoDevice();
+ SDL_VideoDevice *_this = SDL_GetVideoDevice();
- SDL_assert(this && this->Vulkan_CreateSurface);
+ SDL_assert(_this && _this->Vulkan_CreateSurface);
swapchainData = SDL_malloc(sizeof(VulkanSwapchainData));
swapchainData->frameCounter = 0;
// Each swapchain must have its own surface.
- if (!this->Vulkan_CreateSurface(
- this,
+ if (!_this->Vulkan_CreateSurface(
+ _this,
windowData->window,
renderer->instance,
NULL, // FIXME: VAllocationCallbacks
@@ -11629,13 +11629,13 @@ static bool VULKAN_INTERNAL_PrepareVulkan(
return true;
}
-static bool VULKAN_PrepareDriver(SDL_VideoDevice *this)
+static bool VULKAN_PrepareDriver(SDL_VideoDevice *_this)
{
// Set up dummy VulkanRenderer
VulkanRenderer *renderer;
Uint8 result;
- if (this->Vulkan_CreateSurface == NULL) {
+ if (_this->Vulkan_CreateSurface == NULL) {
return false;
}