[virglrenderer-devel] [PATCH] vrend: Set scissor_state_dirty correctly.

Lepton Wu lepton at chromium.org
Tue Jul 24 22:36:10 UTC 2018


Then I have 2 options:

1.   Check ctx->sub->rs_state->scissor indead of asking GL
2.  Always set ctx->sub->scissor_state_dirty, I guess this won't hurt
and make codes looks simple.

Personally, I like option 2 since it makes code simple. Option 1 looks
like a optimization but looks like a "over" optimization for me.
Which option do you prefer?

Thanks!
On Tue, Jul 24, 2018 at 3:08 PM Dave Airlie <airlied at gmail.com> wrote:
>
> On 25 July 2018 at 03:52, Lepton Wu <lepton at chromium.org> wrote:
> > We forgot to set scissor_state_dirty when we disable GL_SCISSOR_TEST
> > in vrend_renderer_blit_int. This fixes bug mentioned in
> > https://lists.freedesktop.org/archives/virglrenderer-devel/2018-July/001230.html
> > ---
> >  src/vrend_renderer.c | 15 +++++++++++----
> >  1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
> > index c68bda0..17e9674 100644
> > --- a/src/vrend_renderer.c
> > +++ b/src/vrend_renderer.c
> > @@ -6689,12 +6689,19 @@ static void vrend_renderer_blit_int(struct vrend_context *ctx,
> >        src_y2 = src_res->base.height0 - info->src.box.y;
> >     }
> >
> > -   if (info->scissor_enable) {
> > +   bool current_scissor = glIsEnabled(GL_SCISSOR_TEST);
>
> I don't like this bit ^^ shouldn't we know in this context if the
> scissor test is enabled, we should
> be keeping track of this on our side, not asking GL to return info we
> should already know.
>
> Dave.


More information about the virglrenderer-devel mailing list