ctx->output_mask |= mask_attribs;
}
-static void
-handle_shader_output_decl(struct ac_llvm_context *ctx,
- struct ac_shader_abi *abi,
- struct nir_shader *nir,
- struct nir_variable *variable,
- gl_shader_stage stage)
+void
+ac_handle_shader_output_decl(struct ac_llvm_context *ctx,
+ struct ac_shader_abi *abi,
+ struct nir_shader *nir,
+ struct nir_variable *variable,
+ gl_shader_stage stage)
{
unsigned output_loc = variable->data.driver_location / 4;
unsigned attrib_count = glsl_count_attribute_slots(variable->type, false);
ctx.main_function = LLVMGetBasicBlockParent(LLVMGetInsertBlock(ctx.ac.builder));
nir_foreach_variable(variable, &nir->outputs)
- handle_shader_output_decl(&ctx.ac, ctx.abi, nir, variable,
- ctx.stage);
+ ac_handle_shader_output_decl(&ctx.ac, ctx.abi, nir, variable,
+ ctx.stage);
ctx.defs = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
_mesa_key_pointer_equal);
nir_foreach_variable(variable, &geom_shader->outputs) {
scan_shader_output_decl(&ctx, variable, geom_shader, MESA_SHADER_VERTEX);
- handle_shader_output_decl(&ctx.ac, &ctx.abi, geom_shader,
- variable, MESA_SHADER_VERTEX);
+ ac_handle_shader_output_decl(&ctx.ac, &ctx.abi, geom_shader,
+ variable, MESA_SHADER_VERTEX);
}
ac_gs_copy_shader_emit(&ctx);
struct ac_shader_binary;
struct ac_shader_config;
struct nir_shader;
+struct nir_variable;
struct radv_pipeline_layout;
struct ac_llvm_context;
void ac_nir_translate(struct ac_llvm_context *ac, struct ac_shader_abi *abi,
struct nir_shader *nir);
+void
+ac_handle_shader_output_decl(struct ac_llvm_context *ctx,
+ struct ac_shader_abi *abi,
+ struct nir_shader *nir,
+ struct nir_variable *variable,
+ gl_shader_stage stage);
+
bool ac_lower_subgroups(struct nir_shader *shader);
#endif /* AC_NIR_TO_LLVM_H */