diff options
| author | Yong He <yonghe@outlook.com> | 2021-12-13 09:57:56 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-13 09:57:56 -0800 |
| commit | 3359313620cd57b8404f95cfe7b07cce514eff71 (patch) | |
| tree | 8f7edee5b23ca0345ce7ac62b54a9726c84752bf /slang-gfx.h | |
| parent | c1064a263350ee6042625bf368a97f7fe94dcd39 (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 'slang-gfx.h')
| -rw-r--r-- | slang-gfx.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/slang-gfx.h b/slang-gfx.h index f070e30b0..4d414fa7f 100644 --- a/slang-gfx.h +++ b/slang-gfx.h @@ -1451,21 +1451,23 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL setPrimitiveTopology(PrimitiveTopology topology) = 0; virtual SLANG_NO_THROW void SLANG_MCALL setVertexBuffers( - UInt startSlot, - UInt slotCount, + uint32_t startSlot, + uint32_t slotCount, IBufferResource* const* buffers, - const UInt* strides, - const UInt* offsets) = 0; - inline void setVertexBuffer(UInt slot, IBufferResource* buffer, UInt stride, UInt offset = 0) + const uint32_t* strides, + const uint32_t* offsets) = 0; + inline void setVertexBuffer( + uint32_t slot, IBufferResource* buffer, uint32_t stride, uint32_t offset = 0) { setVertexBuffers(slot, 1, &buffer, &stride, &offset); } virtual SLANG_NO_THROW void SLANG_MCALL - setIndexBuffer(IBufferResource* buffer, Format indexFormat, UInt offset = 0) = 0; - virtual SLANG_NO_THROW void SLANG_MCALL draw(UInt vertexCount, UInt startVertex = 0) = 0; + setIndexBuffer(IBufferResource* buffer, Format indexFormat, uint32_t offset = 0) = 0; virtual SLANG_NO_THROW void SLANG_MCALL - drawIndexed(UInt indexCount, UInt startIndex = 0, UInt baseVertex = 0) = 0; + draw(uint32_t vertexCount, uint32_t startVertex = 0) = 0; + virtual SLANG_NO_THROW void SLANG_MCALL + drawIndexed(uint32_t indexCount, uint32_t startIndex = 0, uint32_t baseVertex = 0) = 0; virtual SLANG_NO_THROW void SLANG_MCALL drawIndirect( uint32_t maxDrawCount, IBufferResource* argBuffer, @@ -1482,10 +1484,10 @@ public: virtual SLANG_NO_THROW Result SLANG_MCALL setSamplePositions( uint32_t samplesPerPixel, uint32_t pixelCount, const SamplePosition* samplePositions) = 0; virtual SLANG_NO_THROW void SLANG_MCALL drawInstanced( - UInt vertexCount, - UInt instanceCount, - UInt startVertex, - UInt startInstanceLocation) = 0; + uint32_t vertexCount, + uint32_t instanceCount, + uint32_t startVertex, + uint32_t startInstanceLocation) = 0; virtual SLANG_NO_THROW void SLANG_MCALL drawIndexedInstanced( uint32_t indexCount, uint32_t instanceCount, |
