Mesa (master): ilo: fix fragment shaders that use PCB on GEN7+

Chia-I Wu olv at kemper.freedesktop.org
Thu Aug 15 03:58:44 UTC 2013


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Thu Aug 15 11:14:05 2013 +0800

ilo: fix fragment shaders that use PCB on GEN7+

Missed this commit when preparing PCB changes for upstreaming.

---

 src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c |    8 ++++++--
 src/gallium/drivers/ilo/ilo_gpe_gen7.c         |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
index b395f9b..aa54898 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline_gen7.c
@@ -493,8 +493,12 @@ gen7_pipeline_wm(struct ilo_3d_pipeline *p,
    }
 
    /* 3DSTATE_CONSTANT_PS */
-   if (session->pcb_state_fs_changed)
-      gen7_emit_3DSTATE_CONSTANT_PS(p->dev, NULL, NULL, 0, p->cp);
+   if (session->pcb_state_fs_changed) {
+      gen7_emit_3DSTATE_CONSTANT_PS(p->dev,
+            &p->state.wm.PUSH_CONSTANT_BUFFER,
+            &p->state.wm.PUSH_CONSTANT_BUFFER_size,
+            1, p->cp);
+   }
 
    /* 3DSTATE_PS */
    if (DIRTY(FS) || DIRTY(SAMPLER_FS) || DIRTY(BLEND) ||
diff --git a/src/gallium/drivers/ilo/ilo_gpe_gen7.c b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
index f6cc6e9..84ac0f8 100644
--- a/src/gallium/drivers/ilo/ilo_gpe_gen7.c
+++ b/src/gallium/drivers/ilo/ilo_gpe_gen7.c
@@ -143,7 +143,7 @@ ilo_gpe_init_fs_cso_gen7(const struct ilo_dev_info *dev,
    dw4 = (max_threads - 1) << IVB_PS_MAX_THREADS_SHIFT |
          GEN7_PS_POSOFFSET_NONE;
 
-   if (false)
+   if (ilo_shader_get_kernel_param(fs, ILO_KERNEL_PCB_CBUF0_SIZE))
       dw4 |= GEN7_PS_PUSH_CONSTANT_ENABLE;
 
    if (ilo_shader_get_kernel_param(fs, ILO_KERNEL_INPUT_COUNT))




More information about the mesa-commit mailing list