hw streamout (rather than stg instructions in shader)
</doc>
<bitfield name="STRIDE_IN_VPC" low="0" high="7" type="uint"/>
- <bitfield name="NUMNONPOSVAR" low="8" high="15" type="uint"/>
+ <bitfield name="POSITIONLOC" low="8" high="15" type="uint"/>
<!--
This seems to be the OUTLOC for the psize output. It could possibly
be the max-OUTLOC position, but it is only set when VS writes psize
<reg32 offset="0x9303" name="VPC_PACK_3">
<doc>
- domain shader version
-
- num of varyings plus four for gl_Position (plus one if gl_PointSize)
- plus # of transform-feedback (streamout) varyings if using the
- hw streamout (rather than stg instructions in shader)
+ domain shader version of VPC_PACK
</doc>
<bitfield name="STRIDE_IN_VPC" low="0" high="7" type="uint"/>
- <bitfield name="NUMNONPOSVAR" low="8" high="15" type="uint"/>
+ <bitfield name="POSITIONLOC" low="8" high="15" type="uint"/>
<!--
This seems to be the OUTLOC for the psize output. It could possibly
be the max-OUTLOC position, but it is only set when VS writes psize
ir3_find_output_regid(vs, VARYING_SLOT_POS);
const uint32_t pointsize_regid =
ir3_find_output_regid(vs, VARYING_SLOT_PSIZ);
- uint32_t pointsize_loc = 0xff;
- if (position_regid != regid(63, 0))
+ uint32_t pointsize_loc = 0xff, position_loc = 0xff;
+ if (position_regid != regid(63, 0)) {
+ position_loc = linkage.max_loc;
ir3_link_add(&linkage, position_regid, 0xf, linkage.max_loc);
+ }
if (pointsize_regid != regid(63, 0)) {
pointsize_loc = linkage.max_loc;
ir3_link_add(&linkage, pointsize_regid, 0x1, linkage.max_loc);
0xff00ff00);
tu_cs_emit_pkt4(cs, REG_A6XX_VPC_PACK, 1);
- tu_cs_emit(cs, A6XX_VPC_PACK_NUMNONPOSVAR(fs->total_in) |
+ tu_cs_emit(cs, A6XX_VPC_PACK_POSITIONLOC(position_loc) |
A6XX_VPC_PACK_PSIZELOC(pointsize_loc) |
A6XX_VPC_PACK_STRIDE_IN_VPC(linkage.max_loc));
uint32_t vertex_regid, instance_regid;
uint32_t ij_pix_regid, ij_samp_regid, ij_cent_regid, ij_size_regid;
enum a3xx_threadsize fssz;
- uint8_t psize_loc = ~0;
+ uint8_t psize_loc = ~0, pos_loc = ~0;
int i, j;
static const struct ir3_shader_variant dummy_fs = {0};
OUT_RING(ring, ~varmask[3]); /* VPC_VAR[3].DISABLE */
/* a6xx appends pos/psize to end of the linkage map: */
- if (VALIDREG(pos_regid))
+ if (VALIDREG(pos_regid)) {
+ pos_loc = l.max_loc;
ir3_link_add(&l, pos_regid, 0xf, l.max_loc);
+ }
if (VALIDREG(psize_regid)) {
psize_loc = l.max_loc;
}
OUT_PKT4(ring, REG_A6XX_VPC_PACK, 1);
- OUT_RING(ring, A6XX_VPC_PACK_NUMNONPOSVAR(fs->total_in) |
+ OUT_RING(ring, A6XX_VPC_PACK_POSITIONLOC(pos_loc) |
A6XX_VPC_PACK_PSIZELOC(psize_loc) |
A6XX_VPC_PACK_STRIDE_IN_VPC(l.max_loc));