From b47839ad8361ef42a0f38c52fe24307b865c5489 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 17 Jul 2016 21:37:58 +0200 Subject: st/mesa: update sampler states when shaders are changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This bug seems to have always been there. Applications changing shaders but not textures between draw calls would have gotten undefined behavior. Reviewed-by: Nicolai Hähnle --- src/mesa/state_tracker/st_atom.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_atom.h b/src/mesa/state_tracker/st_atom.h index 961c395b89d..febd7ce6596 100644 --- a/src/mesa/state_tracker/st_atom.h +++ b/src/mesa/state_tracker/st_atom.h @@ -97,7 +97,8 @@ enum { ST_NEW_VS_SSBOS | \ ST_NEW_VERTEX_ARRAYS | \ ST_NEW_CLIP_STATE | \ - ST_NEW_RASTERIZER) + ST_NEW_RASTERIZER | \ + ST_NEW_RENDER_SAMPLERS) #define ST_NEW_TCS_RESOURCES (ST_NEW_TCS_SAMPLER_VIEWS | \ ST_NEW_TCS_IMAGES | \ @@ -107,7 +108,8 @@ enum { ST_NEW_TCS_SSBOS) #define ST_NEW_TESSCTRL_PROGRAM (ST_NEW_TCS_STATE | \ - ST_NEW_TCS_RESOURCES) + ST_NEW_TCS_RESOURCES | \ + ST_NEW_RENDER_SAMPLERS) #define ST_NEW_TES_RESOURCES (ST_NEW_TES_SAMPLER_VIEWS | \ ST_NEW_TES_IMAGES | \ @@ -118,7 +120,8 @@ enum { #define ST_NEW_TESSEVAL_PROGRAM (ST_NEW_TES_STATE | \ ST_NEW_TES_RESOURCES | \ - ST_NEW_RASTERIZER) + ST_NEW_RASTERIZER | \ + ST_NEW_RENDER_SAMPLERS) #define ST_NEW_GS_RESOURCES (ST_NEW_GS_SAMPLER_VIEWS | \ ST_NEW_GS_IMAGES | \ @@ -129,7 +132,8 @@ enum { #define ST_NEW_GEOMETRY_PROGRAM (ST_NEW_GS_STATE | \ ST_NEW_GS_RESOURCES | \ - ST_NEW_RASTERIZER) + ST_NEW_RASTERIZER | \ + ST_NEW_RENDER_SAMPLERS) #define ST_NEW_FRAGMENT_PROGRAM (ST_NEW_FS_STATE | \ ST_NEW_FS_SAMPLER_VIEWS | \ @@ -138,7 +142,8 @@ enum { ST_NEW_FS_UBOS | \ ST_NEW_FS_ATOMICS | \ ST_NEW_FS_SSBOS | \ - ST_NEW_SAMPLE_SHADING) + ST_NEW_SAMPLE_SHADING | \ + ST_NEW_RENDER_SAMPLERS) #define ST_NEW_COMPUTE_PROGRAM (ST_NEW_CS_STATE | \ ST_NEW_CS_SAMPLER_VIEWS | \ @@ -146,7 +151,8 @@ enum { ST_NEW_CS_CONSTANTS | \ ST_NEW_CS_UBOS | \ ST_NEW_CS_ATOMICS | \ - ST_NEW_CS_SSBOS) + ST_NEW_CS_SSBOS | \ + ST_NEW_CS_SAMPLERS) #define ST_NEW_CONSTANTS (ST_NEW_VS_CONSTANTS | \ ST_NEW_TCS_CONSTANTS | \ -- cgit v1.2.3