- SVGADXOcclusionPredicateQueryResult occResult;
- assert(svga_have_vgpu10(svga));
- ret = get_query_result_vgpu10(svga, sq, wait,
- (void *)&occResult, sizeof(occResult));
- vresult->b = occResult.anySamplesRendered != 0;
+ if (svga_have_vgpu10(svga)) {
+ SVGADXOcclusionPredicateQueryResult occResult;
+ ret = get_query_result_vgpu10(svga, sq, wait,
+ (void *)&occResult, sizeof(occResult));
+ vresult->b = occResult.anySamplesRendered != 0;
+ } else {
+ uint64_t count = 0;
+ ret = get_query_result_vgpu9(svga, sq, wait, &count);
+ vresult->b = count != 0;
+ }