summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texcompress.c
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2014-07-17 14:30:29 +0100
committerNeil Roberts <[email protected]>2014-08-12 18:23:50 +0100
commit442bcd7fd373b2a55c0db9ee806f6f4be64b0285 (patch)
tree232ffd0d08e78c8d73fe4a13f9cedeba055d21a3 /src/mesa/main/texcompress.c
parent7e78033c11858b34e274be91586fdfa750c1db11 (diff)
mesa: Add texel fetch functions for BPTC-compressed textures
Adds functions to fetch from any of the four BPTC-compressed formats. v2: Set the alpha component to 1.0 when fetching from the half-float formats instead of leaving it uninitialised. Don't linearize the alpha component when fetching from sRGB. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/texcompress.c')
-rw-r--r--src/mesa/main/texcompress.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c
index 53c0ea02206..b4efeee3bcc 100644
--- a/src/mesa/main/texcompress.c
+++ b/src/mesa/main/texcompress.c
@@ -42,6 +42,7 @@
#include "texcompress_rgtc.h"
#include "texcompress_s3tc.h"
#include "texcompress_etc.h"
+#include "texcompress_bptc.h"
/**
@@ -610,6 +611,11 @@ _mesa_get_compressed_fetch_func(mesa_format format)
return _mesa_get_compressed_rgtc_func(format);
case MESA_FORMAT_ETC1_RGB8:
return _mesa_get_etc_fetch_func(format);
+ case MESA_FORMAT_BPTC_RGBA_UNORM:
+ case MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM:
+ case MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT:
+ case MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT:
+ return _mesa_get_bptc_fetch_func(format);
default:
return NULL;
}