diff options
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 10 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/dri/common/dri_util.c | 4 | ||||
-rw-r--r-- | mesalib/src/mesa/drivers/windows/gdi/wmesa.c | 9 |
3 files changed, 13 insertions, 10 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index 2ebcd35bd..482bd98a2 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -1569,10 +1569,10 @@ _mesa_meta_Clear(struct gl_context *ctx, GLbitfield buffers) /* vertex colors */ for (i = 0; i < 4; i++) { - verts[i].r = ctx->Color.ClearColorUnclamped[0]; - verts[i].g = ctx->Color.ClearColorUnclamped[1]; - verts[i].b = ctx->Color.ClearColorUnclamped[2]; - verts[i].a = ctx->Color.ClearColorUnclamped[3]; + verts[i].r = ctx->Color.ClearColor.f[0]; + verts[i].g = ctx->Color.ClearColor.f[1]; + verts[i].b = ctx->Color.ClearColor.f[2]; + verts[i].a = ctx->Color.ClearColor.f[3]; } /* upload new vertex data */ @@ -1679,7 +1679,7 @@ _mesa_meta_glsl_Clear(struct gl_context *ctx, GLbitfield buffers) _mesa_UseProgramObjectARB(clear->ShaderProg); _mesa_Uniform4fvARB(clear->ColorLocation, 1, - ctx->Color.ClearColorUnclamped); + ctx->Color.ClearColor.f); _mesa_BindVertexArray(clear->ArrayObj); _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, clear->VBO); diff --git a/mesalib/src/mesa/drivers/dri/common/dri_util.c b/mesalib/src/mesa/drivers/dri/common/dri_util.c index 6d6401934..cdd413737 100644 --- a/mesalib/src/mesa/drivers/dri/common/dri_util.c +++ b/mesalib/src/mesa/drivers/dri/common/dri_util.c @@ -816,8 +816,10 @@ driCreateNewScreen(int scrn, (void) loaderPrivate; - if (driDriverAPI.InitScreen == NULL) + if (driDriverAPI.InitScreen == NULL) { + __driUtilMessage("driver does not support DRI1"); return NULL; + } psp = calloc(1, sizeof *psp); if (!psp) diff --git a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c index 35a150d06..14d15ed6c 100644 --- a/mesalib/src/mesa/drivers/windows/gdi/wmesa.c +++ b/mesalib/src/mesa/drivers/windows/gdi/wmesa.c @@ -249,14 +249,15 @@ static void wmesa_flush(struct gl_context *ctx) /* * Set the color used to clear the color buffer. */ -static void clear_color(struct gl_context *ctx, const GLfloat color[4]) +static void clear_color(struct gl_context *ctx, + const union gl_color_union color) { WMesaContext pwc = wmesa_context(ctx); GLubyte col[3]; - CLAMPED_FLOAT_TO_UBYTE(col[0], color[0]); - CLAMPED_FLOAT_TO_UBYTE(col[1], color[1]); - CLAMPED_FLOAT_TO_UBYTE(col[2], color[2]); + UNCLAMPED_FLOAT_TO_UBYTE(col[0], color.f[0]); + UNCLAMPED_FLOAT_TO_UBYTE(col[1], color.f[1]); + UNCLAMPED_FLOAT_TO_UBYTE(col[2], color.f[2]); pwc->clearColorRef = RGB(col[0], col[1], col[2]); DeleteObject(pwc->clearPen); DeleteObject(pwc->clearBrush); |