diff options
author | Tobias Klausmann <[email protected]> | 2016-05-08 22:44:11 +0200 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-05-15 10:48:39 -0400 |
commit | 8c0293979457dab49f0055075d1ca4daa3fb8033 (patch) | |
tree | 677ce1a79386b8b72ebdf51d6ac3120da6f2e6ba /src/gallium/drivers/nouveau/nvc0/nvc0_program.c | |
parent | 2ad970ecf49ecf79cb1b2c38cedc69e527eb3c28 (diff) |
nv50,nvc0: add support for cull distances
Cull distances are just a special case of clip distances as far as the
hardware is concerned. Make sure that the relevant "planes" are enabled,
and flip the clip mode to cull for those.
Signed-off-by: Tobias Klausmann <[email protected]>
[imirkin: add enables on nvc0, add nv50 support]
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Tobias Klausmann <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nvc0/nvc0_program.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c index 9db45c0759a..b573ac0b8bc 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c @@ -251,8 +251,9 @@ nvc0_vtgp_gen_header(struct nvc0_program *vp, struct nv50_ir_prog_info *info) } } - vp->vp.clip_enable = - (1 << (info->io.clipDistances + info->io.cullDistances)) - 1; + vp->vp.clip_enable = (1 << info->io.clipDistances) - 1; + vp->vp.cull_enable = + ((1 << info->io.cullDistances) - 1) << info->io.clipDistances; for (i = 0; i < info->io.cullDistances; ++i) vp->vp.clip_mode |= 1 << ((info->io.clipDistances + i) * 4); |