radv: use WAIT_REG_MEM_GREATER_OR_EQUAL instead of a magic value
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 30 Oct 2018 11:29:13 +0000 (12:29 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 31 Oct 2018 08:21:28 +0000 (09:21 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/common/sid.h
src/amd/vulkan/radv_query.c

index d88ecf558069b76eaa4d599f0254ac08ba1cf746..5c53133147f728e9e28c7d6c06a8f38f31a9cd94 100644 (file)
 #define PKT3_WAIT_REG_MEM                      0x3C
 #define                WAIT_REG_MEM_EQUAL              3
 #define                WAIT_REG_MEM_NOT_EQUAL          4
+#define                WAIT_REG_MEM_GREATER_OR_EQUAL   5
 #define         WAIT_REG_MEM_MEM_SPACE(x)       (((unsigned)(x) & 0x3) << 4)
 #define         WAIT_REG_MEM_PFP               (1 << 8)
 #define PKT3_MEM_WRITE                         0x3D /* not on CIK */
index 318d6c7afee3550f69d4d95f26873e52b9dcfdcc..57ea22fb8478b7ecd56a3bceee4647eadcae41f9 100644 (file)
@@ -1039,7 +1039,7 @@ void radv_CmdCopyQueryPoolResults(
 
                                /* Waits on the upper word of the last DB entry */
                                radeon_emit(cs, PKT3(PKT3_WAIT_REG_MEM, 5, 0));
-                               radeon_emit(cs, 5 | WAIT_REG_MEM_MEM_SPACE(1));
+                               radeon_emit(cs, WAIT_REG_MEM_GREATER_OR_EQUAL | WAIT_REG_MEM_MEM_SPACE(1));
                                radeon_emit(cs, src_va);
                                radeon_emit(cs, src_va >> 32);
                                radeon_emit(cs, 0x80000000); /* reference value */