radeonsi: declare new user SGPR indices for bindless samplers/images
[mesa.git] / src / gallium / drivers / radeonsi / si_shader_internal.h
index 31b4c30ee90fe43b9a440d7db5f10f161ed19c82..f304295cb6e5fce2488d99d1590351135e5f536e 100644 (file)
@@ -123,6 +123,7 @@ struct si_shader_context {
        int param_rw_buffers;
        int param_const_and_shader_buffers;
        int param_samplers_and_images;
+       int param_bindless_samplers_and_images;
        /* Common inputs for merged shaders. */
        int param_merged_wave_info;
        int param_merged_scratch_offset;
@@ -305,6 +306,9 @@ void si_llvm_emit_store(struct lp_build_tgsi_context *bld_base,
 
 void si_emit_waitcnt(struct si_shader_context *ctx, unsigned simm16);
 
+LLVMValueRef si_get_indirect_index(struct si_shader_context *ctx,
+                                  const struct tgsi_ind_register *ind,
+                                  int rel_index);
 LLVMValueRef si_get_bounded_indirect_index(struct si_shader_context *ctx,
                                           const struct tgsi_ind_register *ind,
                                           int rel_index, unsigned num);
@@ -314,6 +318,22 @@ LLVMTypeRef si_const_array(LLVMTypeRef elem_type, int num_elements);
 void si_shader_context_init_alu(struct lp_build_tgsi_context *bld_base);
 void si_shader_context_init_mem(struct si_shader_context *ctx);
 
+LLVMValueRef si_load_sampler_desc(struct si_shader_context *ctx,
+                                 LLVMValueRef list, LLVMValueRef index,
+                                 enum ac_descriptor_type type);
+LLVMValueRef si_load_image_desc(struct si_shader_context *ctx,
+                               LLVMValueRef list, LLVMValueRef index,
+                               enum ac_descriptor_type desc_type, bool dcc_off);
+
+void si_llvm_load_input_vs(
+       struct si_shader_context *ctx,
+       unsigned input_index,
+       LLVMValueRef out[4]);
+void si_llvm_load_input_fs(
+       struct si_shader_context *ctx,
+       unsigned input_index,
+       LLVMValueRef out[4]);
+
 bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader *nir);
 
 #endif