summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-08-02 16:40:50 +0200
committerMarek Olšák <[email protected]>2016-08-12 18:49:24 +0200
commit8c1775c14caf934bf56e9511099033477853d568 (patch)
tree30b8e853bb6a96033b13f6b4f03b748d20c23e9b /src/mesa/state_tracker/st_program.h
parenta7d33315a76efaa8943dbe439f5538ce6d76ff41 (diff)
st/mesa: determine states used or affected by shaders at compile time
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 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> (v1)
Diffstat (limited to 'src/mesa/state_tracker/st_program.h')
-rw-r--r--src/mesa/state_tracker/st_program.h6
1 files changed, 6 insertions, 0 deletions
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;
};