Mesa (main): d3d12: Predication fix: For boolean queries used for predication, D3D12 uses uint64, so clear at least a uint64 in the result

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 14 16:12:31 UTC 2022


Module: Mesa
Branch: main
Commit: dbc5c3929ee8fd3b60f6f9d820e85e4d48465212
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbc5c3929ee8fd3b60f6f9d820e85e4d48465212

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Mon Jan 10 09:39:20 2022 -0800

d3d12: Predication fix: For boolean queries used for predication, D3D12 uses uint64, so clear at least a uint64 in the result

Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14486>

---

 src/gallium/drivers/d3d12/d3d12_query.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/d3d12/d3d12_query.cpp b/src/gallium/drivers/d3d12/d3d12_query.cpp
index 32141016ae2..714efeba1b2 100644
--- a/src/gallium/drivers/d3d12/d3d12_query.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_query.cpp
@@ -191,7 +191,7 @@ accumulate_result(struct d3d12_context *ctx, struct d3d12_query *q,
    D3D12_QUERY_DATA_PIPELINE_STATISTICS *results_stats = (D3D12_QUERY_DATA_PIPELINE_STATISTICS *)results;
    D3D12_QUERY_DATA_SO_STATISTICS *results_so = (D3D12_QUERY_DATA_SO_STATISTICS *)results;
 
-   util_query_clear_result(result, q->type);
+   memset(result, 0, sizeof(*result));
    for (unsigned i = 0; i < q->curr_query; ++i) {
       switch (q->type) {
       case PIPE_QUERY_OCCLUSION_PREDICATE:



More information about the mesa-commit mailing list