Skip to content

Commit 39a8c84

Browse files
Clean up various type warning in DX12 and Vulkan.
1 parent 928c24d commit 39a8c84

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

DirectX12/PlatformStructuredBuffer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ void PlatformStructuredBuffer::RestoreDeviceObjects(crossplatform::RenderPlatfor
139139
srvDesc.Buffer.Flags = D3D12_BUFFER_SRV_FLAG_NONE;
140140

141141
mSrvViews.resize(mMaxApplyMod);
142-
for (int v = 0; v < mMaxApplyMod; v++)
142+
for (uint32_t v = 0; v < mMaxApplyMod; v++)
143143
{
144144
srvDesc.Buffer.FirstElement = v * mNumElements;
145145

@@ -161,7 +161,7 @@ void PlatformStructuredBuffer::RestoreDeviceObjects(crossplatform::RenderPlatfor
161161
uavDesc.Buffer.Flags = D3D12_BUFFER_UAV_FLAG_NONE;
162162

163163
mUavViews.resize(mMaxApplyMod);
164-
for (int v = 0; v < mMaxApplyMod; v++)
164+
for (uint32_t v = 0; v < mMaxApplyMod; v++)
165165
{
166166
uavDesc.Buffer.FirstElement = v * mNumElements;
167167

@@ -370,7 +370,7 @@ void PlatformStructuredBuffer::UpdateBuffer(platform::crossplatform::DeviceConte
370370

371371
// First update the UPLOAD buffer at the apply offset:
372372
UINT8* pBuffer = nullptr;
373-
UINT curOff = mCurApplies * mUnitSize;
373+
UINT64 curOff = mCurApplies * mUnitSize;
374374
const CD3DX12_RANGE readRange(0, 0);
375375
HRESULT res = mUploadBuffer->Map(0, &readRange, (void**)&pBuffer);
376376
if (res != S_OK)

Vulkan/Texture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,9 +1244,9 @@ void Texture::Reallocate(crossplatform::GraphicsDeviceContext& deviceContext, co
12441244
vk::ImageLayout srcLayout = mCurrentImageLayout;
12451245

12461246
int w=width,h=length;
1247-
for (uint32_t mip = 0; mip < mips; mip++)
1247+
for (uint32_t mip = 0; mip < static_cast<uint32_t>(mips); mip++)
12481248
{
1249-
for (uint32_t layer = 0; layer < arraySize; layer++)
1249+
for (uint32_t layer = 0; layer < static_cast<uint32_t>(arraySize); layer++)
12501250
{
12511251
if (mip >= mLoadedTextures.size())
12521252
continue;

0 commit comments

Comments
 (0)