diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-06-01 21:27:18 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-06-01 21:30:57 +0100 |
commit | 6ce68ad3ca242076bbb93fdd99bb448f87a31d15 (patch) | |
tree | c16f9df9eb36510f378feef5002c383bc17e9a55 /src/gallium/drivers/llvmpipe/lp_bld_interp.h | |
parent | c7c64d97836c71eaf2ee3fc6d384877170b8c844 (diff) |
llvmpipe: Use struct lp_shader_input in the interpolator.
Eliminates all this identical yet slightly different code to decide how
shader inputs should be interpolated.
As bonus, don't interpolate the position twice when it is listed in the
TGSI shader inputs.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_interp.h')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_bld_interp.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h index 2d41fefd47..79d1e51605 100644 --- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h +++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h @@ -46,10 +46,7 @@ #include "tgsi/tgsi_exec.h" - - -struct tgsi_token; -struct tgsi_shader_info; +#include "lp_setup.h" struct lp_build_interp_soa_context @@ -58,7 +55,7 @@ struct lp_build_interp_soa_context unsigned num_attribs; unsigned mask[1 + PIPE_MAX_SHADER_INPUTS]; /**< TGSI_WRITE_MASK_x */ - unsigned interp[1 + PIPE_MAX_SHADER_INPUTS]; /**< TGSI_INTERPOLATE_x */ + enum lp_interp interp[1 + PIPE_MAX_SHADER_INPUTS]; LLVMValueRef a0 [1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS]; LLVMValueRef dadx[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS]; @@ -79,8 +76,8 @@ struct lp_build_interp_soa_context void lp_build_interp_soa_init(struct lp_build_interp_soa_context *bld, - const struct tgsi_shader_info *info, - boolean flatshade, + unsigned num_inputs, + const struct lp_shader_input *inputs, LLVMBuilderRef builder, struct lp_type type, LLVMValueRef a0_ptr, |