diff options
author | marha <marha@users.sourceforge.net> | 2011-10-27 08:37:52 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-10-27 08:37:52 +0200 |
commit | 2a9be4af293f20fa33cc34fbc3b72e2235d91090 (patch) | |
tree | d41608bda1d56be1aa96857dee20e988b53760a3 /mesalib/src/mesa/swrast/s_texrender.c | |
parent | 9d53da0fbb9ae6df9a38ad40df4f53cd28287235 (diff) | |
parent | d662d461634660f5c0f3998b5eb7d7ed3bd5a25f (diff) | |
download | vcxsrv-2a9be4af293f20fa33cc34fbc3b72e2235d91090.tar.gz vcxsrv-2a9be4af293f20fa33cc34fbc3b72e2235d91090.tar.bz2 vcxsrv-2a9be4af293f20fa33cc34fbc3b72e2235d91090.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/mesa/swrast/s_texrender.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_texrender.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/mesalib/src/mesa/swrast/s_texrender.c b/mesalib/src/mesa/swrast/s_texrender.c index 47e458e1c..e2b921512 100644 --- a/mesalib/src/mesa/swrast/s_texrender.c +++ b/mesalib/src/mesa/swrast/s_texrender.c @@ -31,6 +31,15 @@ struct texture_renderbuffer }; +/** cast wrapper */ +static inline struct texture_renderbuffer * +texture_renderbuffer(struct gl_renderbuffer *rb) +{ + return (struct texture_renderbuffer *) rb; +} + + + /** * Get row of values from the renderbuffer that wraps a texture image. */ @@ -38,8 +47,7 @@ static void texture_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, void *values) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -107,8 +115,7 @@ static void texture_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], void *values) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -174,8 +181,7 @@ static void texture_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -236,8 +242,7 @@ static void texture_put_row_rgb(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *values, const GLubyte *mask) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -296,8 +301,7 @@ static void texture_put_mono_row(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, GLint x, GLint y, const void *value, const GLubyte *mask) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -356,8 +360,7 @@ texture_put_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint co const GLint x[], const GLint y[], const void *values, const GLubyte *mask) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -415,8 +418,7 @@ texture_put_mono_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], const void *value, const GLubyte *mask) { - const struct texture_renderbuffer *trb - = (const struct texture_renderbuffer *) rb; + struct texture_renderbuffer *trb = texture_renderbuffer(rb); const GLint z = trb->Zoffset; GLuint i; @@ -610,7 +612,6 @@ update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) trb->Base.DataType = CHAN_TYPE; trb->Base._BaseFormat = GL_RGBA; } - trb->Base.Data = trb->TexImage->Base.Data; } |