diff options
author | Hyunjun Ko <[email protected]> | 2020-04-23 02:28:34 +0000 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-23 05:19:04 +0000 |
commit | 227df2a2badf0047a3e6e2c1d196aa1b26427b10 (patch) | |
tree | af2bc3dc3a1ee423e8a8800aa85860217518dfed /src/freedreno | |
parent | 85f84ea148474554af42ca513b9cb7c43a78a738 (diff) |
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 <[email protected]>
Reviewed-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4693>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/vulkan/tu_pipeline.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index b2d5b69393c..e3ac144603a 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -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); |