radv: do not load the local invocation index when it's unused
[mesa.git] / src / amd / common / ac_shader_info.h
index ed97d06d56bb1cd166f580d13cfc1ac538f4f416..79e5615254b8188cf584eb4d9658b4c611e2d624 100644 (file)
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  * IN THE SOFTWARE.
  */
+
 #ifndef AC_SHADER_INFO_H
 #define AC_SHADER_INFO_H
+
 struct nir_shader;
 struct ac_nir_compiler_options;
 
-/* a NIR pass to gather all the info needed to optimise the alloction patterns for the RADV user sgprs */
-
 struct ac_shader_info {
+       bool needs_push_constants;
+       uint32_t desc_set_used_mask;
+       bool needs_multiview_view_index;
        struct {
                bool has_vertex_buffers; /* needs vertex buffers and base/start */
                bool needs_draw_id;
+               bool needs_instance_id;
        } vs;
        struct {
+               bool force_persample;
                bool needs_sample_positions;
+               bool uses_input_attachments;
        } ps;
        struct {
-               uint8_t grid_components_used;
+               bool uses_grid_size;
+               bool uses_block_id[3];
+               bool uses_thread_id[3];
+               bool uses_local_invocation_idx;
        } cs;
 };
 
+/* A NIR pass to gather all the info needed to optimise the allocation patterns
+ * for the RADV user sgprs
+ */
 void
 ac_nir_shader_info_pass(struct nir_shader *nir,
                        const struct ac_nir_compiler_options *options,
                        struct ac_shader_info *info);
+
 #endif