radv: flush and invalidate CB before resetting query pools on GFX9

Submitted by Samuel Pitoiset on June 13, 2019, 8:54 a.m.

Details

Message ID 20190613085433.16259-1-samuel.pitoiset@gmail.com
State New
Headers show
Series "radv: flush and invalidate CB before resetting query pools on GFX9" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Samuel Pitoiset June 13, 2019, 8:54 a.m.
We have to emit a CACHE_FLUSH_AND_INV_TS_EVENT to be sure all
prior GPU work is done.

This fixes the following CTS (when the small hint is disabled):
dEQP-VK.query_pool.statistics_query.reset_before_copy.*

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
---
 src/amd/vulkan/radv_query.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index 3bbd10cbb34..b91ffbab989 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -1641,6 +1641,8 @@  static void emit_end_query(struct radv_cmd_buffer *cmd_buffer,
 					       RADV_CMD_FLAG_CS_PARTIAL_FLUSH |
 					       RADV_CMD_FLAG_INV_GLOBAL_L2 |
 					       RADV_CMD_FLAG_INV_VMEM_L1;
+	if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9)
+		cmd_buffer->active_query_flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
 }
 
 void radv_CmdBeginQueryIndexedEXT(

Comments

Add DB while we are at it?

Otherwise, r-b

On Thu, Jun 13, 2019 at 10:51 AM Samuel Pitoiset
<samuel.pitoiset@gmail.com> wrote:
>
> We have to emit a CACHE_FLUSH_AND_INV_TS_EVENT to be sure all
> prior GPU work is done.
>
> This fixes the following CTS (when the small hint is disabled):
> dEQP-VK.query_pool.statistics_query.reset_before_copy.*
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> ---
>  src/amd/vulkan/radv_query.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
> index 3bbd10cbb34..b91ffbab989 100644
> --- a/src/amd/vulkan/radv_query.c
> +++ b/src/amd/vulkan/radv_query.c
> @@ -1641,6 +1641,8 @@ static void emit_end_query(struct radv_cmd_buffer *cmd_buffer,
>                                                RADV_CMD_FLAG_CS_PARTIAL_FLUSH |
>                                                RADV_CMD_FLAG_INV_GLOBAL_L2 |
>                                                RADV_CMD_FLAG_INV_VMEM_L1;
> +       if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9)
> +               cmd_buffer->active_query_flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
>  }
>
>  void radv_CmdBeginQueryIndexedEXT(
> --
> 2.22.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
On 6/13/19 11:14 AM, Bas Nieuwenhuizen wrote:
> Add DB while we are at it?
Pushed with DB added.
>
> Otherwise, r-b
>
> On Thu, Jun 13, 2019 at 10:51 AM Samuel Pitoiset
> <samuel.pitoiset@gmail.com> wrote:
>> We have to emit a CACHE_FLUSH_AND_INV_TS_EVENT to be sure all
>> prior GPU work is done.
>>
>> This fixes the following CTS (when the small hint is disabled):
>> dEQP-VK.query_pool.statistics_query.reset_before_copy.*
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
>> ---
>>   src/amd/vulkan/radv_query.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
>> index 3bbd10cbb34..b91ffbab989 100644
>> --- a/src/amd/vulkan/radv_query.c
>> +++ b/src/amd/vulkan/radv_query.c
>> @@ -1641,6 +1641,8 @@ static void emit_end_query(struct radv_cmd_buffer *cmd_buffer,
>>                                                 RADV_CMD_FLAG_CS_PARTIAL_FLUSH |
>>                                                 RADV_CMD_FLAG_INV_GLOBAL_L2 |
>>                                                 RADV_CMD_FLAG_INV_VMEM_L1;
>> +       if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9)
>> +               cmd_buffer->active_query_flush_bits |= RADV_CMD_FLAG_FLUSH_AND_INV_CB;
>>   }
>>
>>   void radv_CmdBeginQueryIndexedEXT(
>> --
>> 2.22.0
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev