mesa: Remove extra texObj.
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: d0e18550e2 ("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>
This commit is contained in:
@@ -591,7 +591,7 @@ pop_texture_group(struct gl_context *ctx, struct gl_texture_attrib_node *texstat
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user