mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
st/mesa: don't set RENDER_TARGET/DEPTH_STENCIL flag for compressed textures
This commit is contained in:
parent
a8c78f3aa1
commit
70df04404b
1 changed files with 7 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue