summaryrefslogtreecommitdiff
path: root/tools/gfx/immediate-renderer-base.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-12-13 09:57:56 -0800
committerGitHub <noreply@github.com>2021-12-13 09:57:56 -0800
commit3359313620cd57b8404f95cfe7b07cce514eff71 (patch)
tree8f7edee5b23ca0345ce7ac62b54a9726c84752bf /tools/gfx/immediate-renderer-base.h
parentc1064a263350ee6042625bf368a97f7fe94dcd39 (diff)
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 <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/immediate-renderer-base.h')
-rw-r--r--tools/gfx/immediate-renderer-base.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/tools/gfx/immediate-renderer-base.h b/tools/gfx/immediate-renderer-base.h
index b1e867edc..19186d0f2 100644
--- a/tools/gfx/immediate-renderer-base.h
+++ b/tools/gfx/immediate-renderer-base.h
@@ -60,14 +60,16 @@ public:
virtual void setScissorRects(UInt count, const ScissorRect* scissors) = 0;
virtual void setPrimitiveTopology(PrimitiveTopology topology) = 0;
virtual void setVertexBuffers(
- UInt startSlot,
- UInt slotCount,
+ uint32_t startSlot,
+ uint32_t slotCount,
IBufferResource* const* buffers,
- const UInt* strides,
- const UInt* offsets) = 0;
- virtual void setIndexBuffer(IBufferResource* buffer, Format indexFormat, UInt offset = 0) = 0;
- virtual void draw(UInt vertexCount, UInt startVertex = 0) = 0;
- virtual void drawIndexed(UInt indexCount, UInt startIndex = 0, UInt baseVertex = 0) = 0;
+ const uint32_t* strides,
+ const uint32_t* offsets) = 0;
+ virtual void setIndexBuffer(
+ IBufferResource* buffer, Format indexFormat, uint32_t offset = 0) = 0;
+ virtual void draw(uint32_t vertexCount, uint32_t startVertex = 0) = 0;
+ virtual void drawIndexed(
+ uint32_t indexCount, uint32_t startIndex = 0, uint32_t baseVertex = 0) = 0;
virtual void setStencilReference(uint32_t referenceValue) = 0;
virtual void dispatchCompute(int x, int y, int z) = 0;
virtual void copyBuffer(
@@ -137,11 +139,11 @@ public:
SLANG_UNUSED(topology);
}
virtual void setVertexBuffers(
- UInt startSlot,
- UInt slotCount,
+ uint32_t startSlot,
+ uint32_t slotCount,
IBufferResource* const* buffers,
- const UInt* strides,
- const UInt* offsets) override
+ const uint32_t* strides,
+ const uint32_t* offsets) override
{
SLANG_UNUSED(startSlot);
SLANG_UNUSED(slotCount);
@@ -149,19 +151,21 @@ public:
SLANG_UNUSED(strides);
SLANG_UNUSED(offsets);
}
- virtual void setIndexBuffer(IBufferResource* buffer, Format indexFormat, UInt offset = 0)
+ virtual void setIndexBuffer(
+ IBufferResource* buffer, Format indexFormat, uint32_t offset = 0)
override
{
SLANG_UNUSED(buffer);
SLANG_UNUSED(indexFormat);
SLANG_UNUSED(offset);
}
- virtual void draw(UInt vertexCount, UInt startVertex = 0) override
+ virtual void draw(uint32_t vertexCount, uint32_t startVertex = 0) override
{
SLANG_UNUSED(vertexCount);
SLANG_UNUSED(startVertex);
}
- virtual void drawIndexed(UInt indexCount, UInt startIndex = 0, UInt baseVertex = 0) override
+ virtual void drawIndexed(
+ uint32_t indexCount, uint32_t startIndex = 0, uint32_t baseVertex = 0) override
{
SLANG_UNUSED(indexCount);
SLANG_UNUSED(startIndex);