From 8c1775c14caf934bf56e9511099033477853d568 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 2 Aug 2016 16:40:50 +0200 Subject: st/mesa: determine states used or affected by shaders at compile time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At compile time, each shader determines which ST_NEW flags should be set at shader bind time. This just sets the new field for all shaders. The next commit will use it. v2: small code unification Tested-by: Edmondo Tommasina Reviewed-by: Nicolai Hähnle (v1) --- src/mesa/state_tracker/st_program.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/mesa/state_tracker/st_program.h') diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index e6db1069025..8e11bf02fa9 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -107,6 +107,7 @@ struct st_fragment_program struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; struct ati_fragment_shader *ati_fs; + uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ /* used when bypassing glsl_to_tgsi: */ struct gl_shader_program *shader_program; @@ -166,6 +167,7 @@ struct st_vertex_program struct gl_vertex_program Base; /**< The Mesa vertex program */ struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; + uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ /* used when bypassing glsl_to_tgsi: */ struct gl_shader_program *shader_program; @@ -214,6 +216,7 @@ struct st_geometry_program struct gl_geometry_program Base; /**< The Mesa geometry program */ struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; + uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ struct st_basic_variant *variants; }; @@ -227,6 +230,7 @@ struct st_tessctrl_program struct gl_tess_ctrl_program Base; /**< The Mesa tess ctrl program */ struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; + uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ struct st_basic_variant *variants; }; @@ -240,6 +244,7 @@ struct st_tesseval_program struct gl_tess_eval_program Base; /**< The Mesa tess eval program */ struct pipe_shader_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; + uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ struct st_basic_variant *variants; }; @@ -253,6 +258,7 @@ struct st_compute_program struct gl_compute_program Base; /**< The Mesa compute program */ struct pipe_compute_state tgsi; struct glsl_to_tgsi_visitor* glsl_to_tgsi; + uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */ struct st_basic_variant *variants; }; -- cgit v1.2.3