X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fradeonsi%2Fsi_shader.h;h=20f2c812c21ed87807acb920797a70352f16cf48;hb=3b143369a55d1b79f7db14dda587e18f6b27c975;hp=9a89be7932f2bfd036c3048f1d70b5688272c3e8;hpb=9ac7d0a0e2dedba0f4eb03fcd4a3ffa7b8917eb2;p=mesa.git diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 9a89be7932f..20f2c812c21 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -136,6 +136,7 @@ #include "tgsi/tgsi_scan.h" #include "util/u_inlines.h" #include "util/u_queue.h" +#include "util/simple_mtx.h" #include "ac_binary.h" #include "ac_llvm_build.h" @@ -256,26 +257,10 @@ enum { #define S_VS_STATE_LS_OUT_VERTEX_SIZE(x) (((unsigned)(x) & 0xFF) << 24) #define C_VS_STATE_LS_OUT_VERTEX_SIZE 0x00FFFFFF -/* Driver-specific system values. */ -enum { - /* Values from set_tess_state. */ - TGSI_SEMANTIC_DEFAULT_TESSOUTER_SI = TGSI_SEMANTIC_COUNT, - TGSI_SEMANTIC_DEFAULT_TESSINNER_SI, - - /* Up to 4 dwords in user SGPRs for compute shaders. */ - TGSI_SEMANTIC_CS_USER_DATA, -}; - enum { /* Use a property enum that CS wouldn't use. */ TGSI_PROPERTY_CS_LOCAL_SIZE = TGSI_PROPERTY_FS_COORD_ORIGIN, - /* The number of used user data dwords in the range [1, 4]. */ - TGSI_PROPERTY_CS_USER_DATA_DWORDS = TGSI_PROPERTY_FS_COORD_PIXEL_CENTER, - - /* Use a property enum that VS wouldn't use. */ - TGSI_PROPERTY_VS_BLIT_SGPRS = TGSI_PROPERTY_FS_COORD_ORIGIN, - /* These represent the number of SGPRs the shader uses. */ SI_VS_BLIT_SGPRS_POS = 3, SI_VS_BLIT_SGPRS_POS_COLOR = 7, @@ -326,7 +311,7 @@ struct si_shader_selector { struct util_queue_fence ready; struct si_compiler_ctx_state compiler_ctx_state; - mtx_t mutex; + simple_mtx_t mutex; struct si_shader *first_variant; /* immutable after the first variant */ struct si_shader *last_variant; /* mutable */ @@ -343,6 +328,9 @@ struct si_shader_selector { struct tgsi_token *tokens; struct nir_shader *nir; + void *nir_binary; + unsigned nir_size; + struct pipe_stream_output_info so; struct tgsi_shader_info info; struct tgsi_tessctrl_info tcs_info; @@ -352,8 +340,6 @@ struct si_shader_selector { bool vs_needs_prolog; bool force_correct_derivs_after_kill; bool prim_discard_cs_allowed; - bool ngg_writes_edgeflag; - bool pos_writes_edgeflag; unsigned pa_cl_vs_out_cntl; ubyte clipdist_mask; ubyte culldist_mask; @@ -696,7 +682,6 @@ struct si_shader { unsigned vgt_gs_onchip_cntl; unsigned vgt_gs_instance_cnt; unsigned vgt_esgs_ring_itemsize; - unsigned vgt_reuse_off; unsigned spi_vs_out_config; unsigned spi_shader_idx_format; unsigned spi_shader_pos_format; @@ -728,6 +713,7 @@ struct si_shader { /*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; }; @@ -773,8 +759,8 @@ void si_nir_scan_shader(const struct nir_shader *nir, struct tgsi_shader_info *info); void si_nir_scan_tess_ctrl(const struct nir_shader *nir, struct tgsi_tessctrl_info *out); -void si_lower_nir(struct si_shader_selector *sel, unsigned wave_size); -void si_nir_opts(struct nir_shader *nir); +void si_nir_adjust_driver_locations(struct nir_shader *nir); +void si_finalize_nir(struct pipe_screen *screen, void *nirptr, bool optimize); /* si_state_shaders.c */ void gfx9_get_gs_info(struct si_shader_selector *es,