summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_bld_interp.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-06-02 18:43:35 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-06-02 18:43:35 +0100
commitead58101f91e82279b25676dfe822120be611995 (patch)
tree2698c9fa8f327726c57e5cda971c88447ce134b1 /src/gallium/drivers/llvmpipe/lp_bld_interp.h
parent5871b7ebc9f9629c076c9fe3c9c32aa9fd531eba (diff)
llvmpipe: Per quad interpolation.
First interpolate the 4 quads upper left corners, then sub-interpolate each quad pixel. Do the perspective divide once per quad. Saves some muls and reciprocates. But doesn't seem to make a noticeable improvement. It make the code simpler and more compact, so commiting anyway.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_interp.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_interp.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_interp.h b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
index 45a430701f..2905513301 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_interp.h
+++ b/src/gallium/drivers/llvmpipe/lp_bld_interp.h
@@ -58,12 +58,11 @@ struct lp_build_interp_soa_context
unsigned mask[1 + PIPE_MAX_SHADER_INPUTS]; /**< TGSI_WRITE_MASK_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];
- LLVMValueRef dady[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
+ LLVMValueRef x;
+ LLVMValueRef y;
- /* Attribute values before perspective divide */
- LLVMValueRef attribs_pre[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
+ LLVMValueRef a [1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
+ LLVMValueRef dadq[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];
LLVMValueRef attribs[1 + PIPE_MAX_SHADER_INPUTS][NUM_CHANNELS];