diff options
Diffstat (limited to 'mesalib/src/mesa/drivers/common/meta.c')
-rw-r--r-- | mesalib/src/mesa/drivers/common/meta.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c index 785a59531..ad289aa70 100644 --- a/mesalib/src/mesa/drivers/common/meta.c +++ b/mesalib/src/mesa/drivers/common/meta.c @@ -1026,7 +1026,7 @@ _mesa_meta_in_progress(struct gl_context *ctx) static INLINE GLfloat invert_z(GLfloat normZ) { - GLfloat objZ = 1.0 - 2.0 * normZ; + GLfloat objZ = 1.0f - 2.0f * normZ; return objZ; } @@ -2920,7 +2920,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, /* setup texcoords (XXX what about border?) */ setup_texture_coords(faceTarget, - 0.0, 0.0, /* width, height never used here */ + 0.0f, 0.0f, /* width, height never used here */ slice, verts[0].tex, verts[1].tex, @@ -3098,20 +3098,19 @@ get_temp_image_type(struct gl_context *ctx, GLenum baseFormat) */ static void copy_tex_sub_image(struct gl_context *ctx, - GLuint dims, GLenum target, GLint level, + GLuint dims, + struct gl_texture_image *texImage, GLint xoffset, GLint yoffset, GLint zoffset, + struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height) { - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; + struct gl_texture_object *texObj = texImage->TexObject; + const GLenum target = texObj->Target; GLenum format, type; GLint bpp; void *buf; - texObj = _mesa_get_current_tex_object(ctx, target); - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - /* Choose format/type for temporary image buffer */ format = _mesa_get_format_base_format(texImage->TexFormat); if (format == GL_LUMINANCE || @@ -3180,34 +3179,40 @@ copy_tex_sub_image(struct gl_context *ctx, void -_mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level, +_mesa_meta_CopyTexSubImage1D(struct gl_context *ctx, + struct gl_texture_image *texImage, GLint xoffset, + struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width) { - copy_tex_sub_image(ctx, 1, target, level, xoffset, 0, 0, - x, y, width, 1); + copy_tex_sub_image(ctx, 1, texImage, xoffset, 0, 0, + rb, x, y, width, 1); } void -_mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level, +_mesa_meta_CopyTexSubImage2D(struct gl_context *ctx, + struct gl_texture_image *texImage, GLint xoffset, GLint yoffset, + struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height) { - copy_tex_sub_image(ctx, 2, target, level, xoffset, yoffset, 0, - x, y, width, height); + copy_tex_sub_image(ctx, 2, texImage, xoffset, yoffset, 0, + rb, x, y, width, height); } void -_mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, GLenum target, GLint level, +_mesa_meta_CopyTexSubImage3D(struct gl_context *ctx, + struct gl_texture_image *texImage, GLint xoffset, GLint yoffset, GLint zoffset, + struct gl_renderbuffer *rb, GLint x, GLint y, GLsizei width, GLsizei height) { - copy_tex_sub_image(ctx, 3, target, level, xoffset, yoffset, zoffset, - x, y, width, height); + copy_tex_sub_image(ctx, 3, texImage, xoffset, yoffset, zoffset, + rb, x, y, width, height); } |