radeonsi: set amdgpu-gds-size for mode == 2 of compute-based culling
authorMarek Olšák <marek.olsak@amd.com>
Fri, 20 Mar 2020 22:02:20 +0000 (18:02 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sat, 28 Mar 2020 00:58:34 +0000 (00:58 +0000)
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>

src/gallium/drivers/radeonsi/si_compute_prim_discard.c

index 3843b3959466b2caaf055ddda2990c09481b8871..ec95ec1214f0d25207b909f4990ab034ffa35494 100644 (file)
@@ -366,7 +366,10 @@ void si_build_prim_discard_compute_shader(struct si_shader_context *ctx)
        si_llvm_create_func(ctx, "prim_discard_cs", NULL, 0, THREADGROUP_SIZE);
        ctx->type = old_type;
 
-       if (VERTEX_COUNTER_GDS_MODE == 1) {
+       if (VERTEX_COUNTER_GDS_MODE == 2) {
+               ac_llvm_add_target_dep_function_attr(ctx->main_fn,
+                                                    "amdgpu-gds-size", 256);
+       } else if (VERTEX_COUNTER_GDS_MODE == 1) {
                ac_llvm_add_target_dep_function_attr(ctx->main_fn, "amdgpu-gds-size",
                                                     GDS_SIZE_UNORDERED);
        }