From 5d9ccb629689ccd2cfec3374a84dc5d165fee246 Mon Sep 17 00:00:00 2001
From: Ethan Lee <[EMAIL REDACTED]>
Date: Fri, 20 Dec 2024 00:56:48 -0500
Subject: [PATCH] gpu: Add explicit casts to D3D12 staging descriptor changes
---
src/gpu/d3d12/SDL_gpu_d3d12.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gpu/d3d12/SDL_gpu_d3d12.c b/src/gpu/d3d12/SDL_gpu_d3d12.c
index 1767a22d283db..9ab90010cd863 100644
--- a/src/gpu/d3d12/SDL_gpu_d3d12.c
+++ b/src/gpu/d3d12/SDL_gpu_d3d12.c
@@ -2007,15 +2007,15 @@ static D3D12StagingDescriptorPool *D3D12_INTERNAL_CreateStagingDescriptorPool(
return NULL;
}
- D3D12StagingDescriptorPool *pool = SDL_calloc(1, sizeof(D3D12StagingDescriptorPool));
+ D3D12StagingDescriptorPool *pool = (D3D12StagingDescriptorPool*) SDL_calloc(1, sizeof(D3D12StagingDescriptorPool));
pool->heapCount = 1;
- pool->heaps = SDL_malloc(sizeof(D3D12DescriptorHeap*));
+ pool->heaps = (D3D12DescriptorHeap**) SDL_malloc(sizeof(D3D12DescriptorHeap*));
pool->heaps[0] = heap;
pool->freeDescriptorCapacity = STAGING_HEAP_DESCRIPTOR_COUNT;
pool->freeDescriptorCount = STAGING_HEAP_DESCRIPTOR_COUNT;
- pool->freeDescriptors = SDL_malloc(STAGING_HEAP_DESCRIPTOR_COUNT * sizeof(D3D12StagingDescriptor));
+ pool->freeDescriptors = (D3D12StagingDescriptor*) SDL_malloc(STAGING_HEAP_DESCRIPTOR_COUNT * sizeof(D3D12StagingDescriptor));
for (Uint32 i = 0; i < STAGING_HEAP_DESCRIPTOR_COUNT; i += 1) {
pool->freeDescriptors[i].pool = pool;
@@ -2045,12 +2045,12 @@ static bool D3D12_INTERNAL_ExpandStagingDescriptorPool(
}
pool->heapCount += 1;
- pool->heaps = SDL_realloc(pool->heaps, pool->heapCount * sizeof(D3D12DescriptorHeap*));
+ pool->heaps = (D3D12DescriptorHeap**) SDL_realloc(pool->heaps, pool->heapCount * sizeof(D3D12DescriptorHeap*));
pool->heaps[pool->heapCount - 1] = heap;
pool->freeDescriptorCapacity += STAGING_HEAP_DESCRIPTOR_COUNT;
pool->freeDescriptorCount += STAGING_HEAP_DESCRIPTOR_COUNT;
- pool->freeDescriptors = SDL_realloc(pool->freeDescriptors, pool->freeDescriptorCapacity * sizeof(D3D12StagingDescriptor));
+ pool->freeDescriptors = (D3D12StagingDescriptor*) SDL_realloc(pool->freeDescriptors, pool->freeDescriptorCapacity * sizeof(D3D12StagingDescriptor));
for (Uint32 i = 0; i < STAGING_HEAP_DESCRIPTOR_COUNT; i += 1) {
pool->freeDescriptors[i].pool = pool;