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/debug-layer.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tools/gfx/debug-layer.cpp') diff --git a/tools/gfx/debug-layer.cpp b/tools/gfx/debug-layer.cpp index d96af7069..fa7064b89 100644 --- a/tools/gfx/debug-layer.cpp +++ b/tools/gfx/debug-layer.cpp @@ -1084,11 +1084,11 @@ void DebugRenderCommandEncoder::setPrimitiveTopology(PrimitiveTopology topology) } void DebugRenderCommandEncoder::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) { SLANG_GFX_API_FUNC; @@ -1101,22 +1101,21 @@ void DebugRenderCommandEncoder::setVertexBuffers( } void DebugRenderCommandEncoder::setIndexBuffer( - IBufferResource* buffer, - Format indexFormat, - UInt offset) + IBufferResource* buffer, Format indexFormat, uint32_t offset) { SLANG_GFX_API_FUNC; auto innerBuffer = static_cast(buffer)->baseObject.get(); baseObject->setIndexBuffer(innerBuffer, indexFormat, offset); } -void DebugRenderCommandEncoder::draw(UInt vertexCount, UInt startVertex) +void DebugRenderCommandEncoder::draw(uint32_t vertexCount, uint32_t startVertex) { SLANG_GFX_API_FUNC; baseObject->draw(vertexCount, startVertex); } -void DebugRenderCommandEncoder::drawIndexed(UInt indexCount, UInt startIndex, UInt baseVertex) +void DebugRenderCommandEncoder::drawIndexed( + uint32_t indexCount, uint32_t startIndex, uint32_t baseVertex) { SLANG_GFX_API_FUNC; baseObject->drawIndexed(indexCount, startIndex, baseVertex); @@ -1166,7 +1165,10 @@ Result DebugRenderCommandEncoder::setSamplePositions( } void DebugRenderCommandEncoder::drawInstanced( - UInt vertexCount, UInt instanceCount, UInt startVertex, UInt startInstanceLocation) + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t startVertex, + uint32_t startInstanceLocation) { SLANG_GFX_API_FUNC; return baseObject->drawInstanced( -- cgit v1.2.3