Mesa (master): r600g: add int support for 2/10/10/10 format.

Dave Airlie airlied at kemper.freedesktop.org
Sun Nov 27 19:33:53 UTC 2011


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Sun Nov 27 16:24:26 2011 +0000

r600g: add int support for 2/10/10/10 format.

integer wasn't set properly for the non-uniform types.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/r600_texture.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index 8fe1118..2d041b0 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -1012,6 +1012,9 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
 
 	/* Non-uniform formats. */
 	if (!uniform) {
+		if (desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB &&
+		    desc->channel[0].pure_integer)
+			word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
 		switch(desc->nr_channels) {
 		case 3:
 			if (desc->channel[0].size == 5 &&




More information about the mesa-commit mailing list