From 8c2cbc8955f8512820a32aae2fa38ed5b97c2e95 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 10 Feb 2015 07:13:11 +0800 Subject: ilo: update VS related functions for Gen8 --- src/gallium/drivers/ilo/ilo_builder_3d_top.h | 30 ++++++++++++++++++++++++++++ src/gallium/drivers/ilo/ilo_state_3d_top.c | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'src/gallium/drivers') 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 @@ -722,6 +722,36 @@ gen6_3DSTATE_VS(struct ilo_builder *builder, dw[5] = dw5; } +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) { 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); -- cgit v1.2.3