--- src/gallium/auxiliary/gallivm/lp_bld_tgsi.h | 46 ++++++++++++++++++++++- src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c | 43 --------------------- 2 files changed, 44 insertions(+), 45 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h index 9713d10..b5b1c6e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.h @@ -36,6 +36,8 @@ #define LP_BLD_TGSI_H #include "gallivm/lp_bld.h" +#include "gallivm/lp_bld_limits.h" +#include "lp_bld_type.h" #include "pipe/p_compiler.h" #include "pipe/p_state.h" #include "tgsi/tgsi_scan.h" @@ -43,8 +45,6 @@ struct tgsi_token; struct tgsi_shader_info; -struct lp_type; -struct lp_build_context; struct lp_build_mask_context; struct gallivm_state; @@ -207,4 +207,46 @@ lp_build_system_values_array(struct gallivm_state *gallivm, LLVMValueRef facing); +struct lp_build_tgsi_aos_context +{ + struct lp_build_context base; + + /* Builder for integer masks and indices */ + struct lp_build_context int_bld; + + /* + * AoS swizzle used: + * - swizzles[0] = red index + * - swizzles[1] = green index + * - swizzles[2] = blue index + * - swizzles[3] = alpha index + */ + unsigned char swizzles[4]; + unsigned char inv_swizzles[4]; + + LLVMValueRef consts_ptr; + const LLVMValueRef *inputs; + LLVMValueRef *outputs; + + struct lp_build_sampler_aos *sampler; + + LLVMValueRef immediates[LP_MAX_TGSI_IMMEDIATES]; + LLVMValueRef temps[LP_MAX_TGSI_TEMPS]; + LLVMValueRef addr[LP_MAX_TGSI_ADDRS]; + LLVMValueRef preds[LP_MAX_TGSI_PREDS]; + + /* We allocate/use this array of temps if (1 << TGSI_FILE_TEMPORARY) is + * set in the indirect_files field. + * The temps[] array above is unused then. + */ + LLVMValueRef temps_array; + + /** bitmask indicating which register files are accessed indirectly */ + unsigned indirect_files; + + struct tgsi_full_instruction *instructions; + uint max_instructions; +}; + + #endif /* LP_BLD_TGSI_H */ diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c index a021efd..b968c22 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_aos.c @@ -55,55 +55,12 @@ #include "lp_bld_flow.h" #include "lp_bld_quad.h" #include "lp_bld_tgsi.h" -#include "lp_bld_limits.h" #include "lp_bld_debug.h" #define LP_MAX_INSTRUCTIONS 256 -struct lp_build_tgsi_aos_context -{ - struct lp_build_context base; - - /* Builder for integer masks and indices */ - struct lp_build_context int_bld; - - /* - * AoS swizzle used: - * - swizzles[0] = red index - * - swizzles[1] = green index - * - swizzles[2] = blue index - * - swizzles[3] = alpha index - */ - unsigned char swizzles[4]; - unsigned char inv_swizzles[4]; - - LLVMValueRef consts_ptr; - const LLVMValueRef *inputs; - LLVMValueRef *outputs; - - struct lp_build_sampler_aos *sampler; - - LLVMValueRef immediates[LP_MAX_TGSI_IMMEDIATES]; - LLVMValueRef temps[LP_MAX_TGSI_TEMPS]; - LLVMValueRef addr[LP_MAX_TGSI_ADDRS]; - LLVMValueRef preds[LP_MAX_TGSI_PREDS]; - - /* We allocate/use this array of temps if (1 << TGSI_FILE_TEMPORARY) is - * set in the indirect_files field. - * The temps[] array above is unused then. - */ - LLVMValueRef temps_array; - - /** bitmask indicating which register files are accessed indirectly */ - unsigned indirect_files; - - struct tgsi_full_instruction *instructions; - uint max_instructions; -}; - - /** * Wrapper around lp_build_swizzle_aos which translates swizzles to another * ordering. -- 1.7.6.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev