diff options
author | Brian Paul <[email protected]> | 2009-12-04 09:14:40 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-04 09:14:42 -0700 |
commit | 04e12e31b252e7a18862c3ac386f302665edb6e7 (patch) | |
tree | 88eccdac9fa17ff15082c5b5154850052900d73e /src/gallium/drivers/llvmpipe/lp_setup_tri.c | |
parent | c6057ab8ff8991eac9c73c267696b386f8e56c68 (diff) |
llvmpipe: dynamic allocation of triangle a0/dadx/dady arrays
Much less memory per triangle now.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index c21c465a75d..3b71bc4c034 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -177,6 +177,16 @@ static void setup_tri_coefficients( struct setup_context *setup, { unsigned slot; + /* Allocate space for the a0, dadx and dady arrays + */ + { + unsigned bytes; + bytes = (setup->fs.nr_inputs + 1) * 4 * sizeof(float); + tri->inputs.a0 = get_data_aligned( &setup->data, bytes, 16 ); + tri->inputs.dadx = get_data_aligned( &setup->data, bytes, 16 ); + tri->inputs.dady = get_data_aligned( &setup->data, bytes, 16 ); + } + /* The internal position input is in slot zero: */ setup_fragcoord_coef(tri, 0, v1, v2, v3); |