Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
344e7142
Commit
344e7142
authored
Jun 24, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support isampler throughout the compiler.
TRAC #23359 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
d273c273
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
18 deletions
+19
-18
ShaderLang.h
include/GLSLANG/ShaderLang.h
+5
-3
BaseTypes.h
src/compiler/BaseTypes.h
+2
-0
Intermediate.cpp
src/compiler/Intermediate.cpp
+4
-6
ParseHelper.cpp
src/compiler/ParseHelper.cpp
+4
-9
SymbolTable.cpp
src/compiler/SymbolTable.cpp
+2
-0
VariableInfo.cpp
src/compiler/VariableInfo.cpp
+2
-0
No files found.
include/GLSLANG/ShaderLang.h
View file @
344e7142
...
@@ -36,8 +36,8 @@ extern "C" {
...
@@ -36,8 +36,8 @@ extern "C" {
#endif
#endif
// Version number for shader translation API.
// Version number for shader translation API.
// It is incremented everytime the API changes.
// It is incremented every
time the API changes.
#define ANGLE_SH_VERSION 11
5
#define ANGLE_SH_VERSION 11
6
//
//
// 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
...
@@ -115,7 +115,9 @@ typedef enum {
...
@@ -115,7 +115,9 @@ typedef enum {
SH_SAMPLER_2D
=
0x8B5E
,
SH_SAMPLER_2D
=
0x8B5E
,
SH_SAMPLER_CUBE
=
0x8B60
,
SH_SAMPLER_CUBE
=
0x8B60
,
SH_SAMPLER_2D_RECT_ARB
=
0x8B63
,
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
;
}
ShDataType
;
typedef
enum
{
typedef
enum
{
...
...
src/compiler/BaseTypes.h
View file @
344e7142
...
@@ -67,6 +67,8 @@ inline const char* getBasicString(TBasicType t)
...
@@ -67,6 +67,8 @@ inline const char* getBasicString(TBasicType t)
case
EbtSamplerCube
:
return
"samplerCube"
;
break
;
case
EbtSamplerCube
:
return
"samplerCube"
;
break
;
case
EbtSamplerExternalOES
:
return
"samplerExternalOES"
;
break
;
case
EbtSamplerExternalOES
:
return
"samplerExternalOES"
;
break
;
case
EbtSampler2DRect
:
return
"sampler2DRect"
;
break
;
case
EbtSampler2DRect
:
return
"sampler2DRect"
;
break
;
case
EbtISampler2D
:
return
"isampler2D"
;
break
;
case
EbtISamplerCube
:
return
"isamplerCube"
;
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"
;
...
...
src/compiler/Intermediate.cpp
View file @
344e7142
...
@@ -432,12 +432,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
...
@@ -432,12 +432,10 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
//
//
// Does the base type allow operation?
// Does the base type allow operation?
//
//
switch
(
node
->
getBasicType
())
{
if
(
node
->
getBasicType
()
==
EbtVoid
||
case
EbtVoid
:
IsSampler
(
node
->
getBasicType
()))
case
EbtSampler2D
:
{
case
EbtSamplerCube
:
return
0
;
return
0
;
default
:
break
;
}
}
//
//
...
...
src/compiler/ParseHelper.cpp
View file @
344e7142
...
@@ -328,16 +328,11 @@ bool TParseContext::lValueErrorCheck(int line, const char* op, TIntermTyped* nod
...
@@ -328,16 +328,11 @@ bool TParseContext::lValueErrorCheck(int line, const char* op, TIntermTyped* nod
//
//
// Type that can't be written to?
// Type that can't be written to?
//
//
switch
(
node
->
getBasicType
())
{
if
(
node
->
getBasicType
()
==
EbtVoid
)
{
case
EbtSampler2D
:
case
EbtSamplerCube
:
message
=
"can't modify a sampler"
;
break
;
case
EbtVoid
:
message
=
"can't modify void"
;
message
=
"can't modify void"
;
break
;
}
default
:
if
(
IsSampler
(
node
->
getBasicType
()))
{
break
;
message
=
"can't modify a sampler"
;
}
}
}
}
...
...
src/compiler/SymbolTable.cpp
View file @
344e7142
...
@@ -50,6 +50,8 @@ void TType::buildMangledName(TString& mangledName)
...
@@ -50,6 +50,8 @@ void TType::buildMangledName(TString& mangledName)
case
EbtBool
:
mangledName
+=
'b'
;
break
;
case
EbtBool
:
mangledName
+=
'b'
;
break
;
case
EbtSampler2D
:
mangledName
+=
"s2"
;
break
;
case
EbtSampler2D
:
mangledName
+=
"s2"
;
break
;
case
EbtSamplerCube
:
mangledName
+=
"sC"
;
break
;
case
EbtSamplerCube
:
mangledName
+=
"sC"
;
break
;
case
EbtISampler2D
:
mangledName
+=
"is2"
;
break
;
case
EbtISamplerCube
:
mangledName
+=
"isC"
;
break
;
case
EbtStruct
:
case
EbtStruct
:
mangledName
+=
"struct-"
;
mangledName
+=
"struct-"
;
if
(
typeName
)
if
(
typeName
)
...
...
src/compiler/VariableInfo.cpp
View file @
344e7142
...
@@ -99,6 +99,8 @@ static ShDataType getVariableDataType(const TType& type)
...
@@ -99,6 +99,8 @@ static ShDataType getVariableDataType(const TType& type)
case
EbtSamplerCube
:
return
SH_SAMPLER_CUBE
;
case
EbtSamplerCube
:
return
SH_SAMPLER_CUBE
;
case
EbtSamplerExternalOES
:
return
SH_SAMPLER_EXTERNAL_OES
;
case
EbtSamplerExternalOES
:
return
SH_SAMPLER_EXTERNAL_OES
;
case
EbtSampler2DRect
:
return
SH_SAMPLER_2D_RECT_ARB
;
case
EbtSampler2DRect
:
return
SH_SAMPLER_2D_RECT_ARB
;
case
EbtISampler2D
:
return
SH_INT_SAMPLER_2D
;
case
EbtISamplerCube
:
return
SH_INT_SAMPLER_CUBE
;
default:
UNREACHABLE
();
default:
UNREACHABLE
();
}
}
return
SH_NONE
;
return
SH_NONE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment