diff options
author | Ilia Mirkin <[email protected]> | 2015-08-26 00:11:23 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-08-29 16:18:04 -0400 |
commit | a5a96118ed728969c5a41e643cf6ffd0c42461f0 (patch) | |
tree | ca4e58814fb01b0c2c3264a9dfe063aec8b934d9 /src/gallium/drivers/freedreno/a3xx | |
parent | 58e24b4761ec8c348bf6825c2355a6e047599306 (diff) |
freedreno/a3xx: implement half-z clipping
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/a3xx.xml.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h index 441bfec5756..a157dc33db9 100644 --- a/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h +++ b/src/gallium/drivers/freedreno/a3xx/a3xx.xml.h @@ -680,6 +680,7 @@ static inline uint32_t REG_A3XX_CP_PROTECT_REG(uint32_t i0) { return 0x00000460 #define A3XX_GRAS_CL_CLIP_CNTL_VP_CLIP_CODE_IGNORE 0x00080000 #define A3XX_GRAS_CL_CLIP_CNTL_VP_XFORM_DISABLE 0x00100000 #define A3XX_GRAS_CL_CLIP_CNTL_PERSP_DIVISION_DISABLE 0x00200000 +#define A3XX_GRAS_CL_CLIP_CNTL_ZERO_GB_SCALE_Z 0x00400000 #define A3XX_GRAS_CL_CLIP_CNTL_ZCOORD 0x00800000 #define A3XX_GRAS_CL_CLIP_CNTL_WCOORD 0x01000000 #define A3XX_GRAS_CL_CLIP_CNTL_ZCLIP_DISABLE 0x02000000 diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c b/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c index 583caaa806f..260eacd301a 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c @@ -65,7 +65,8 @@ fd3_rasterizer_state_create(struct pipe_context *pctx, if (cso->multisample) TODO */ - so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER; /* ??? */ + so->gras_cl_clip_cntl = A3XX_GRAS_CL_CLIP_CNTL_IJ_PERSP_CENTER /* ??? */ | + COND(cso->clip_halfz, A3XX_GRAS_CL_CLIP_CNTL_ZERO_GB_SCALE_Z); so->gras_su_point_minmax = A3XX_GRAS_SU_POINT_MINMAX_MIN(psize_min) | A3XX_GRAS_SU_POINT_MINMAX_MAX(psize_max); |