mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-24 00:06:10 +00:00
Use consistent style for pointer declarations and casts
This commit is contained in:
@@ -1210,7 +1210,7 @@ static ID3D12CommandQueue *s_CommandQueue;
|
||||
|
||||
#if defined(SDL_PLATFORM_XBOXONE)
|
||||
// These are not defined in d3d12_x.h.
|
||||
typedef HRESULT (D3DAPI* PFN_D3D12_XBOX_CREATE_DEVICE)(_In_opt_ IGraphicsUnknown*, _In_ const D3D12XBOX_CREATE_DEVICE_PARAMETERS*, _In_ REFIID, _Outptr_opt_ void**);
|
||||
typedef HRESULT (D3DAPI* PFN_D3D12_XBOX_CREATE_DEVICE)(_In_opt_ IGraphicsUnknown *, _In_ const D3D12XBOX_CREATE_DEVICE_PARAMETERS*, _In_ REFIID, _Outptr_opt_ void **);
|
||||
#define D3D12_STANDARD_MULTISAMPLE_PATTERN DXGI_STANDARD_MULTISAMPLE_QUALITY_PATTERN
|
||||
#endif
|
||||
|
||||
@@ -2212,15 +2212,15 @@ static D3D12StagingDescriptorPool *D3D12_INTERNAL_CreateStagingDescriptorPool(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
D3D12StagingDescriptorPool *pool = (D3D12StagingDescriptorPool*) SDL_calloc(1, sizeof(D3D12StagingDescriptorPool));
|
||||
D3D12StagingDescriptorPool *pool = (D3D12StagingDescriptorPool *)SDL_calloc(1, sizeof(D3D12StagingDescriptorPool));
|
||||
|
||||
pool->heapCount = 1;
|
||||
pool->heaps = (D3D12DescriptorHeap**) 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 = (D3D12StagingDescriptor*) 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;
|
||||
@@ -2250,12 +2250,12 @@ static bool D3D12_INTERNAL_ExpandStagingDescriptorPool(
|
||||
}
|
||||
|
||||
pool->heapCount += 1;
|
||||
pool->heaps = (D3D12DescriptorHeap**) 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 = (D3D12StagingDescriptor*) 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;
|
||||
@@ -7521,7 +7521,7 @@ static bool D3D12_INTERNAL_AcquireSwapchainTexture(
|
||||
1,
|
||||
&barrierDesc);
|
||||
|
||||
*swapchainTexture = (SDL_GPUTexture*)&windowData->textureContainers[swapchainIndex];
|
||||
*swapchainTexture = (SDL_GPUTexture *)&windowData->textureContainers[swapchainIndex];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -7933,7 +7933,7 @@ static bool D3D12_Submit(
|
||||
ID3D12Resource_Release(windowData->textureContainers[presentData->swapchainImageIndex].activeTexture->resource);
|
||||
#endif
|
||||
|
||||
windowData->inFlightFences[windowData->frameCounter] = (SDL_GPUFence*)d3d12CommandBuffer->inFlightFence;
|
||||
windowData->inFlightFences[windowData->frameCounter] = (SDL_GPUFence *)d3d12CommandBuffer->inFlightFence;
|
||||
(void)SDL_AtomicIncRef(&d3d12CommandBuffer->inFlightFence->referenceCount);
|
||||
windowData->frameCounter = (windowData->frameCounter + 1) % renderer->allowedFramesInFlight;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user