diff options
author | Marek Olšák <[email protected]> | 2018-08-21 21:59:23 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-09-06 21:53:00 -0400 |
commit | daa19363def83c025ccf16106b3402268bf1f56f (patch) | |
tree | 94fd791ebf78e36f29ddf8c8cd665a3731688d6e /src/gallium/drivers/freedreno/a3xx | |
parent | 7b26741806c521279a1b83f2eae40a277d806626 (diff) |
gallium: split depth_clip into depth_clip_near & depth_clip_far
for AMD_depth_clamp_separate.
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 4 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_program.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index bab3d3d28c8..c970ef63ee7 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -557,7 +557,7 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, if (fp->has_kill) { val |= A3XX_RB_DEPTH_CONTROL_EARLY_Z_DISABLE; } - if (!ctx->rasterizer->depth_clip) { + if (!ctx->rasterizer->depth_clip_near) { val |= A3XX_RB_DEPTH_CONTROL_Z_CLAMP_ENABLE; } OUT_PKT0(ring, REG_A3XX_RB_DEPTH_CONTROL, 1); @@ -652,7 +652,7 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, * or nothing deal. So when we disable clipping, we must handle the * viewport clip via scissors. */ - if (!ctx->rasterizer->depth_clip) { + if (!ctx->rasterizer->depth_clip_near) { struct pipe_viewport_state *vp = &ctx->viewport; minx = MAX2(minx, (int)floorf(vp->translate[0] - fabsf(vp->scale[0]))); miny = MAX2(miny, (int)floorf(vp->translate[1] - fabsf(vp->scale[1]))); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_program.c b/src/gallium/drivers/freedreno/a3xx/fd3_program.c index b6f8ff33c47..87ba28a6b2c 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_program.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_program.c @@ -83,7 +83,7 @@ fd3_needs_manual_clipping(const struct ir3_shader *shader, { uint64_t outputs = ir3_shader_outputs(shader); - return (!rast->depth_clip || + return (!rast->depth_clip_near || util_bitcount(rast->clip_plane_enable) > 6 || outputs & ((1ULL << VARYING_SLOT_CLIP_VERTEX) | (1ULL << VARYING_SLOT_CLIP_DIST0) | diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c b/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c index 260eacd301a..6efff82e336 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_rasterizer.c @@ -98,7 +98,7 @@ fd3_rasterizer_state_create(struct pipe_context *pctx, if (cso->offset_tri) so->gras_su_mode_control |= A3XX_GRAS_SU_MODE_CONTROL_POLY_OFFSET; - if (!cso->depth_clip) + if (!cso->depth_clip_near) so->gras_cl_clip_cntl |= A3XX_GRAS_CL_CLIP_CNTL_CLIP_DISABLE; return so; |