ilo: add variants of 3DSTATE_{HS,DS}
authorChia-I Wu <olvaffe@gmail.com>
Tue, 11 Nov 2014 02:38:28 +0000 (10:38 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Tue, 11 Nov 2014 05:52:25 +0000 (13:52 +0800)
Rename them to gen7_disable_3DSTATE_{HS,DS}() to reflect the fact.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/drivers/ilo/ilo_builder_3d_top.h
src/gallium/drivers/ilo/ilo_render_gen7.c

index d440e980b43ea246541ecbfa76a5df5a6a13bf2e..1b4f4a35ae85ccbf6001f230be90fb99a521ea7c 100644 (file)
@@ -589,16 +589,13 @@ gen6_disable_3DSTATE_VS(struct ilo_builder *builder)
 }
 
 static inline void
-gen7_3DSTATE_HS(struct ilo_builder *builder,
-                const struct ilo_shader_state *hs)
+gen7_disable_3DSTATE_HS(struct ilo_builder *builder)
 {
    const uint8_t cmd_len = 7;
    uint32_t *dw;
 
    ILO_DEV_ASSERT(builder->dev, 7, 7.5);
 
-   assert(!hs);
-
    ilo_builder_batch_pointer(builder, cmd_len, &dw);
 
    dw[0] = GEN7_RENDER_CMD(3D, 3DSTATE_HS) | (cmd_len - 2);
@@ -627,16 +624,13 @@ gen7_3DSTATE_TE(struct ilo_builder *builder)
 }
 
 static inline void
-gen7_3DSTATE_DS(struct ilo_builder *builder,
-                const struct ilo_shader_state *ds)
+gen7_disable_3DSTATE_DS(struct ilo_builder *builder)
 {
    const uint8_t cmd_len = 6;
    uint32_t *dw;
 
    ILO_DEV_ASSERT(builder->dev, 7, 7.5);
 
-   assert(!ds);
-
    ilo_builder_batch_pointer(builder, cmd_len, &dw);
 
    dw[0] = GEN7_RENDER_CMD(3D, 3DSTATE_DS) | (cmd_len - 2);
index 9943ec503360d75b797c5c76279204834d0c7ede..8830db4e852a25340addb49fd8cd668137974e67 100644 (file)
@@ -378,7 +378,7 @@ gen7_draw_hs(struct ilo_render *r,
    /* 3DSTATE_CONSTANT_HS and 3DSTATE_HS */
    if (r->hw_ctx_changed) {
       gen7_3DSTATE_CONSTANT_HS(r->builder, 0, 0, 0);
-      gen7_3DSTATE_HS(r->builder, NULL);
+      gen7_disable_3DSTATE_HS(r->builder);
    }
 
    /* 3DSTATE_BINDING_TABLE_POINTERS_HS */
@@ -404,7 +404,7 @@ gen7_draw_ds(struct ilo_render *r,
    /* 3DSTATE_CONSTANT_DS and 3DSTATE_DS */
    if (r->hw_ctx_changed) {
       gen7_3DSTATE_CONSTANT_DS(r->builder, 0, 0, 0);
-      gen7_3DSTATE_DS(r->builder, NULL);
+      gen7_disable_3DSTATE_DS(r->builder);
    }
 
    /* 3DSTATE_BINDING_TABLE_POINTERS_DS */
@@ -724,12 +724,12 @@ gen7_rectlist_vs_to_sf(struct ilo_render *r,
    gen6_disable_3DSTATE_VS(r->builder);
 
    gen7_3DSTATE_CONSTANT_HS(r->builder, NULL, NULL, 0);
-   gen7_3DSTATE_HS(r->builder, NULL);
+   gen7_disable_3DSTATE_HS(r->builder);
 
    gen7_3DSTATE_TE(r->builder);
 
    gen7_3DSTATE_CONSTANT_DS(r->builder, NULL, NULL, 0);
-   gen7_3DSTATE_DS(r->builder, NULL);
+   gen7_disable_3DSTATE_DS(r->builder);
 
    gen7_3DSTATE_CONSTANT_GS(r->builder, NULL, NULL, 0);
    gen7_disable_3DSTATE_GS(r->builder);