Mesa (master): r600g: Use symbolic names for NUMBER_TYPE.

Henri Verbeet hverbeet at kemper.freedesktop.org
Thu Apr 7 13:30:31 PDT 2011


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

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Thu Apr  7 22:21:20 2011 +0200

r600g: Use symbolic names for NUMBER_TYPE.

Signed-off-by: Henri Verbeet <hverbeet at gmail.com>

---

 src/gallium/drivers/r600/evergreen_state.c |    6 +++---
 src/gallium/drivers/r600/r600_state.c      |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 97f9a07..cff79fa 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -680,7 +680,7 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
 					 level, state->cbufs[cb]->u.tex.first_layer);
 	pitch = rtex->pitch_in_blocks[level] / 8 - 1;
 	slice = rtex->pitch_in_blocks[level] * surf->aligned_height / 64 - 1;
-	ntype = 0;
+	ntype = V_028C70_NUMBER_UNORM;
 	desc = util_format_description(surf->base.format);
 	if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
 		ntype = V_028C70_NUMBER_SRGB;
@@ -690,7 +690,7 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
 
 	/* disable when gallium grows int textures */
 	if ((format == FMT_32_32_32_32 || format == FMT_16_16_16_16) && rtex->force_int_type)
-		ntype = 4;
+		ntype = V_028C70_NUMBER_UINT;
 
 	color_info = S_028C70_FORMAT(format) |
 		S_028C70_COMP_SWAP(swap) |
@@ -708,7 +708,7 @@ static void evergreen_cb(struct r600_pipe_context *rctx, struct r600_pipe_state
 	   if we aren't a float, sint or uint */
 	if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS &&
 	    desc->channel[i].size < 12 && desc->channel[i].type != UTIL_FORMAT_TYPE_FLOAT &&
-	    ntype != 4 && ntype != 5)
+	    ntype != V_028C70_NUMBER_UINT && ntype != V_028C70_NUMBER_SINT)
 		color_info |= S_028C70_SOURCE_FORMAT(V_028C70_EXPORT_4C_16BPC);
 
 	if (rtex->array_mode[level] > V_028C70_ARRAY_LINEAR_ALIGNED) {
diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c
index 7ab6965..3a863ae 100644
--- a/src/gallium/drivers/r600/r600_state.c
+++ b/src/gallium/drivers/r600/r600_state.c
@@ -742,7 +742,7 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
 					 level, state->cbufs[cb]->u.tex.first_layer);
 	pitch = rtex->pitch_in_blocks[level] / 8 - 1;
 	slice = rtex->pitch_in_blocks[level] * surf->aligned_height / 64 - 1;
-	ntype = 0;
+	ntype = V_0280A0_NUMBER_UNORM;
 	desc = util_format_description(surf->base.format);
 	if (desc->colorspace == UTIL_FORMAT_COLORSPACE_SRGB)
 		ntype = V_0280A0_NUMBER_SRGB;
@@ -758,7 +758,7 @@ static void r600_cb(struct r600_pipe_context *rctx, struct r600_pipe_state *rsta
 
 	/* disable when gallium grows int textures */
 	if ((format == FMT_32_32_32_32 || format == FMT_16_16_16_16) && rtex->force_int_type)
-		ntype = 4;
+		ntype = V_0280A0_NUMBER_UINT;
 
 	color_info = S_0280A0_FORMAT(format) |
 		S_0280A0_COMP_SWAP(swap) |



More information about the mesa-commit mailing list