* in the shader via vs_state_bits in LS/HS.
*/
/* bit gap */
-#define VS_STATE_LS_OUT_PATCH_SIZE__SHIFT 11
-#define VS_STATE_LS_OUT_PATCH_SIZE__MASK 0x1fff
#define VS_STATE_LS_OUT_VERTEX_SIZE__SHIFT 24
#define VS_STATE_LS_OUT_VERTEX_SIZE__MASK 0xff
* 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
- * [11:23] = stride between patches in DW = num_inputs * num_vertices * 4
- * max = 32*32*4 + 32*4
* [24:31] = stride between vertices in DW = num_inputs * 4
* max = 32*4
*/
/* Compute userdata SGPRs. */
assert(((input_vertex_size / 4) & ~0xff) == 0);
assert(((output_vertex_size / 4) & ~0xff) == 0);
- assert(((input_patch_size / 4) & ~0x1fff) == 0);
assert(((output_patch_size / 4) & ~0x1fff) == 0);
assert(((output_patch0_offset / 4) & ~0xffff) == 0);
assert(((perpatch_output_offset / 4) & ~0xffff) == 0);
}
/* Set SI_SGPR_VS_STATE_BITS. */
- SET_FIELD(sctx->current_vs_state, VS_STATE_LS_OUT_PATCH_SIZE, input_patch_size / 4);
SET_FIELD(sctx->current_vs_state, VS_STATE_LS_OUT_VERTEX_SIZE, input_vertex_size / 4);
/* We should be able to support in-shader LDS use with LLVM >= 9
vs_state |= ENCODE_FIELD(VS_STATE_INDEXED, 1);
/* Copy all state bits from vs_state to gs_state except the LS bits. */
- gs_state |= vs_state &
- CLEAR_FIELD(VS_STATE_LS_OUT_PATCH_SIZE) &
- CLEAR_FIELD(VS_STATE_LS_OUT_VERTEX_SIZE);
+ gs_state |= vs_state & CLEAR_FIELD(VS_STATE_LS_OUT_VERTEX_SIZE);
if (vs_state != sctx->last_vs_state ||
((HAS_GS || NGG) && gs_state != sctx->last_gs_state)) {