[Mesa-dev] [RFC PATCH] mesa/st/cb_clear: in st_Clear also validate the render state (needed by virgl)

Gert Wollny gert.wollny at collabora.com
Thu May 3 17:15:07 UTC 2018


Am Donnerstag, den 03.05.2018, 12:51 -0400 schrieb Ilia Mirkin:
> 
> virgl_clear implements a gallium API call which is meant to clear the
> surface. It sounds like virglrenderer does not properly implement
> that
> call. Either workaround your buggy "hardware" (i.e. virglrenderer) by
> throwing in an explicit "no, really, do this" call, or fix
> virglrenderer to do the clear irrespective of what the last-set
> rasterizer discard state might be. I'd recommend the latter (i.e.
> fixing this in virglrenderer).
> 

IMNSHO doing a clear regardless of the last-set rasterizer discard is
just replacing one bug with another. Besides, there is another CTS test
that apparently gets fixed by this patch 

dEQP-GLES3.functional.shaders.indexing.
   moredynamic.with_value_from_indexing_expression_fragment

and this doesn't use rasterizer discard. 

In any case, virglrendere doesn't know about the state change because
the client (virgl) doesn't send the state change before the clear. This
is the bug.

My problem is to fix this in the right place I need access to the
current render state in virgl_clear so that I can send the updated
state like it is done for other hardware when they call the blitter
(and that's why I put an RFC into the subject, in the hope that someone
who is more knowledgabe with the data structures used by virgl could
give me a hint). 

Another option would be to always send state changes to the host,
regardless of whether they will be used or not, but this seems to me
like a waste of cycles.

Best,
Gert



More information about the mesa-dev mailing list