Commit 1fbc2873 by Nicolas Capens

Add textureOffset intrinsics to the symbol table.

BUG=angle:541 Change-Id: Ied96edd073017a507369319a781b8ed23f60790b Reviewed-on: https://chromium-review.googlesource.com/181520Tested-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent b6780326
// //
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -523,6 +523,27 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI ...@@ -523,6 +523,27 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "fwidth", float4); symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "fwidth", float4);
} }
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "textureOffset", sampler2D, float2, int2);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "textureOffset", sampler2D, float2, int2, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "textureOffset", isampler2D, float2, int2);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "textureOffset", isampler2D, float2, int2, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, uint4, "textureOffset", usampler2D, float2, int2);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, uint4, "textureOffset", usampler2D, float2, int2, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "textureOffset", sampler3D, float3, int3);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "textureOffset", sampler3D, float3, int3, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "textureOffset", isampler3D, float3, int3);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "textureOffset", isampler3D, float3, int3, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, uint4, "textureOffset", usampler3D, float3, int3);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, uint4, "textureOffset", usampler3D, float3, int3, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureOffset", sampler2DShadow, float3, int3);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float1, "textureOffset", sampler2DShadow, float3, int3, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "textureOffset", sampler2DArray, float3, int2);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, float4, "textureOffset", sampler2DArray, float3, int2, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "textureOffset", isampler2DArray, float3, int2);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, int4, "textureOffset", isampler2DArray, float3, int2, float1);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, uint4, "textureOffset", usampler2DArray, float3, int2);
symbolTable.insertBuiltIn(ESSL3_BUILTINS, uint4, "textureOffset", usampler2DArray, float3, int2, float1);
// //
// Depth range in window coordinates // Depth range in window coordinates
// //
......
// //
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -293,7 +293,7 @@ public: ...@@ -293,7 +293,7 @@ public:
return insert(level, *constant); return insert(level, *constant);
} }
bool insertBuiltIn(ESymbolLevel level, TType *rvalue, const char *name, TType *ptype1, TType *ptype2 = 0, TType *ptype3 = 0) bool insertBuiltIn(ESymbolLevel level, TType *rvalue, const char *name, TType *ptype1, TType *ptype2 = 0, TType *ptype3 = 0, TType *ptype4 = 0)
{ {
TFunction *function = new TFunction(NewPoolTString(name), *rvalue); TFunction *function = new TFunction(NewPoolTString(name), *rvalue);
...@@ -312,6 +312,12 @@ public: ...@@ -312,6 +312,12 @@ public:
function->addParameter(param3); function->addParameter(param3);
} }
if(ptype4)
{
TParameter param4 = {NULL, ptype4};
function->addParameter(param4);
}
return insert(level, *function); return insert(level, *function);
} }
......
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