zink: require occlusionQueryPrecise for occlusion queries
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 10 Aug 2021 14:16:15 +0000 (10:16 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 27 Aug 2021 02:26:17 +0000 (02:26 +0000)
ensure this is present to avoid driver explosions

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12583>

src/gallium/drivers/zink/zink_screen.c

index 855e282..a432717 100644 (file)
@@ -389,7 +389,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
       return screen->info.props.limits.maxColorAttachments;
 
    case PIPE_CAP_OCCLUSION_QUERY:
-      return 1;
+      return screen->info.feats.features.occlusionQueryPrecise;
 
    case PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS:
       return screen->info.have_EXT_sample_locations && screen->info.have_EXT_extended_dynamic_state;