hk: fix patch count = 0 handling
fixes fault in dEQP-VK.tessellation.misc_draw.triangles_no_patches Backport-to: 25.1 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34612> (cherry picked from commit e541ffcbe862956f16d2fe38716c97c0a14c06a5)
This commit is contained in:

committed by
Eric Engestrom

parent
2099c23dab
commit
2be4fb62cf
@@ -734,7 +734,7 @@
|
||||
"description": "hk: fix patch count = 0 handling",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -771,7 +771,7 @@ libagx_prefix_sum_tess(global struct libagx_tess_args *p, global uint *c_prims,
|
||||
return;
|
||||
|
||||
/* The last element of an inclusive prefix sum is the total sum */
|
||||
uint total = p->counts[p->nr_patches - 1];
|
||||
uint total = p->nr_patches > 0 ? p->counts[p->nr_patches - 1] : 0;
|
||||
|
||||
/* Allocate 4-byte indices */
|
||||
uint32_t elsize_B = sizeof(uint32_t);
|
||||
|
Reference in New Issue
Block a user