Commit 2ffe0bbe by Nicolas Capens Committed by Shannon Woods

Support usampler throughout the compiler.

TRAC #23360 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent 9e3a3f43
...@@ -37,7 +37,7 @@ extern "C" { ...@@ -37,7 +37,7 @@ extern "C" {
// Version number for shader translation API. // Version number for shader translation API.
// It is incremented every time the API changes. // It is incremented every time the API changes.
#define ANGLE_SH_VERSION 116 #define ANGLE_SH_VERSION 117
// //
// The names of the following enums have been derived by replacing GL prefix // The names of the following enums have been derived by replacing GL prefix
...@@ -118,6 +118,8 @@ typedef enum { ...@@ -118,6 +118,8 @@ typedef enum {
SH_SAMPLER_EXTERNAL_OES = 0x8D66, SH_SAMPLER_EXTERNAL_OES = 0x8D66,
SH_INT_SAMPLER_2D = 0x8DCA, SH_INT_SAMPLER_2D = 0x8DCA,
SH_INT_SAMPLER_CUBE = 0x8DCC, SH_INT_SAMPLER_CUBE = 0x8DCC,
SH_UNSIGNED_INT_SAMPLER_2D = 0x8DD2,
SH_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4,
} ShDataType; } ShDataType;
typedef enum { typedef enum {
......
...@@ -71,6 +71,8 @@ inline const char* getBasicString(TBasicType t) ...@@ -71,6 +71,8 @@ inline const char* getBasicString(TBasicType t)
case EbtSampler2DRect: return "sampler2DRect"; break; case EbtSampler2DRect: return "sampler2DRect"; break;
case EbtISampler2D: return "isampler2D"; break; case EbtISampler2D: return "isampler2D"; break;
case EbtISamplerCube: return "isamplerCube"; break; case EbtISamplerCube: return "isamplerCube"; break;
case EbtUSampler2D: return "usampler2D"; break;
case EbtUSamplerCube: return "usamplerCube"; break;
case EbtStruct: return "structure"; break; case EbtStruct: return "structure"; break;
case EbtInterfaceBlock: return "interface block"; break; case EbtInterfaceBlock: return "interface block"; break;
default: return "unknown type"; default: return "unknown type";
......
...@@ -52,6 +52,8 @@ void TType::buildMangledName(TString& mangledName) ...@@ -52,6 +52,8 @@ void TType::buildMangledName(TString& mangledName)
case EbtSamplerCube: mangledName += "sC"; break; case EbtSamplerCube: mangledName += "sC"; break;
case EbtISampler2D: mangledName += "is2"; break; case EbtISampler2D: mangledName += "is2"; break;
case EbtISamplerCube: mangledName += "isC"; break; case EbtISamplerCube: mangledName += "isC"; break;
case EbtUSampler2D: mangledName += "us2"; break;
case EbtUSamplerCube: mangledName += "usC"; break;
case EbtStruct: case EbtStruct:
mangledName += "struct-"; mangledName += "struct-";
if (typeName) if (typeName)
......
...@@ -101,6 +101,8 @@ static ShDataType getVariableDataType(const TType& type) ...@@ -101,6 +101,8 @@ static ShDataType getVariableDataType(const TType& type)
case EbtSampler2DRect: return SH_SAMPLER_2D_RECT_ARB; case EbtSampler2DRect: return SH_SAMPLER_2D_RECT_ARB;
case EbtISampler2D: return SH_INT_SAMPLER_2D; case EbtISampler2D: return SH_INT_SAMPLER_2D;
case EbtISamplerCube: return SH_INT_SAMPLER_CUBE; case EbtISamplerCube: return SH_INT_SAMPLER_CUBE;
case EbtUSampler2D: return SH_UNSIGNED_INT_SAMPLER_2D;
case EbtUSamplerCube: return SH_UNSIGNED_INT_SAMPLER_CUBE;
default: UNREACHABLE(); default: UNREACHABLE();
} }
return SH_NONE; return SH_NONE;
......
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