Use the correct sprite replacement depending on the flip of the coord
mode, using either T or 1-T depending on whether we have an upper-left or
lower-left coordinate origin. This fixes all the point sprite piglits.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
},
.rasterflat = ctx->rasterizer && ctx->rasterizer->flatshade,
.sprite_coord_enable = ctx->rasterizer ? ctx->rasterizer->sprite_coord_enable : 0,
+ .sprite_coord_mode = ctx->rasterizer ? ctx->rasterizer->sprite_coord_mode : false,
};
unsigned dirty;
uint32_t dirty;
uint32_t sprite_coord_enable;
+ bool sprite_coord_mode;
bool rasterflat;
/* cached to avoid repeated lookups of same variants: */
* 1's for the .z and .w components.
*/
if (emit->sprite_coord_enable & (1 << sem2idx(fp->inputs[j].semantic)))
- vpsrepl[inloc / 16] |= 0x09 << ((inloc % 16) * 2);
+ vpsrepl[inloc / 16] |= (emit->sprite_coord_mode ? 0x0d : 0x09)
+ << ((inloc % 16) * 2);
}
OUT_PKT0(ring, REG_A3XX_VPC_ATTR, 2);