diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2020-09-09 21:16:36 +0200 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-09-18 07:45:11 +0000 |
commit | 6a0d7f6316c60b480f4439ecef50de422a9175a6 (patch) | |
tree | f593256b0ce87b2b974ec9061bd7a2964b29453b | |
parent | 12b8ad8f21febed97ad6be401eeec4798fc748cd (diff) |
etnaviv: shuffle some variant fields
Just to group together the parts that will get serialized when we have
shader disk-cache.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6669>
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_compiler.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler.h b/src/gallium/drivers/etnaviv/etnaviv_compiler.h index e03b748b48b..8aaebab9f9f 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler.h +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler.h @@ -70,6 +70,20 @@ struct etna_shader_io_file { struct etna_shader_variant { uint32_t id; /* for debug */ + /* index into outputs (for linking) - only for TGSI compiler */ + int output_count_per_semantic[TGSI_SEMANTIC_COUNT]; + struct etna_shader_inout * *output_per_semantic_list; /* list of pointers to outputs */ + struct etna_shader_inout **output_per_semantic[TGSI_SEMANTIC_COUNT]; + + /* shader variants form a linked list */ + struct etna_shader_variant *next; + + /* replicated here to avoid passing extra ptrs everywhere */ + struct etna_shader *shader; + struct etna_shader_key key; + + struct etna_bo *bo; /* cached code memory bo handle (for icache) */ + gl_shader_stage stage; uint32_t code_size; /* code size in uint32 words */ uint32_t *code; @@ -88,11 +102,6 @@ struct etna_shader_variant { /* outputs (for linking) */ struct etna_shader_io_file outfile; - /* index into outputs (for linking) - only for TGSI compiler */ - int output_count_per_semantic[TGSI_SEMANTIC_COUNT]; - struct etna_shader_inout * *output_per_semantic_list; /* list of pointers to outputs */ - struct etna_shader_inout **output_per_semantic[TGSI_SEMANTIC_COUNT]; - /* special inputs/outputs (vs only) */ int vs_id_in_reg; /* vertexid+instanceid input */ int vs_pos_out_reg; /* VS position output */ @@ -108,15 +117,6 @@ struct etna_shader_variant { /* shader is larger than GPU instruction limit, thus needs icache */ bool needs_icache; - - /* shader variants form a linked list */ - struct etna_shader_variant *next; - - /* replicated here to avoid passing extra ptrs everywhere */ - struct etna_shader *shader; - struct etna_shader_key key; - - struct etna_bo *bo; /* cached code memory bo handle (for icache) */ }; struct etna_varying { |