radeonsi: remove redundant si_shader_info::uses_kill
[mesa.git] / src / gallium / drivers / radeonsi / si_shader.h
index 838fc9f823ec1ecdd0671c2977df938980e10e2a..bfcbfab6e25d4c9a60cec316d4702c0ab94f7f06 100644 (file)
@@ -152,7 +152,7 @@ struct si_context;
 #define SI_MAX_ATTRIBS    16
 #define SI_MAX_VS_OUTPUTS 40
 
-/* Shader IO unique indices are supported for TGSI_SEMANTIC_GENERIC with an
+/* Shader IO unique indices are supported for VARYING_SLOT_VARn with an
  * index smaller than this.
  */
 #define SI_MAX_IO_GENERIC 32
@@ -267,9 +267,6 @@ enum
 
 enum
 {
-   /* Use a property enum that CS wouldn't use. */
-   TGSI_PROPERTY_CS_LOCAL_SIZE = 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,
@@ -319,16 +316,17 @@ struct si_compiler_ctx_state {
 };
 
 struct si_shader_info {
+   shader_info base;
+
    gl_shader_stage stage;
 
    ubyte num_inputs;
    ubyte num_outputs;
-   ubyte input_semantic_name[PIPE_MAX_SHADER_INPUTS]; /**< TGSI_SEMANTIC_x */
-   ubyte input_semantic_index[PIPE_MAX_SHADER_INPUTS];
+   ubyte input_semantic[PIPE_MAX_SHADER_INPUTS];
    ubyte input_interpolate[PIPE_MAX_SHADER_INPUTS];
    ubyte input_usage_mask[PIPE_MAX_SHADER_INPUTS];
-   ubyte output_semantic_name[PIPE_MAX_SHADER_OUTPUTS]; /**< TGSI_SEMANTIC_x */
-   ubyte output_semantic_index[PIPE_MAX_SHADER_OUTPUTS];
+   ubyte output_semantic[PIPE_MAX_SHADER_OUTPUTS];
+   char output_semantic_to_slot[VARYING_SLOT_TESS_MAX];
    ubyte output_usagemask[PIPE_MAX_SHADER_OUTPUTS];
    ubyte output_readmask[PIPE_MAX_SHADER_OUTPUTS];
    ubyte output_streams[PIPE_MAX_SHADER_OUTPUTS];
@@ -337,33 +335,27 @@ struct si_shader_info {
    ubyte color_interpolate_loc[2];
 
    int constbuf0_num_slots;
-   unsigned const_buffers_declared; /**< bitmask of declared const buffers */
-   unsigned samplers_declared;      /**< bitmask of declared samplers */
    ubyte num_stream_output_components[4];
 
    uint num_memory_instructions; /**< sampler, buffer, and image instructions */
 
    ubyte colors_read; /**< which color components are read by the FS */
    ubyte colors_written;
+   bool color0_writes_all_cbufs; /**< gl_FragColor */
    bool reads_samplemask;   /**< does fragment shader read sample mask? */
    bool reads_tess_factors; /**< If TES reads TESSINNER or TESSOUTER */
    bool writes_z;           /**< does fragment shader write Z value? */
    bool writes_stencil;     /**< does fragment shader write stencil value? */
    bool writes_samplemask;  /**< does fragment shader write sample mask? */
    bool writes_edgeflag;    /**< vertex shader outputs edgeflag */
-   bool uses_kill;          /**< KILL or KILL_IF instruction used? */
    bool uses_persp_center;
    bool uses_persp_centroid;
    bool uses_persp_sample;
    bool uses_linear_center;
    bool uses_linear_centroid;
    bool uses_linear_sample;
-   bool uses_persp_opcode_interp_sample;
-   bool uses_linear_opcode_interp_sample;
+   bool uses_interp_at_sample;
    bool uses_instanceid;
-   bool uses_vertexid;
-   bool uses_vertexid_nobase;
-   bool uses_basevertex;
    bool uses_drawid;
    bool uses_primid;
    bool uses_frontface;
@@ -384,17 +376,6 @@ struct si_shader_info {
    bool uses_bindless_samplers;
    bool uses_bindless_images;
    bool uses_fbfetch;
-   unsigned clipdist_writemask;
-   unsigned culldist_writemask;
-   unsigned num_written_culldistance;
-   unsigned num_written_clipdistance;
-
-   unsigned images_declared;         /**< bitmask of declared images */
-   unsigned image_buffers;           /**< bitmask of images that are buffers */
-   unsigned msaa_images_declared;    /**< bitmask of declared MSAA images */
-   unsigned shader_buffers_declared; /**< bitmask of declared shader buffers */
-
-   unsigned properties[TGSI_PROPERTY_COUNT]; /* index with TGSI_PROPERTY_ */
 
    /** Whether all codepaths write tess factors in all invocations. */
    bool tessfactors_are_def_in_all_invocs;
@@ -842,8 +823,8 @@ bool si_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *compi
 bool si_create_shader_variant(struct si_screen *sscreen, struct ac_llvm_compiler *compiler,
                               struct si_shader *shader, struct pipe_debug_callback *debug);
 void si_shader_destroy(struct si_shader *shader);
-unsigned si_shader_io_get_unique_index_patch(unsigned semantic_name, unsigned index);
-unsigned si_shader_io_get_unique_index(unsigned semantic_name, unsigned index, unsigned is_varying);
+unsigned si_shader_io_get_unique_index_patch(unsigned semantic);
+unsigned si_shader_io_get_unique_index(unsigned semantic, bool is_varying);
 bool si_shader_binary_upload(struct si_screen *sscreen, struct si_shader *shader,
                              uint64_t scratch_va);
 void si_shader_dump(struct si_screen *sscreen, struct si_shader *shader,