History log of /external/mesa3d/src/mesa/main/texcompress_rgtc.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bd016a2601a741799bc76734deae0cb9ebcb2b8f 15-Sep-2015 Ulrich Weigand <uweigand@de.ibm.com> mesa: Fix texture compression on big-endian systems

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>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
2768a0b1b42f3c1531ab9c3647a93f0504002280 01-Apr-2015 Brian Paul <brianp@vmware.com> mesa: remove unneeded #include of colormac.h

Acked-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
bfcdb843830bba0190e00e35e3c5c18c4bdb5de1 21-Feb-2015 Matt Turner <mattst88@gmail.com> mesa: Use assert() instead of ASSERT wrapper.

Acked-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
c540800aa5521023f28eeb288f0d7bb0b67278f3 07-Nov-2014 Iago Toral Quiroga <itoral@igalia.com> mesa: Remove _mesa_make_temp_float_image

Now that we have _mesa_format_convert we don't need this.

This was only used to create temporary RGBA float images in the process
of storing some compressed formats. These can call _mesa_texstore
with a RGBA/float dst to achieve the same goal.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
4468386a3c8126cf94691c5f0ee12b0b157f314c 07-Nov-2014 Iago Toral Quiroga <itoral@igalia.com> mesa: Remove _mesa_make_temp_ubyte_image

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>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
ebcb2ee989b9839e52f2789a457fb806d1fad1e7 16-Sep-2014 Dave Airlie <airlied@redhat.com> util: move shared rgtc code to util (v2)

This was being shared using a ../../ get out of gallium into
mesa, and I swore when I did it I'd fix things when we got a util
dir, we did, so I have.

v2: move RGTC_DEBUG define

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
f5bd5568abcc234c1c2b6a4bb67b880706f3caed 22-Jan-2014 Mark Mueller <MarkKMueller@gmail.com> mesa: Fix Type A _INT formats to MESA_FORMAT naming standard

Replace Type A _INT formats names with _SINT to match naming spec,
and update type C formats as follows:
s/MESA_FORMAT_R_INT8\b/MESA_FORMAT_R_SINT8/g
s/MESA_FORMAT_R_INT16\b/MESA_FORMAT_R_SINT16/g
s/MESA_FORMAT_R_INT32\b/MESA_FORMAT_R_SINT32/g
s/MESA_FORMAT_RG_INT8\b/MESA_FORMAT_RG_SINT8/g
s/MESA_FORMAT_RG_INT16\b/MESA_FORMAT_RG_SINT16/g
s/MESA_FORMAT_RG_INT32\b/MESA_FORMAT_RG_SINT32/g
s/MESA_FORMAT_RGB_INT8\b/MESA_FORMAT_RGB_SINT8/g
s/MESA_FORMAT_RGB_INT16\b/MESA_FORMAT_RGB_SINT16/g
s/MESA_FORMAT_RGB_INT32\b/MESA_FORMAT_RGB_SINT32/g
s/MESA_FORMAT_RGBA_INT8\b/MESA_FORMAT_RGBA_SINT8/g
s/MESA_FORMAT_RGBA_INT16\b/MESA_FORMAT_RGBA_SINT16/g
s/MESA_FORMAT_RGBA_INT32\b/MESA_FORMAT_RGBA_SINT32/g
s/\bMESA_FORMAT_RED_RGTC1\b/MESA_FORMAT_R_RGTC1_UNORM/g
s/\bMESA_FORMAT_SIGNED_RED_RGTC1\b/MESA_FORMAT_R_RGTC1_SNORM/g
s/\bMESA_FORMAT_RG_RGTC2\b/MESA_FORMAT_RG_RGTC2_UNORM/g
s/\bMESA_FORMAT_SIGNED_RG_RGTC2\b/MESA_FORMAT_RG_RGTC2_SNORM/g
s/\bMESA_FORMAT_L_LATC1\b/MESA_FORMAT_L_LATC1_UNORM/g
s/\bMESA_FORMAT_SIGNED_L_LATC1\b/MESA_FORMAT_L_LATC1_SNORM/g
s/\bMESA_FORMAT_LA_LATC2\b/MESA_FORMAT_LA_LATC2_UNORM/g
s/\bMESA_FORMAT_SIGNED_LA_LATC2\b/MESA_FORMAT_LA_LATC2_SNORM/g
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
71fe9437169cfdafda8814aa814bb85429fb6cfc 04-Jan-2014 Mark Mueller <MarkKMueller@gmail.com> mesa: change gl_format to mesa_format

s/\bgl_format\b/mesa_format/g. Use better name for Mesa Formats enum
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
0c883e46d871797cd1141498850d51cde6e54b76 19-Apr-2013 Eric Anholt <eric@anholt.net> swrast: Replace ImageOffsets with an ImageSlices pointer.

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>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
b76f6d9557ff27140e18cf8aa2b57db8876d5d4d 17-Apr-2013 Brian Paul <brianp@vmware.com> mesa: remove #include "mfeatures.h" from numerous source files

None of the remaining FEATURE_x symbols in mfeatures.h are used anymore.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
c7d3254b8e0bb0859c4ed969f07b4585af5577b7 02-Jan-2013 Brian Paul <brianp@vmware.com> mesa: fix signed/unsignd mix-up in fetch_signed_l_latc1()

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=58844
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
b29f2d5ff54c5031e5b0f0ae9f89acb4eb38b219 08-Dec-2012 Brian Paul <brianp@vmware.com> mesa: remove old swrast-based compressed texel fetch code
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
cd7baf5bf488299da0e75c7d04dd611274a0eb8f 08-Dec-2012 Brian Paul <brianp@vmware.com> mesa: add new texel fetch code for rgtc formats
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
2ffc7fd2d2cbb1e895ceb8afd12e7c4a2dc3050f 03-Sep-2012 Brian Paul <brianp@vmware.com> mesa: remove more null pointer checks before free() calls

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
d78b44c2651b45c337dda71b17351beb41eb9c14 23-Aug-2012 Brian Paul <brianp@vmware.com> mesa/swrast: fix GL_TEXTURE_2D_ARRAY texture fetches for latc/rgtc formats

Fix-up the texel fetch functions so that they handle 3D coords (as used for
array textures) and remove the "f_2d" part from their names.

Helps fix swrast crashes in piglit's copyteximage test. More to come.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
bd3c10c0f0c60ab3421c2da2eab814edc2296cb0 16-Jan-2012 Brian Paul <brianp@vmware.com> swrast: s/Data/Map/ in swrast_texture_image

To indicate that it points to mapped texture memory.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
d69d287068e0a6b5e2f3c13b1f55335a9b6ce03b 02-Jan-2012 Brian Paul <brianp@vmware.com> mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functions

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>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
6e0f9001fe3fb191c2928bd09aa9e9d05ddf4ea9 23-Oct-2011 Brian Paul <brianp@vmware.com> mesa: move gl_texture_image::Data, RowStride, ImageOffsets to swrast

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.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
5253cf98057dad54e25b4b8c36f8cf24f559314c 05-Oct-2011 Brian Paul <brianp@vmware.com> mesa: get rid of imageOffsets arrays in texstore code

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>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
b4e6afbf7715df7473723f3e0c5d714cd5721802 17-Sep-2011 Brian Paul <brianp@vmware.com> mesa/gallium: remove GLchan from latc, rgtc code
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
663f61a3e177a443c36f414a16a9d5f94e74135d 17-Sep-2011 Brian Paul <brianp@vmware.com> mesa: s/_mesa_make_temp_chan_image()/_mesa_make_temp_ubyte_image()

Another step toward eliminating the GLchan type.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
a1661dc8957a35899d653e9fffd97f166c56be56 17-Sep-2011 Brian Paul <brianp@vmware.com> mesa: move gl_texture_image::FetchTexel fields to swrast

This also involves passing swrast_texture_image instead of gl_texture_image
into all the fetch functions.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
6eff8479af1a137d81d7bffc0c55a39910c28ce9 06-Apr-2011 Marek Olšák <maraeo@gmail.com> mesa: fix dstRowDiff computation in RGTC texstore functions

Copied from libtxc_dxtn, this fixes NPOT RGTC1 textures with r300g.
I also did the same for RGTC2.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
7d16e2c0cd70dc5a23b746dbc8e44c58366b5353 07-Mar-2011 Marek Olšák <maraeo@gmail.com> mesa: add EXT_texture_compression_latc

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.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
531c336fa39d8e823d05728cb7ddb3cc8a44d199 02-Mar-2011 Dave Airlie <airlied@redhat.com> rgtc: move the texel fetch into common unsigned/signed code.

This function can be done in the include file also.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
fb6ecca0a556dcca1f77bfb84a835e2b9c2e2e6a 02-Mar-2011 Dave Airlie <airlied@redhat.com> rgtc: fix issues with compressor and signed types.

With signed types we weren't hitting this test however the comment
stating this doesn't happen often doesn't apply when using signed
types since an all 0 block is quite common which isn't abs min or max.

this fixes the limits correctly again also.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
521394a204bd8073846acc7f9861081d29fa24c9 02-Mar-2011 Dave Airlie <airlied@redhat.com> rgtc: don't try to access off the end of the block.

if the values are all in the last dword, the high bits can be 0,

This fixes a valgrind warning I saw when playing with mipmaps.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
5f714c2aaf8d25e5d5ba2e4c29cb3046f7639d24 02-Mar-2011 Dave Airlie <airlied@redhat.com> rgtc: move to using ubyte for fetch instead of chan + fix limit

My previous fix to the byte max was incorrect.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
ff0f36f59d58e90e775117beb945ffbec7a5d7e2 02-Mar-2011 Dave Airlie <airlied@redhat.com> rgtc: fix fetch function limits for signed types
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
01d5d1e80ee506205e8615356e55e4bca16c6b11 02-Mar-2011 Dave Airlie <airlied@redhat.com> swrast/rgtc: fix rendering issues introduced when fix constants

The max value was wrong and this showed up in the piglit tests.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
9c16fcc617b8c5c4db825ed290f994e535de8c65 01-Mar-2011 Dave Airlie <airlied@redhat.com> rgtc: shared the compressor code between signed/unsigned

No idea why I didn't do it like this the first time, but share
the code like other portions of mesa do using _tmp.h suffix
and some #defines for the types.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
3f600047d95f46995915d46aff574796d088fa83 28-Feb-2011 Dave Airlie <airlied@redhat.com> rgtc: fix void pointer arith.

should fix scons build.
/external/mesa3d/src/mesa/main/texcompress_rgtc.c
8d47c919859e9cd90cfc04eb220ac8a5aa87048e 22-Feb-2011 Dave Airlie <airlied@redhat.com> mesa: Add RGTC texture store/fetch support.

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 <airlied@redhat.com>
/external/mesa3d/src/mesa/main/texcompress_rgtc.c