Initialize some variables.
This commit is contained in:
@@ -134,6 +134,8 @@ union instruction {
|
|||||||
GLuint dword;
|
GLuint dword;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define RSW_NOOP ((0<<0) | (1<<2) | (2<<4) | (3<<6))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct compilation {
|
struct compilation {
|
||||||
@@ -894,7 +896,7 @@ static struct reg cvp_emit_arg( struct compilation *cp,
|
|||||||
/* Emit any necessary swizzling.
|
/* Emit any necessary swizzling.
|
||||||
*/
|
*/
|
||||||
rsw.dword = 0;
|
rsw.dword = 0;
|
||||||
rsw.rsw.neg = src->Negate ? 1 : 0;
|
rsw.rsw.neg = src->Negate ? WRITEMASK_XYZW : 0;
|
||||||
rsw.rsw.swz = ((GET_SWZ(src->Swizzle, 0) << 0) |
|
rsw.rsw.swz = ((GET_SWZ(src->Swizzle, 0) << 0) |
|
||||||
(GET_SWZ(src->Swizzle, 1) << 2) |
|
(GET_SWZ(src->Swizzle, 1) << 2) |
|
||||||
(GET_SWZ(src->Swizzle, 2) << 4) |
|
(GET_SWZ(src->Swizzle, 2) << 4) |
|
||||||
@@ -902,10 +904,7 @@ static struct reg cvp_emit_arg( struct compilation *cp,
|
|||||||
|
|
||||||
noop.dword = 0;
|
noop.dword = 0;
|
||||||
noop.rsw.neg = 0;
|
noop.rsw.neg = 0;
|
||||||
noop.rsw.swz = ((0<<0) |
|
noop.rsw.swz = RSW_NOOP;
|
||||||
(1<<2) |
|
|
||||||
(2<<4) |
|
|
||||||
(3<<6));
|
|
||||||
|
|
||||||
if (rsw.dword != noop.dword) {
|
if (rsw.dword != noop.dword) {
|
||||||
union instruction *op = cvp_next_instruction(cp);
|
union instruction *op = cvp_next_instruction(cp);
|
||||||
@@ -960,8 +959,6 @@ static GLuint cvp_choose_result( struct compilation *cp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RSW_NOOP ((0<<0) | (1<<2) | (2<<4) | (3<<6))
|
|
||||||
|
|
||||||
static struct reg cvp_emit_rsw( struct compilation *cp,
|
static struct reg cvp_emit_rsw( struct compilation *cp,
|
||||||
GLuint dst,
|
GLuint dst,
|
||||||
struct reg src,
|
struct reg src,
|
||||||
@@ -1012,6 +1009,8 @@ static void cvp_emit_inst( struct compilation *cp,
|
|||||||
struct reg reg[3];
|
struct reg reg[3];
|
||||||
GLuint result, i;
|
GLuint result, i;
|
||||||
|
|
||||||
|
assert(sizeof(*op) == sizeof(GLuint));
|
||||||
|
|
||||||
/* Need to handle SWZ, ARL specially.
|
/* Need to handle SWZ, ARL specially.
|
||||||
*/
|
*/
|
||||||
switch (inst->Opcode) {
|
switch (inst->Opcode) {
|
||||||
@@ -1050,8 +1049,8 @@ static void cvp_emit_inst( struct compilation *cp,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VP_OPCODE_SWZ: {
|
case VP_OPCODE_SWZ: {
|
||||||
GLuint swz0, swz1;
|
GLuint swz0 = 0, swz1 = 0;
|
||||||
GLuint neg0, neg1;
|
GLuint neg0 = 0, neg1 = 0;
|
||||||
GLuint mask = 0;
|
GLuint mask = 0;
|
||||||
|
|
||||||
/* Translate 3-bit-per-element swizzle into two 2-bit swizzles,
|
/* Translate 3-bit-per-element swizzle into two 2-bit swizzles,
|
||||||
|
Reference in New Issue
Block a user