Mesa (master): ilo: R32G32B32_FLOAT need no special care on Gen8+

Chia-I Wu olv at kemper.freedesktop.org
Sat Feb 21 03:37:47 UTC 2015


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

Author: Chia-I Wu <olvaffe at gmail.com>
Date:   Sat Feb 21 00:35:49 2015 +0800

ilo: R32G32B32_FLOAT need no special care on Gen8+

Gen8+ must use VALIGN_4.  Unlike prior Gens, R32G32B32_FLOAT should supposedly
support VALIGN_4.

---

 src/gallium/drivers/ilo/ilo_layout.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/ilo/ilo_layout.c b/src/gallium/drivers/ilo/ilo_layout.c
index 03a692f..0b639b2 100644
--- a/src/gallium/drivers/ilo/ilo_layout.c
+++ b/src/gallium/drivers/ilo/ilo_layout.c
@@ -430,8 +430,9 @@ layout_init_alignments(struct ilo_layout *layout,
           layout->tiling == INTEL_TILING_Y &&
           (templ->bind & PIPE_BIND_RENDER_TARGET));
 
-      if (valign_4)
-         assert(layout->block_size != 12);
+      if (ilo_dev_gen(params->dev) >= ILO_GEN(7) &&
+          ilo_dev_gen(params->dev) <= ILO_GEN(7.5) && valign_4)
+         assert(layout->format != PIPE_FORMAT_R32G32B32_FLOAT);
 
       layout->align_i = 4;
       layout->align_j = (valign_4) ? 4 : 2;
@@ -525,7 +526,9 @@ layout_get_valid_tilings(const struct ilo_layout *layout,
        *
        *     "VALIGN_4 is not supported for surface format R32G32B32_FLOAT."
        */
-      if (ilo_dev_gen(params->dev) >= ILO_GEN(7) && layout->block_size == 12)
+      if (ilo_dev_gen(params->dev) >= ILO_GEN(7) &&
+          ilo_dev_gen(params->dev) <= ILO_GEN(7.5) &&
+          layout->format == PIPE_FORMAT_R32G32B32_FLOAT)
          valid_tilings &= ~LAYOUT_TILING_Y;
    }
 




More information about the mesa-commit mailing list