Skip to content

mesa: Consider mesa format in addition to internal format for mip/cube completeness

Jesse Natalie requested to merge jenatali/mesa:texfilter-mip-completeness into main

Prior to 06b526de, the mesa format was used for these completeness checks. That was to address the case where a different internal format selected the same mesa format, and the texture shouldn't be considered compatible. But this didn't address the case where the same internal format selected a different mesa format, e.g. because the type passed to the TexImage API was different.

An old WGL demo app called TexFilter.exe tries to redefine a mipped RGBA16 texture as RGBA8. This incorrect logic caused Mesa to try to copy the RGBA16 data from the smaller mips into the newly created RGBA8 data, because it thought that the texture was still mip-complete, despite the format changing.

Cc: mesa-stable

Merge request reports