diff options
author | Marek Olšák <[email protected]> | 2016-11-13 03:17:46 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-11-21 21:44:35 +0100 |
commit | 6d5c2a8b5c33122682d801f9b14a70e3d3d9a5cc (patch) | |
tree | fc10ce2274189664c857777c893be3c1cc3d077d /src/gallium/drivers/radeonsi/si_shader.h | |
parent | d4e9f409e93391fb56b12e6933123198df7ac4bc (diff) |
radeonsi: split the shader key into 3 logical parts
key->part.*: prolog and epilog flags only
key->as_{ls,es}: special flags
key->mono.*: flags for monolithic compilation only
Tested-by: Edmondo Tommasina <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.h')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 65 |
1 files changed, 39 insertions, 26 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 59e7bfb0457..bed22c1cf00 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -330,7 +330,6 @@ struct si_vs_epilog_bits { /* Common TCS bits between the shader key and the epilog key. */ struct si_tcs_epilog_bits { unsigned prim_mode:3; - uint64_t inputs_to_copy; }; struct si_gs_prolog_bits { @@ -398,30 +397,44 @@ union si_shader_part_key { } ps_epilog; }; -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 */ - - /* One pair of bits for every input: SI_FIX_FETCH_* enums. */ - uint32_t fix_fetch; - } 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 { - struct si_gs_prolog_bits prolog; - } gs; +struct si_shader_key { + /* Prolog and epilog flags. */ + union { + 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; + } 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; + } 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 */ + unsigned as_ls:1; /* local shader */ + + /* Flags for monolithic compilation only. */ + union { + struct { + /* One pair of bits for every input: SI_FIX_FETCH_* enums. */ + uint32_t fix_fetch; + } vs; + struct { + uint64_t inputs_to_copy; /* for fixed-func TCS */ + } tcs; + } mono; }; struct si_shader_config { @@ -470,7 +483,7 @@ struct si_shader { struct si_pm4_state *pm4; struct r600_resource *bo; struct r600_resource *scratch_bo; - union si_shader_key key; + struct si_shader_key key; bool is_binary_shared; bool is_gs_copy_shader; |