Commit e72595b4 by Jamie Madill Committed by Commit Bot

Rename EOpFaceForward to EOpFaceforward.

This mirrors the spec naming and makes auto-gen a little easier. BUG=chromium:697758 Change-Id: I9bcbc2c874b9a93a6d542aedf2b239f01ee708ce Reviewed-on: https://chromium-review.googlesource.com/526393Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent d04908bc
...@@ -188,7 +188,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu) ...@@ -188,7 +188,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu)
"}\n" "}\n"
"\n"); "\n");
emu->addEmulatedFunction(EOpFaceForward, float1, float1, float1, emu->addEmulatedFunction(EOpFaceforward, float1, float1, float1,
"float webgl_faceforward_emu(float N, float I, float Nref)\n" "float webgl_faceforward_emu(float N, float I, float Nref)\n"
"{\n" "{\n"
" if(dot(Nref, I) >= 0)\n" " if(dot(Nref, I) >= 0)\n"
...@@ -201,7 +201,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu) ...@@ -201,7 +201,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu)
" }\n" " }\n"
"}\n" "}\n"
"\n"); "\n");
emu->addEmulatedFunction(EOpFaceForward, float2, float2, float2, emu->addEmulatedFunction(EOpFaceforward, float2, float2, float2,
"float2 webgl_faceforward_emu(float2 N, float2 I, float2 Nref)\n" "float2 webgl_faceforward_emu(float2 N, float2 I, float2 Nref)\n"
"{\n" "{\n"
" if(dot(Nref, I) >= 0)\n" " if(dot(Nref, I) >= 0)\n"
...@@ -214,7 +214,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu) ...@@ -214,7 +214,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu)
" }\n" " }\n"
"}\n" "}\n"
"\n"); "\n");
emu->addEmulatedFunction(EOpFaceForward, float3, float3, float3, emu->addEmulatedFunction(EOpFaceforward, float3, float3, float3,
"float3 webgl_faceforward_emu(float3 N, float3 I, float3 Nref)\n" "float3 webgl_faceforward_emu(float3 N, float3 I, float3 Nref)\n"
"{\n" "{\n"
" if(dot(Nref, I) >= 0)\n" " if(dot(Nref, I) >= 0)\n"
...@@ -227,7 +227,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu) ...@@ -227,7 +227,7 @@ void InitBuiltInFunctionEmulatorForHLSL(BuiltInFunctionEmulator *emu)
" }\n" " }\n"
"}\n" "}\n"
"\n"); "\n");
emu->addEmulatedFunction(EOpFaceForward, float4, float4, float4, emu->addEmulatedFunction(EOpFaceforward, float4, float4, float4,
"float4 webgl_faceforward_emu(float4 N, float4 I, float4 Nref)\n" "float4 webgl_faceforward_emu(float4 N, float4 I, float4 Nref)\n"
"{\n" "{\n"
" if(dot(Nref, I) >= 0)\n" " if(dot(Nref, I) >= 0)\n"
......
...@@ -145,7 +145,7 @@ void InsertBuiltInFunctions(sh::GLenum type, ...@@ -145,7 +145,7 @@ void InsertBuiltInFunctions(sh::GLenum type,
symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpDot, float1, genType, genType); symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpDot, float1, genType, genType);
symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpCross, float3, float3, float3); symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpCross, float3, float3, float3);
symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpNormalize, genType, genType); symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpNormalize, genType, genType);
symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpFaceForward, genType, genType, genType, symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpFaceforward, genType, genType, genType,
genType); genType);
symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpReflect, genType, genType, genType); symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpReflect, genType, genType, genType);
symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpRefract, genType, genType, genType, float1); symbolTable.insertBuiltInOp(COMMON_BUILTINS, EOpRefract, genType, genType, genType, float1);
......
...@@ -3150,7 +3150,7 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg ...@@ -3150,7 +3150,7 @@ TConstantUnion *TIntermConstantUnion::FoldAggregateBuiltIn(TIntermAggregate *agg
break; break;
} }
case EOpFaceForward: case EOpFaceforward:
{ {
ASSERT(basicType == EbtFloat); ASSERT(basicType == EbtFloat);
// genType faceforward(genType N, genType I, genType Nref) : // genType faceforward(genType N, genType I, genType Nref) :
......
...@@ -285,7 +285,7 @@ TIntermTyped *TIntermediate::foldAggregateBuiltIn(TIntermAggregate *aggregate, ...@@ -285,7 +285,7 @@ TIntermTyped *TIntermediate::foldAggregateBuiltIn(TIntermAggregate *aggregate,
case EOpDistance: case EOpDistance:
case EOpDot: case EOpDot:
case EOpCross: case EOpCross:
case EOpFaceForward: case EOpFaceforward:
case EOpReflect: case EOpReflect:
case EOpRefract: case EOpRefract:
case EOpBitfieldExtract: case EOpBitfieldExtract:
......
...@@ -234,7 +234,7 @@ const char *GetOperatorString(TOperator op) ...@@ -234,7 +234,7 @@ const char *GetOperatorString(TOperator op)
return "cross"; return "cross";
case EOpNormalize: case EOpNormalize:
return "normalize"; return "normalize";
case EOpFaceForward: case EOpFaceforward:
return "faceforward"; return "faceforward";
case EOpReflect: case EOpReflect:
return "reflect"; return "reflect";
......
...@@ -163,7 +163,7 @@ enum TOperator ...@@ -163,7 +163,7 @@ enum TOperator
EOpDot, EOpDot,
EOpCross, EOpCross,
EOpNormalize, EOpNormalize,
EOpFaceForward, EOpFaceforward,
EOpReflect, EOpReflect,
EOpRefract, EOpRefract,
......
...@@ -987,7 +987,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -987,7 +987,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate *node)
case EOpDistance: case EOpDistance:
case EOpDot: case EOpDot:
case EOpCross: case EOpCross:
case EOpFaceForward: case EOpFaceforward:
case EOpReflect: case EOpReflect:
case EOpRefract: case EOpRefract:
case EOpMulMatrixComponentWise: case EOpMulMatrixComponentWise:
......
...@@ -1969,7 +1969,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node) ...@@ -1969,7 +1969,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
case EOpCross: case EOpCross:
outputTriplet(out, visit, "cross(", ", ", ")"); outputTriplet(out, visit, "cross(", ", ", ")");
break; break;
case EOpFaceForward: case EOpFaceforward:
ASSERT(node->getUseEmulatedFunction()); ASSERT(node->getUseEmulatedFunction());
writeEmulatedFunctionTriplet(out, visit, node->getOp()); writeEmulatedFunctionTriplet(out, visit, node->getOp());
break; break;
......
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