ilo: do not need last shader stage for 3DSTATE_SBE
authorChia-I Wu <olvaffe@gmail.com>
Thu, 22 Aug 2013 06:59:03 +0000 (14:59 +0800)
committerChia-I Wu <olvaffe@gmail.com>
Thu, 22 Aug 2013 07:18:29 +0000 (15:18 +0800)
We have set up 3DSTATE_SBE (or 3DSTATE_SF on GEN6) in
ilo_shader_select_kernel_routing().  There is no need to pass the last shader
stage to the GPE function.

src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
src/gallium/drivers/ilo/ilo_gpe_gen6.h
src/gallium/drivers/ilo/ilo_gpe_gen7.h

index 245efa20c43c5351ad290992abbb4e3262f47a25..c51de1412dcc970d0696e807d434c96353efd970 100644 (file)
@@ -626,10 +626,8 @@ gen6_pipeline_sf(struct ilo_3d_pipeline *p,
                  struct gen6_pipeline_session *session)
 {
    /* 3DSTATE_SF */
-   if (DIRTY(RASTERIZER) || DIRTY(VS) || DIRTY(GS) || DIRTY(FS)) {
-      gen6_emit_3DSTATE_SF(p->dev, ilo->rasterizer, ilo->fs,
-            (ilo->gs) ? ilo->gs : ilo->vs, p->cp);
-   }
+   if (DIRTY(RASTERIZER) || DIRTY(FS))
+      gen6_emit_3DSTATE_SF(p->dev, ilo->rasterizer, ilo->fs, p->cp);
 }
 
 void
index aa54898ac3f170577049d4dbea9de20786f3314d..27ecd952bb54bda119f3bc181f25794389b68648 100644 (file)
@@ -451,10 +451,8 @@ gen7_pipeline_sf(struct ilo_3d_pipeline *p,
                  struct gen6_pipeline_session *session)
 {
    /* 3DSTATE_SBE */
-   if (DIRTY(RASTERIZER) || DIRTY(VS) || DIRTY(GS) || DIRTY(FS)) {
-      gen7_emit_3DSTATE_SBE(p->dev, ilo->rasterizer, ilo->fs,
-            (ilo->gs) ? ilo->gs : ilo->vs, ilo->cp);
-   }
+   if (DIRTY(RASTERIZER) || DIRTY(FS))
+      gen7_emit_3DSTATE_SBE(p->dev, ilo->rasterizer, ilo->fs, ilo->cp);
 
    /* 3DSTATE_SF */
    if (DIRTY(RASTERIZER) || DIRTY(FB)) {
index 8f005e95fbaaa226b150f7d9da71707bf7e01d4a..d8d71d7308888a9313ba3430eee60a11331de285 100644 (file)
@@ -261,7 +261,6 @@ static inline void
 ilo_gpe_gen6_fill_3dstate_sf_sbe(const struct ilo_dev_info *dev,
                                  const struct ilo_rasterizer_state *rasterizer,
                                  const struct ilo_shader_state *fs,
-                                 const struct ilo_shader_state *last_sh,
                                  uint32_t *dw, int num_dwords)
 {
    int output_count, vue_offset, vue_len;
@@ -1187,7 +1186,6 @@ static inline void
 gen6_emit_3DSTATE_SF(const struct ilo_dev_info *dev,
                      const struct ilo_rasterizer_state *rasterizer,
                      const struct ilo_shader_state *fs,
-                     const struct ilo_shader_state *last_sh,
                      struct ilo_cp *cp)
 {
    const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x13);
@@ -1199,7 +1197,7 @@ gen6_emit_3DSTATE_SF(const struct ilo_dev_info *dev,
    ilo_gpe_gen6_fill_3dstate_sf_raster(dev, rasterizer,
          1, PIPE_FORMAT_NONE, payload_raster, Elements(payload_raster));
    ilo_gpe_gen6_fill_3dstate_sf_sbe(dev, rasterizer,
-         fs, last_sh, payload_sbe, Elements(payload_sbe));
+         fs, payload_sbe, Elements(payload_sbe));
 
    ilo_cp_begin(cp, cmd_len);
    ilo_cp_write(cp, cmd | (cmd_len - 2));
index 02feec096c2ad5b7d311d06ae357a1742c3f5734..1d4c0a13e8285adad98ac4bd4b27974c03a7d119 100644 (file)
@@ -580,7 +580,6 @@ static inline void
 gen7_emit_3DSTATE_SBE(const struct ilo_dev_info *dev,
                       const struct ilo_rasterizer_state *rasterizer,
                       const struct ilo_shader_state *fs,
-                      const struct ilo_shader_state *last_sh,
                       struct ilo_cp *cp)
 {
    const uint32_t cmd = ILO_GPE_CMD(0x3, 0x0, 0x1f);
@@ -589,8 +588,7 @@ gen7_emit_3DSTATE_SBE(const struct ilo_dev_info *dev,
 
    ILO_GPE_VALID_GEN(dev, 7, 7);
 
-   ilo_gpe_gen6_fill_3dstate_sf_sbe(dev, rasterizer,
-         fs, last_sh, dw, Elements(dw));
+   ilo_gpe_gen6_fill_3dstate_sf_sbe(dev, rasterizer, fs, dw, Elements(dw));
 
    ilo_cp_begin(cp, cmd_len);
    ilo_cp_write(cp, cmd | (cmd_len - 2));