Skip to content

Conversation

@greggman
Copy link
Contributor

@greggman greggman commented Feb 28, 2025

Separate the builtins by stage and input/output as it's arguably less confusiung.

Note: This only separates the table. It would be nice to also separate the documentation so that vertex position links to a different place than fragment position and sample_mask input links to different place than sample_mask output. That change can happen in another PR.

Issue #5081

Note: Other GPU API specs do not combine inputs and outputs from multiple stages into one.

  • GLSL sections 7.1.1, 7.1.2, 7.1.3

  • HLSL

  • MSL sections 5.2.3.1, 5.2.3.3, 5.2.3.4, 5.2.3.5, 5.2.3.6

Result:

Screenshot 2025-02-28 at 14 56 33

Separate the builtins by stage and input/output as it's
arguably less confusiung.

Note: This only separates the table. It would be nice to also
separate the documentation so that vertex position links to
a different place than fragment position and sample_mask
input links to different place than sample_mask output.
That change can happen in another PR.

Issue gpuweb#5081

Note: Other GPU API specs no not combine inputs and outputs
from multiple stages into one.

* [GLSL](https://registry.khronos.org/OpenGL/specs/es/3.1/GLSL_ES_Specification_3.10.withchanges.pdf),
  sections (7.1.1, 7.1.2, 7.1.3).

* [HLSL](https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-semantics)

* [MSL](https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf)
  sections 5.2.3.1, 5.2.3.3, 5.2.3.4, 5.2.3.5, 5.2.3.6
@greggman greggman requested a review from alan-baker February 28, 2025 23:08
@github-actions
Copy link
Contributor

Previews, as seen when this build job started (95075a6):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@alan-baker
Copy link
Contributor

The styling of the spec doesn't really draw the eye to table names (in light mode at least) and that's the only place the stage and direction are listed. I'm not opposed to finding a better organization, but I think this can be improved.

@kainino0x kainino0x added wgsl WebGPU Shading Language Issues copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) labels Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants