zink: only inspect dual-src limit if feature enabled
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Tue, 4 Feb 2020 10:21:58 +0000 (11:21 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 Feb 2020 11:01:47 +0000 (11:01 +0000)
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3689>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3689>

src/gallium/drivers/zink/zink_screen.c

index 9503194711630cca10ee8d826bc914dcc6ad1fd8..b3299976f8f3ddd2ae185e7d2581963c35413112 100644 (file)
@@ -95,6 +95,8 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return 1;
 
    case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS:
+      if (!screen->feats.dualSrcBlend)
+         return 0;
       return screen->props.limits.maxFragmentDualSrcAttachments;
 
    case PIPE_CAP_POINT_SPRITE: