From 533320e4d1367f8acb81dab6e1a15bbc3ebb2385 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Tue, 10 Nov 2015 18:46:12 -0800 Subject: meta/blit: Save and restore the sampler using gl_sampler_object instead of GL API object handle Some meta operations can be called recursively. Future changes (the "Don't pollute the ... namespace" changes) will cause objects with invalid names to be used. If a nested meta operation tries to restore an object named 0xDEADBEEF, it will fail. v2: Add a comment explaining why samp_obj_save is set to NULL in _mesa_meta_fb_tex_blit_begin. This came out of review feedback from Jason. Signed-off-by: Ian Romanick Reviewed-by: Jason Ekstrand --- src/mesa/drivers/common/meta.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/common/meta.h') diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h index 268824cfcb0..856dcdbad7c 100644 --- a/src/mesa/drivers/common/meta.h +++ b/src/mesa/drivers/common/meta.h @@ -310,7 +310,8 @@ struct fb_tex_blit_state { GLint baseLevelSave, maxLevelSave; struct gl_sampler_object *samp_obj; - GLuint samplerSave, stencilSamplingSave; + struct gl_sampler_object *samp_obj_save; + GLuint stencilSamplingSave; GLuint tempTex; }; -- cgit v1.2.3