turnip: Fix crashes when geometry shader constants aren't used
Fixes dEQP-VK.transform_feedback.fuzz.2_level_array.float.geometry, for example. Signed-off-by: Hyunjun Ko <zzoon@igalia.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4693>
This commit is contained in:
parent
85f84ea148
commit
227df2a2ba
|
@ -897,6 +897,8 @@ tu6_emit_link_map(struct tu_cs *cs,
|
|||
int size = DIV_ROUND_UP(num_loc, 4);
|
||||
|
||||
size = (MIN2(size + base, consumer->constlen) - base) * 4;
|
||||
if (size <= 0)
|
||||
return;
|
||||
|
||||
tu6_emit_const(cs, CP_LOAD_STATE6_GEOM, base, SB6_GS_SHADER, 0, size,
|
||||
patch_locs);
|
||||
|
|
Loading…
Reference in New Issue