mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
swrast: Avoid aliasing violation.
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
149309a424
commit
a1e9b72102
1 changed files with 2 additions and 2 deletions
|
|
@ -56,8 +56,8 @@ _swrast_mask_rgba_span(struct gl_context *ctx, struct gl_renderbuffer *rb,
|
|||
* Note that we're not using span->array->mask[] here. We could...
|
||||
*/
|
||||
if (span->array->ChanType == GL_UNSIGNED_BYTE) {
|
||||
/* treat 4xGLubyte as 1xGLuint */
|
||||
const GLuint srcMask = *((GLuint *) ctx->Color.ColorMask[buf]);
|
||||
GLuint srcMask;
|
||||
memcpy(&srcMask, ctx->Color.ColorMask[buf], sizeof(srcMask));
|
||||
const GLuint dstMask = ~srcMask;
|
||||
const GLuint *dst = (const GLuint *) rbPixels;
|
||||
GLuint *src = (GLuint *) span->array->rgba8;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue