asahi: Identify the separate varying count fields

Flat/goraud/linear and 32/16 need to be specified separately. This
change identifies the new fields but should be a functional no-op.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23998>
This commit is contained in:
Asahi Lina
2023-06-28 17:09:19 +09:00
committed by Marge Bot
parent d9bf52e00f
commit 49994dc8cb
5 changed files with 61 additions and 39 deletions
+45 -20
View File
@@ -39,41 +39,66 @@ of the shader in the "Bind Vertex Pipeline" packet. The value may be interpreted
consist of a single 32-bit value or an aligned 16-bit register pair, depending
on whether interpolation should happen at 32-bit or 16-bit. Vertex outputs are
indexed starting from 0, with the *vertex position* always coming first, the
32-bit user varyings coming next, then 16-bit user varyings, and finally *point
size* and *clip distances* at the end if present. Note that *clip distances* are
not accessible from the fragment shader; if the fragment shader needs to read
the interpolated clip distance, the vertex shader must *also* write the clip
distance values to a user varying for the fragment shader to interpolate. Also
note there is no clip plane enable mask anywhere; that must lowered for APIs
that require this (OpenGL but not Vulkan).
32-bit user varyings coming next with perspective, flat, and linear interpolated
varyings grouped in that order, then 16-bit user varyings with the same groupings,
and finally *point size* and *clip distances* at the end if present. Note that
*clip distances* are not accessible from the fragment shader; if the fragment
shader needs to read the interpolated clip distance, the vertex shader must
*also* write the clip distance values to a user varying for the fragment shader
to interpolate. Also note there is no clip plane enable mask anywhere; that must
lowered for APIs that require this (OpenGL but not Vulkan).
.. list-table:: Ordering of vertex outputs with all outputs used
:widths: 25 75
:header-rows: 1
* - Index
* - Size (words)
- Value
* - 0
- Vertex position
* - 4
- 32-bit varying 0
- Vertex position
* - 1
- 32-bit smooth varying 0
* -
- ...
* - 4 + m
- 32-bit varying m
* - 4 + m + 1
- Packed pair of 16-bit varyings 0
* - 1
- 32-bit smooth varying m
* - 1
- 32-bit flat varying 0
* -
- ...
* - 4 + m + 1 + n
- Packed pair of 16-bit varyings n
* - 4 + m + 1 + n + 1
* - 1
- 32-bit flat varying n
* - 1
- 32-bit linear varying 0
* -
- ...
* - 1
- 32-bit linear varying o
* - 1
- Packed pair of 16-bit smooth varyings 0
* -
- ...
* - 1
- Packed pair of 16-bit smooth varyings p
* - 1
- Packed pair of 16-bit flat varyings 0
* -
- ...
* - 1
- Packed pair of 16-bit flat varyings q
* - 1
- Packed pair of 16-bit linear varyings 0
* -
- ...
* - 1
- Packed pair of 16-bit linear varyings r
* - 1
- Point size
* - 4 + m + 1 + n + 2 + 0
* - 1
- Clip distance for plane 0
* -
- ...
* - 4 + m + 1 + n + 2 + 15
* - 1
- Clip distance for plane 15
Remapping