-union si_shader_key {
- struct {
- struct si_ps_prolog_bits prolog;
- struct si_ps_epilog_bits epilog;
- } ps;
- struct {
- struct si_vs_prolog_bits prolog;
- struct si_vs_epilog_bits epilog;
- unsigned as_es:1; /* export shader */
- unsigned as_ls:1; /* local shader */
- } vs;
- struct {
- struct si_tcs_epilog_bits epilog;
- } tcs; /* tessellation control shader */
- struct {
- struct si_vs_epilog_bits epilog; /* same as VS */
- unsigned as_es:1; /* export shader */
- } tes; /* tessellation evaluation shader */
+struct si_shader_key {
+ /* Prolog and epilog flags. */
+ union {
+ struct {
+ struct si_vs_prolog_bits prolog;
+ struct si_vs_epilog_bits epilog;
+ } vs;
+ struct {
+ struct si_tcs_epilog_bits epilog;
+ } tcs; /* tessellation control shader */
+ struct {
+ struct si_vs_epilog_bits epilog; /* same as VS */
+ } tes; /* tessellation evaluation shader */
+ struct {
+ struct si_gs_prolog_bits prolog;
+ } gs;
+ struct {
+ struct si_ps_prolog_bits prolog;
+ struct si_ps_epilog_bits epilog;
+ } ps;
+ } part;
+
+ /* These two are initially set according to the NEXT_SHADER property,
+ * or guessed if the property doesn't seem correct.
+ */
+ unsigned as_es:1; /* export shader, which precedes GS */
+ unsigned as_ls:1; /* local shader, which precedes TCS */
+
+ /* Flags for monolithic compilation only. */
+ union {
+ struct {
+ /* One byte for every input: SI_FIX_FETCH_* enums. */
+ uint8_t fix_fetch[SI_MAX_ATTRIBS];
+ } vs;
+ struct {
+ uint64_t inputs_to_copy; /* for fixed-func TCS */
+ } tcs;
+ } mono;
+
+ /* Optimization flags for asynchronous compilation only. */
+ union {
+ struct {
+ uint64_t kill_outputs; /* "get_unique_index" bits */
+ uint32_t kill_outputs2; /* "get_unique_index2" bits */
+ unsigned clip_disable:1;
+ } hw_vs; /* HW VS (it can be VS, TES, GS) */
+ } opt;