Dear Ilia, 

it took me a while but I think I understand now, thanks for all your
explanations. 


Am Freitag, den 04.05.2018, 18:11 -0400 schrieb Ilia Mirkin:
> 
> Rasterizer state doesn't affect the gallium clear callback. clear
> just clears -- it's a memset. However rasterizer state affects
> glClear() so  you have to make sure to keep that in mind when you try
> to implement clear() with glClear() (i.e. turn off whatever GL state
> the rasterizer may have set which would cause you issues).
I think my error was that I looked at st_Clear, which does indeed
handle all the relevant rasterization states, but because they are
handled directly there they don't need extra validation, something that
is only required for virgl, in other words what I really would want is
a replacement for st_Clear that would forward the state changes to
virgl and then call some other function glclear that sends the clear
mask to virglrenderer where everything is passed to and processed in
the host st_Clear anyway. Obviously gallium was not designed for this. 

> If you want, you could construct a temporary rasterizer state, bind
> that, do the glClear() and then bind the old one back.
This is what I now implemented in virgl, and it fixes all the tests I
was looking at. Performance wise it is not exactly nice, because it
adds two state changes, but so is the whole clear operation, and to
improve this situation one has to look beyond the current gallium
implementation. 

Thanks again, 
Gert


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to