зеркало из https://github.com/AvaloniaUI/angle.git
Support isampler throughout the compiler.
TRAC #23359 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
This commit is contained in:
Родитель
d273c27389
Коммит
344e7142ed
|
@ -36,8 +36,8 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
// Version number for shader translation API.
|
||||
// It is incremented everytime the API changes.
|
||||
#define ANGLE_SH_VERSION 115
|
||||
// It is incremented every time the API changes.
|
||||
#define ANGLE_SH_VERSION 116
|
||||
|
||||
//
|
||||
// The names of the following enums have been derived by replacing GL prefix
|
||||
|
@ -115,7 +115,9 @@ typedef enum {
|
|||
SH_SAMPLER_2D = 0x8B5E,
|
||||
SH_SAMPLER_CUBE = 0x8B60,
|
||||
SH_SAMPLER_2D_RECT_ARB = 0x8B63,
|
||||
SH_SAMPLER_EXTERNAL_OES = 0x8D66
|
||||
SH_SAMPLER_EXTERNAL_OES = 0x8D66,
|
||||
SH_INT_SAMPLER_2D = 0x8DCA,
|
||||
SH_INT_SAMPLER_CUBE = 0x8DCC,
|
||||
} ShDataType;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -67,6 +67,8 @@ inline const char* getBasicString(TBasicType t)
|
|||
case EbtSamplerCube: return "samplerCube"; break;
|
||||
case EbtSamplerExternalOES: return "samplerExternalOES"; break;
|
||||
case EbtSampler2DRect: return "sampler2DRect"; break;
|
||||
case EbtISampler2D: return "isampler2D"; break;
|
||||
case EbtISamplerCube: return "isamplerCube"; break;
|
||||
case EbtStruct: return "structure"; break;
|
||||
case EbtInterfaceBlock: return "interface block"; break;
|
||||
default: return "unknown type";
|
||||
|
|
|
@ -432,12 +432,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
|
|||
//
|
||||
// Does the base type allow operation?
|
||||
//
|
||||
switch (node->getBasicType()) {
|
||||
case EbtVoid:
|
||||
case EbtSampler2D:
|
||||
case EbtSamplerCube:
|
||||
return 0;
|
||||
default: break;
|
||||
if (node->getBasicType() == EbtVoid ||
|
||||
IsSampler(node->getBasicType()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -328,16 +328,11 @@ bool TParseContext::lValueErrorCheck(int line, const char* op, TIntermTyped* nod
|
|||
//
|
||||
// Type that can't be written to?
|
||||
//
|
||||
switch (node->getBasicType()) {
|
||||
case EbtSampler2D:
|
||||
case EbtSamplerCube:
|
||||
message = "can't modify a sampler";
|
||||
break;
|
||||
case EbtVoid:
|
||||
if (node->getBasicType() == EbtVoid) {
|
||||
message = "can't modify void";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (IsSampler(node->getBasicType())) {
|
||||
message = "can't modify a sampler";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,6 +50,8 @@ void TType::buildMangledName(TString& mangledName)
|
|||
case EbtBool: mangledName += 'b'; break;
|
||||
case EbtSampler2D: mangledName += "s2"; break;
|
||||
case EbtSamplerCube: mangledName += "sC"; break;
|
||||
case EbtISampler2D: mangledName += "is2"; break;
|
||||
case EbtISamplerCube: mangledName += "isC"; break;
|
||||
case EbtStruct:
|
||||
mangledName += "struct-";
|
||||
if (typeName)
|
||||
|
|
|
@ -99,6 +99,8 @@ static ShDataType getVariableDataType(const TType& type)
|
|||
case EbtSamplerCube: return SH_SAMPLER_CUBE;
|
||||
case EbtSamplerExternalOES: return SH_SAMPLER_EXTERNAL_OES;
|
||||
case EbtSampler2DRect: return SH_SAMPLER_2D_RECT_ARB;
|
||||
case EbtISampler2D: return SH_INT_SAMPLER_2D;
|
||||
case EbtISamplerCube: return SH_INT_SAMPLER_CUBE;
|
||||
default: UNREACHABLE();
|
||||
}
|
||||
return SH_NONE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче