mesa: fix restoring of texture attributes for msaa binding points
This fixes rendering in Unigine Tropics with MSAA enabled. Since the
binding for MSAA does not get restored, we can't rely on the "defaults
get restored below" logic in that case.
Fixes: 81e6f6ef0c (mesa: don't push/pop default texture attributes redundantly)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4558
Reported-by: Andrew Randrianasulu <randrianasulu@gmail.com>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10001>
This commit is contained in:
@@ -653,6 +653,13 @@ pop_texture_group(struct gl_context *ctx, struct gl_texture_attrib_node *texstat
|
||||
if (texObj->Name == 0)
|
||||
continue;
|
||||
|
||||
/* But in the MSAA case, where the currently-bound object is not the
|
||||
* default state, we should still restore the saved default object's
|
||||
* data when that's what was saved initially.
|
||||
*/
|
||||
if (savedObj->Name == 0)
|
||||
savedObj = &texstate->SavedDefaultObj[tgt];
|
||||
|
||||
if (!copy_texture_attribs(texObj, savedObj, tgt))
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user