gallivm: Basic AoS TGSI -> LLVM IR.

Essentially a variation of the SoA version.
This commit is contained in:
José Fonseca 2010-09-02 12:45:50 +01:00
parent 58daea741f
commit 93158622e2
4 changed files with 1156 additions and 0 deletions

View File

@ -171,6 +171,7 @@ GALLIVM_SOURCES = \
gallivm/lp_bld_sample_soa.c \
gallivm/lp_bld_struct.c \
gallivm/lp_bld_swizzle.c \
gallivm/lp_bld_tgsi_aos.c \
gallivm/lp_bld_tgsi_soa.c \
gallivm/lp_bld_type.c \
draw/draw_llvm.c \

View File

@ -222,6 +222,7 @@ if env['llvm']:
'gallivm/lp_bld_sample_soa.c',
'gallivm/lp_bld_struct.c',
'gallivm/lp_bld_swizzle.c',
'gallivm/lp_bld_tgsi_aos.c',
'gallivm/lp_bld_tgsi_soa.c',
'gallivm/lp_bld_type.c',
'draw/draw_llvm.c',

View File

@ -82,6 +82,24 @@ struct lp_build_sampler_soa
};
struct lp_build_sampler_aos
{
void
(*destroy)( struct lp_build_sampler_aos *sampler );
LLVMValueRef
(*emit_fetch_texel)( const struct lp_build_sampler_aos *sampler,
LLVMBuilderRef builder,
struct lp_type type,
unsigned target, /* TGSI_TEXTURE_* */
unsigned unit,
LLVMValueRef coords,
LLVMValueRef ddx,
LLVMValueRef ddy,
enum lp_build_tex_modifier modifier);
};
void
lp_build_tgsi_soa(LLVMBuilderRef builder,
const struct tgsi_token *tokens,
@ -95,4 +113,15 @@ lp_build_tgsi_soa(LLVMBuilderRef builder,
const struct tgsi_shader_info *info);
void
lp_build_tgsi_aos(LLVMBuilderRef builder,
const struct tgsi_token *tokens,
struct lp_type type,
LLVMValueRef consts_ptr,
const LLVMValueRef *inputs,
LLVMValueRef *outputs,
struct lp_build_sampler_aos *sampler,
const struct tgsi_shader_info *info);
#endif /* LP_BLD_TGSI_H */

File diff suppressed because it is too large Load Diff