summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-01-31 18:52:57 -0700
committerBrian Paul <[email protected]>2013-02-04 07:58:21 -0700
commit4df42890c583172b0516fb90bf905e64889c5b75 (patch)
treee1dd0793a8241a4ba2cd01d3af8f09b4c2903386 /src/mesa/state_tracker/st_texture.c
parent478056b81ae80ea3301511fb99b7ba5845202379 (diff)
st/mesa: don't choose DXT formats if we can't do DXT compression
If we call gl[Copy]TexImage2D() with a generic compression format (e.g. intFormat=GL_COMPRESSED_RGBA) we can't choose a DXT format if we don't have the external DXT compression library. We weren't actually enforcing this before since the pipe_screen::is_format_supported(DXT) query has no dependency on the DXT compression library. Now if we're given a generic compressed format and we can't do DXT compression we'll fall back to a non-compressed format. v2: use util_format_is_s3tc() function and add more comments about the allow_dxt parameter. Note: This is a candidate for the stable branches. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r--src/mesa/state_tracker/st_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index ee4d7622d27..584eaa9817a 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -398,7 +398,8 @@ st_create_color_map_texture(struct gl_context *ctx)
/* find an RGBA texture format */
format = st_choose_format(pipe->screen, GL_RGBA, GL_NONE, GL_NONE,
- PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW);
+ PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW,
+ FALSE);
/* create texture for color map/table */
pt = st_texture_create(st, PIPE_TEXTURE_2D, format, 0,