diff options
author | Keith Whitwell <[email protected]> | 2010-01-11 12:06:51 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-01-11 12:12:59 +0000 |
commit | 86f450060debebd66dd5fb72f83800d7634efeaa (patch) | |
tree | 9042a96f8a3257bfa3a624ba157bcf7279ba8028 /src/gallium/drivers/llvmpipe/lp_state_fs.c | |
parent | ad74ea286951634d49d500f2e5ce740072794fe2 (diff) |
llvmpipe: force constant interpolation of flatshade colors
Nice speedup for gears.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_state_fs.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 01912d6ea2d..7ce72027770 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -718,7 +718,10 @@ generate_fragment(struct llvmpipe_context *lp, generate_pos0(builder, x, y, &x0, &y0); - lp_build_interp_soa_init(&interp, shader->base.tokens, builder, fs_type, + lp_build_interp_soa_init(&interp, + shader->base.tokens, + key->flatshade, + builder, fs_type, a0_ptr, dadx_ptr, dady_ptr, x0, y0); @@ -958,6 +961,8 @@ make_variant_key(struct llvmpipe_context *lp, key->alpha.func = lp->depth_stencil->alpha.func; /* alpha.ref_value is passed in jit_context */ + key->flatshade = lp->rasterizer->flatshade; + if (lp->framebuffer.nr_cbufs) { memcpy(&key->blend, lp->blend, sizeof key->blend); } |