diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2017-10-21 01:29:16 -0700 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2017-10-31 23:36:54 -0700 |
commit | 05b11933619c8f57bef1e0d71c34c523993d6257 (patch) | |
tree | ac3165edd55cc63af0516e81765181652b914879 | |
parent | 4c7a1ec62a5fdb42fb175da28f7b6c5c13f6478f (diff) |
intel/compiler: Add union types for prog_data and prog_key stages
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
-rw-r--r-- | src/intel/compiler/brw_compiler.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h index 17fc4e1b17..2bb7111ad5 100644 --- a/src/intel/compiler/brw_compiler.h +++ b/src/intel/compiler/brw_compiler.h @@ -402,6 +402,16 @@ struct brw_cs_prog_key { struct brw_sampler_prog_key_data tex; }; +/* brw_any_prog_key is any of the keys that map to an API stage */ +union brw_any_prog_key { + struct brw_vs_prog_key vs; + struct brw_tcs_prog_key tcs; + struct brw_tes_prog_key tes; + struct brw_gs_prog_key gs; + struct brw_wm_prog_key wm; + struct brw_cs_prog_key cs; +}; + /* * Image metadata structure as laid out in the shader parameter * buffer. Entries have to be 16B-aligned for the vec4 back-end to be @@ -1064,6 +1074,18 @@ struct brw_clip_prog_data { uint32_t total_grf; }; +/* brw_any_prog_data is prog_data for any stage that maps to an API stage */ +union brw_any_prog_data { + struct brw_stage_prog_data base; + struct brw_vue_prog_data vue; + struct brw_vs_prog_data vs; + struct brw_tcs_prog_data tcs; + struct brw_tes_prog_data tes; + struct brw_gs_prog_data gs; + struct brw_wm_prog_data wm; + struct brw_cs_prog_data cs; +}; + #define DEFINE_PROG_DATA_DOWNCAST(stage) \ static inline struct brw_##stage##_prog_data * \ brw_##stage##_prog_data(struct brw_stage_prog_data *prog_data) \ |