diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-01 00:01:15 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-01 10:32:37 +0100 |
commit | 9b2873d3d97b6780d878bd9b821fba0302470f9f (patch) | |
tree | 8c28ad966224af3f464c3acb788e00ec237cb1a4 /src/sna/brw/brw_test_gen7.c | |
parent | fd3a1236051265fab700aad689a171de47d7338f (diff) |
sna/gen4+: Implement an opacity shader
Avoid the cumbersome lookup through the alpha gradient texture and
simply multiply the incoming opacity value. The next step will be to
reduce the number of floats required per vertex.
Now that we have removed the primary user of the alpha solid cache, it
may be time to retire that as well.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/brw/brw_test_gen7.c')
-rw-r--r-- | src/sna/brw/brw_test_gen7.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/sna/brw/brw_test_gen7.c b/src/sna/brw/brw_test_gen7.c index c3f0e231..085b25cc 100644 --- a/src/sna/brw/brw_test_gen7.c +++ b/src/sna/brw/brw_test_gen7.c @@ -167,6 +167,17 @@ static void gen7_ps_nomask_projective(void) compare(ps_kernel_nomask_projective); } +static void gen7_ps_opacity(void) +{ + uint32_t store[1024]; + struct brw_compile p; + + brw_compile_init(&p, GEN, store); + brw_wm_kernel__affine_opacity(&p, 16); + + compare(ps_kernel_nomask_affine); +} + void brw_test_gen7(void) { gen7_ps_nomask_affine(); @@ -175,4 +186,6 @@ void brw_test_gen7(void) gen7_ps_masksa_affine(); gen7_ps_nomask_projective(); + + gen7_ps_opacity(); } |