Module: Mesa
Branch: master
Commit: 6865ec210bd7487bc889e2c94ed91a4f52ef0f8f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6865ec210bd7487bc889e2c94ed91a4f52ef0f8f

Author: Dave Airlie <[email protected]>
Date:   Mon Mar 15 16:56:48 2021 +1000

lavapipe: fix writing availability for queries.

If the availability has to be written it needs to be written
 to the correct place.

The host query reset tests fall over this.

Reviewed-By: Mike Blumenkrantz <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9594>

---

 src/gallium/frontends/lavapipe/lvp_query.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/gallium/frontends/lavapipe/lvp_query.c 
b/src/gallium/frontends/lavapipe/lvp_query.c
index 87deb1504e8..7bf4346a46e 100644
--- a/src/gallium/frontends/lavapipe/lvp_query.c
+++ b/src/gallium/frontends/lavapipe/lvp_query.c
@@ -138,8 +138,12 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_GetQueryPoolResults(
                *(uint64_t *)dptr = result.u64;
                dptr += 8;
             }
-         } else
-            dptr += stride;
+         } else {
+            if (pool->type == VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT)
+               dptr += 16;
+            else
+               dptr += 8;
+         }
 
       } else {
          if (ready || (flags & VK_QUERY_RESULT_PARTIAL_BIT)) {
@@ -174,7 +178,10 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_GetQueryPoolResults(
                dptr += 4;
             }
          } else
-            dptr += stride;
+            if (pool->type == VK_QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT)
+               dptr += 8;
+            else
+               dptr += 4;
       }
 
       if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to