aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/cell/spu/spu_main.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2008-03-21 11:15:49 -0700
committerIan Romanick <[email protected]>2008-03-21 15:57:01 -0700
commit600499cf888fee9a91ff3106beca939ea0c7b2bd (patch)
treed517fc8e8bdf97b6ba6a781f21981ec72360679c /src/gallium/drivers/cell/spu/spu_main.h
parentf140062b72ee2df05020d86abdc47336262494f9 (diff)
cell: Change code-gen for CONST_COLOR blend factor
Previously the constant color blend factor was compiled into the generated code. This meant that the code had to be regenerated each time the constant color was changed. This doesn't fit with the model used in Gallium. As-is, the code could be better. The constant color is loaded for every quad processed, even if it is not used. Also, if a lot of (1-x) blend factors are used, 1.0 will be loaded and reloaded into registers many times.
Diffstat (limited to 'src/gallium/drivers/cell/spu/spu_main.h')
-rw-r--r--src/gallium/drivers/cell/spu/spu_main.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/cell/spu/spu_main.h b/src/gallium/drivers/cell/spu/spu_main.h
index 56d0968676b..49f5d99674a 100644
--- a/src/gallium/drivers/cell/spu/spu_main.h
+++ b/src/gallium/drivers/cell/spu/spu_main.h
@@ -77,6 +77,7 @@ struct spu_blend_results {
typedef struct spu_blend_results (*blend_func)(
qword frag_r, qword frag_g, qword frag_b, qword frag_a,
qword pixel_r, qword pixel_g, qword pixel_b, qword pixel_a,
+ qword const_r, qword const_g, qword const_b, qword const_a,
qword frag_mask);
struct spu_framebuffer {
@@ -108,6 +109,7 @@ struct spu_global
boolean read_fb;
blend_func blend;
+ qword const_blend_color[4] ALIGN16_ATTRIB;
struct pipe_sampler_state sampler[PIPE_MAX_SAMPLERS];
struct cell_command_texture texture;