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

Author: Mike Blumenkrantz <[email protected]>
Date:   Sun Mar 14 19:28:52 2021 -0400

zink: don't use PARTIAL bit for query results with time queries

this is illegal

Reviewed-by: Dave Airlie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9811>

---

 src/gallium/drivers/zink/zink_query.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_query.c 
b/src/gallium/drivers/zink/zink_query.c
index 4c619d03bf6..ab277a7b664 100644
--- a/src/gallium/drivers/zink/zink_query.c
+++ b/src/gallium/drivers/zink/zink_query.c
@@ -925,15 +925,16 @@ zink_get_query_result_resource(struct pipe_context *pctx,
        * buffer
        */
 
+      VkQueryResultFlags flag = is_time_query(query) ? 0 : 
VK_QUERY_RESULT_PARTIAL_BIT;
       if (fences) {
          struct pipe_resource *staging = pipe_buffer_create(pctx->screen, 0, 
PIPE_USAGE_STAGING, result_size * 2);
-         copy_results_to_buffer(ctx, query, zink_resource(staging), 0, 1, 
size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | 
VK_QUERY_RESULT_PARTIAL_BIT);
+         copy_results_to_buffer(ctx, query, zink_resource(staging), 0, 1, 
size_flags | VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | flag);
          zink_copy_buffer(ctx, &ctx->batch, res, zink_resource(staging), 
offset, result_size, result_size);
          pipe_resource_reference(&staging, NULL);
       } else {
          uint64_t u64[2] = {0};
          if (vkGetQueryPoolResults(screen->dev, query->query_pool, query_id, 
1, 2 * result_size, u64,
-                                   0, size_flags | 
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | VK_QUERY_RESULT_PARTIAL_BIT) != 
VK_SUCCESS) {
+                                   0, size_flags | 
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT | flag) != VK_SUCCESS) {
             debug_printf("zink: getting query result failed\n");
             return;
          }

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

Reply via email to