Mesa (main): freedreno/ir3: get the post-lowering clip/cull mask
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Nov 29 05:05:36 UTC 2021
Module: Mesa
Branch: main
Commit: f533d7a4466987561095158f3762ba557e6fd7a4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f533d7a4466987561095158f3762ba557e6fd7a4
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sat Nov 20 19:17:43 2021 -0500
freedreno/ir3: get the post-lowering clip/cull mask
The variant may include a lowered gl_Clip/CullDistance array. So we have
to use the variant's info (which is not available). However we save off
the clip/cull masks already, so just reuse those.
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13891>
---
src/freedreno/ir3/ir3_compiler_nir.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 05c93726a32..bb4b6276e5d 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -3573,10 +3573,7 @@ pack_inlocs(struct ir3_context *ctx)
* use the NIR clip/cull distances to avoid reading ucp_enables in the
* shader key.
*/
- unsigned clip_cull_size =
- ctx->so->shader->nir->info.clip_distance_array_size +
- ctx->so->shader->nir->info.cull_distance_array_size;
- unsigned clip_cull_mask = MASK(clip_cull_size);
+ unsigned clip_cull_mask = so->clip_mask | so->cull_mask;
for (unsigned i = 0; i < so->inputs_count; i++) {
unsigned compmask = 0, maxcomp = 0;
More information about the mesa-commit
mailing list