Revert "freedreno,ir3: rename Z_CLAMP_ENABLE to Z_CLIP_DISABLE"

This reverts commit 6cb41c5188. It was
incorrect and the issue it was trying to fix was actually a zink bug.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18861>
This commit is contained in:
Connor Abbott
2022-09-28 12:32:42 +02:00
committed by Marge Bot
parent 7308996921
commit 5af6dad179
6 changed files with 11 additions and 11 deletions

View File

@@ -2109,7 +2109,7 @@ to upconvert to 32b float internally?
<bitfield name="Z_TEST_ENABLE" pos="0" type="boolean"/> <bitfield name="Z_TEST_ENABLE" pos="0" type="boolean"/>
<bitfield name="Z_WRITE_ENABLE" pos="1" type="boolean"/> <bitfield name="Z_WRITE_ENABLE" pos="1" type="boolean"/>
<bitfield name="ZFUNC" low="2" high="4" type="adreno_compare_func"/> <bitfield name="ZFUNC" low="2" high="4" type="adreno_compare_func"/>
<bitfield name="Z_CLIP_DISABLE" pos="5" type="boolean"/> <bitfield name="Z_CLAMP_ENABLE" pos="5" type="boolean"/>
<doc> <doc>
Z_READ_ENABLE bit is set for zfunc other than GL_ALWAYS or GL_NEVER Z_READ_ENABLE bit is set for zfunc other than GL_ALWAYS or GL_NEVER
also set when Z_BOUNDS_ENABLE is set also set when Z_BOUNDS_ENABLE is set

View File

@@ -4123,7 +4123,7 @@ tu_pipeline_builder_parse_depth_stencil(struct tu_pipeline_builder *builder,
A6XX_RB_DEPTH_CNTL_Z_READ_ENABLE; /* TODO: don't set for ALWAYS/NEVER */ A6XX_RB_DEPTH_CNTL_Z_READ_ENABLE; /* TODO: don't set for ALWAYS/NEVER */
if (builder->depth_clip_disable) if (builder->depth_clip_disable)
rb_depth_cntl |= A6XX_RB_DEPTH_CNTL_Z_CLIP_DISABLE; rb_depth_cntl |= A6XX_RB_DEPTH_CNTL_Z_CLAMP_ENABLE;
if (ds_info->depthWriteEnable) if (ds_info->depthWriteEnable)
rb_depth_cntl |= A6XX_RB_DEPTH_CNTL_Z_WRITE_ENABLE; rb_depth_cntl |= A6XX_RB_DEPTH_CNTL_Z_WRITE_ENABLE;

View File

@@ -1000,11 +1000,11 @@ fd6_emit_non_ring(struct fd_ringbuffer *ring, struct fd6_emit *emit) assert_dt
.vert = guardband_y)); .vert = guardband_y));
} }
/* The clamp ranges are only used when the rasterizer disables /* The clamp ranges are only used when the rasterizer wants depth
* depth clip. * clamping.
*/ */
if ((dirty & (FD_DIRTY_VIEWPORT | FD_DIRTY_RASTERIZER)) && if ((dirty & (FD_DIRTY_VIEWPORT | FD_DIRTY_RASTERIZER)) &&
fd_depth_clip_disabled(ctx)) { fd_depth_clamp_enabled(ctx)) {
float zmin, zmax; float zmin, zmax;
util_viewport_zmin_zmax(&ctx->viewport, ctx->rasterizer->clip_halfz, util_viewport_zmin_zmax(&ctx->viewport, ctx->rasterizer->clip_halfz,
&zmin, &zmax); &zmin, &zmax);
@@ -1054,7 +1054,7 @@ fd6_emit_state(struct fd_ringbuffer *ring, struct fd6_emit *emit)
state = fd6_zsa_state( state = fd6_zsa_state(
ctx, ctx,
util_format_is_pure_integer(pipe_surface_format(pfb->cbufs[0])), util_format_is_pure_integer(pipe_surface_format(pfb->cbufs[0])),
fd_depth_clip_disabled(ctx)); fd_depth_clamp_enabled(ctx));
fd_ringbuffer_ref(state); fd_ringbuffer_ref(state);
break; break;
case FD6_GROUP_LRZ: case FD6_GROUP_LRZ:

View File

@@ -216,8 +216,8 @@ fd6_zsa_state_create(struct pipe_context *pctx,
OUT_PKT4(ring, REG_A6XX_RB_DEPTH_CNTL, 1); OUT_PKT4(ring, REG_A6XX_RB_DEPTH_CNTL, 1);
OUT_RING(ring, OUT_RING(ring,
so->rb_depth_cntl | COND(i & FD6_ZSA_DEPTH_CLIP_DISABLE, so->rb_depth_cntl | COND(i & FD6_ZSA_DEPTH_CLAMP,
A6XX_RB_DEPTH_CNTL_Z_CLIP_DISABLE)); A6XX_RB_DEPTH_CNTL_Z_CLAMP_ENABLE));
OUT_PKT4(ring, REG_A6XX_RB_STENCILMASK, 2); OUT_PKT4(ring, REG_A6XX_RB_STENCILMASK, 2);
OUT_RING(ring, so->rb_stencilmask); OUT_RING(ring, so->rb_stencilmask);

View File

@@ -36,7 +36,7 @@
#include "fd6_context.h" #include "fd6_context.h"
#define FD6_ZSA_NO_ALPHA (1 << 0) #define FD6_ZSA_NO_ALPHA (1 << 0)
#define FD6_ZSA_DEPTH_CLIP_DISABLE (1 << 1) #define FD6_ZSA_DEPTH_CLAMP (1 << 1)
struct fd6_zsa_stateobj { struct fd6_zsa_stateobj {
struct pipe_depth_stencil_alpha_state base; struct pipe_depth_stencil_alpha_state base;
@@ -68,7 +68,7 @@ fd6_zsa_state(struct fd_context *ctx, bool no_alpha, bool depth_clamp) assert_dt
if (no_alpha) if (no_alpha)
variant |= FD6_ZSA_NO_ALPHA; variant |= FD6_ZSA_NO_ALPHA;
if (depth_clamp) if (depth_clamp)
variant |= FD6_ZSA_DEPTH_CLIP_DISABLE; variant |= FD6_ZSA_DEPTH_CLAMP;
return fd6_zsa_stateobj(ctx->zsa)->stateobj[variant]; return fd6_zsa_stateobj(ctx->zsa)->stateobj[variant];
} }

View File

@@ -55,7 +55,7 @@ fd_blend_enabled(struct fd_context *ctx, unsigned n) assert_dt
} }
static inline bool static inline bool
fd_depth_clip_disabled(struct fd_context *ctx) assert_dt fd_depth_clamp_enabled(struct fd_context *ctx) assert_dt
{ {
return !(ctx->rasterizer->depth_clip_near && return !(ctx->rasterizer->depth_clip_near &&
ctx->rasterizer->depth_clip_far); ctx->rasterizer->depth_clip_far);