summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/ffvertex_prog.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-17 03:40:28 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-12-17 03:40:28 +0100
commitef9a82038acd73936830671dbe43205c28a2151d (patch)
tree90be2cdd9f48750c18b669ca2ab9553575d9f822 /src/mesa/main/ffvertex_prog.c
parentf84f60446aebaeee8a1df741328cbd4a30dd24ea (diff)
parent743c2327b167b95046e02af4c7b2f7a282a0943d (diff)
downloadexternal_mesa3d-replicant-6.0-old.zip
external_mesa3d-replicant-6.0-old.tar.gz
external_mesa3d-replicant-6.0-old.tar.bz2
Merge remote-tracking branch 'androidx86/marshmallow-x86' into replicant-6.0replicant-6.0-beta-0001replicant-6.0-alpha-0006replicant-6.0-old
Diffstat (limited to 'src/mesa/main/ffvertex_prog.c')
-rw-r--r--src/mesa/main/ffvertex_prog.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c
index d72bc71..18dffc3 100644
--- a/src/mesa/main/ffvertex_prog.c
+++ b/src/mesa/main/ffvertex_prog.c
@@ -293,10 +293,9 @@ struct ureg {
GLuint file:4;
GLint idx:9; /* relative addressing may be negative */
/* sizeof(idx) should == sizeof(prog_src_reg::Index) */
- GLuint abs:1;
GLuint negate:1;
GLuint swz:12;
- GLuint pad:5;
+ GLuint pad:6;
};
@@ -325,7 +324,6 @@ static const struct ureg undef = {
0,
0,
0,
- 0,
0
};
@@ -344,7 +342,6 @@ static struct ureg make_ureg(GLuint file, GLint idx)
struct ureg reg;
reg.file = file;
reg.idx = idx;
- reg.abs = 0;
reg.negate = 0;
reg.swz = SWIZZLE_NOOP;
reg.pad = 0;
@@ -352,15 +349,6 @@ static struct ureg make_ureg(GLuint file, GLint idx)
}
-
-static struct ureg absolute( struct ureg reg )
-{
- reg.abs = 1;
- reg.negate = 0;
- return reg;
-}
-
-
static struct ureg negate( struct ureg reg )
{
reg.negate ^= 1;
@@ -961,7 +949,8 @@ static struct ureg calculate_light_attenuation( struct tnl_program *p,
emit_op2(p, OPCODE_DP3, spot, 0, negate(VPpli), spot_dir_norm);
emit_op2(p, OPCODE_SLT, slt, 0, swizzle1(spot_dir_norm,W), spot);
- emit_op2(p, OPCODE_POW, spot, 0, absolute(spot), swizzle1(attenuation, W));
+ emit_op1(p, OPCODE_ABS, spot, 0, spot);
+ emit_op2(p, OPCODE_POW, spot, 0, spot, swizzle1(attenuation, W));
emit_op2(p, OPCODE_MUL, att, 0, slt, spot);
release_temp(p, spot);