diff options
author | Chia-I Wu <[email protected]> | 2014-11-11 10:31:55 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-11-11 13:51:36 +0800 |
commit | 63ded78e1cc1748bd5e74fcb4bcead6d58093668 (patch) | |
tree | 7e331fa38ed764dda4a99e99728258f5db1dd7c3 | |
parent | 9087239df8bb01c35429ea0e438b382a964f6d89 (diff) |
ilo: add variants of 3DSTATE_VS
Add gen6_disable_3DSTATE_VS() to disable VS.
Signed-off-by: Chia-I Wu <[email protected]>
-rw-r--r-- | src/gallium/drivers/ilo/ilo_builder_3d_top.h | 34 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_render_gen6.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/ilo/ilo_render_gen7.c | 2 |
3 files changed, 22 insertions, 16 deletions
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h index 39bd1e5d278..9794e92393e 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h @@ -550,31 +550,19 @@ gen6_3DSTATE_VS(struct ilo_builder *builder, const struct ilo_shader_state *vs) { const uint8_t cmd_len = 6; - const uint32_t dw0 = GEN6_RENDER_CMD(3D, 3DSTATE_VS) | (cmd_len - 2); const struct ilo_shader_cso *cso; uint32_t dw2, dw4, dw5, *dw; ILO_DEV_ASSERT(builder->dev, 6, 7.5); - if (!vs) { - ilo_builder_batch_pointer(builder, cmd_len, &dw); - dw[0] = dw0; - dw[1] = 0; - dw[2] = 0; - dw[3] = 0; - dw[4] = 0; - dw[5] = 0; - - return; - } - cso = ilo_shader_get_kernel_cso(vs); dw2 = cso->payload[0]; dw4 = cso->payload[1]; dw5 = cso->payload[2]; ilo_builder_batch_pointer(builder, cmd_len, &dw); - dw[0] = dw0; + + dw[0] = GEN6_RENDER_CMD(3D, 3DSTATE_VS) | (cmd_len - 2); dw[1] = ilo_shader_get_kernel_offset(vs); dw[2] = dw2; dw[3] = 0; /* scratch */ @@ -583,6 +571,24 @@ gen6_3DSTATE_VS(struct ilo_builder *builder, } static inline void +gen6_disable_3DSTATE_VS(struct ilo_builder *builder) +{ + const uint8_t cmd_len = 6; + uint32_t *dw; + + ILO_DEV_ASSERT(builder->dev, 6, 7.5); + + ilo_builder_batch_pointer(builder, cmd_len, &dw); + + dw[0] = GEN6_RENDER_CMD(3D, 3DSTATE_VS) | (cmd_len - 2); + dw[1] = 0; + dw[2] = 0; + dw[3] = 0; + dw[4] = 0; + dw[5] = 0; +} + +static inline void gen7_3DSTATE_HS(struct ilo_builder *builder, const struct ilo_shader_state *hs) { diff --git a/src/gallium/drivers/ilo/ilo_render_gen6.c b/src/gallium/drivers/ilo/ilo_render_gen6.c index 4e3bd18b309..fcdbd676270 100644 --- a/src/gallium/drivers/ilo/ilo_render_gen6.c +++ b/src/gallium/drivers/ilo/ilo_render_gen6.c @@ -844,7 +844,7 @@ gen6_rectlist_vs_to_sf(struct ilo_render *r, const struct ilo_blitter *blitter) { gen6_3DSTATE_CONSTANT_VS(r->builder, NULL, NULL, 0); - gen6_3DSTATE_VS(r->builder, NULL); + gen6_disable_3DSTATE_VS(r->builder); gen6_wa_post_3dstate_constant_vs(r); diff --git a/src/gallium/drivers/ilo/ilo_render_gen7.c b/src/gallium/drivers/ilo/ilo_render_gen7.c index 34a881aa067..a8c24434bce 100644 --- a/src/gallium/drivers/ilo/ilo_render_gen7.c +++ b/src/gallium/drivers/ilo/ilo_render_gen7.c @@ -721,7 +721,7 @@ gen7_rectlist_vs_to_sf(struct ilo_render *r, const struct ilo_blitter *blitter) { gen7_3DSTATE_CONSTANT_VS(r->builder, NULL, NULL, 0); - gen6_3DSTATE_VS(r->builder, NULL); + gen6_disable_3DSTATE_VS(r->builder); gen7_3DSTATE_CONSTANT_HS(r->builder, NULL, NULL, 0); gen7_3DSTATE_HS(r->builder, NULL); |