Skip to content
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

Open
aleino-nv opened this issue Aug 28, 2024 · 5 comments
Open

WGSL: Aim for getting all GFX tests to pass #4943

aleino-nv opened this issue Aug 28, 2024 · 5 comments
Assignees
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case. kind:enhancement a desirable new feature, option, or behavior

Comments

@aleino-nv
Copy link
Collaborator

aleino-nv commented Aug 28, 2024

No description provided.

@aleino-nv aleino-nv self-assigned this Aug 28, 2024
@aleino-nv aleino-nv added goal:forward looking Feature needed at a later date, not connected to a specific use case. kind:enhancement a desirable new feature, option, or behavior labels Aug 28, 2024
@bmillsNV bmillsNV added this to the Q4 2024 (Fall) milestone Aug 29, 2024
@bmillsNV bmillsNV assigned jkwak-work and unassigned aleino-nv Oct 1, 2024
@jkwak-work
Copy link
Collaborator

jkwak-work commented Oct 2, 2024

The plan is to try to get tests/render/cross-compile-entry-point.slang working for WGSL and see what comes out next.

@jkwak-work
Copy link
Collaborator

jkwak-work commented Oct 3, 2024

After spending some time understanding how tests/render/cross-compile-entry-point.slang works, here is how I understood this issue.

There are four slang-test "test-types" related to "rendering"; the full list of "test-types" can be found here.:

  • COMPARE_HLSL_RENDER
  • COMPARE_HLSL_CROSS_COMPILE_RENDER
  • COMPARE_HLSL_GLSL_RENDER
  • COMPARE_RENDER_COMPUTE

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:

tests/bugs/texture2d-gather.hlsl
tests/render/cross-compile-entry-point.slang // currently disabled
tests/render/nointerpolation.hlsl // currently disabled
tests/render/render0.hlsl // currently disabled
tests/render/cross-compile0.hlsl // currently disabled
tests/render/imported-parameters.hlsl // currently disabled
tests/render/unused-discard.hlsl // currently disabled

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.
If enabled, they will also need to work for WGSL.
As an example, "tests/render/cross-compile-entry-point.slang" can be simply re-enabled by changing the test-type from COMPARE_HLSL_CROSS_COMPILE_RENDER to COMPARE_HLSL_RENDER.

When the task is completed, we should have a following line on those rendering tests,

//TEST:COMPARE_HLSL_RENDER:-wgpu

It will generate two PNG image files: one with HLSL/DXC and another with WGSL/DAWN.
slang-test will compare the images and check if they are identical.

@csyonghe
Copy link
Collaborator

csyonghe commented Oct 3, 2024

COMPARE_RENDER_COMPUTE is actually relevant, it is a vertex-fragment pipeline that writes results into a buffer instead of a framebuffer, and reads back the buffer values for comparison, so that test is a vertex-fragment shader test.

@jkwak-work
Copy link
Collaborator

I see.
Thanks for the information.

For COMPARE_RENDER_COMPUTE, there are six tests that use the test-type:

./compute/compile-time-loop.slang
./compute/discard-stmt.slang
./compute/global-type-param-in-entrypoint.slang // currently disabled
./compute/texture-sample-grad-offset-clamp.slang
./compute/texture-sampling.slang
./compute/type-param-varying.slang // currently disabled

@jkwak-work
Copy link
Collaborator

It appears that a big portion of the implementation for this task is already done in PR 5174.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
goal:forward looking Feature needed at a later date, not connected to a specific use case. kind:enhancement a desirable new feature, option, or behavior
Projects
None yet
Development

No branches or pull requests

4 participants