radeon/llvm: Move lowering of SETCC node to R600ISelLowering
[mesa.git] / src / gallium / drivers / radeon / radeon_llvm.h
index 39b1214e836334058f808ed0b3f12e9ba9848f97..7a32bb083b26ab212fe33ac7f035df897d1ac454 100644 (file)
@@ -36,6 +36,8 @@
 #define RADEON_LLVM_MAX_BRANCH_DEPTH 16
 #define RADEON_LLVM_MAX_LOOP_DEPTH 16
 
+#define RADEON_LLVM_MAX_SYSTEM_VALUES 4
+
 struct radeon_llvm_branch {
        LLVMBasicBlockRef endif_block;
        LLVMBasicBlockRef if_block;
@@ -78,6 +80,9 @@ struct radeon_llvm_context {
                        unsigned input_index,
                        const struct tgsi_full_declaration *decl);
 
+       void (*load_system_value)(struct radeon_llvm_context *,
+                       unsigned index,
+                       const struct tgsi_full_declaration *decl);
 
        /** User data to use with the callbacks */
        void * userdata;
@@ -90,6 +95,8 @@ struct radeon_llvm_context {
        LLVMValueRef outputs[RADEON_LLVM_MAX_OUTPUTS][TGSI_NUM_CHANNELS];
        unsigned output_reg_count;
 
+       LLVMValueRef system_values[RADEON_LLVM_MAX_SYSTEM_VALUES];
+
        unsigned reserved_reg_count;
        /*=== Private Members ===*/
 
@@ -150,4 +157,20 @@ unsigned radeon_llvm_reg_index_soa(unsigned index, unsigned chan);
 
 void radeon_llvm_finalize_module(struct radeon_llvm_context * ctx);
 
+LLVMValueRef
+build_intrinsic(LLVMBuilderRef builder,
+               const char *name,
+               LLVMTypeRef ret_type,
+               LLVMValueRef *args,
+               unsigned num_args,
+               LLVMAttribute attr);
+
+void
+build_tgsi_intrinsic_nomem(
+               const struct lp_build_tgsi_action * action,
+               struct lp_build_tgsi_context * bld_base,
+               struct lp_build_emit_data * emit_data);
+
+
+
 #endif /* RADEON_LLVM_H */