diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2015-01-27 19:57:40 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2015-02-12 07:56:11 +0800 |
commit | 05e2eb57cdb2ce185625038e7424ca2ef733a9aa (patch) | |
tree | d36a2cf7ce22f794227f43c8b969b426119ab0d9 | |
parent | 9ab0165375ea3e32a02b488ba9f78c460e700cd7 (diff) | |
download | external_mesa3d-05e2eb57cdb2ce185625038e7424ca2ef733a9aa.zip external_mesa3d-05e2eb57cdb2ce185625038e7424ca2ef733a9aa.tar.gz external_mesa3d-05e2eb57cdb2ce185625038e7424ca2ef733a9aa.tar.bz2 |
ilo: update CLIP related functions for Gen8
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state_3d_bottom.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/gallium/drivers/ilo/ilo_state_3d_bottom.c b/src/gallium/drivers/ilo/ilo_state_3d_bottom.c index 579e56a..781d15b 100644 --- a/src/gallium/drivers/ilo/ilo_state_3d_bottom.c +++ b/src/gallium/drivers/ilo/ilo_state_3d_bottom.c @@ -44,7 +44,7 @@ rasterizer_init_clip(const struct ilo_dev_info *dev, { uint32_t dw1, dw2, dw3; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); dw1 = GEN6_CLIP_DW1_STATISTICS; @@ -61,22 +61,24 @@ rasterizer_init_clip(const struct ilo_dev_info *dev, dw1 |= 0 << 19 | GEN7_CLIP_DW1_EARLY_CULL_ENABLE; - if (state->front_ccw) - dw1 |= GEN7_CLIP_DW1_FRONTWINDING_CCW; - - switch (state->cull_face) { - case PIPE_FACE_NONE: - dw1 |= GEN7_CLIP_DW1_CULLMODE_NONE; - break; - case PIPE_FACE_FRONT: - dw1 |= GEN7_CLIP_DW1_CULLMODE_FRONT; - break; - case PIPE_FACE_BACK: - dw1 |= GEN7_CLIP_DW1_CULLMODE_BACK; - break; - case PIPE_FACE_FRONT_AND_BACK: - dw1 |= GEN7_CLIP_DW1_CULLMODE_BOTH; - break; + if (ilo_dev_gen(dev) < ILO_GEN(8)) { + if (state->front_ccw) + dw1 |= GEN7_CLIP_DW1_FRONTWINDING_CCW; + + switch (state->cull_face) { + case PIPE_FACE_NONE: + dw1 |= GEN7_CLIP_DW1_CULLMODE_NONE; + break; + case PIPE_FACE_FRONT: + dw1 |= GEN7_CLIP_DW1_CULLMODE_FRONT; + break; + case PIPE_FACE_BACK: + dw1 |= GEN7_CLIP_DW1_CULLMODE_BACK; + break; + case PIPE_FACE_FRONT_AND_BACK: + dw1 |= GEN7_CLIP_DW1_CULLMODE_BOTH; + break; + } } } @@ -90,7 +92,7 @@ rasterizer_init_clip(const struct ilo_dev_info *dev, else dw2 |= GEN6_CLIP_DW2_APIMODE_OGL; - if (state->depth_clip) + if (ilo_dev_gen(dev) < ILO_GEN(8) && state->depth_clip) dw2 |= GEN6_CLIP_DW2_Z_TEST_ENABLE; if (state->flatshade_first) { |