1 /* 2 * Copyright © 2020 Google, Inc. 3 * SPDX-License-Identifier: MIT 4 */ 5 6 #ifndef __IR3_ASSEMBLER_H__ 7 #define __IR3_ASSEMBLER_H__ 8 9 #include <stdint.h> 10 #include <stdio.h> 11 12 #define MAX_BUFS 4 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 struct ir3_kernel_info { 19 uint32_t num_bufs; 20 uint32_t buf_sizes[MAX_BUFS]; /* size in dwords */ 21 uint32_t buf_addr_regs[MAX_BUFS]; 22 uint32_t *buf_init_data[MAX_BUFS]; 23 uint32_t buf_init_data_sizes[MAX_BUFS]; 24 25 uint64_t shader_print_buffer_iova; 26 27 /* driver-param / replaced uniforms: */ 28 unsigned numwg; 29 unsigned wgid; 30 unsigned early_preamble; 31 }; 32 33 struct ir3_shader; 34 struct ir3_compiler; 35 36 struct ir3_shader *ir3_parse_asm(struct ir3_compiler *c, 37 struct ir3_kernel_info *info, FILE *in); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* __IR3_ASSEMBLER_H__ */ 44