radeonsi: remove the Z culling option from the primitive discard CS

Not useful.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11102>
This commit is contained in:
Marek Olšák 2021-05-30 20:29:29 -04:00 committed by Marge Bot
parent a448074d05
commit fc95ba6c86
3 changed files with 0 additions and 14 deletions

View File

@ -157,8 +157,6 @@
#define THREADGROUPS_PER_CU 1 /* TGs to launch on 1 CU before going onto the next, max 8 */
#define MAX_WAVES_PER_SH 0 /* no limit */
#define INDEX_STORES_USE_SLC 1 /* don't cache indices if L2 is full */
/* Don't cull Z. We already do (W < 0) culling for primitives behind the viewer. */
#define CULL_Z 0
/* 0 = unordered memory counter, 1 = unordered GDS counter, 2 = ordered GDS counter */
#define VERTEX_COUNTER_GDS_MODE 2
#define GDS_SIZE_UNORDERED (4 * 1024) /* only for the unordered GDS counter */
@ -664,12 +662,9 @@ void si_build_prim_discard_compute_shader(struct si_shader_context *ctx)
options.cull_front = key->opt.cs_cull_front;
options.cull_back = key->opt.cs_cull_back;
options.cull_view_xy = true;
options.cull_view_near_z = CULL_Z && key->opt.cs_cull_z;
options.cull_view_far_z = CULL_Z && key->opt.cs_cull_z;
options.cull_small_prims = true;
options.cull_zero_area = true;
options.cull_w = true;
options.use_halfz_clip_space = key->opt.cs_halfz_clip_space;
LLVMValueRef accepted =
ac_cull_triangle(&ctx->ac, pos, prim_restart_accepted, vp_scale, vp_translate,
@ -878,11 +873,6 @@ static bool si_shader_select_prim_discard_cs(struct si_context *sctx,
key.opt.cs_cull_back = sctx->viewport0_y_inverted ? rs->cull_front : rs->cull_back;
}
if (!rs->depth_clamp_any && CULL_Z) {
key.opt.cs_cull_z = 1;
key.opt.cs_halfz_clip_space = rs->clip_halfz;
}
sctx->cs_prim_discard_state.cso = sctx->shader.vs.cso;
sctx->cs_prim_discard_state.current = NULL;

View File

@ -1192,8 +1192,6 @@ static void si_dump_shader_key(const struct si_shader *shader, FILE *f)
fprintf(f, " opt.cs_need_correct_orientation = %u\n", key->opt.cs_need_correct_orientation);
fprintf(f, " opt.cs_cull_front = %u\n", key->opt.cs_cull_front);
fprintf(f, " opt.cs_cull_back = %u\n", key->opt.cs_cull_back);
fprintf(f, " opt.cs_cull_z = %u\n", key->opt.cs_cull_z);
fprintf(f, " opt.cs_halfz_clip_space = %u\n", key->opt.cs_halfz_clip_space);
break;
case MESA_SHADER_TESS_CTRL:

View File

@ -694,8 +694,6 @@ struct si_shader_key {
unsigned cs_need_correct_orientation : 1;
unsigned cs_cull_front : 1;
unsigned cs_cull_back : 1;
unsigned cs_cull_z : 1;
unsigned cs_halfz_clip_space : 1;
/* VS and TCS have the same number of patch vertices. */
unsigned same_patch_vertices:1;