uint8_t bit_size;
} nir_parameter;
+typedef struct nir_printf_info {
+ unsigned num_args;
+ unsigned *arg_sizes;
+ unsigned string_size;
+ char *strings;
+} nir_printf_info;
+
typedef struct nir_function {
struct exec_node node;
void *constant_data;
/** Size of the constant data associated with the shader, in bytes */
unsigned constant_data_size;
+
+ unsigned printf_info_count;
+ nir_printf_info *printf_info;
} nir_shader;
#define nir_foreach_function(func, shader) \
intrinsic("load_frag_shading_rate", dest_comp=1, bit_sizes=[32],
flags=[CAN_ELIMINATE, CAN_REORDER])
+# OpenCL printf instruction
+# First source is a deref to the format string
+# Second source is a deref to a struct containing the args
+# Dest is success or failure
+intrinsic("printf", src_comp=[1, 1], dest_comp=1, bit_sizes=[32])
+
# IR3-specific version of most SSBO intrinsics. The only different
# compare to the originals is that they add an extra source to hold
# the dword-offset, which is needed by the backend code apart from