Mesa (7.8): i965: Use R16G16B16A16_FLOAT for 3-component half-float.

Eric Anholt anholt at kemper.freedesktop.org
Tue Jun 15 15:55:57 PDT 2010


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

Author: Eric Anholt <eric at anholt.net>
Date:   Thu May 13 22:10:39 2010 -0700

i965: Use R16G16B16A16_FLOAT for 3-component half-float.

The RGBX version isn't supported as a vertex input type, but since we
force the last channel's value anyway, this should be fine.  The only
potential risk I see is in the limiter on VBO reads past the end of
the buffer forcing the whole vertex to 0 when the A channel lands past
the end.

Fixes piglit draw-vertices-half-float.
(cherry picked from commit f5bd48cf673456ffea730f28c9b95c6883399162)

---

 src/mesa/drivers/dri/i965/brw_draw_upload.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 8247faa..9cbff24 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -59,7 +59,7 @@ static GLuint half_float_types[5] = {
    0,
    BRW_SURFACEFORMAT_R16_FLOAT,
    BRW_SURFACEFORMAT_R16G16_FLOAT,
-   0, /* can't seem to render this one */
+   BRW_SURFACEFORMAT_R16G16B16A16_FLOAT,
    BRW_SURFACEFORMAT_R16G16B16A16_FLOAT
 };
 



More information about the mesa-commit mailing list