- struct si_compiler_ctx_state compiler_ctx_state;
-
- struct si_shader_selector *selector;
- struct si_shader_selector *previous_stage_sel; /* for refcounting */
- struct si_shader *next_variant;
-
- struct si_shader_part *prolog;
- struct si_shader *previous_stage; /* for GFX9 */
- struct si_shader_part *prolog2;
- struct si_shader_part *epilog;
-
- struct si_pm4_state *pm4;
- struct r600_resource *bo;
- struct r600_resource *scratch_bo;
- struct si_shader_key key;
- struct util_queue_fence ready;
- bool compilation_failed;
- bool is_monolithic;
- bool is_optimized;
- bool is_binary_shared;
- bool is_gs_copy_shader;
-
- /* The following data is all that's needed for binary shaders. */
- struct ac_shader_binary binary;
- struct si_shader_config config;
- struct si_shader_info info;
-
- /* Shader key + LLVM IR + disassembly + statistics.
- * Generated for debug contexts only.
- */
- char *shader_log;
- size_t shader_log_size;
+ struct si_compiler_ctx_state compiler_ctx_state;
+
+ struct si_shader_selector *selector;
+ struct si_shader_selector *previous_stage_sel; /* for refcounting */
+ struct si_shader *next_variant;
+
+ struct si_shader_part *prolog;
+ struct si_shader *previous_stage; /* for GFX9 */
+ struct si_shader_part *prolog2;
+ struct si_shader_part *epilog;
+
+ struct si_pm4_state *pm4;
+ struct si_resource *bo;
+ struct si_resource *scratch_bo;
+ struct si_shader_key key;
+ struct util_queue_fence ready;
+ bool compilation_failed;
+ bool is_monolithic;
+ bool is_optimized;
+ bool is_binary_shared;
+ bool is_gs_copy_shader;
+
+ /* The following data is all that's needed for binary shaders. */
+ struct si_shader_binary binary;
+ struct ac_shader_config config;
+ struct si_shader_binary_info info;
+
+ struct {
+ uint16_t ngg_emit_size; /* in dwords */
+ uint16_t hw_max_esverts;
+ uint16_t max_gsprims;
+ uint16_t max_out_verts;
+ uint16_t prim_amp_factor;
+ bool max_vert_out_per_gs_instance;
+ } ngg;
+
+ /* Shader key + LLVM IR + disassembly + statistics.
+ * Generated for debug contexts only.
+ */
+ char *shader_log;
+ size_t shader_log_size;
+
+ struct gfx9_gs_info gs_info;
+
+ /* For save precompute context registers values. */
+ union {
+ struct {
+ unsigned vgt_gsvs_ring_offset_1;
+ unsigned vgt_gsvs_ring_offset_2;
+ unsigned vgt_gsvs_ring_offset_3;
+ unsigned vgt_gsvs_ring_itemsize;
+ unsigned vgt_gs_max_vert_out;
+ unsigned vgt_gs_vert_itemsize;
+ unsigned vgt_gs_vert_itemsize_1;
+ unsigned vgt_gs_vert_itemsize_2;
+ unsigned vgt_gs_vert_itemsize_3;
+ unsigned vgt_gs_instance_cnt;
+ unsigned vgt_gs_onchip_cntl;
+ unsigned vgt_gs_max_prims_per_subgroup;
+ unsigned vgt_esgs_ring_itemsize;
+ } gs;
+
+ struct {
+ unsigned ge_max_output_per_subgroup;
+ unsigned ge_ngg_subgrp_cntl;
+ unsigned vgt_primitiveid_en;
+ unsigned vgt_gs_onchip_cntl;
+ unsigned vgt_gs_instance_cnt;
+ unsigned vgt_esgs_ring_itemsize;
+ unsigned spi_vs_out_config;
+ unsigned spi_shader_idx_format;
+ unsigned spi_shader_pos_format;
+ unsigned pa_cl_vte_cntl;
+ unsigned pa_cl_ngg_cntl;
+ unsigned vgt_gs_max_vert_out; /* for API GS */
+ unsigned ge_pc_alloc; /* uconfig register */
+ } ngg;
+
+ struct {
+ unsigned vgt_gs_mode;
+ unsigned vgt_primitiveid_en;
+ unsigned vgt_reuse_off;
+ unsigned spi_vs_out_config;
+ unsigned spi_shader_pos_format;
+ unsigned pa_cl_vte_cntl;
+ unsigned ge_pc_alloc; /* uconfig register */
+ } vs;
+
+ struct {
+ unsigned spi_ps_input_ena;
+ unsigned spi_ps_input_addr;
+ unsigned spi_baryc_cntl;
+ unsigned spi_ps_in_control;
+ unsigned spi_shader_z_format;
+ unsigned spi_shader_col_format;
+ unsigned cb_shader_mask;
+ } ps;
+ } ctx_reg;
+
+ /*For save precompute registers value */
+ unsigned vgt_tf_param; /* VGT_TF_PARAM */
+ unsigned vgt_vertex_reuse_block_cntl; /* VGT_VERTEX_REUSE_BLOCK_CNTL */
+ unsigned pa_cl_vs_out_cntl;
+ unsigned ge_cntl;