diff options
author | Chia-I Wu <[email protected]> | 2015-02-10 07:13:11 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2015-02-12 07:56:12 +0800 |
commit | 8c2cbc8955f8512820a32aae2fa38ed5b97c2e95 (patch) | |
tree | e3e83e3934ae032494c32067263beb0bf4d6fbbe | |
parent | 0e3381154cfcc265495344c1c7b3e98dbbbe6183 (diff) |
ilo: update VS related functions for Gen8
-rw-r--r-- | src/gallium/drivers/ilo/ilo_builder_3d_top.h | 30 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_state_3d_top.c | 2 |
2 files changed, 31 insertions, 1 deletions
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h index 78e03c36b8d..04609d0b655 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h @@ -723,6 +723,36 @@ gen6_3DSTATE_VS(struct ilo_builder *builder, } static inline void +gen8_3DSTATE_VS(struct ilo_builder *builder, + const struct ilo_shader_state *vs, + uint32_t clip_plane_enable) +{ + const uint8_t cmd_len = 9; + const struct ilo_shader_cso *cso; + uint32_t dw3, dw6, dw7, dw8, *dw; + + ILO_DEV_ASSERT(builder->dev, 8, 8); + + cso = ilo_shader_get_kernel_cso(vs); + dw3 = cso->payload[0]; + dw6 = cso->payload[1]; + dw7 = cso->payload[2]; + dw8 = clip_plane_enable << GEN8_VS_DW8_UCP_CLIP_ENABLES__SHIFT; + + ilo_builder_batch_pointer(builder, cmd_len, &dw); + + dw[0] = GEN6_RENDER_CMD(3D, 3DSTATE_VS) | (cmd_len - 2); + dw[1] = ilo_shader_get_kernel_offset(vs); + dw[2] = 0; + dw[3] = dw3; + dw[4] = 0; /* scratch */ + dw[5] = 0; + dw[6] = dw6; + dw[7] = dw7; + dw[8] = dw8; +} + +static inline void gen6_disable_3DSTATE_VS(struct ilo_builder *builder) { const uint8_t cmd_len = 6; diff --git a/src/gallium/drivers/ilo/ilo_state_3d_top.c b/src/gallium/drivers/ilo/ilo_state_3d_top.c index 73f8402be0b..d7d64b0c2b3 100644 --- a/src/gallium/drivers/ilo/ilo_state_3d_top.c +++ b/src/gallium/drivers/ilo/ilo_state_3d_top.c @@ -205,7 +205,7 @@ ilo_gpe_init_vs_cso(const struct ilo_dev_info *dev, int start_grf, vue_read_len, sampler_count, max_threads; uint32_t dw2, dw4, dw5; - ILO_DEV_ASSERT(dev, 6, 7.5); + ILO_DEV_ASSERT(dev, 6, 8); start_grf = ilo_shader_get_kernel_param(vs, ILO_KERNEL_URB_DATA_START_REG); vue_read_len = ilo_shader_get_kernel_param(vs, ILO_KERNEL_INPUT_COUNT); |