mesa: Fix FLUSH_VERTICES in SubpixelPrecisionBiasNV.
authorMathias Fröhlich <mathias.froehlich@web.de>
Mon, 23 Sep 2019 06:10:37 +0000 (08:10 +0200)
committerMathias Fröhlich <mathias.froehlich@web.de>
Wed, 19 Feb 2020 14:51:25 +0000 (15:51 +0100)
The FLUSH_VERTICES macro is supposed to be called before the current
context state is changed.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
src/mesa/main/viewport.c

index 97d328541b2c029c3b8a812f556871170ad80f58..f4dc74ae41a02e66f06fbaff81274ec11ce01e97 100644 (file)
@@ -610,10 +610,11 @@ subpixel_precision_bias(struct gl_context *ctx, GLuint xbits, GLuint ybits)
    if (MESA_VERBOSE & VERBOSE_API)
       _mesa_debug(ctx, "glSubpixelPrecisionBiasNV(%u, %u)\n", xbits, ybits);
 
+   FLUSH_VERTICES(ctx, 0);
+
    ctx->SubpixelPrecisionBias[0] = xbits;
    ctx->SubpixelPrecisionBias[1] = ybits;
 
-   FLUSH_VERTICES(ctx, 0);
    ctx->NewDriverState |=
       ctx->DriverFlags.NewNvConservativeRasterizationParams;
 }