aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.h
Commit message (Collapse)AuthorAgeFilesLines
...
* mesa: Add comments about bit-ordering of new XRGB/XBGR formats.Kenneth Graunke2013-05-121-15/+15
| | | | | | | | | | | | | Marek added these new formats in commit f9fa725690c470daf308, but without comments relating to the packing. Sometimes the naming is confusing, so these comments are helpful in determining whether two formats are compatible. The new comments are based on my reading of format_unpack.c. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Marek Olšák <[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: add RGBX formats for existing GL RGB texture formatsMarek Olšák2013-02-071-0/+16
| | | | v2: fix compilation of swrast
* mesa: fixup inconsistent naming of RG16 formatsMarek Olšák2013-02-061-2/+2
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Add new MESA_FORMATs for ETC2 compressed texturesAnuj Phogat2012-12-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is required by OpenGL ES 3.0 to support ETC2 textures. This patch adds new MESA_FORMATs for following etc2 texture formats: GL_COMPRESSED_RGB8_ETC2 GL_COMPRESSED_SRGB8_ETC2 GL_COMPRESSED_RGBA8_ETC2_EAC GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC GL_COMPRESSED_R11_EAC GL_COMPRESSED_RG11_EAC GL_COMPRESSED_SIGNED_R11_EAC GL_COMPRESSED_SIGNED_RG11_EAC MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1 MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1 Above formats are currently available in only gles 3.0. v2: Add entries in texfetch_funcs[] array. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Brian Paul <[email protected]> v3 (Paul Berry <[email protected]>): comment out symbols that are not implemented yet, so that this commit compiles on its own; future commits will uncomment the symbols as they become available.
* mesa formats: add MESA_FORMAT_ABGR2101010_UINTJordan Justen2012-07-211-0/+1
| | | | | Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mesa: add glformats integer type/format detection routinesJordan Justen2012-07-211-1/+3
| | | | | | | | | | | | _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: added swapBytes parameter to _mesa_format_matches_format_and_type()Brian Paul2012-01-271-1/+2
| | | | | | Not actually used yet though. Reviewed-by: Ian Romanick <[email protected]>
* mesa: add _mesa_get_format_max_bits()Brian Paul2011-12-241-0/+3
| | | | | | Returns max bits per channel for the given format. Reviewed-by: José Fonseca <[email protected]>
* mesa: add MAX_PIXEL_BYTES defineBrian Paul2011-12-081-0/+8
| | | | | | | | | In a few places we need to allocate space for some number of generic pixels. Use this new define instead of a magic number like 16 or 4 * sizeof(GLuint). Reviewed-by: Jose Fonseca <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: rename MESA_FORMAT_RG88_REV to MESA_FORMAT_RG88Brian Paul2011-12-021-1/+1
| | | | R is in the high byte, G in the low byte.
* mesa: rename MESA_FORMAT_RG88 to MESA_FORMAT_GR88Brian Paul2011-12-021-1/+1
| | | | | To better reflect the component ordering and be consistent with other format names.
* mesa: add support for GL_OES_compressed_ETC1_RGB8_textureChia-I Wu2011-12-021-0/+2
| | | | | | | | | | | Add support for GL_OES_compressed_ETC1_RGB8_texture to core mesa. There is no driver support yet. Unlike desktop GL compressed texture formats, GLES compressed texture formats usually can only be used with glCompressedTexImage2D. All other gl*Tex*Image* functions are updated to check for that. Reviewed-by: Brian Paul <[email protected]>
* mesa: add component comments for sRGB formatsBrian Paul2011-11-281-5/+5
|
* mesa: fix comments for RG formatsBrian Paul2011-11-281-4/+4
| | | | | | The position of the red and green bits was misstated in the comments. Arguably, the names of these formats should be changed to "GR" to reflect the component ordering and to be consistent with other formats.
* mesa/format: add mesa MESA_FORMAT_ARGB2101010_UINT support.Dave Airlie2011-11-281-0/+2
| | | | | | | | | | | | | | This format is used in the ARB_texture_rgb10_a2ui spec. It adds core mesa support, texformat + texstore support, format_unpack and fbobject.c (all patches from list merged + fixed up). also fixes some whitespace issues. Parts were: Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* mesa: add MESA_FORMAT_RGBX8888 and MESA_FORMAT_RGBX8888_REVChia-I Wu2011-11-271-0/+2
| | | | | | | | | | | | | MESA_FORMAT_RGBX8888_REV is one of the opaque pixel formats used on Android. Thanks to texture-from-pixmap, drivers may actually see texture images with this format on Android. MESA_FORMAT_RGBX8888 is added only for completeness. Reviewed-by: Brian Paul <[email protected]> [olv: Move the new formats after MESA_FORMAT_ARGB8888_REV in gl_format. I accidentally moved them to the wrong place when preparing the patch.]
* mesa,glsl,mapi: Put extern "C" { ... } where appropriate.José Fonseca2011-11-091-0/+11
| | | | | Probably a several places missing, but enough to cover all headers (in)directly included by uniform_query.cpp, and fix the MSVC build.
* mesa: Add a function for comparing gl_format to format/type.Eric Anholt2011-11-031-0/+3
| | | | | | | | | | This should be useful in making more generic fast paths in the pixel paths. v2: Add note about PACK_SWAP_BYTES, and fix up for endianness by synchronizing with memcpy_texture paths in texstore.c. Reviewed-by: Brian Paul <[email protected]>
* mesa/formats: add rest of integer formats.Dave Airlie2011-10-051-0/+46
| | | | | | | | | | | | | | | | This is taken from reading EXT_texture_integer + EXT_texture_rg in combination, Comments on necessity of each format, naming of formats and bugs in the formats tables please. Is there any formats I've missed? Eric looked over this to make sure its consistent at least. As I've changed the ordering of things in the format table, the follow patches are required to avoid regression. Signed-off-by: Dave Airlie <[email protected]>
* mesa: added _mesa_get_uncompressed_format(), _mesa_format_num_components()Brian Paul2011-09-081-0/+7
|
* mesa: Remove all mention of MESA_FORMAT_CI8Ian Romanick2011-08-291-1/+0
| | | | | | | | | | | Nothing in Mesa supports color-index textures, and most of the other infrastructure that could allow such support has already been removed. This puts the final nail in the coffin. Also clean out some GL_COLOR_INDEX comments in formats.c. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: initial ARB_depth_buffer_float supportMarek Olšák2011-07-101-0/+3
| | | | | | | Using GL_NONE as DataType of Z32_FLOAT_X24S8, not sure what I should put there. The spec says the type is n/a. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix return type of _mesa_get_format_bytes() (#37351)Adam Jackson2011-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Despite that negative values aren't sensible here, making this unsigned is dangerous. Consider get_pointer_generic, which computes a value of the form: void *base + (int x * int stride + int y) * unsigned bpp The usual arithmetic conversions will coerce the (x*stride + y) subexpression to unsigned. Since stride can be negative, this is disastrous. Fixes at least the following piglit tests on Ironlake: fbo/fbo-blit-d24s8 spec/ARB_depth_texture/fbo-clear-formats spec/EXT_packed_depth_stencil/fbo-clear-formats NOTE: This is a candidate for the 7.10 branch. Reviewed-by: Chad Versace <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
* mesa: implement EXT_packed_floatMarek Olšák2011-04-291-0/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: implement EXT_texture_shared_exponentMarek Olšák2011-04-291-0/+2
| | | | | | | | | swrast support done. There is no renderbuffer support in swrast, because it's not required by the extension. Reviewed-by: Brian Paul <[email protected]>
* mesa: add R/RG floating-point formatsMarek Olšák2011-04-151-0/+4
|
* mesa: initial EXT_texture_snorm supportMarek Olšák2011-03-291-3/+12
| | | | | The component ordering of some formats has been been reversed to match Gallium types.
* mesa: add EXT_texture_compression_latcMarek Olšák2011-03-081-0/+8
| | | | | | | | | | | | | | | | | The encoding/decoding algorithms are shared with RGTC. Thanks to some magic with the base format, the RGTC texstore functions work for LATC too. swrast passes the related piglit tests besides two things: - The alpha channel is wrong (it's always 1), however the incorrect alpha channel makes some other tests fail too, so I guess it's unrelated to LATC. - Signed LATC fetches aren't correct yet (signed values are clamped to [0,1]), however RGTC has the same problem. Further testing (with other of my patches) shows that hardware drivers and softpipe work. BTW, ETQW uses this extension.
* mesa: Add RGTC texture store/fetch support.Dave Airlie2011-02-281-0/+6
| | | | | | | | | This adds support for the RGTC unsigned and signed texture storage and fetch methods. the code is a port of the DXT5 alpha compression code. Signed-off-by: Dave Airlie <[email protected]>
* mesa: fix mipmap generation for MESA_FORMAT_AL44Marek Olšák2011-02-161-0/+3
| | | | This was missed when implementing AL44.
* mesa/swrast: implement EXT_texture_sRGB_decodeDave Airlie2011-01-161-0/+3
| | | | | | | This implements the extension by choosing a different set of texture fetch functions when the texture parameter changes. Signed-off-by: Dave Airlie <[email protected]>
* mesa: implement new texture format I16Marek Olšák2010-12-231-0/+1
|
* mesa: implement new texture format L16Marek Olšák2010-12-231-0/+1
|
* mesa: implement new texture format A16Marek Olšák2010-12-231-0/+1
|
* mesa: implement new texture format AL44Marek Olšák2010-12-231-0/+1
| | | | | | Radeon GPUs can do this. R600 can even do render-to-texture. Packing and extracting aren't implemented, but we shouldn't hit them (I think). Tested with swrast, softpipe, and r300g.
* mesa: implement new texture format ARGB2101010Marek Olšák2010-12-231-0/+1
| | | | Radeon GPUs do support GL_RGB10_A2.
* mesa: added _mesa_format_image_size64()Brian Paul2010-11-241-0/+4
|
* mesa: rename function to _mesa_is_format_integer_color()Brian Paul2010-10-261-1/+1
| | | | Be a bit more clear about its operation.
* mesa: _mesa_is_format_integer() functionBrian Paul2010-10-231-0/+3
|
* ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formatsIan Romanick2010-10-011-0/+6
|
* mesa: Identify packed depth/stencil buffers using the Format field.Nick Bowler2010-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | Intel sometimes uses packed depth/stencil buffers even when only a depth buffer or only a stencil buffer was requested. Common code currently uses the _BaseFormat field to determine whether a depth/stencil wrapper is necessary. But unless the user explicitly requested a packed depth/stencil buffer, the _BaseFormat field does not encode this information, and the required wrappers are not created. The problem was introduced by commit 45e76d2665b38b ("mesa: remove a bunch of gl_renderbuffer fields"), which killed off the _ActualFormat field upon which the decision to create a wrapper used to be made. This patch changes the logic to use the Format field instead, which is more like the old code. Fixes fdo bug 27590. Signed-off-by: Nick Bowler <[email protected]> Signed-off-by: Brian Paul <[email protected]>
* mesa: Remove unnecessary header.Vinson Lee2010-07-281-1/+1
|
* mesa: initial support for unnormalized integer texture formatsBrian Paul2010-07-051-0/+16
| | | | As defined by GL_EXT_texture_integer.
* mesa: added unsigned 16-bit/channel tex formatBrian Paul2010-05-091-0/+1
|
* mesa: added comments for signed 16-bit formatsBrian Paul2010-05-091-4/+4
|
* mesa: start adding GL 3.1 signed normalized texture formatsBrian Paul2010-04-261-3/+11
|
* mesa: remove trailing comment to silence warningBrian Paul2009-11-171-1/+1
|