Mesa (master): radeonsi: Replace more magic numbers for sampler state.

Michel Dänzer daenzer at kemper.freedesktop.org
Thu Apr 19 00:40:12 PDT 2012


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

Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Thu Apr 19 09:36:52 2012 +0200

radeonsi: Replace more magic numbers for sampler state.

---

 src/gallium/drivers/radeonsi/evergreen_state.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/evergreen_state.c b/src/gallium/drivers/radeonsi/evergreen_state.c
index 2273414..ee95275 100644
--- a/src/gallium/drivers/radeonsi/evergreen_state.c
+++ b/src/gallium/drivers/radeonsi/evergreen_state.c
@@ -1120,17 +1120,17 @@ static void *si_create_sampler_state(struct pipe_context *ctx,
 
 	util_pack_color(state->border_color.f, PIPE_FORMAT_B8G8R8A8_UNORM, &uc);
 	switch (uc.ui) {
-	case 0x000000FF: /* opaque black */
-		border_color_type = 0;
+	case 0x000000FF:
+		border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_OPAQUE_BLACK;
 		break;
-	case 0x00000000: /* transparent black */
-		border_color_type = 1;
+	case 0x00000000:
+		border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_TRANS_BLACK;
 		break;
-	case 0xFFFFFFFF: /* white */
-		border_color_type = 2;
+	case 0xFFFFFFFF:
+		border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_OPAQUE_WHITE;
 		break;
 	default: /* Use border color pointer */
-		border_color_type = 3;
+		border_color_type = V_008F3C_SQ_TEX_BORDER_COLOR_REGISTER;
 	}
 
 	rstate->val[0] = (S_008F30_CLAMP_X(si_tex_wrap(state->wrap_s)) |



More information about the mesa-commit mailing list