[Mesa-dev] [PATCH] radeonsi: don't return NULL fence if no fence is available
Francisco Jerez
currojerez at riseup.net
Sat Jul 18 05:15:02 PDT 2015
Michel Dänzer <michel at daenzer.net> writes:
> 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)
>
I'm rather unfamiliar with the radeonsi pipe driver code so I should
probably hold myself back from giving you an R-b, but I must say that
this seems much cleaner than the last two solutions proposed so
far... :)
>
> 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
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150718/9ad74fe0/attachment.sig>
More information about the mesa-dev
mailing list