summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: remove unneeded #includes of main/compiler.hBrian Paul2018-01-171-1/+0
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* mesa: fix SwapBytes handling in numerous placesDave Airlie2015-09-021-13/+7
| | | | | | | | | | | | | | | | | | | In a number of places the SwapBytes handling didn't handle cases with GL_(UN)PACK_ALIGNMENT set and 7 byte width cases aligned to 8 bytes. This adds a common routine to swap bytes a 2D image and uses this code in: texture storage texture get readpixels swrast drawpixels. [airlied: updated with Brian's nitpicks]. Cc: "11.0" <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* DD: Refactor BlitFramebuffer.Laura Ekstrand2015-02-021-0/+3
| | | | | | | | | In preparation for glBlitNamedFramebuffer, the DD table function BlitFramebuffer needs to accept two arbitrary framebuffer objects rather than assuming ctx->ReadBuffer and ctx->DrawBuffer. Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: Add _mesa_swap2_copy and _mesa_swap4_copyIago Toral Quiroga2015-01-121-2/+15
| | | | | | | | | | | | | | | | | We have _mesa_swap{2,4} but these do in-place byte-swapping only. The new functions receive an extra parameter so we can swap bytes on a source input array and store the results in a (possibly different) destination array. This is useful to implement byte-swapping in pixel uploads, since in this case we need to swap bytes on the src data which is owned by the application so we can't do an in-place byte swap. v2: - Include compiler.h in image.h, which is necessary to build in MSCV as indicated by Brian Paul. Reviewed-by: Jason Ekstrand <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <[email protected]>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <[email protected]>
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: move _mesa_error_check_format_and_type() to glformats.cBrian Paul2012-07-241-4/+0
| | | | | Now all the format/type-related helper functions are in glformats.c and image.c is just image-related functions.
* mesa: move more format helper functions to glformats.cBrian Paul2012-07-241-18/+0
|
* mesa: move some format helper functions to glformats.cBrian Paul2012-07-241-24/+0
|
* mesa: add glformats integer type/format detection routinesJordan Justen2012-07-211-3/+0
| | | | | | | | | | | | _mesa_is_integer_format is moved to formats.c and renamed as _mesa_is_enum_format_integer. _mesa_is_format_unsigned, _mesa_is_type_integer, _mesa_is_type_unsigned, and _mesa_is_enum_format_or_type_integer are added. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: new _mesa_error_check_format_and_type() functionBrian Paul2012-02-071-3/+3
| | | | | | | | | | | | | | | | | | | | This replaces the _mesa_is_legal_format_and_type() function. According to the spec, some invalid format/type combinations to glDrawPixels, ReadPixels and glTexImage should generate GL_INVALID_ENUM but others should generate GL_INVALID_OPERATION. With the old function we didn't make that distinction and generated GL_INVALID_ENUM errors instead of GL_INVALID_OPERATION. The new function returns one of those errors or GL_NO_ERROR. This will also let us remove some redundant format/type checks in follow-on commit. v2: add more checks for ARB_texture_rgb10_a2ui at the top of _mesa_error_check_format_and_type() per Ian. Signed-off-by: Brian Paul <[email protected]>
* mesa: add _mesa_image_offset()nobled2011-12-081-0/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: move _mesa_base_format_has_channel() into image.cBrian Paul2011-11-281-0/+3
| | | | | | This is where other format-related functions live. Reviewed-by: Eric Anholt <[email protected]>
* mesa: Remove all mention of GL_COLOR_INDEX*_EXTIan Romanick2011-09-061-3/+0
| | | | | | | | These enums were only valid with the paletted texture extensions. This allows a couple other trivial clean-ups. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Clean up header file inclusion in image.h.Vinson Lee2010-11-091-1/+3
|
* mesa: add const qualifier to _mesa_is_legal_format_and_type()Brian Paul2010-10-281-1/+2
|
* mesa: split up the image.c fileBrian Paul2010-10-231-158/+0
| | | | | | New files: pack.c - image/row packing/unpacking functions pixeltransfer.c - pixel scale/bias/lookup functions
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-25/+25
|
* mesa: Remove SGI_color_matrix.Eric Anholt2010-09-231-5/+0
| | | | Another optional ARB_imaging subset extension.
* mesa: initial support for unnormalized integer texture formatsBrian Paul2010-07-051-0/+3
| | | | As defined by GL_EXT_texture_integer.
* mesa: move/rename is_depth_or_stencil_format()Brian Paul2010-04-271-0/+3
| | | | Put it with other, similar functions.
* mesa: make is_compressed_format() non-staticBrian Paul2010-04-231-0/+2
|
* mesa: rename params in prototype to match implementationBrian Paul2010-03-171-1/+1
|
* mesa: new _mesa_expand_bitmap() functionBrian Paul2009-09-011-0/+7
|
* mesa: added _mesa_is_stencil_format()Brian Paul2009-08-311-0/+3
|
* mesa: refactor: move _mesa_is_color/depth/stencil_format() helpers to image.cBrian Paul2009-08-131-0/+18
|
* mesa: make _mesa_clip_blit() a shared functionBrian Paul2009-08-051-0/+6
|
* mesa: remove the noClamp parameter to _mesa_pack_rgba_span_float()Brian Paul2009-04-031-1/+1
| | | | | It was only set to GL_TRUE in one place where it isn't really needed (glGetTexImage(sRGB format)).
* mesa: add new signed rgba texture formatRoland Scheidegger2009-03-281-1/+1
| | | | | This is a (partial) backport of the signed texture format support in OGL 3.1. Since it wasn't promoted from an existing extension roll our own.
* mesa: add support for ATI_envmap_bumpmapRoland Scheidegger2009-03-121-0/+7
| | | | | | | | add new entrypoints, new texture format, etc translate in texenvprogram.c for drivers using the mesa-generated tex env fragment program also handled in swrast, but not tested (cannot work due to negative texel results not handled correctly)
* mesa: Fix the size per pixel for packed pixel format data type.Xiang, Haihao2009-01-061-0/+3
|
* Added new _mesa_clip_copytexsubimage() function to do avoid clipping down in ↵Brian2008-09-231-0/+6
| | | | | | | the drivers. This should probably be pulled into main-line Mesa... (cherry picked from commit 324ecadbfdf9b944e059832f146451e4151dcb21)
* mesa: refactor: move pixel map/scale/bias code into image.cBrian Paul2008-09-211-1/+46
| | | | pixel.c is just the API-related code now.
* Change float depthScale param to _mesa_unpack_depth_span() to GLuint depthMax.Brian2007-07-081-3/+3
|
* Consolidate, move, fix code related to color index and stencil image transferBrian Paul2006-10-131-0/+11
| | | | operations (shift, offset, table lookup, etc).
* In _mesa_pack_rgba_span_float() we don't need to make a temporary copy ofBrian Paul2006-10-131-2/+1
| | | | | | | incoming colors when applying pixel transfer ops. In all cases, the caller either indicates there's no pixel transfer ops, or the incoming colors are coming from temporary storage already and can be safely modified.
* s/GLuint/GLbitfield/Brian Paul2006-10-131-7/+7
|
* removed obsolete _mesa_pack_rgba_span_chan()Brian Paul2006-10-131-8/+0
|
* Added _mesa_convert_colors().Brian Paul2006-10-111-1/+7
| | | | _mesa_clip_drawpixels() now handles Pixel.ZoomY==-1.
* merge from texman branchmesa_20060325Brian Paul2006-03-261-1/+6
|
* added _mesa_pack_depth_stencil_span()Brian Paul2005-10-011-0/+7
|
* Initial work for GL_EXT_packed_depth_stencil extension.Brian Paul2005-09-281-10/+6
| | | | glReadPixels done, glDrawPixels mostly done.
* GL_(UN)PACK_SKIP_IMAGES should only be applied to 3D texture pack/unpackingBrian Paul2004-11-101-4/+28
| | | | | | | and ignored for 1D and 2D images. Need to pass in image dimensions (1,2,3) to the _mesa_image_address() function. This change gets propogated to some other routines. Also added new _mesa_image_address[123]d() convenience functions.
* added _mesa_clip_drawpixels() and _mesa_clip_readpixels()Brian Paul2004-11-091-1/+15
|
* New glTexImage code.Brian Paul2004-04-221-1/+1
| | | | | | | | The gl_texture_format struct now has a StoreTexImageFunc that's called by glTex[Sub]Image[123]D to convert the user's texture data into the specific texture format layout. Now it's much easier to add new texture formats (like the 16/32-bit floating point formats). The texutil.[ch] and texutil_tmp.h files are obsolete.
* Implementation of GL_EXT_pixel_buffer_object extension.Brian Paul2004-03-131-3/+0
| | | | | Note: extension may not be finalized yet - subject to change! Note: implementation not fully suitable for h/w implementation yet.
* Remove clamp parameter from _mesa_unpack_color_span_float(). Pass theBrian Paul2004-02-281-5/+5
| | | | | | IMAGE_CLAMP_BIT if needed. Added ClampVertexColors and ClampFragmentColors to GLcontext in anticipation of upcoming extensions (not fully used yet).
* consolidate image transfer operations in new _mesa_apply_rgba_transfer_ops() ↵Brian Paul2004-02-281-2/+6
| | | | function