diff --git a/src/freedreno/registers/adreno/adreno_pm4.xml b/src/freedreno/registers/adreno/adreno_pm4.xml index c4bf6b43318..ba46e9d5ae4 100644 --- a/src/freedreno/registers/adreno/adreno_pm4.xml +++ b/src/freedreno/registers/adreno/adreno_pm4.xml @@ -2053,28 +2053,20 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords) - Executes the following DWORDs of commands if the dword at ADDR0 - is not equal to 0 and the dword at ADDR1 is less than REF - (signed comparison). + Executes the following DWORDs of commands if the dword + at BOOL_ADDR is not equal to 0 and the the timestamp + value ACTIVE_TIMESTAMP is ahead of the value fetched + from TIMESTAMP_ADDR. + + The timestamp comparision is an unsigned compare with + wraparound, ie: + + (ACTIVE_TIMESTAMP - *TIMESTAMP_ADDR) < 0x80000000 - - - - - - - - - - - - - - - - - - + + + + diff --git a/src/freedreno/vulkan/tu_query_pool.cc b/src/freedreno/vulkan/tu_query_pool.cc index edee44671f5..6a1bf454b0f 100644 --- a/src/freedreno/vulkan/tu_query_pool.cc +++ b/src/freedreno/vulkan/tu_query_pool.cc @@ -840,7 +840,7 @@ emit_copy_query_pool_results(struct tu_cmd_buffer *cmdbuf, tu_cs_emit_pkt7(cs, CP_COND_EXEC, 6); tu_cs_emit_qw(cs, available_iova); tu_cs_emit_qw(cs, available_iova); - tu_cs_emit(cs, CP_COND_EXEC_4_REF(0x2)); + tu_cs_emit(cs, CP_COND_EXEC_ACTIVE_TIMESTAMP(0x2).reg); tu_cs_emit(cs, 6); /* Cond execute the next 6 DWORDS */ /* Start of conditional execution */ @@ -1579,7 +1579,7 @@ emit_stop_primitive_ctrs(struct tu_cmd_buffer *cmdbuf, tu_cs_emit_pkt7(cs, CP_COND_EXEC, 6); tu_cs_emit_qw(cs, global_iova(cmdbuf, vtx_stats_query_not_running)); tu_cs_emit_qw(cs, global_iova(cmdbuf, vtx_stats_query_not_running)); - tu_cs_emit(cs, CP_COND_EXEC_4_REF(0x2)); + tu_cs_emit(cs, CP_COND_EXEC_ACTIVE_TIMESTAMP(0x2).reg); tu_cs_emit(cs, 2); /* Cond execute the next 2 DWORDS */ tu_emit_event_write(cmdbuf, cs, FD_STOP_PRIMITIVE_CTRS);