mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
radeonsi: correct and clean up obsolete vs_state_bits comments
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21525>
This commit is contained in:
parent
23e7d44a88
commit
32b8d0c19d
2 changed files with 9 additions and 17 deletions
|
|
@ -260,12 +260,19 @@ enum
|
|||
*/
|
||||
/* bit gap */
|
||||
#define VS_STATE_LS_OUT_VERTEX_SIZE__SHIFT 24
|
||||
#define VS_STATE_LS_OUT_VERTEX_SIZE__MASK 0xff
|
||||
#define VS_STATE_LS_OUT_VERTEX_SIZE__MASK 0xff /* max 32 * 4 + 1 */
|
||||
|
||||
/* These fields are only set in current_gs_state in si_context, and they are accessible
|
||||
* in the shader via vs_state_bits in legacy GS, the GS copy shader, and any NGG shader.
|
||||
*/
|
||||
/* bit gap */
|
||||
/* Small prim filter precision = num_samples / quant_mode, which can only be equal to 1/2^n
|
||||
* where n is between 4 and 12. Knowing that, we only need to store 4 bits of the FP32 exponent.
|
||||
* Set it like this: value = (fui(num_samples / quant_mode) >> 23) & 0xf;
|
||||
* Expand to FP32 like this: ((0x70 | value) << 23);
|
||||
* With 0x70 = 112, we get 2^(112 + value - 127) = 2^(value - 15), which is always a negative
|
||||
* exponent and it's equal to 1/2^(15 - value).
|
||||
*/
|
||||
#define GS_STATE_SMALL_PRIM_PRECISION_NO_AA__SHIFT 18
|
||||
#define GS_STATE_SMALL_PRIM_PRECISION_NO_AA__MASK 0xf
|
||||
#define GS_STATE_SMALL_PRIM_PRECISION__SHIFT 22
|
||||
|
|
|
|||
|
|
@ -50,22 +50,7 @@ struct si_shader_args {
|
|||
/* API VS */
|
||||
struct ac_arg vb_descriptors[5];
|
||||
struct ac_arg vertex_index0;
|
||||
/* VS states and layout of LS outputs / TCS inputs at the end
|
||||
* [0] = clamp vertex color
|
||||
* [1] = indexed
|
||||
* [2:3] = NGG: output primitive type
|
||||
* [4:5] = NGG: provoking vertex index
|
||||
* [6] = NGG: streamout queries enabled
|
||||
* [7:10] = NGG: small prim filter precision = num_samples / quant_mode,
|
||||
* but in reality it's: 1/2^n, from 1/16 to 1/4096 = 1/2^4 to 1/2^12
|
||||
* Only the first 4 bits of the exponent are stored.
|
||||
* Set it like this: (fui(num_samples / quant_mode) >> 23)
|
||||
* Expand to FP32 like this: ((0x70 | value) << 23);
|
||||
* With 0x70 = 112, we get 2^(112 + value - 127) = 2^(value - 15)
|
||||
* = 1/2^(15 - value) in FP32
|
||||
* [24:31] = stride between vertices in DW = num_inputs * 4
|
||||
* max = 32*4
|
||||
*/
|
||||
/* VS state bits. See the VS_STATE_* and GS_STATE_* definitions. */
|
||||
struct ac_arg vs_state_bits;
|
||||
struct ac_arg vs_blit_inputs;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue