Home | History | Annotate | Download | only in main

Lines Matching full:teximage

46 #include "teximage.h"
77 struct gl_texture_image *texImage)
79 const GLint width = texImage->Width;
80 const GLint height = texImage->Height;
81 const GLint depth = texImage->Depth;
95 ctx->Driver.MapTextureImage(ctx, texImage, img,
105 _mesa_unpack_float_z_row(texImage->TexFormat, width, src, depthRow);
109 ctx->Driver.UnmapTextureImage(ctx, texImage, img);
127 struct gl_texture_image *texImage)
129 const GLint width = texImage->Width;
130 const GLint height = texImage->Height;
131 const GLint depth = texImage->Depth;
139 ctx->Driver.MapTextureImage(ctx, texImage, img,
156 ctx->Driver.UnmapTextureImage(ctx, texImage, img);
172 struct gl_texture_image *texImage)
174 const GLint width = texImage->Width;
175 const GLint height = texImage->Height;
176 const GLint depth = texImage->Depth;
184 ctx->Driver.MapTextureImage(ctx, texImage, img,
197 if ((texImage->TexFormat == MESA_FORMAT_YCBCR
199 (texImage->TexFormat == MESA_FORMAT_YCBCR_REV
209 ctx->Driver.UnmapTextureImage(ctx, texImage, img);
225 struct gl_texture_image *texImage,
230 _mesa_get_srgb_format_linear(texImage->TexFormat);
234 const GLuint width = texImage->Width;
235 const GLuint height = texImage->Height;
236 const GLuint depth = texImage->Depth;
253 ctx->Driver.MapTextureImage(ctx, texImage, 0,
261 ctx->Driver.UnmapTextureImage(ctx, texImage, 0);
277 rebaseFormat = texImage->_BaseFormat;
319 struct gl_texture_image *texImage,
324 _mesa_get_srgb_format_linear(texImage->TexFormat);
325 const GLuint width = texImage->Width;
328 GLuint height = texImage->Height;
329 GLuint depth = texImage->Depth;
333 GLboolean tex_is_integer = _mesa_is_format_integer_color(texImage->TexFormat);
334 GLboolean tex_is_uint = _mesa_is_format_unsigned(texImage->TexFormat);
344 if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
349 if (texImage->_BaseFormat == GL_LUMINANCE ||
350 texImage->_BaseFormat == GL_INTENSITY ||
351 texImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
356 rebaseFormat = texImage->_BaseFormat;
358 else if ((texImage->_BaseFormat == GL_RGBA ||
359 texImage->_BaseFormat == GL_RGB ||
360 texImage->_BaseFormat == GL_RG) &&
377 ctx->Driver.MapTextureImage(ctx, texImage, img,
411 ctx->Driver.UnmapTextureImage(ctx, texImage, img);
430 struct gl_texture_image *texImage)
432 const GLenum dataType = _mesa_get_format_datatype(texImage->TexFormat);
448 if (_mesa_is_format_compressed(texImage->TexFormat)) {
450 pixels, texImage, transferOps);
454 pixels, texImage, transferOps);
466 struct gl_texture_image *texImage)
468 const GLenum target = texImage->TexObject->Target;
480 memCopy = _mesa_format_matches_format_and_type(texImage->TexFormat,
486 const GLuint bpp = _mesa_get_format_bytes(texImage->TexFormat);
487 const GLuint bytesPerRow = texImage->Width * bpp;
489 _mesa_image_address2d(&ctx->Pack, pixels, texImage->Width,
490 texImage->Height, format, type, 0, 0);
492 _mesa_image_row_stride(&ctx->Pack, texImage->Width, format, type);
497 ctx->Driver.MapTextureImage(ctx, texImage, 0,
498 0, 0, texImage->Width, texImage->Height,
503 memcpy(dst, src, bytesPerRow * texImage->Height);
507 for (row = 0; row < texImage->Height; row++) {
515 ctx->Driver.UnmapTextureImage(ctx, texImage, 0);
535 struct gl_texture_image *texImage)
539 switch (texImage->TexObject->Target) {
572 if (get_tex_memcpy(ctx, format, type, pixels, texImage)) {
576 get_tex_depth(ctx, dimensions, format, type, pixels, texImage);
579 get_tex_depth_stencil(ctx, dimensions, format, type, pixels, texImage);
582 get_tex_ycbcr(ctx, dimensions, format, type, pixels, texImage);
585 get_tex_rgba(ctx, dimensions, format, type, pixels, texImage);
601 struct gl_texture_image *texImage,
605 _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
625 ctx->Driver.MapTextureImage(ctx, texImage, 0,
626 0, 0, texImage->Width, texImage->Height,
633 const GLuint size = _mesa_format_image_size(texImage->TexFormat,
634 texImage->Width,
635 texImage->Height,
636 texImage->Depth);
641 _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
642 for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) {
649 ctx->Driver.UnmapTextureImage(ctx, texImage, 0);
702 struct gl_texture_image *texImage;
731 texImage = _mesa_select_tex_image(ctx, texObj, target, level);
732 if (!texImage) {
737 baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
769 if (!_mesa_validate_pbo_access(dimensions, &ctx->Pack, texImage->Width,
770 texImage->Height, texImage->Depth,
812 struct gl_texture_image *texImage;
827 texImage = _mesa_select_tex_image(ctx, texObj, target, level);
829 if (_mesa_is_zero_size_texture(texImage))
836 _mesa_get_format_name(texImage->TexFormat),
837 texImage->Width, texImage->Height,
843 ctx->Driver.GetTexImage(ctx, format, type, pixels, texImage);
866 struct gl_texture_image *texImage;
889 texImage = _mesa_select_tex_image(ctx, texObj, target, level);
891 if (!texImage) {
898 if (!_mesa_is_format_compressed(texImage->TexFormat)) {
904 compressedSize = _mesa_format_image_size(texImage->TexFormat,
905 texImage->Width,
906 texImage->Height,
907 texImage->Depth);
943 struct gl_texture_image *texImage;
957 texImage = _mesa_select_tex_image(ctx, texObj, target, level);
959 if (_mesa_is_zero_size_texture(texImage))
966 _mesa_get_format_name(texImage->TexFormat),
967 texImage->Width, texImage->Height);
972 ctx->Driver.GetCompressedTexImage(ctx, texImage, img);