diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-04-12 00:45:51 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-04-12 07:38:58 +0200 |
commit | b35b5951fc5a0e0e697fb291d8fa257d413c717f (patch) | |
tree | b8abeef21fdc039dd3792b9bf4012eb43513275f /src/amd | |
parent | 0763453291f59531e13c1be916feaf7af14dddaf (diff) |
radv: Stop shadowing the result in radv_GetQueryPoolResults.
The outer result was referred to, which meant bugs.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index bd293b58e69..fa5a3b6df24 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -876,7 +876,7 @@ VkResult radv_GetQueryPoolResults( } case VK_QUERY_TYPE_OCCLUSION: { volatile uint64_t const *src64 = (volatile uint64_t const *)src; - uint64_t result = 0; + uint64_t sample_count = 0; int db_count = get_max_db(device); available = 1; @@ -890,7 +890,7 @@ VkResult radv_GetQueryPoolResults( if (!(start & (1ull << 63)) || !(end & (1ull << 63))) available = 0; else { - result += end - start; + sample_count += end - start; } } @@ -901,10 +901,10 @@ VkResult radv_GetQueryPoolResults( } if (flags & VK_QUERY_RESULT_64_BIT) { - *(uint64_t*)dest = result; + *(uint64_t*)dest = sample_count; dest += 8; } else { - *(uint32_t*)dest = result; + *(uint32_t*)dest = sample_count; dest += 4; } break; |