Mesa (master): ilo: do not need last shader stage for 3DSTATE_SBE

Chia-I Wu olv at kemper.freedesktop.org
Thu Aug 22 07:20:46 UTC 2013


Module: Mesa
Branch: master
Commit: b6037e734ee22849cea05a3c92d908e5f92a79fb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b6037e734ee22849cea05a3c92d908e5f92a79fb

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Thu Aug 22 14:59:03 2013 +0800

ilo: do not need last shader stage for 3DSTATE_SBE

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 |    6 ++----
 src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c |    6 ++----
 src/gallium/drivers/ilo/ilo_gpe_gen6.h         |    4 +---
 src/gallium/drivers/ilo/ilo_gpe_gen7.h         |    4 +---
 4 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
index 245efa2..c51de14 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen6.c
@@ -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
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
index aa54898..27ecd95 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
@@ -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)) {
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen6.h b/src/gallium/drivers/ilo/ilo_gpe_gen6.h
index 8f005e9..d8d71d7 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen6.h
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen6.h
@@ -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));
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.h b/src/gallium/drivers/ilo/ilo_gpe_gen7.h
index 02feec0..1d4c0a1 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen7.h
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.h
@@ -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));




More information about the mesa-commit mailing list