Fix defect reported by Coverity Scan.
Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In texObj = texObj = _mesa_get_tex_unit(ctx, u)->CurrentTex[tgt], texObj is written twice with the same value.
Fixes:
d0e18550e26 ("mesa: optimize saving/restoring bound textures for glPush/PopAttrib")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8000>
for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
const struct gl_texture_object *savedObj = &texstate->SavedObj[u][tgt];
struct gl_texture_object *texObj =
- texObj = _mesa_get_tex_unit(ctx, u)->CurrentTex[tgt];
+ _mesa_get_tex_unit(ctx, u)->CurrentTex[tgt];
if (texObj->Name != savedObj->Name) {
/* We don't need to check whether the texture target is supported,