summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2021-10-27 01:25:49 -0400
committerEric Engestrom <eric@engestrom.ch>2021-11-03 20:15:46 +0000
commited5c8bb1d22a77f8c8538a916cae369e27ad7d3c (patch)
tree3e9043aad14606971482537102cdb7af6c5ad556
parentb255dbcdd90bea7ffc93c0ca65469d37597e58fa (diff)
downloadmesa-ed5c8bb1d22a77f8c8538a916cae369e27ad7d3c.tar.gz
radeonsi: enable shader culling for indirect draws
It was mistakenly disabled, decreasing performance a lot. Only valid for Mesa 21.3. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Cc: 21.3 <mesa-stable@lists.freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13539> (cherry picked from commit 98f696c972f9415892c19b405217285003234058)
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 236f30ba38c..c9fffb62ac5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1084,7 +1084,7 @@
"description": "radeonsi: enable shader culling for indirect draws",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp
index a16f834831c..e090244ae9c 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.cpp
+++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp
@@ -2210,6 +2210,7 @@ static void si_draw(struct pipe_context *ctx,
si_resource(indirect->indirect_draw_count)->TC_L2_dirty = false;
}
}
+ total_direct_count = INT_MAX; /* just set something other than 0 to enable shader culling */
} else {
total_direct_count = min_direct_count = draws[0].count;