mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-13 09:50:17 +01:00
texobj: Check completeness with InternalFormat rather than Mesa format
The internal Mesa format used for a texture might not match the one requested in the internalFormat when the texture was created, for example if the driver is internally remapping RGB textures to RGBA. Otherwise it can cause false positives for completeness if one mipmap image is created as RGBA and the other as RGB because they would both have an RGBA Mesa format. If we check the InternalFormat instead then we are directly checking the API usage which I think better matches the intention of the check. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93700 Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
parent
f4ab7340ca
commit
06b526de05
1 changed files with 1 additions and 1 deletions
|
|
@ -835,7 +835,7 @@ _mesa_test_texobj_completeness( const struct gl_context *ctx,
|
|||
incomplete(t, MIPMAP, "TexImage[%d] is missing", i);
|
||||
return;
|
||||
}
|
||||
if (img->TexFormat != baseImage->TexFormat) {
|
||||
if (img->InternalFormat != baseImage->InternalFormat) {
|
||||
incomplete(t, MIPMAP, "Format[i] != Format[baseLevel]");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue