Lines Matching refs:texImage
31 #include "main/teximage.h"
55 struct gl_texture_image *texImage)
58 _mesa_delete_texture_image(ctx, texImage);
67 struct gl_texture_image *texImage)
69 struct swrast_texture_image *swImg = swrast_texture_image(texImage);
70 GLuint bytes = _mesa_format_image_size(texImage->TexFormat, texImage->Width,
71 texImage->Height, texImage->Depth);
80 swImg->RowStride = texImage->Width;
86 swImg->ImageOffsets = (GLuint *) malloc(texImage->Depth * sizeof(GLuint));
90 for (i = 0; i < texImage->Depth; i++) {
91 swImg->ImageOffsets[i] = i * texImage->Width * texImage->Height;
94 _swrast_init_texture_image(texImage);
108 _swrast_init_texture_image(struct gl_texture_image *texImage)
110 struct swrast_texture_image *swImg = swrast_texture_image(texImage);
112 if ((texImage->Width == 1 || _mesa_is_pow_two(texImage->Width2)) &&
113 (texImage->Height == 1 || _mesa_is_pow_two(texImage->Height2)) &&
114 (texImage->Depth == 1 || _mesa_is_pow_two(texImage->Depth2)))
120 if (texImage->TexObject->Target == GL_TEXTURE_RECTANGLE_NV) {
127 swImg->WidthScale = (GLfloat) texImage->Width;
128 swImg->HeightScale = (GLfloat) texImage->Height;
129 swImg->DepthScale = (GLfloat) texImage->Depth;
139 struct gl_texture_image *texImage)
141 struct swrast_texture_image *swImage = swrast_texture_image(texImage);
158 _mesa_check_map_teximage(struct gl_texture_image *texImage,
162 if (texImage->TexObject->Target == GL_TEXTURE_1D)
165 assert(x < texImage->Width || texImage->Width == 0);
166 assert(y < texImage->Height || texImage->Height == 0);
167 assert(x + w <= texImage->Width);
168 assert(y + h <= texImage->Height);
176 * \param texImage the texture image
185 struct gl_texture_image *texImage,
192 struct swrast_texture_image *swImage = swrast_texture_image(texImage);
197 _mesa_check_map_teximage(texImage, slice, x, y, w, h);
199 texelSize = _mesa_get_format_bytes(texImage->TexFormat);
200 stride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
201 _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh);
214 if (texImage->TexObject->Target == GL_TEXTURE_3D ||
215 texImage->TexObject->Target == GL_TEXTURE_2D_ARRAY) {
216 GLuint sliceSize = _mesa_format_image_size(texImage->TexFormat,
217 texImage->Width,
218 texImage->Height,
220 assert(slice < texImage->Depth);
222 } else if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
223 GLuint sliceSize = _mesa_format_image_size(texImage->TexFormat,
224 texImage->Width,
227 assert(slice < texImage->Height);
240 struct gl_texture_image *texImage,
255 struct gl_texture_image *texImage = texObj->Image[face][level];
256 if (texImage) {
258 swrast_texture_image(texImage);
276 struct gl_texture_image *texImage = texObj->Image[face][level];
277 if (texImage) {
279 = swrast_texture_image(texImage);
344 struct gl_texture_image *texImage = texObj->Image[face][level];
345 if (!_swrast_alloc_texture_image_buffer(ctx, texImage)) {