summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa/format: add mesa MESA_FORMAT_ARGB2101010_UINT support.Dave Airlie2011-11-281-0/+9
| | | | | | | | | | | | | | 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 <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa: Fall back to float16 if float32 isn't supported in ChooseTexFormat.Eric Anholt2011-11-221-0/+11
| | | | | | | Until GL 3.0, there isn't any requirement on the actual sizes of channels chosen. By falling back to 16 here, we can correctly support ARB_texture_float on original i965 hardware, which can't correctly filter 32-bit floats.
* mesa: Add fallback from RGB_FLOAT16 to RGBA_FLOAT16 before RGBA_FLOAT32.Eric Anholt2011-11-221-0/+1
| | | | | | | Not all i965 hardware can do RGB float16, and this will at least save half the memory and have expected behavior in terms of precision. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: improve the warning message in _mesa_choose_tex_format()Brian Paul2011-10-231-1/+3
| | | | Bug 42128 hits this _mesa_warning() call.
* mesa/texformat: add integer fallbacks to other formatsDave Airlie2011-10-081-73/+131
| | | | | | | | | This fixes up the integer format choosing to pick the closest mesa format then the most likely fallback. (the formatting in this file needs cleaning in another patch). Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa/texformat: update choose_tex_format for integer types.Dave Airlie2011-10-051-4/+79
| | | | | | This adds the integer types to the tex format chooser. Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa: Remove EXT_bgra and EXT_texture_format_BGRA8888 extension enable flagsIan Romanick2011-09-261-1/+3
| | | | | | | | | | | | | All drivers remaining in Mesa support this extension. This extension is either required or optional features in desktop OpenGL, OpenGL ES 1.x, and OpenGL ES 2.x. EXT_texture_format_BGRA8888 is mostly a subset of EXT_bgra. The only difference seems to be that EXT_texture_format_BGRA8888 allows GL_BGRA as an internal format to glTexImage2D and friends. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Remove API facing bits of EXT_paletted_texture and ↵Ian Romanick2011-09-061-7/+0
| | | | | | | | | | | | | | EXT_shared_texture_palette This was also discussed at XDS 2010. However, actually making the change was delayed because several drivers still exposed these extensions to significant benefit (e.g., tdfx). Now that those drivers have been removed, this code can be removed as well. v2: A lot of bits that were missed in the previous patch have been removed. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: Remove all mention of MESA_FORMAT_CI8Ian Romanick2011-08-291-3/+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 <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: initial ARB_depth_buffer_float supportMarek Olšák2011-07-101-0/+13
| | | | | | | 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 <kenneth@whitecape.org>
* mesa: Add MESA_FORMAT_X8_Z24 to _mesa_choose_tex_formatChad Versace2011-05-251-0/+2
| | | | | | | | | | | Prefer MESA_FORMAT_X8_Z24 over MESA_FORMAT_S8_Z24 for textures with internal format GL_DEPTH_COMPONENT*. i965 needs MESA_FORMAT_X8_Z24 for HiZ and separate stencil. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Chad Versace <chad@chad-versace.us>
* mesa: implement EXT_packed_floatMarek Olšák2011-04-291-0/+10
| | | | | Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa, util: move RGB9E5 conversion functions to gallium/utilMarek Olšák2011-04-291-2/+2
| | | | | | | Also use MAX3 and incorporate Ian's suggestion in texformat.c. I don't think wrapping u_format_rgb9e5.h in another header and thus making it more complicated is worth it.
* mesa: implement EXT_texture_shared_exponentMarek Olšák2011-04-291-0/+10
| | | | | | | | | swrast support done. There is no renderbuffer support in swrast, because it's not required by the extension. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Choose RGTC formats for GL_COMPRESSED_RED, GL_COMPRESSED_RG.Eric Anholt2011-04-231-0/+8
| | | | | | | | | We were falling through to the default R8 and RG88 formats instead of compressing when possible. Noticed by swrast fbo-blending-formats actually doing rendering. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add ChooseTexFormat fallbacks for floating point textures.Eric Anholt2011-04-201-4/+30
| | | | | | This covers X_FLOAT16 -> X_FLOAT32, and X -> RGBA_FLOAT32. Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: add R/RG floating-point formatsMarek Olšák2011-04-151-0/+16
|
* mesa: Add fall-back formats for unsupported snorm formatsIan Romanick2011-04-041-3/+23
| | | | | | | | | | | | | | | | | | | | This is always the way with real hardware and desktop OpenGL. Some hardware can't do some formats natively. The alpha-only, luminance, and intensity formats are usually the most problematic. Some sized formats can also be problematic. This patch provides fall-back formats for those that are not natively supported. At some point it would be interesting to try providing device-independent conversions using EXT_texture_swizzle. The drivers that support EXT_texture_swizzle could, for example, see GL_LUMINANCE16_SNORM as MESA_FORMAT_SIGNED_R16 with a { r, r, r, 1 } swizzle. Care would need to be taken to prevent issues with using those textures for FBO rendering. This is the rest of the fix for glean's pixelFormats test on i965. Reviewed-by: Marek Olšák <maraeo@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: initial EXT_texture_snorm supportMarek Olšák2011-03-291-16/+33
| | | | | The component ordering of some formats has been been reversed to match Gallium types.
* mesa: add ATI_texture_compression_3dcMarek Olšák2011-03-081-0/+10
| | | | | | | LUMINANCE_ALPHA_LATC2 = LUMINANCE_ALPHA_3DC, so this is easy. Note that there is no specification for 3DC, just a few white papers from ATI.
* mesa: add EXT_texture_compression_latcMarek Olšák2011-03-081-0/+19
| | | | | | | | | | | | | | | | | 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.
* swrast: add RGTC supportDave Airlie2011-02-281-0/+19
|
* mesa: Support internalFormat=GL_BGRA for DRI driversKristian Høgsberg2011-01-261-0/+11
|
* mesa: Directly include mfeatures.h in files that perform feature tests.Vinson Lee2011-01-071-0/+1
|
* mesa: Include mtypes.h in files that use gl_context struct.Vinson Lee2011-01-051-0/+1
| | | | | | Directly include mtypes.h if a file uses a gl_context struct. This allows future removal of headers that are not strictly necessary but indirectly include mtypes.h for a file.
* intel: Merge our choosetexformat fallbacks into core.Eric Anholt2011-01-041-1/+47
| | | | | | We now share the type/format -> MESA_FORMAT_* mappings with software mesa, and the core supports most of the fallbacks hardware drivers will want.
* mesa: Make _mesa_choose_tex_format() choose formats out of a supported table.Eric Anholt2011-01-041-91/+172
| | | | | Right now this is just tweaking the current code to look at the table. Choosing actually supported formats will come later.
* mesa: implement new texture format I16Marek Olšák2010-12-231-2/+4
|
* mesa: implement new texture format L16Marek Olšák2010-12-231-2/+4
|
* mesa: implement new texture format A16Marek Olšák2010-12-231-2/+4
|
* mesa: implement new texture format AL44Marek Olšák2010-12-231-1/+3
| | | | | | 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/+2
| | | | Radeon GPUs do support GL_RGB10_A2.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* ARB_texture_rg: Add R8, R16, RG88, and RG1616 internal formatsIan Romanick2010-10-011-0/+23
|
* mesa: initial support for unnormalized integer texture formatsBrian Paul2010-07-051-0/+47
| | | | As defined by GL_EXT_texture_integer.
* mesa: added unsigned 16-bit/channel tex formatBrian Paul2010-05-091-8/+14
|
* mesa: start adding GL 3.1 signed normalized texture formatsBrian Paul2010-04-261-0/+26
|
* mesa: Remove unnecessary headers from texformat.c.Vinson Lee2010-01-181-2/+0
|
* AL1616: Enable MESA_FORMAT_AL1616 for software pathsIan Romanick2009-11-161-2/+4
|
* Merge branch 'texformat-rework'Brian Paul2009-10-281-1706/+73
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/mesa/drivers/dri/radeon/radeon_fbo.c src/mesa/drivers/dri/s3v/s3v_tex.c src/mesa/drivers/dri/s3v/s3v_xmesa.c src/mesa/drivers/dri/trident/trident_context.c src/mesa/main/debug.c src/mesa/main/mipmap.c src/mesa/main/texformat.c src/mesa/main/texgetimage.c
| * mesa: move _mesa_format_to_type_and_comps() to formats.cBrian Paul2009-10-051-179/+0
| |
| * mesa: remove GLchan-based formats; use hw 8-bit/channel formats insteadBrian Paul2009-09-301-31/+6
| | | | | | | | Removed: MESA_FORMAT_RGBA, RGB, ALPHA, LUMINANCE, LUMINANCE_ALPHA, INTENSITY.
| * mesa: move texel fetch/store into new texfetch.[ch] filesBrian Paul2009-09-301-580/+4
| |
| * mesa: remove gl_texture_formatBrian Paul2009-09-301-908/+0
| |
| * mesa: replace gl_texture_format with gl_formatBrian Paul2009-09-301-73/+74
| | | | | | | | | | | | Now gl_texture_image::TexFormat is a simple MESA_FORMAT_x enum. ctx->Driver.ChooseTexture format also returns a MESA_FORMAT_x. gl_texture_format will go away next.
| * mesa: change _mesa_format_to_type_and_comps() format parameter typeBrian Paul2009-09-271-4/+3
| |
| * mesa: remove unused gl_texture_format fieldsBrian Paul2009-09-271-432/+0
| |
| * mesa: rework null texel fetch/store funcsBrian Paul2009-09-271-22/+21
| |
| * mesa: null-out StoreTexImageFunc fieldsBrian Paul2009-09-271-53/+53
| |
| * mesa: use _mesa_get_texel_store_func()Brian Paul2009-09-271-52/+52
| |