On Fri, May 4, 2018 at 1:11 PM, Ilia Mirkin <[email protected]> wrote: > On Fri, May 4, 2018 at 2:50 PM, Gert Wollny <[email protected]> wrote: >> For that reason I think that a render state validation within st_Clear >> makes sense, because it makes sure that the states like SCISSOR_TEST >> or DISCARD_RASTERIZER are properly send to the driver, before clear() >> is executed that makes use of these states. And while the workaround >> for DISCARD_RASTERIZER is possible because if it is set then the host >> should actually never see the clear command, SCISSOR_TEST is different, >> its state can not be guessed on the host. >> >> Anyway, I happily take every hint on how this can be fixed directly in >> virgl_clear or virgl in general, and thank you for taking the time to >> answer me, > > I thought someone else took care of the scissor thing for clears. At > least they were asking about it.
Yes, there were similar problems with stencils and scissors. https://cgit.freedesktop.org/virglrenderer/commit/?id=b75e0a1dabdfbda44c310a69026a9dbd7d980294 https://cgit.freedesktop.org/virglrenderer/commit/?id=252b00d77c30ce39608c1a9de18523cbdcaca623 Essentially, we need save and restore the prior rasterizer state. > I have to assume that virglrenderer keeps track of the last-set > rasterizer state. Based on that, you have to turn off scissors, > rasterizer discard, window rectangles, stencil tests, sample masks(?), > and anything else which affects clears (have a look at st_Clear -- > anything that causes it to hit the fallback path which draws should be > something you turn off because calling glClear() in virglrenderer). > > If you don't keep track of the last-set rasterizer state, then now may > be a good time to start :) > > -ilia > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
