summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_context.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-08-19 09:38:14 -0700
committerEric Anholt <[email protected]>2015-10-23 18:11:21 +0100
commit70b06fb5d55d639fd74596a2ff6971cb57c030ca (patch)
tree557ad6384709de62ddfb292cf1383a04833255fb /src/gallium/drivers/vc4/vc4_context.h
parent8e701fda499af0387f5c72f7bc14510182738647 (diff)
vc4: Convert blending to being done in 4x8 unorm normally.
We can't do this all the time, because you want blending to be done in linear space, and sRGB would lose too much precision being done in 4x8. The win on instructions is pretty huge when you can, though. total uniforms in shared programs: 32065 -> 32168 (0.32%) uniforms in affected programs: 327 -> 430 (31.50%) total instructions in shared programs: 92644 -> 89830 (-3.04%) instructions in affected programs: 15580 -> 12766 (-18.06%) Improves openarena performance at 1920x1080 from 10.7fps to 11.2fps.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_context.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_context.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_context.h b/src/gallium/drivers/vc4/vc4_context.h
index 7a758f8545f..86f2ce5e608 100644
--- a/src/gallium/drivers/vc4/vc4_context.h
+++ b/src/gallium/drivers/vc4/vc4_context.h
@@ -291,7 +291,10 @@ struct vc4_context {
struct vc4_vertex_stateobj *vtx;
- struct pipe_blend_color blend_color;
+ struct {
+ struct pipe_blend_color f;
+ uint8_t ub[4];
+ } blend_color;
struct pipe_stencil_ref stencil_ref;
unsigned sample_mask;
struct pipe_framebuffer_state framebuffer;