mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
st/mesa: do not require all texture formats to be renderable
This is a bandaid on the problem that if some formats were not renderable (like luminance_alpha), st/mesa fell back to some RGBA format, so basically some non-renderable formats were actually not used at all. This is only a problem with hardware drivers, softpipe can render to anything. Instead, require only RGB8/RGBA8 to be renderable.
This commit is contained in:
parent
998657112b
commit
4a710469e0
1 changed files with 6 additions and 1 deletions
|
|
@ -1028,8 +1028,13 @@ gl_format
|
|||
st_ChooseTextureFormat(struct gl_context *ctx, GLint internalFormat,
|
||||
GLenum format, GLenum type)
|
||||
{
|
||||
boolean want_renderable =
|
||||
internalFormat == 3 || internalFormat == 4 ||
|
||||
internalFormat == GL_RGB || internalFormat == GL_RGBA ||
|
||||
internalFormat == GL_RGB8 || internalFormat == GL_RGBA8;
|
||||
|
||||
return st_ChooseTextureFormat_renderable(ctx, internalFormat,
|
||||
format, type, GL_TRUE);
|
||||
format, type, want_renderable);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue