summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress_s3tc.c
Commit message (Collapse)AuthorAgeFilesLines
* Use correct names for dlopen()ed files on CygwinYaakov Selkowitz2016-07-151-0/+2
| | | | | Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
* mesa: Fix texture compression on big-endian systemsUlrich Weigand2015-09-171-3/+6
| | | | | | | | | | | | | | | | | | | | | | | Various pieces of code to create compressed textures will first generate an uncompressed RGBA texture into a temporary buffer, and then read from that buffer while creating the final compressed texture in the requested format. The code reading from the temporary buffer assumes the buffer is formatted as an array of bytes in RGBA order. However, the buffer is filled using a _mesa_texstore call with MESA_FORMAT_R8G8B8A8_UNORM format -- this is defined as an array of *integers* holding the RGBA values in packed format (least-significant to most-significant). This means incorrect bytes are accessed on big-endian systems. This patch fixes this by using the MESA_FORMAT_A8B8G8R8_UNORM format instead on big-endian systems when filling the buffer. This fixes about 100 piglit test case failures on s390x for me. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com> Tested-by: Oded Gabbay <oded.gabbay@gmail.com> Cc: "10.6" "11.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@gmail.com>
* texcompress_s3tc/fxt1: fix stride checks (v1.1)Dave Airlie2015-09-021-4/+4
| | | | | | | | | | | | | | | | | | The fastpath currently checks the RowLength != width, but if you have a RowLength of 7, and Alignment of 4, then that shouldn't match. align the rowlength to the pack alignment before comparing. This fixes compressed cases in CTS packed_pixels_pixelstore test when SKIP_PIXELS is enabled, which causes row length to get set. v1.1: add fxt1 fix (Iago) Cc: "11.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa: Remove pointless USE_EXTERNAL_DXTN_LIB macro.Jose Fonseca2015-04-131-8/+0
| | | | | | | I'm not sure what was the original intention, but currently USE_EXTERNAL_DXTN_LIB always ends up defined, one way or another. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
* mesa: remove unneeded #include of colormac.hBrian Paul2015-04-011-1/+0
| | | | | Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
* mesa: Use assert() instead of ASSERT wrapper.Matt Turner2015-02-231-4/+4
| | | | Acked-by: Eric Anholt <eric@anholt.net>
* mesa: Remove _mesa_make_temp_ubyte_imageIago Toral Quiroga2015-01-121-24/+44
| | | | | | | | | | | | Now that we have _mesa_format_convert we don't need this. texstore_rgba will use the GL_COLOR_INDEX to RGBA conversion helpers instead and compressed formats that used _mesa_make_temp_ubyte_image to create an ubyte RGBA temporary image can call _mesa_texstore with a RGBA/ubyte dst to achieve the same goal. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
* mesa: remove last DJGPP remainsEmil Velikov2014-09-271-2/+0
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa/main: Use the RGB <-> sRGB conversion functions in libmesautilJason Ekstrand2014-08-041-12/+13
| | | | | Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* mesa: change gl_format to mesa_formatMark Mueller2014-01-271-1/+1
| | | | s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* swrast: Replace ImageOffsets with an ImageSlices pointer.Eric Anholt2013-04-301-32/+24
| | | | | | | | | | | | | This is a step toward allowing drivers to use their normal mapping paths, instead of requiring that all slice mappings come from an aligned offset from the first slice's map. This incidentally fixes missing slice handling in FXT1 swrast. v2: Use slice height helper function. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com>
* mesa: remove #include "mfeatures.h" from numerous source filesBrian Paul2013-04-171-1/+0
| | | | | | None of the remaining FEATURE_x symbols in mfeatures.h are used anymore. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* mesa: add missing texel fetch code for sRGB DXT formatsBrian Paul2012-12-261-0/+82
| | | | Fixes http://bugs.freedesktop.org/show_bug.cgi?id=58548
* mesa: remove old swrast-based compressed texel fetch codeBrian Paul2012-12-141-165/+0
|
* mesa: add new texel fetch code for dxt formatsBrian Paul2012-12-141-1/+105
|
* mesa: Make nonlinear_to_linear() function available outside fileAnuj Phogat2012-12-071-39/+13
| | | | | | | | | This patch changes nonlinear_to_linear() function to non static inline and makes it available outside format_unpack.c. Also, removes the duplicate copies in other files. Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove '(void) k' linesBrian Paul2012-11-271-4/+0
| | | | Serves no purpose as the k parameter is used later in the code.
* mesa: remove FEATURE_EXT_texture_sRGB define.Oliver McFadden2012-09-151-4/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove FEATURE_texture_s3tc define.Oliver McFadden2012-09-151-6/+0
| | | | | Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa/dxtn: make function pointers staticDave Airlie2012-09-151-4/+4
| | | | | | | | These aren't used outside thie file from what I can see. Reviewed-by: Matt Turner <mattst88@gmail.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* mesa: remove more null pointer checks before free() callsBrian Paul2012-09-031-8/+4
| | | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
* mesa/swrast: fix GL_TEXTURE_2D_ARRAY texture fetches for dxt formatsBrian Paul2012-08-241-28/+32
| | | | | | | As with the previous commit. This fixes the last crash in the piglit copyteximage test but there's still some failures.
* swrast: s/Data/Map/ in swrast_texture_imageBrian Paul2012-01-241-4/+4
| | | | To indicate that it points to mapped texture memory.
* mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functionsBrian Paul2012-01-021-32/+7
| | | | | | | | The were always zero. When doing a sub-texture replacement we account for the dstX/Y/Zoffsets when we map the texture image. So no need to pass them into the texstore code anymore. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrastBrian Paul2011-10-231-10/+8
| | | | | | Only swrast and the drivers that fall back to swrast need these fields now. This removes the last of the fields related to software rendering from gl_texture_image.
* mesa: fix image unpacking when storing compressed texturesBrian Paul2011-10-071-4/+12
| | | | | | | | | | | | | | This fixes failures found with the new piglit texsubimage test. Two things were broken: 1. The dxt code doesn't handle sources images where width != row stride. Check for that and take the _mesa_make_temp_ubyte_image() path to get an image where width = rowstride. 2. If we don't take the _mesa_make_temp_ubyte_image() path we need to take the source image unpacking parameters into account in order to get the proper starting memory address of the source texels. Note: This is a candidate for the 7.11 branch.
* mesa: get rid of imageOffsets arrays in texstore codeBrian Paul2011-10-051-8/+4
| | | | | | | | | | | These were used to find the start of a 3D image slice (or 2D array texture slice) given a base address. Instead, use a simple array of address of image slices instead. This is a step toward getting rid of the gl_texture_image::ImageOffsets field. Reviewed-by: Eric Anholt <eric@anholt.net>
* mesa: s/INLINE/inline/Brian Paul2011-10-011-1/+1
| | | | | | | INLINE is still seen in some files (some generated files, etc) but this is a good start. Acked-by: Kenneth Graunke <kenneth@whitecape.org>
* mesa: replace GLchan with GLubyte in texcompress_s3tc.cBrian Paul2011-09-201-59/+57
|
* mesa: s/_mesa_make_temp_chan_image()/_mesa_make_temp_ubyte_image()Brian Paul2011-09-201-8/+8
| | | | Another step toward eliminating the GLchan type.
* mesa: move gl_texture_image::FetchTexel fields to swrastBrian Paul2011-09-171-18/+21
| | | | | This also involves passing swrast_texture_image instead of gl_texture_image into all the fetch functions.
* mesa: remove set-but-unused variables in texcompress_s3tcMarek Olšák2011-05-011-16/+0
|
* 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.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-1/+1
|
* mesa: fix assertions to handle srgb formatsBrian Paul2010-09-241-4/+8
| | | | | | http://bugs.freedesktop.org/show_bug.cgi?id=30333 NOTE: This is a candidate for the 7.9 branch.
* mesa: Remove EXT_convolution.Eric Anholt2010-09-231-5/+0
| | | | More optional code.
* mesa: Don't warn when the desired result of s3tc lib available occurs.Eric Anholt2010-08-251-1/+0
|
* mesa: Remove unnecessary headers.Vinson Lee2010-07-311-1/+0
|
* mesa: Include macros.h in files that use symbols from macros.h.Vinson Lee2010-07-301-0/+1
| | | | Don't rely on inclusion of other files that already include macros.h.
* mesa: Remove _mesa_pow(), which is always just pow().Eric Anholt2010-05-131-1/+1
|
* mesa: Use a consistent name of the external s3tc library for all windows ↵José Fonseca2010-03-311-1/+1
| | | | compilers.
* Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versionsKristian Høgsberg2010-02-191-4/+4
|
* mesa/main: Make FEATURE_texture_s3tc follow feature conventions.Chia-I Wu2009-10-291-1/+7
| | | | Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
* mesa: don't include texformat.hBrian Paul2009-10-051-1/+0
|
* mesa: remove gl_texture_formatBrian Paul2009-09-301-129/+0
|