Lines Matching refs:packing
99 * Pixel unpacking/packing parameters are observed according to \p packing.
102 * \param packing the pixelstore attributes
117 const struct gl_pixelstore_attrib *packing,
132 alignment = packing->Alignment;
133 if (packing->RowLength > 0) {
134 pixels_per_row = packing->RowLength;
139 if (packing->ImageHeight > 0) {
140 rows_per_image = packing->ImageHeight;
146 skippixels = packing->SkipPixels;
148 skiprows = packing->SkipRows;
150 skipimages = (dimensions == 3) ? packing->SkipImages : 0;
190 if (packing->Invert) {
213 * Pixel unpacking/packing parameters are observed according to \p packing.
216 * \param packing the pixelstore attributes
232 const struct gl_pixelstore_attrib *packing,
240 addr += _mesa_image_offset(dimensions, packing, width, height,
248 _mesa_image_address1d( const struct gl_pixelstore_attrib *packing,
254 return _mesa_image_address(1, packing, image, width, 1,
260 _mesa_image_address2d( const struct gl_pixelstore_attrib *packing,
266 return _mesa_image_address(2, packing, image, width, height,
272 _mesa_image_address3d( const struct gl_pixelstore_attrib *packing,
278 return _mesa_image_address(3, packing, image, width, height,
287 * \param packing the pixelstore attributes
295 _mesa_image_row_stride( const struct gl_pixelstore_attrib *packing,
300 assert(packing);
303 if (packing->RowLength == 0) {
307 bytesPerRow = (packing->RowLength + 7) / 8;
315 if (packing->RowLength == 0) {
319 bytesPerRow = bytesPerPixel * packing->RowLength;
323 remainder = bytesPerRow % packing->Alignment;
325 bytesPerRow += (packing->Alignment - remainder);
328 if (packing->Invert) {
339 * pixel packing parameters and image width, format and type.
342 _mesa_image_image_stride( const struct gl_pixelstore_attrib *packing,
348 assert(packing);
351 if (packing->RowLength == 0) {
355 bytesPerRow = (packing->RowLength + 7) / 8;
363 if (packing->RowLength == 0) {
367 bytesPerRow = bytesPerPixel * packing->RowLength;
371 remainder = bytesPerRow % packing->Alignment;
373 bytesPerRow += (packing->Alignment - remainder);
375 if (packing->ImageHeight == 0)
378 bytesPerImage = bytesPerRow * packing->ImageHeight;
859 * using the packing information this swaps the bytes
861 * It takes into a/c various packing parameters like
866 const struct gl_pixelstore_attrib *packing,
872 assert(packing->SwapBytes);
876 int stride = _mesa_image_row_stride(packing, width, format, type);