Commit 04c967a3 by Alexis Hetu Committed by Alexis Hétu

Replaced some hardcoded constants

Replaced values that matched with FRAGMENT_UNIFORM_VECTORS or VERTEX_UNIFORM_VECTORS where appropriate. Change-Id: I64a72b6f30a8a553ea44c268e757ee529cff59fd Reviewed-on: https://swiftshader-review.googlesource.com/3672Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent 7df892df
......@@ -125,14 +125,14 @@ namespace es2
vertexShaderDirty = true;
vertexShaderConstantsFDirty = 0;
for(int i = 0; i < 224; i++)
for(int i = 0; i < FRAGMENT_UNIFORM_VECTORS; i++)
{
float zero[4] = {0, 0, 0, 0};
setPixelShaderConstantF(i, zero, 1);
}
for(int i = 0; i < 256; i++)
for(int i = 0; i < VERTEX_UNIFORM_VECTORS; i++)
{
float zero[4] = {0, 0, 0, 0};
......
......@@ -75,7 +75,7 @@ namespace sw
void PixelProcessor::setFloatConstant(unsigned int index, const float value[4])
{
if(index < 224)
if(index < FRAGMENT_UNIFORM_VECTORS)
{
c[index][0] = value[0];
c[index][1] = value[1];
......
......@@ -79,11 +79,11 @@ namespace sw
{
queries = 0;
vsDirtyConstF = 256 + 1;
vsDirtyConstF = VERTEX_UNIFORM_VECTORS + 1;
vsDirtyConstI = 16;
vsDirtyConstB = 16;
psDirtyConstF = 224;
psDirtyConstF = FRAGMENT_UNIFORM_VECTORS;
psDirtyConstI = 16;
psDirtyConstB = 16;
......@@ -434,7 +434,7 @@ namespace sw
{
data->ff = ff;
draw->vsDirtyConstF = 256 + 1;
draw->vsDirtyConstF = VERTEX_UNIFORM_VECTORS + 1;
draw->vsDirtyConstI = 16;
draw->vsDirtyConstB = 16;
}
......
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