From: Ilia Mirkin Date: Mon, 6 Jul 2020 03:16:33 +0000 (-0400) Subject: a4xx: hook up centroid ij coords X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bffee01bd9e434a5da17dd665531211d2759f63e;p=mesa.git a4xx: hook up centroid ij coords This is necessary now that the compiler respects centroid interpolation, even in non-MSAA mode. Otherwise the interpolation doesn't work. Fixes a bunch of dEQP centroid transform feedback tests. Signed-off-by: Ilia Mirkin Reviewed-by: Rob Clark Part-of: --- diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c index ef44ce57168..b5b13dc288e 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c @@ -239,7 +239,8 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit, /* XXX left out centroid/sample for now */ OUT_RING(ring, A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(ij_regid[IJ_PERSP_PIXEL]) | A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_PIXEL(ij_regid[IJ_LINEAR_PIXEL]) | - 0xfcfc0000); + A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID(ij_regid[IJ_PERSP_CENTROID]) | + A4XX_HLSQ_CONTROL_3_REG_IJ_LINEAR_CENTROID(ij_regid[IJ_LINEAR_CENTROID])); OUT_RING(ring, 0x00fcfcfc); /* XXX HLSQ_CONTROL_4 */ OUT_PKT0(ring, REG_A4XX_HLSQ_VS_CONTROL_REG, 5); @@ -390,11 +391,13 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit, CONDREG(face_regid, A4XX_GRAS_CNTL_IJ_PERSP) | CONDREG(zwcoord_regid, A4XX_GRAS_CNTL_IJ_PERSP) | CONDREG(ij_regid[IJ_PERSP_PIXEL], A4XX_GRAS_CNTL_IJ_PERSP) | - CONDREG(ij_regid[IJ_LINEAR_PIXEL], A4XX_GRAS_CNTL_IJ_LINEAR)); + CONDREG(ij_regid[IJ_LINEAR_PIXEL], A4XX_GRAS_CNTL_IJ_LINEAR) | + CONDREG(ij_regid[IJ_PERSP_CENTROID], A4XX_GRAS_CNTL_IJ_PERSP)); OUT_PKT0(ring, REG_A4XX_RB_RENDER_CONTROL2, 1); OUT_RING(ring, A4XX_RB_RENDER_CONTROL2_MSAA_SAMPLES(0) | CONDREG(ij_regid[IJ_PERSP_PIXEL], A4XX_RB_RENDER_CONTROL2_IJ_PERSP_PIXEL) | + CONDREG(ij_regid[IJ_PERSP_CENTROID], A4XX_RB_RENDER_CONTROL2_IJ_PERSP_CENTROID) | CONDREG(ij_regid[IJ_LINEAR_PIXEL], A4XX_RB_RENDER_CONTROL2_SIZE) | COND(s[FS].v->frag_face, A4XX_RB_RENDER_CONTROL2_FACENESS) | COND(s[FS].v->fragcoord_compmask != 0,