Commit 907700d1 by Nicolas Capens

Move loop register usage to relative addressing.

Bug 22652760 Change-Id: I50c6935bac91f586953b0dd2abd0d2a859468ee1 Reviewed-on: https://swiftshader-review.googlesource.com/4579Tested-by: 's avatarNicolas Capens <capn@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent d2fad90b
...@@ -754,12 +754,6 @@ namespace sw ...@@ -754,12 +754,6 @@ namespace sw
{ {
reg = v[i]; reg = v[i];
} }
else if(src.rel.type == Shader::PARAMETER_LOOP)
{
Int aL = this->aL[loopDepth];
reg = v[i + aL];
}
else else
{ {
Int a = relativeAddress(src); Int a = relativeAddress(src);
...@@ -947,6 +941,10 @@ namespace sw ...@@ -947,6 +941,10 @@ namespace sw
return Extract(c, 0) * var.rel.scale; return Extract(c, 0) * var.rel.scale;
} }
else if(var.rel.type == Shader::PARAMETER_LOOP)
{
return aL[loopDepth];
}
else ASSERT(false); else ASSERT(false);
return 0; return 0;
......
...@@ -401,15 +401,6 @@ namespace sw ...@@ -401,15 +401,6 @@ namespace sw
if(dst.z) pDst.z = r.o[dst.index].z; if(dst.z) pDst.z = r.o[dst.index].z;
if(dst.w) pDst.w = r.o[dst.index].w; if(dst.w) pDst.w = r.o[dst.index].w;
} }
else if(dst.rel.type == Shader::PARAMETER_LOOP)
{
Int aL = r.aL[r.loopDepth];
if(dst.x) pDst.x = r.o[dst.index + aL].x;
if(dst.y) pDst.y = r.o[dst.index + aL].y;
if(dst.z) pDst.z = r.o[dst.index + aL].z;
if(dst.w) pDst.w = r.o[dst.index + aL].w;
}
else else
{ {
Int a = relativeAddress(dst); Int a = relativeAddress(dst);
...@@ -541,15 +532,6 @@ namespace sw ...@@ -541,15 +532,6 @@ namespace sw
if(dst.z) r.o[dst.index].z = d.z; if(dst.z) r.o[dst.index].z = d.z;
if(dst.w) r.o[dst.index].w = d.w; if(dst.w) r.o[dst.index].w = d.w;
} }
else if(dst.rel.type == Shader::PARAMETER_LOOP)
{
Int aL = r.aL[r.loopDepth];
if(dst.x) r.o[dst.index + aL].x = d.x;
if(dst.y) r.o[dst.index + aL].y = d.y;
if(dst.z) r.o[dst.index + aL].z = d.z;
if(dst.w) r.o[dst.index + aL].w = d.w;
}
else else
{ {
Int a = relativeAddress(dst); Int a = relativeAddress(dst);
...@@ -876,6 +858,10 @@ namespace sw ...@@ -876,6 +858,10 @@ namespace sw
return Extract(c, 0) * var.rel.scale; return Extract(c, 0) * var.rel.scale;
} }
else if(var.rel.type == Shader::PARAMETER_LOOP)
{
return r.aL[r.loopDepth];
}
else ASSERT(false); else ASSERT(false);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment