summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-04-23 12:28:55 -0600
committerBrian Paul <brianp@vmware.com>2010-04-23 12:29:31 -0600
commit70df04404bc4459f3a7f527c8b847ea06a51b599 (patch)
tree3b6bf1f95cc73b1dc498e6c55ecd9af3bbcf418a /src/mesa/state_tracker
parenta8c78f3aa13ee6a370f79c8d5936c75ba29ec193 (diff)
st/mesa: don't set RENDER_TARGET/DEPTH_STENCIL flag for compressed textures
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_format.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 180118d69d..2e40659b19 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -661,11 +661,13 @@ st_ChooseTextureFormat(GLcontext *ctx, GLint internalFormat,
* An alternative would be to destroy and re-create a texture when
* we first start rendering to it.
*/
- if (_mesa_is_depth_format(internalFormat) ||
- _mesa_is_depthstencil_format(internalFormat))
- usage |= PIPE_BIND_DEPTH_STENCIL;
- else
- usage |= PIPE_BIND_RENDER_TARGET;
+ if (!_mesa_is_compressed_format(ctx, internalFormat)) {
+ if (_mesa_is_depth_format(internalFormat) ||
+ _mesa_is_depthstencil_format(internalFormat))
+ usage |= PIPE_BIND_DEPTH_STENCIL;
+ else
+ usage |= PIPE_BIND_RENDER_TARGET;
+ }
pFormat = st_choose_format(ctx->st->pipe->screen, internalFormat,
PIPE_TEXTURE_2D, usage);