diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-04-14 17:59:13 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-14 14:59:13 +0000 |
| commit | 0f0818722268464775981520c2d6e975a9cf14fa (patch) | |
| tree | 2519a57506f026d2c116112fe81a5c9c6d5282ef /docs/user-guide | |
| parent | b9af45ff3f2288e2aa325c1d910544e368eb9538 (diff) | |
Add SV_PointCoord to match gl_PointCoord (#6795)
* Add gl_PointCoord support in GLSL compat mode
* Add SV_PointCoord
* Test on metal as well
* Update SPIRV system value semantics table in docs
* Update metal docs for SV_PointCoord
Diffstat (limited to 'docs/user-guide')
| -rw-r--r-- | docs/user-guide/a2-01-spirv-target-specific.md | 3 | ||||
| -rw-r--r-- | docs/user-guide/a2-02-metal-target-specific.md | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/docs/user-guide/a2-01-spirv-target-specific.md b/docs/user-guide/a2-01-spirv-target-specific.md index d37f41a5e..6d73199e0 100644 --- a/docs/user-guide/a2-01-spirv-target-specific.md +++ b/docs/user-guide/a2-01-spirv-target-specific.md @@ -62,6 +62,7 @@ The system-value semantics are translated to the following SPIR-V code. | `SV_IsFrontFace` | `BuiltIn FrontFacing` | | `SV_OutputControlPointID` | `BuiltIn InvocationId` | | `SV_PointSize`<sup>*</sup> | `BuiltIn PointSize` | +| `SV_PointCoord`<sup>*</sup> | `BuiltIn PointCoord` | | `SV_Position` | `BuiltIn Position/FragCoord` | | `SV_PrimitiveID` | `BuiltIn PrimitiveId` | | `SV_RenderTargetArrayIndex` | `BuiltIn Layer` | @@ -76,7 +77,7 @@ The system-value semantics are translated to the following SPIR-V code. | `SV_ViewID` | `BuiltIn ViewIndex` | | `SV_ViewportArrayIndex` | `BuiltIn ViewportIndex` | -*Note* that `SV_DrawIndex` and `SV_PointSize` are Slang-specific semantics that are not defined in HLSL. +*Note* that `SV_DrawIndex`, `SV_PointSize` and `SV_PointCoord` are Slang-specific semantics that are not defined in HLSL. Behavior of `discard` after SPIR-V 1.6 diff --git a/docs/user-guide/a2-02-metal-target-specific.md b/docs/user-guide/a2-02-metal-target-specific.md index bbcf28005..b14a4889e 100644 --- a/docs/user-guide/a2-02-metal-target-specific.md +++ b/docs/user-guide/a2-02-metal-target-specific.md @@ -34,6 +34,8 @@ The system-value semantics are translated to the following Metal attributes: | `SV_GroupIndex` | Calculated from `SV_GroupThreadID` and group extents | | `SV_InstanceID` | `[[instance_id]]` | | `SV_IsFrontFace` | `[[front_facing]]` | +| `SV_PointSize` | `[[point_size]]` | +| `SV_PointCoord` | `[[point_coord]]` | | `SV_PrimitiveID` | `[[primitive_id]]` | | `SV_RenderTargetArrayIndex` | `[[render_target_array_index]]` | | `SV_SampleIndex` | `[[sample_id]]` | |
