[Mesa-dev] [PATCH] radv: always do tess ring size calculations.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Mar 31 19:33:32 UTC 2017


)

On Fri, Mar 31, 2017 at 3:33 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> We could store these in the device, but it's probably
> not that much overhead to recalculate them, this is needed
> because we will emit the rings if the queue has them created
> so we need to emit the register values correctly as well.
>
> This fixes some tess tests failing when run after other tests
> inside CTS.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/vulkan/radv_device.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
> index af82926..5c48be1 100644
> --- a/src/amd/vulkan/radv_device.c
> +++ b/src/amd/vulkan/radv_device.c
> @@ -1393,15 +1393,11 @@ radv_get_preamble_cs(struct radv_queue *queue,
>                 if (needs_tess_rings)
>                         add_tess_rings = true;
>         }
> -
> -       if (add_tess_rings) {
> -               tess_factor_ring_size = 32768 * queue->device->physical_device->rad_info.max_se;

I just realized we can alloc 16 KiB instead of 32 KiB for HAWAII
(based on tess_offchip_block_dw_size).

Either way:

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

> -               hs_offchip_param = radv_get_hs_offchip_param(queue->device,
> -                                                            &max_offchip_buffers);
> -               tess_offchip_ring_size = max_offchip_buffers *
> -                       queue->device->tess_offchip_block_dw_size * 4;
> -
> -       }
> +       tess_factor_ring_size = 32768 * queue->device->physical_device->rad_info.max_se;
> +       hs_offchip_param = radv_get_hs_offchip_param(queue->device,
> +                                                    &max_offchip_buffers);
> +       tess_offchip_ring_size = max_offchip_buffers *
> +               queue->device->tess_offchip_block_dw_size * 4;
>
>         if (scratch_size <= queue->scratch_size &&
>             compute_scratch_size <= queue->compute_scratch_size &&
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list