diff options
author | Kenneth Graunke <[email protected]> | 2012-09-19 12:01:14 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-09-20 14:49:19 -0700 |
commit | 328961d95586931a17fe81ba816d362e8389c105 (patch) | |
tree | f8948e9f00a001cf9de90b81c4c26c1ad1799f55 /src/mesa/main/fog.c | |
parent | e2249e8c4d06a85d6389ba1689e15d7e29aa4dff (diff) |
mesa: Don't override S3TC internalFormat if data is pre-compressed.
Commit 42723d88d intended to override an S3TC internalFormat to a
generic compressed format when the application requested online
compression of uncompressed data. Unfortunately, it also broke
pre-compressed textures when libtxc_dxtn isn't installed but the
extensions are forced on.
Both glCompressedTexImage2D() and glTexImage2D() call teximage(), which
calls _mesa_choose_texture_format(), hitting this override code. If we
have actual S3TC source data, we can't treat it as any other format, and
need to avoid the override.
Since glCompressedTexImage2D() passes in a format of GL_NONE (which is
illegal for glTexImage), we can use that to detect the pre-compressed
case and avoid the overrides.
Fixes a regression since 42723d88d370a7599398cc1c2349aeb951ba1c57.
NOTE: This is a candidate for the 9.0 branch.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-and-tested-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main/fog.c')
0 files changed, 0 insertions, 0 deletions