1 #ifndef LIBRESOC_SHADER_ARGS_H
2 #define LIBRESOC_SHADER_ARGS_H
7 #define MAX_INLINE_PUSH_CONSTS 8
19 ARG_CONST_PTR
, /* Pointer to i8 array */
20 ARG_CONST_FLOAT_PTR
, /* Pointer to f32 array */
21 ARG_CONST_PTR_PTR
, /* Pointer to pointer to i8 array */
22 ARG_CONST_DESC_PTR
, /* Pointer to v4i32 array */
23 ARG_CONST_IMAGE_PTR
, /* Pointer to v8i32 array */
34 /* Info on how to declare arguments */
37 enum arg_regfile file
;
45 uint8_t num_sgprs_used
;
46 uint8_t num_vgprs_used
;
48 struct arg base_vertex
;
49 struct arg start_instance
;
52 struct arg instance_id
;
53 struct arg tcs_patch_id
;
54 struct arg tcs_rel_ids
;
55 struct arg tes_patch_id
;
56 struct arg gs_prim_id
;
57 struct arg gs_invocation_id
;
60 struct arg frag_pos
[4];
61 struct arg front_face
;
63 struct arg sample_coverage
;
65 struct arg persp_sample
;
66 struct arg persp_center
;
67 struct arg persp_centroid
;
68 struct arg pull_model
;
69 struct arg linear_sample
;
70 struct arg linear_center
;
71 struct arg linear_centroid
;
74 struct arg local_invocation_ids
;
75 struct arg num_work_groups
;
76 struct arg workgroup_ids
[3];
80 struct arg push_constants
;
81 struct arg inline_push_consts
[MAX_INLINE_PUSH_CONSTS
];
82 unsigned num_inline_push_consts
;
83 unsigned base_inline_push_consts
;
84 struct arg view_index
;
87 void add_arg(struct shader_args
*info
, enum arg_regfile regfile
, unsigned registers
,
88 enum arg_type type
, struct arg
*arg
);