From: Brian Paul Date: Fri, 23 Apr 2010 18:28:55 +0000 (-0600) Subject: st/mesa: don't set RENDER_TARGET/DEPTH_STENCIL flag for compressed textures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70df04404bc4459f3a7f527c8b847ea06a51b599;p=mesa.git st/mesa: don't set RENDER_TARGET/DEPTH_STENCIL flag for compressed textures --- diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index 180118d69df..2e40659b19e 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);