From 3359313620cd57b8404f95cfe7b07cce514eff71 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 13 Dec 2021 09:57:56 -0800 Subject: gfx: use uint32_t in draw calls and implement current size query. (#2055) * gfx: Implement remaining resource commands on D3D12. Includes: `textureBarrier`, `copyTexture`, `uploadTextureData`, `copyTextureToBuffer`, and `textureSubresourceBarrier`. * gfx: Implement `CurrentSize` query. Co-authored-by: Yong He --- tools/gfx/command-writer.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools/gfx/command-writer.h') diff --git a/tools/gfx/command-writer.h b/tools/gfx/command-writer.h index 04be1be86..208cb185a 100644 --- a/tools/gfx/command-writer.h +++ b/tools/gfx/command-writer.h @@ -195,11 +195,11 @@ public: } void setVertexBuffers( - UInt startSlot, - UInt slotCount, + uint32_t startSlot, + uint32_t slotCount, IBufferResource* const* buffers, - const UInt* strides, - const UInt* offsets) + const uint32_t* strides, + const uint32_t* offsets) { uint32_t bufferOffset = 0; for (UInt i = 0; i < slotCount; i++) @@ -208,12 +208,12 @@ public: if (i == 0) bufferOffset = offset; } - uint32_t stridesOffset = encodeData(strides, sizeof(UInt) * slotCount); - uint32_t offsetsOffset = encodeData(offsets, sizeof(UInt) * slotCount); + uint32_t stridesOffset = encodeData(strides, sizeof(uint32_t) * slotCount); + uint32_t offsetsOffset = encodeData(offsets, sizeof(uint32_t) * slotCount); m_commands.add(Command( CommandName::SetVertexBuffers, - (uint32_t)startSlot, - (uint32_t)slotCount, + startSlot, + slotCount, bufferOffset, stridesOffset, offsetsOffset)); -- cgit v1.2.3