Mesa (main): radv: fix bounds checking for zero vertex stride on GFX6-7
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 16 07:00:46 UTC 2021
Module: Mesa
Branch: main
Commit: 7a1cc56e405b247702e91180c1143ca96b96b5bf
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7a1cc56e405b247702e91180c1143ca96b96b5bf
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Thu Jul 15 10:10:09 2021 +0200
radv: fix bounds checking for zero vertex stride on GFX6-7
GFX6 and GFX10+ have similar logic.
This fixes test_zero_vertex_stride from vkd3d-proton on
Pitcairn (GFX6) and on Bonaire (GFX7).
Cc: 21.2 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11904>
---
src/amd/vulkan/radv_cmd_buffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
index 56308a4dca7..66ebd70ad34 100644
--- a/src/amd/vulkan/radv_cmd_buffer.c
+++ b/src/amd/vulkan/radv_cmd_buffer.c
@@ -2933,10 +2933,10 @@ radv_flush_vertex_descriptors(struct radv_cmd_buffer *cmd_buffer, bool pipeline_
/* GFX10 uses OOB_SELECT_RAW if stride==0, so convert num_records from elements into
* into bytes in that case. GFX8 always uses bytes.
*/
- if (num_records && (chip == GFX8 || (chip >= GFX10 && !stride))) {
+ if (num_records && (chip == GFX8 || (chip != GFX9 && !stride))) {
num_records = (num_records - 1) * stride + attrib_end;
} else if (!num_records) {
- /* On GFX9 (GFX6/7 untested), it seems bounds checking is disabled if both
+ /* On GFX9, it seems bounds checking is disabled if both
* num_records and stride are zero. This doesn't seem necessary on GFX8, GFX10 and
* GFX10.3 but it doesn't hurt.
*/
More information about the mesa-commit
mailing list