diff options
| author | Yong He <yonghe@outlook.com> | 2021-11-18 11:14:29 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 11:14:29 -0800 |
| commit | b482844b689eb109ee1d70c527e098400ac6d409 (patch) | |
| tree | f40e332e366b2dd2193d817c0c7d0bdc95455c90 /tools/gfx/cuda/render-cuda.cpp | |
| parent | efebfada38cd5252da62f7618c7f95e3ab180fbd (diff) | |
gfx: add coverage for more resource commands. (#2020)
* gfx: specify SubresourceRange for resource view creation.
* Add gfx method for `resolveResource`.
* Fix compile error.
* `copyTextureToBuffer` and `textureSubresourceBarrier`.
* Fix vulkan bug.
* Fix test cras;h.
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/cuda/render-cuda.cpp')
| -rw-r--r-- | tools/gfx/cuda/render-cuda.cpp | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/tools/gfx/cuda/render-cuda.cpp b/tools/gfx/cuda/render-cuda.cpp index be3379c71..a3c288ab0 100644 --- a/tools/gfx/cuda/render-cuda.cpp +++ b/tools/gfx/cuda/render-cuda.cpp @@ -1044,10 +1044,10 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL copyTexture( ITextureResource* dst, - ITextureResource::SubresourceRange dstSubresource, + SubresourceRange dstSubresource, ITextureResource::Offset3D dstOffset, ITextureResource* src, - ITextureResource::SubresourceRange srcSubresource, + SubresourceRange srcSubresource, ITextureResource::Offset3D srcOffset, ITextureResource::Size extent) override { @@ -1063,7 +1063,7 @@ public: virtual SLANG_NO_THROW void SLANG_MCALL uploadTextureData( ITextureResource* dst, - ITextureResource::SubresourceRange subResourceRange, + SubresourceRange subResourceRange, ITextureResource::Offset3D offset, ITextureResource::Offset3D extent, ITextureResource::SubresourceData* subResourceData, @@ -1088,6 +1088,51 @@ public: SLANG_UNUSED(flags); SLANG_UNIMPLEMENTED_X("clearResourceView"); } + + virtual SLANG_NO_THROW void SLANG_MCALL resolveResource( + ITextureResource* source, + SubresourceRange sourceRange, + ITextureResource* dest, + SubresourceRange destRange) override + { + SLANG_UNUSED(source); + SLANG_UNUSED(sourceRange); + SLANG_UNUSED(dest); + SLANG_UNUSED(destRange); + SLANG_UNIMPLEMENTED_X("resolveResource"); + } + + virtual SLANG_NO_THROW void SLANG_MCALL copyTextureToBuffer( + IBufferResource* dst, + size_t dstOffset, + size_t dstSize, + ITextureResource* src, + SubresourceRange srcSubresource, + ITextureResource::Offset3D srcOffset, + ITextureResource::Size extent) override + { + SLANG_UNUSED(dst); + SLANG_UNUSED(dstOffset); + SLANG_UNUSED(dstSize); + SLANG_UNUSED(src); + SLANG_UNUSED(srcSubresource); + SLANG_UNUSED(srcOffset); + SLANG_UNUSED(extent); + SLANG_UNIMPLEMENTED_X("copyTextureToBuffer"); + } + + virtual SLANG_NO_THROW void SLANG_MCALL textureSubresourceBarrier( + ITextureResource* texture, + SubresourceRange subresourceRange, + ResourceState src, + ResourceState dst) override + { + SLANG_UNUSED(texture); + SLANG_UNUSED(subresourceRange); + SLANG_UNUSED(src); + SLANG_UNUSED(dst); + SLANG_UNIMPLEMENTED_X("textureSubresourceBarrier"); + } }; ResourceCommandEncoderImpl m_resourceCommandEncoder; |
