radv: Explicitly cast TIMESTAMP_NOT_READY value to uin32_t where needed.
authorOschowa <oschowa@web.de>
Wed, 27 May 2020 10:09:20 +0000 (12:09 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Jun 2020 21:31:17 +0000 (21:31 +0000)
Fixes a clang warning.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>

src/amd/vulkan/radv_query.c

index ea2128fc4c0673e38fa751eae4f6fb3ba817672f..839adf7b23ad365de11636dfccb672853c874948 100644 (file)
@@ -1677,7 +1677,7 @@ void radv_CmdResetQueryPool(
        RADV_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
        RADV_FROM_HANDLE(radv_query_pool, pool, queryPool);
        uint32_t value = pool->type == VK_QUERY_TYPE_TIMESTAMP
-                        ? TIMESTAMP_NOT_READY : 0;
+                        ? (uint32_t)TIMESTAMP_NOT_READY : 0;
        uint32_t flush_bits = 0;
 
        /* Make sure to sync all previous work if the given command buffer has
@@ -1712,7 +1712,7 @@ void radv_ResetQueryPool(
        RADV_FROM_HANDLE(radv_query_pool, pool, queryPool);
 
        uint32_t value = pool->type == VK_QUERY_TYPE_TIMESTAMP
-                        ? TIMESTAMP_NOT_READY : 0;
+                        ? (uint32_t)TIMESTAMP_NOT_READY : 0;
        uint32_t *data =  (uint32_t*)(pool->ptr + firstQuery * pool->stride);
        uint32_t *data_end = (uint32_t*)(pool->ptr + (firstQuery + queryCount) * pool->stride);