-
Notifications
You must be signed in to change notification settings - Fork 237
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
WGSL: Aim for getting all GFX tests to pass #4943
Comments
The plan is to try to get |
After spending some time understanding how There are four slang-test "test-types" related to "rendering"; the full list of "test-types" can be found here.:
Because this task is limited to "all GFX tests", "COMPARE_RENDER_COMPUTE" isn't relevant. There are only 7 tests that use one of the three test-types:
The goal of this task will be to make those tests working for WGSL. For the disabled tests, we will need to re-evaluate if they should be re-enabled. When the task is completed, we should have a following line on those rendering tests,
It will generate two PNG image files: one with HLSL/DXC and another with WGSL/DAWN. |
|
I see. For
|
It appears that a big portion of the implementation for this task is already done in PR 5174. |
Moving to Anders. |
I'll just start with Here we end up with Slang-RHI/WGPU failing because we're trying to create a vertex buffer with
|
This is a known problem I've discussed with @skallweitNV previously. The issue is that MemoryType::Upload makes Slang-RHI try to create a host-mappable buffer, that can also be used in other ways. I'll discuss with @skallweitNV on what should be done. |
After fixing this by changing slang-test to use
In the Vulkan case, the one binding for the vertex shader gets index 3, which matches the WGSL layout. I suppose the error is on the Slang side: the vertex shader binding should get index 3 but gets index 0 for some reason. |
There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not being used. This helps to address issue shader-slang#4943.
#5548 fixes a WGSL emitter layout issue and enables compute/compile-time-loop.slang Looking at some of the other tests now. |
|
@csyonghe It seems a lot of the rendering tests are disabled for all back-ends? Why is that? Should I look into enabling them as part of this task? For |
There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not being used. This patch enables a bunch of tests for WGPU. This helps to address issue shader-slang#4943.
There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not being used. This patch enables a bunch of tests for WGPU. This helps to address issue shader-slang#4943.
* Update Slang-RHI to get WGPU backend fixes * render-test: Use device local memory type for vertex buffers This helps to avoid shader-slang/slang-rhi#104 * Fix bug in WGSL emitter layout code. There was a "kinds" vs. "kind flags" mismatch, and also getBindingOffsetForKinds was not being used. This patch enables a bunch of tests for WGPU. This helps to address issue #4943. * format code --------- Co-authored-by: slangbot <[email protected]>
For I don't know why many of the tests here are disabled, but I just tried enabling So let's try to enable all the currently disabled tests, and if they fail for any reason, we'll decide what to do. |
There are no 1d array textures in WGSL, so add texture-sampling-no-1d-arrays.slang based on texture-sampling.slang, but without 1d texture arrays. This helps to address issue shader-slang#4943.
This helps to address issue shader-slang#4943.
There are no 1d array textures in WGSL, so add texture-sampling-no-1d-arrays.slang based on texture-sampling.slang, but without 1d texture arrays. This helps to address issue shader-slang#4943.
This is due to a limitation in WGSL. See https://www.w3.org/TR/webgpu/#abstract-opdef-maximum-miplevel-count. This helps to address issue shader-slang#4943.
* WGPU: Create cube textures with one layer per face This helps to address shader-slang/slang#4943 * Update src/wgpu/wgpu-texture.cpp * Update src/wgpu/wgpu-texture.cpp * Update src/wgpu/wgpu-texture.cpp --------- Co-authored-by: Simon Kallweit <[email protected]>
I can't just impose this constraint in render-test, because then other tests, that actually do want to test with multiple MIP levels, will break. I suppose I will similarly have to customize this test so that, besides avoiding 1d arrays it also ensures that the 1d textures are only created with at most a single level. I see the Texture2D test parameters takes a |
The remaining issue is that these two lines are apparently sampling 0s, when they should be getting 1s.
Currently debugging that... |
This helps to address issue shader-slang#4943.
It turns out that only the +x direction face was being written repeatedly by Slang-RHI. Here is a PR that I believe contains a fix: shader-slang/slang-rhi#110 EDIT: The PR makes the Slang texture sample test pass, but it breaks some other Slang-RHI tests. Currently debugging that. |
* Implement semantics for WGSL This helps to address issue #4943. * format code --------- Co-authored-by: slangbot <[email protected]> Co-authored-by: Yong He <[email protected]>
This helps to address shader-slang/slang#4943
This helps to address shader-slang/slang#4943
This avoids running into a WebGPU limitation, and helps to address issue shader-slang#4943.
This helps to address issue shader-slang#4943.
With #5617 |
EDIT nevermind, I found out a way to get some tests running after some more experimentation. @csyonghe Can you elaborate a bit on how you enabled and ran
|
* Limit number of MIP levels on 1d textures to be 1 This avoids running into a WebGPU limitation, and helps to address issue #4943. * Update Slang-RHI to get WGPU fixes * Enable WGPU texture sampling test This helps to address issue #4943. --------- Co-authored-by: Yong He <[email protected]>
I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers. This helps to address issue shader-slang#4943.
I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers. This helps to address issue shader-slang#4943.
This PR allowed me to enable all |
This second PR adds some explanations for render tests we can't enable for WGSL: With this PR and the previous one, only the nointerpolate issue is left. |
* render-test: Add copy-source usage for render targets I found that Slang-RHI/WGPU was not able to copy from render targets to staging buffers. This helps to address issue #4943. * Add entries to render API util infos Entries for glsl-cross and glsl-rewrite are added. Without glsl-cross, slang-test fails to select a back-end, and winds up crashing when tests/render/cross-compile-entry-point.slang is enabled tests/render/cross-compile0.hlsl fails similarly without glsl-rewrite. * Enable some rendering tests * Add expected test outputs
The one remaining disabled rendering test that we should address is tracked in #5625. Closing this one. |
No description provided.
The text was updated successfully, but these errors were encountered: