summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_texture.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-22 19:59:36 -0400
committerIlia Mirkin <[email protected]>2014-08-12 19:21:04 -0400
commitffd706dac078587d315f4f6d855f9c2622566fc8 (patch)
treee0d69fce9028c8df0f160e088a0fb764258d3654 /src/mesa/state_tracker/st_cb_texture.c
parent19563f0880fb82c73b7e8fd05d12e36832ca0b04 (diff)
mesa/st: add BPTC formats, expose ARB_texture_compression_bptc
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 969a05f5297..ad14bd939d7 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1016,6 +1016,7 @@ st_GetTexImage(struct gl_context * ctx,
case PIPE_FORMAT_RGTC1_UNORM:
case PIPE_FORMAT_RGTC2_UNORM:
case PIPE_FORMAT_ETC1_RGB8:
+ case PIPE_FORMAT_BPTC_RGBA_UNORM:
dst_glformat = GL_RGBA8;
break;
case PIPE_FORMAT_RGTC1_SNORM:
@@ -1024,7 +1025,12 @@ st_GetTexImage(struct gl_context * ctx,
goto fallback;
dst_glformat = GL_RGBA8_SNORM;
break;
- /* TODO: for BPTC_*FLOAT, set RGBA32F and check for ARB_texture_float */
+ case PIPE_FORMAT_BPTC_RGB_FLOAT:
+ case PIPE_FORMAT_BPTC_RGB_UFLOAT:
+ if (!ctx->Extensions.ARB_texture_float)
+ goto fallback;
+ dst_glformat = GL_RGBA32F;
+ break;
default:
assert(0);
goto fallback;