summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorOliver McFadden <z3ro.geek@gmail.com>2007-05-25 23:02:57 +0000
committerOliver McFadden <z3ro.geek@gmail.com>2007-05-25 23:02:57 +0000
commit9b727e117e26ef6e5a410bc1e2ad9d33e54603eb (patch)
tree92cfb8352b4a714a591eedbe83acf63750a22337 /src/mesa/drivers
parentf78ddc69a0d2d4a61ad8b97bc3abc46bb45cc0c3 (diff)
r300: Cleaned up t_vir0 and t_vir1 slightly.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h2
-rw-r--r--src/mesa/drivers/dri/r300/r300_emit.c25
2 files changed, 10 insertions, 17 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h
index 01caa61766..4bc73dc862 100644
--- a/src/mesa/drivers/dri/r300/r300_context.h
+++ b/src/mesa/drivers/dri/r300/r300_context.h
@@ -785,7 +785,7 @@ struct r300_fragment_program {
#define AOS_FORMAT_USHORT 0
#define AOS_FORMAT_FLOAT 1
-#define AOS_FORMAT_UBYTE 2
+#define AOS_FORMAT_UNSIGNED_BYTE 2
#define AOS_FORMAT_FLOAT_COLOR 3
#define REG_COORDS 0
diff --git a/src/mesa/drivers/dri/r300/r300_emit.c b/src/mesa/drivers/dri/r300/r300_emit.c
index 605c72f6de..fcf2ae3f08 100644
--- a/src/mesa/drivers/dri/r300/r300_emit.c
+++ b/src/mesa/drivers/dri/r300/r300_emit.c
@@ -243,29 +243,24 @@ static inline GLuint t_vir_pack(GLvector4f ** dt, int *inputs, int i)
static GLuint t_vir0(uint32_t * dst, GLvector4f ** dt, int *inputs,
GLint * tab, GLuint nr)
{
- GLuint i, dw, dwInternel;
+ GLuint i, dw;
for (i = 0; i + 1 < nr; i += 2) {
dw = t_vir_pack(dt, inputs, tab[i]);
- dwInternel = t_vir_pack(dt, inputs, tab[i + 1]);
- dw |= dwInternel << R300_VIR0_HIGH_SHIFT;
-
+ dw |= t_vir_pack(dt, inputs, tab[i + 1]) << R300_VIR0_HIGH_SHIFT;
if (i + 2 == nr) {
- dw |=
- (1 <<
- (R300_VIR0_AOS_STOP_SHIFT + R300_VIR0_HIGH_SHIFT));
+ dw |= (1 << (R300_VIR0_AOS_STOP_SHIFT + R300_VIR0_HIGH_SHIFT));
}
- dst[i >> 1] = dw; /* i / 2 */
+ dst[i >> 1] = dw;
}
if (nr & 1) {
dw = t_vir_pack(dt, inputs, tab[nr - 1]);
dw |= 1 << R300_VIR0_AOS_STOP_SHIFT;
-
dst[nr >> 1] = dw;
}
- return (nr + 1) >> 1; /* (nr + 1) / 2 */
+ return (nr + 1) >> 1;
}
static GLuint t_swizzle(int swizzle[4])
@@ -282,14 +277,12 @@ static GLuint t_vir1(uint32_t * dst, int swizzle[][4], GLuint nr)
for (i = 0; i + 1 < nr; i += 2) {
dst[i >> 1] = t_swizzle(swizzle[i]) | R300_INPUT_ROUTE_ENABLE;
- dst[i >> 1] |=
- (t_swizzle(swizzle[i + 1]) | R300_INPUT_ROUTE_ENABLE)
- << 16;
+ dst[i >> 1] |= (t_swizzle(swizzle[i + 1]) | R300_INPUT_ROUTE_ENABLE) << 16;
}
- if (nr & 1)
- dst[nr >> 1] =
- t_swizzle(swizzle[nr - 1]) | R300_INPUT_ROUTE_ENABLE;
+ if (nr & 1) {
+ dst[nr >> 1] = t_swizzle(swizzle[nr - 1]) | R300_INPUT_ROUTE_ENABLE;
+ }
return (nr + 1) >> 1;
}