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@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11904>
This commit is contained in:
parent
0ee322acdb
commit
7a1cc56e40
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue