[Mesa-dev] [PATCH] radeonsi: don't return NULL fence if no fence is available

Marek Olšák maraeo at gmail.com
Sat Jul 18 14:04:45 PDT 2015


It looks good. Would you push it please?

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Jul 17, 2015 at 11:05 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 17.07.2015 06:03, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> An alternative (and ugly) solution to the current clover issue.
>
> How about something like this instead? (Compile tested only)
>
>
> diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
> index 08cc08e..dc8702e 100644
> --- a/src/gallium/drivers/radeonsi/si_hw_context.c
> +++ b/src/gallium/drivers/radeonsi/si_hw_context.c
> @@ -84,7 +84,8 @@ void si_context_gfx_flush(void *context, unsigned flags,
>         struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
>         struct radeon_winsys *ws = ctx->b.ws;
>
> -       if (cs->cdw == ctx->b.initial_gfx_cs_size) {
> +       if (cs->cdw == ctx->b.initial_gfx_cs_size &&
> +           (!fence || ctx->last_gfx_fence)) {
>                 if (fence)
>                         ws->fence_reference(fence, ctx->last_gfx_fence);
>                 if (!(flags & RADEON_FLUSH_ASYNC))
>
>
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list