-
Notifications
You must be signed in to change notification settings - Fork 335
Convert gfx unit tests and examples to use slang-rhi #7577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aa5aff0
to
40e5f1c
Compare
/format |
🌈 Formatted, please merge the changes from this PR |
There is also an |
Co-authored-by: slangbot <[email protected]>
d150eed
to
cfbc002
Compare
I removed |
/format |
🌈 Formatted, please merge the changes from this PR |
Co-authored-by: slangbot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need an issue to follow up this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
But I am not sure what is going on with rhi.slang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@@ -139,119 +139,47 @@ if(SLANG_ENABLE_GFX) | |||
imgui | |||
stb | |||
$<$<BOOL:${SLANG_ENABLE_XLIB}>:X11::X11> | |||
$<$<BOOL:${SLANG_ENABLE_SLANG_RHI}>:slang-rhi> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Disabled/Problematic Tests
Tests that need attention or have unresolved issues:
precompiled-module-2.cpp
slang-rhi\tests\test-precompiled-module-cache.cpp
root-mutable-shader-object.cpp
slang-rhi\tests\test-mutable-shader-object.cpp
get-supported-resource-states-test.cpp
IDevice::getFormatSupport
resolve-resource-tests.cpp
resolveResource
APIDuplicated Tests (Ready for Removal)
These tests have equivalent implementations in slang-rhi and can be safely deleted:
clear-texture-test.cpp
test-cmd-clear-texture.cpp
copy-texture-tests.cpp
test-cmd-copy-texture.cpp
format-unit-tests.cpp
test-formats.cpp
instanced-draw-tests.cpp
test-cmd-draw.cpp
shader-cache-tests.cpp
test-shader-cache.cpp
shared-textures-tests.cpp
test-texture-shared.cpp
swap-chain-resize-test.cpp
test-surface.cpp
texture-types-tests.cpp
test-texture-types.cpp
sampler-array.cpp
test-sampler-array.cpp
uint16-structured-buffer.cpp
test-uint16-buffer.cpp
root-shader-parameter.cpp
test-root-shader-parameter.cpp
Closes: #7564