Mesa (master): ilo: always set up BLEND_STATE on Gen8

Chia-I Wu olv at kemper.freedesktop.org
Mon Feb 16 21:00:12 UTC 2015


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Tue Feb 17 04:45:03 2015 +0800

ilo: always set up BLEND_STATE on Gen8

There is now an DW0 that seems to be always referenced.

---

 src/gallium/drivers/ilo/ilo_builder_3d_bottom.h |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h b/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h
index 9b61e65..ece1423 100644
--- a/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h
+++ b/src/gallium/drivers/ilo/ilo_builder_3d_bottom.h
@@ -1748,7 +1748,7 @@ gen8_BLEND_STATE(struct ilo_builder *builder,
                  const struct ilo_dsa_state *dsa)
 {
    const int state_align = 64;
-   int state_len;
+   const int state_len = 1 + 2 * fb->state.nr_cbufs;
    uint32_t state_offset, *dw;
    unsigned i;
 
@@ -1756,12 +1756,6 @@ gen8_BLEND_STATE(struct ilo_builder *builder,
 
    assert(fb->state.nr_cbufs <= 8);
 
-   /* may need to reference alpha func even when there is no color buffer */
-   if (!fb->state.nr_cbufs && !dsa->dw_blend_alpha)
-      return 0;
-
-   state_len = 1 + 2 * fb->state.nr_cbufs;
-
    state_offset = ilo_builder_dynamic_pointer(builder,
          ILO_BUILDER_ITEM_BLEND, state_align, state_len, &dw);
 




More information about the mesa-commit mailing list