aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texcompress_etc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-08-11 21:22:25 +0200
committermarha <marha@users.sourceforge.net>2014-08-11 21:22:25 +0200
commit8e27619ab489dece35cc4bec86950ee7729cd309 (patch)
treeab59dbc661e00c12ed4777cf9d0d37393c4163aa /mesalib/src/mesa/main/texcompress_etc.c
parentffc99ce2402fe5c9a6eb8fcf193e8e9472fd993b (diff)
parentfdbedba4d50e1b28b0249c83ba11c029f096e400 (diff)
downloadvcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.gz
vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.tar.bz2
vcxsrv-8e27619ab489dece35cc4bec86950ee7729cd309.zip
Merge remote-tracking branch 'origin/released'
Conflicts: libxcb/src/c_client.py mesalib/include/GL/glext.h mesalib/include/GL/glxext.h mesalib/src/glsl/.gitignore mesalib/src/mesa/drivers/dri/common/xmlconfig.h mesalib/src/mesa/main/.gitignore xorg-server/Xext/xvmain.c xorg-server/dix/dispatch.c xorg-server/hw/xfree86/common/compiler.h
Diffstat (limited to 'mesalib/src/mesa/main/texcompress_etc.c')
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/texcompress_etc.c b/mesalib/src/mesa/main/texcompress_etc.c
index ae973b001..98b4fe201 100644
--- a/mesalib/src/mesa/main/texcompress_etc.c
+++ b/mesalib/src/mesa/main/texcompress_etc.c
@@ -43,6 +43,7 @@
#include "texstore.h"
#include "macros.h"
#include "format_unpack.h"
+#include "util/format_srgb.h"
struct etc2_block {
@@ -1307,9 +1308,9 @@ fetch_etc2_srgb8(const GLubyte *map,
etc2_rgb8_fetch_texel(&block, i % 4, j % 4, dst,
false /* punchthrough_alpha */);
- texel[RCOMP] = _mesa_nonlinear_to_linear(dst[0]);
- texel[GCOMP] = _mesa_nonlinear_to_linear(dst[1]);
- texel[BCOMP] = _mesa_nonlinear_to_linear(dst[2]);
+ texel[RCOMP] = util_format_srgb_8unorm_to_linear_float(dst[0]);
+ texel[GCOMP] = util_format_srgb_8unorm_to_linear_float(dst[1]);
+ texel[BCOMP] = util_format_srgb_8unorm_to_linear_float(dst[2]);
texel[ACOMP] = 1.0f;
}
@@ -1345,9 +1346,9 @@ fetch_etc2_srgb8_alpha8_eac(const GLubyte *map,
etc2_rgba8_parse_block(&block, src);
etc2_rgba8_fetch_texel(&block, i % 4, j % 4, dst);
- texel[RCOMP] = _mesa_nonlinear_to_linear(dst[0]);
- texel[GCOMP] = _mesa_nonlinear_to_linear(dst[1]);
- texel[BCOMP] = _mesa_nonlinear_to_linear(dst[2]);
+ texel[RCOMP] = util_format_srgb_8unorm_to_linear_float(dst[0]);
+ texel[GCOMP] = util_format_srgb_8unorm_to_linear_float(dst[1]);
+ texel[BCOMP] = util_format_srgb_8unorm_to_linear_float(dst[2]);
texel[ACOMP] = UBYTE_TO_FLOAT(dst[3]);
}
@@ -1473,9 +1474,9 @@ fetch_etc2_srgb8_punchthrough_alpha1(const GLubyte *map,
true /* punchthrough alpha */);
etc2_rgb8_fetch_texel(&block, i % 4, j % 4, dst,
true /* punchthrough alpha */);
- texel[RCOMP] = _mesa_nonlinear_to_linear(dst[0]);
- texel[GCOMP] = _mesa_nonlinear_to_linear(dst[1]);
- texel[BCOMP] = _mesa_nonlinear_to_linear(dst[2]);
+ texel[RCOMP] = util_format_srgb_8unorm_to_linear_float(dst[0]);
+ texel[GCOMP] = util_format_srgb_8unorm_to_linear_float(dst[1]);
+ texel[BCOMP] = util_format_srgb_8unorm_to_linear_float(dst[2]);
texel[ACOMP] = UBYTE_TO_FLOAT(dst[3]);
}