From: Jonathan Marek Date: Sun, 14 Jun 2020 04:12:05 +0000 (-0400) Subject: freedreno/registers: update varying-related registers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e9ded21d146c6949d1721a3afc19cc18c53e6a1;p=mesa.git freedreno/registers: update varying-related registers Note: * a3xx change based on available register documentation * a4xx guesses (RB_RENDER_CONTROL2 bits especially) * a5xx change based on a6xx, these registers seem identical Signed-off-by: Jonathan Marek Part-of: --- diff --git a/src/freedreno/registers/a3xx.xml b/src/freedreno/registers/a3xx.xml index 5cfa1fe9ea9..c8849693f8c 100644 --- a/src/freedreno/registers/a3xx.xml +++ b/src/freedreno/registers/a3xx.xml @@ -792,7 +792,10 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> - + + + + @@ -1135,8 +1138,10 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> - - + + + + diff --git a/src/freedreno/registers/a4xx.xml b/src/freedreno/registers/a4xx.xml index 284e491c886..454ee596de8 100644 --- a/src/freedreno/registers/a4xx.xml +++ b/src/freedreno/registers/a4xx.xml @@ -2058,11 +2058,17 @@ perhaps they should be taken with a grain of salt - - + + + + + - + + + + diff --git a/src/freedreno/registers/a5xx.xml b/src/freedreno/registers/a5xx.xml index f954a7bd8ad..d80691d61d5 100644 --- a/src/freedreno/registers/a5xx.xml +++ b/src/freedreno/registers/a5xx.xml @@ -1825,7 +1825,9 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> - + + + - + @@ -1976,7 +1978,9 @@ bit 7 for RECTLIST (clear) when z32s8 (used for clear of depth32? not set --> - + + + - + @@ -2633,12 +2637,18 @@ bit 7 for RECTLIST (clear) when z32s8 (used for clear of depth32? not set + - + + + + + + diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml index 129ec464e48..06e51d7c439 100644 --- a/src/freedreno/registers/a6xx.xml +++ b/src/freedreno/registers/a6xx.xml @@ -1902,11 +1902,11 @@ to upconvert to 32b float internally? - + - + - + - + - + - + - - + + + + - + + diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 64a92008af2..ca05fa3beca 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1150,12 +1150,12 @@ tu6_emit_fs_inputs(struct tu_cs *cs, const struct ir3_shader_variant *fs) A6XX_HLSQ_CONTROL_2_REG_SAMPLEID(samp_id_regid) | A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK(smask_in_regid) | A6XX_HLSQ_CONTROL_2_REG_SIZE(ij_size_regid)); - tu_cs_emit(cs, A6XX_HLSQ_CONTROL_3_REG_BARY_IJ_PIXEL(ij_pix_regid) | - A6XX_HLSQ_CONTROL_3_REG_BARY_IJ_CENTROID(ij_cent_regid) | + tu_cs_emit(cs, A6XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(ij_pix_regid) | + A6XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID(ij_cent_regid) | 0xfc00fc00); tu_cs_emit(cs, A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(coord_regid) | A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID(zwcoord_regid) | - A6XX_HLSQ_CONTROL_4_REG_BARY_IJ_PIXEL_PERSAMP(ij_samp_regid) | + A6XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE(ij_samp_regid) | 0x0000fc00); tu_cs_emit(cs, 0xfc); @@ -1164,9 +1164,9 @@ tu6_emit_fs_inputs(struct tu_cs *cs, const struct ir3_shader_variant *fs) tu_cs_emit_pkt4(cs, REG_A6XX_GRAS_CNTL, 1); tu_cs_emit(cs, - CONDREG(ij_pix_regid, A6XX_GRAS_CNTL_VARYING) | - CONDREG(ij_cent_regid, A6XX_GRAS_CNTL_CENTROID) | - CONDREG(ij_samp_regid, A6XX_GRAS_CNTL_PERSAMP_VARYING) | + CONDREG(ij_pix_regid, A6XX_GRAS_CNTL_IJ_PERSP_PIXEL) | + CONDREG(ij_cent_regid, A6XX_GRAS_CNTL_IJ_PERSP_CENTROID) | + CONDREG(ij_samp_regid, A6XX_GRAS_CNTL_IJ_PERSP_SAMPLE) | COND(VALIDREG(ij_size_regid) && !sample_shading, A6XX_GRAS_CNTL_SIZE) | COND(VALIDREG(ij_size_regid) && sample_shading, A6XX_GRAS_CNTL_SIZE_PERSAMP) | COND(fs->fragcoord_compmask != 0, A6XX_GRAS_CNTL_SIZE | @@ -1175,9 +1175,9 @@ tu6_emit_fs_inputs(struct tu_cs *cs, const struct ir3_shader_variant *fs) tu_cs_emit_pkt4(cs, REG_A6XX_RB_RENDER_CONTROL0, 2); tu_cs_emit(cs, - CONDREG(ij_pix_regid, A6XX_RB_RENDER_CONTROL0_VARYING) | - CONDREG(ij_cent_regid, A6XX_RB_RENDER_CONTROL0_CENTROID) | - CONDREG(ij_samp_regid, A6XX_RB_RENDER_CONTROL0_PERSAMP_VARYING) | + CONDREG(ij_pix_regid, A6XX_RB_RENDER_CONTROL0_IJ_PERSP_PIXEL) | + CONDREG(ij_cent_regid, A6XX_RB_RENDER_CONTROL0_IJ_PERSP_CENTROID) | + CONDREG(ij_samp_regid, A6XX_RB_RENDER_CONTROL0_IJ_PERSP_SAMPLE) | COND(enable_varyings, A6XX_RB_RENDER_CONTROL0_UNK10) | COND(VALIDREG(ij_size_regid) && !sample_shading, A6XX_RB_RENDER_CONTROL0_SIZE) | COND(VALIDREG(ij_size_regid) && sample_shading, A6XX_RB_RENDER_CONTROL0_SIZE_PERSAMP) | diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index 238b7dafdd8..8ab7cd2cbb6 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -203,7 +203,7 @@ fd3_program_emit(struct fd_ringbuffer *ring, struct fd3_emit *emit, A3XX_HLSQ_CONTROL_1_REG_FRAGCOORDZWREGID(zwcoord_regid)); OUT_RING(ring, A3XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD(31) | A3XX_HLSQ_CONTROL_2_REG_FACENESSREGID(face_regid)); - OUT_RING(ring, A3XX_HLSQ_CONTROL_3_REG_REGID(vcoord_regid)); + OUT_RING(ring, A3XX_HLSQ_CONTROL_3_REG_IJPERSPCENTERREGID(vcoord_regid)); OUT_RING(ring, A3XX_HLSQ_VS_CONTROL_REG_CONSTLENGTH(vp->constlen) | A3XX_HLSQ_VS_CONTROL_REG_CONSTSTARTOFFSET(0) | A3XX_HLSQ_VS_CONTROL_REG_INSTRLENGTH(vpbuffersz)); diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c index 9484a219eb0..1a9c43ab9f5 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c @@ -235,7 +235,7 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit, OUT_RING(ring, A4XX_HLSQ_CONTROL_2_REG_PRIMALLOCTHRESHOLD(63) | 0x3f3f000 | /* XXX */ A4XX_HLSQ_CONTROL_2_REG_FACEREGID(face_regid)); - OUT_RING(ring, A4XX_HLSQ_CONTROL_3_REG_REGID(vcoord_regid) | + OUT_RING(ring, A4XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(vcoord_regid) | 0xfcfcfc00); OUT_RING(ring, 0x00fcfcfc); /* XXX HLSQ_CONTROL_4 */ diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_program.c b/src/gallium/drivers/freedreno/a5xx/fd5_program.c index 258a6431443..0d812487f0b 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_program.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_program.c @@ -511,7 +511,7 @@ fd5_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring, A5XX_HLSQ_CONTROL_2_REG_SAMPLEID(samp_id_regid) | A5XX_HLSQ_CONTROL_2_REG_SAMPLEMASK(samp_mask_regid) | 0xfc000000); /* XXX */ - OUT_RING(ring, A5XX_HLSQ_CONTROL_3_REG_FRAGCOORDXYREGID(vcoord_regid) | + OUT_RING(ring, A5XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(vcoord_regid) | 0xfcfcfc00); /* XXX */ OUT_RING(ring, A5XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(coord_regid) | A5XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID(zwcoord_regid) | @@ -537,18 +537,18 @@ fd5_program_emit(struct fd_context *ctx, struct fd_ringbuffer *ring, OUT_RING(ring, 0x00000010); /* XXX */ OUT_PKT4(ring, REG_A5XX_GRAS_CNTL, 1); - OUT_RING(ring, COND(s[FS].v->total_in > 0, A5XX_GRAS_CNTL_VARYING) | + OUT_RING(ring, COND(s[FS].v->total_in > 0, A5XX_GRAS_CNTL_IJ_PERSP_PIXEL) | COND(s[FS].v->fragcoord_compmask != 0, A5XX_GRAS_CNTL_COORD_MASK(s[FS].v->fragcoord_compmask) | - A5XX_GRAS_CNTL_UNK3) | - COND(s[FS].v->frag_face, A5XX_GRAS_CNTL_UNK3)); + A5XX_GRAS_CNTL_SIZE) | + COND(s[FS].v->frag_face, A5XX_GRAS_CNTL_SIZE)); OUT_PKT4(ring, REG_A5XX_RB_RENDER_CONTROL0, 2); - OUT_RING(ring, COND(s[FS].v->total_in > 0, A5XX_RB_RENDER_CONTROL0_VARYING) | + OUT_RING(ring, COND(s[FS].v->total_in > 0, A5XX_RB_RENDER_CONTROL0_IJ_PERSP_PIXEL) | COND(s[FS].v->fragcoord_compmask != 0, A5XX_RB_RENDER_CONTROL0_COORD_MASK(s[FS].v->fragcoord_compmask) | - A5XX_RB_RENDER_CONTROL0_UNK3) | - COND(s[FS].v->frag_face, A5XX_RB_RENDER_CONTROL0_UNK3)); + A5XX_RB_RENDER_CONTROL0_SIZE) | + COND(s[FS].v->frag_face, A5XX_RB_RENDER_CONTROL0_SIZE)); OUT_RING(ring, COND(samp_mask_regid != regid(63, 0), A5XX_RB_RENDER_CONTROL1_SAMPLEMASK) | diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index 5b5d9b56420..34fccfd1c84 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -638,12 +638,12 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen, A6XX_HLSQ_CONTROL_2_REG_SAMPLEID(samp_id_regid) | A6XX_HLSQ_CONTROL_2_REG_SAMPLEMASK(smask_in_regid) | A6XX_HLSQ_CONTROL_2_REG_SIZE(ij_size_regid)); - OUT_RING(ring, A6XX_HLSQ_CONTROL_3_REG_BARY_IJ_PIXEL(ij_pix_regid) | - A6XX_HLSQ_CONTROL_3_REG_BARY_IJ_CENTROID(ij_cent_regid) | + OUT_RING(ring, A6XX_HLSQ_CONTROL_3_REG_IJ_PERSP_PIXEL(ij_pix_regid) | + A6XX_HLSQ_CONTROL_3_REG_IJ_PERSP_CENTROID(ij_cent_regid) | 0xfc00fc00); /* XXX */ OUT_RING(ring, A6XX_HLSQ_CONTROL_4_REG_XYCOORDREGID(coord_regid) | A6XX_HLSQ_CONTROL_4_REG_ZWCOORDREGID(zwcoord_regid) | - A6XX_HLSQ_CONTROL_4_REG_BARY_IJ_PIXEL_PERSAMP(ij_samp_regid) | + A6XX_HLSQ_CONTROL_4_REG_IJ_PERSP_SAMPLE(ij_samp_regid) | 0x0000fc00); /* XXX */ OUT_RING(ring, 0xfc); /* XXX */ @@ -668,9 +668,9 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen, OUT_PKT4(ring, REG_A6XX_GRAS_CNTL, 1); OUT_RING(ring, - CONDREG(ij_pix_regid, A6XX_GRAS_CNTL_VARYING) | - CONDREG(ij_cent_regid, A6XX_GRAS_CNTL_CENTROID) | - CONDREG(ij_samp_regid, A6XX_GRAS_CNTL_PERSAMP_VARYING) | + CONDREG(ij_pix_regid, A6XX_GRAS_CNTL_IJ_PERSP_PIXEL) | + CONDREG(ij_cent_regid, A6XX_GRAS_CNTL_IJ_PERSP_CENTROID) | + CONDREG(ij_samp_regid, A6XX_GRAS_CNTL_IJ_PERSP_SAMPLE) | COND(VALIDREG(ij_size_regid) && !sample_shading, A6XX_GRAS_CNTL_SIZE) | COND(VALIDREG(ij_size_regid) && sample_shading, A6XX_GRAS_CNTL_SIZE_PERSAMP) | COND(fs->fragcoord_compmask != 0, A6XX_GRAS_CNTL_SIZE | @@ -679,9 +679,9 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen, OUT_PKT4(ring, REG_A6XX_RB_RENDER_CONTROL0, 2); OUT_RING(ring, - CONDREG(ij_pix_regid, A6XX_RB_RENDER_CONTROL0_VARYING) | - CONDREG(ij_cent_regid, A6XX_RB_RENDER_CONTROL0_CENTROID) | - CONDREG(ij_samp_regid, A6XX_RB_RENDER_CONTROL0_PERSAMP_VARYING) | + CONDREG(ij_pix_regid, A6XX_RB_RENDER_CONTROL0_IJ_PERSP_PIXEL) | + CONDREG(ij_cent_regid, A6XX_RB_RENDER_CONTROL0_IJ_PERSP_CENTROID) | + CONDREG(ij_samp_regid, A6XX_RB_RENDER_CONTROL0_IJ_PERSP_SAMPLE) | COND(enable_varyings, A6XX_RB_RENDER_CONTROL0_UNK10) | COND(VALIDREG(ij_size_regid) && !sample_shading, A6XX_RB_RENDER_CONTROL0_SIZE) | COND(VALIDREG(ij_size_regid) && sample_shading, A6XX_RB_RENDER_CONTROL0_SIZE_PERSAMP) |