Convert gfx unit tests and examples to use slang-rhi#7577
Conversation
aa5aff0 to
40e5f1c
Compare
|
/format |
|
🌈 Formatted, please merge the changes from this PR |
|
There is also an |
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
d150eed to
cfbc002
Compare
I removed |
|
/format |
|
🌈 Formatted, please merge the changes from this PR |
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
jkwak-work
left a comment
There was a problem hiding this comment.
Great job!
Looks good to me.
| * This test has been disabled because the slang-rhi API | ||
| * does not provide equivalent functionality for querying format-supported | ||
| * resource states. The old gfx API's getFormatSupportedResourceStates() is | ||
| * replaced by with IDevice::getFormatSupport. |
There was a problem hiding this comment.
@skallweitNV , do we have a plan to support the feature on RHI?
If not, we should remove this file entirely.
| // For now, skip pipeline creation since we don't have a shader program | ||
| // This would need to be completed for full functionality | ||
| #if 0 |
There was a problem hiding this comment.
Do we need an issue to follow up this?
There was a problem hiding this comment.
I will create an issue
e5ac107 to
3ded299
Compare
To convert But most changes are just trivial, because gfx and rhi shares lots of definitions. |
jkwak-work
left a comment
There was a problem hiding this comment.
Looks good to me
But I am not sure what is going on with rhi.slang.
| imgui | ||
| stb | ||
| $<$<BOOL:${SLANG_ENABLE_XLIB}>:X11::X11> | ||
| $<$<BOOL:${SLANG_ENABLE_SLANG_RHI}>:slang-rhi> |
There was a problem hiding this comment.
This suggests that enabling slang-rhi to compile the platform module is optional.
However, when setting SLANG_ENABLE_SLANG_RHI=OFF, compilation fails as tools/platfom/gui.h tries to include <slang-rhi.h> regardless of this option.
There was a problem hiding this comment.
We currently rely on SLANG_ENABLE_SLANG_RHI=OFF in nixpkgs as slang-rhi tries to download all of its dependencies through FetchPackage and there is no way to provide them offline it seems, thus we have to keep slang-rhi disabled in nixpkgs.
There was a problem hiding this comment.
Thanks for pointing this out and sorry for missing this comment. gfx-unit-test relies on slang-rhi now. We should not build gfx-unit-test if for SLANG_ENABLE_SLANG_RHI=OFF. I will push a change to address this.
Disabled/Problematic Tests
Tests that need attention or have unresolved issues:
precompiled-module-2.cppslang-rhi\tests\test-precompiled-module-cache.cpproot-mutable-shader-object.cppslang-rhi\tests\test-mutable-shader-object.cppget-supported-resource-states-test.cppIDevice::getFormatSupportresolve-resource-tests.cppresolveResourceAPIDuplicated Tests (Ready for Removal)
These tests have equivalent implementations in slang-rhi and can be safely deleted:
clear-texture-test.cpptest-cmd-clear-texture.cppcopy-texture-tests.cpptest-cmd-copy-texture.cppformat-unit-tests.cpptest-formats.cppinstanced-draw-tests.cpptest-cmd-draw.cppshader-cache-tests.cpptest-shader-cache.cppshared-textures-tests.cpptest-texture-shared.cppswap-chain-resize-test.cpptest-surface.cpptexture-types-tests.cpptest-texture-types.cppsampler-array.cpptest-sampler-array.cppuint16-structured-buffer.cpptest-uint16-buffer.cpproot-shader-parameter.cpptest-root-shader-parameter.cppCloses: #7564