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
cb127d3d
Commit
cb127d3d
authored
Jul 15, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create the HLSL shadow texture function.
TRAC #23394 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
354ed2d1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
0 deletions
+49
-0
utilities.cpp
src/common/utilities.cpp
+15
-0
BaseTypes.h
src/compiler/BaseTypes.h
+30
-0
OutputHLSL.cpp
src/compiler/OutputHLSL.cpp
+0
-0
OutputHLSL.h
src/compiler/OutputHLSL.h
+1
-0
ProgramBinary.cpp
src/libGLESv2/ProgramBinary.cpp
+3
-0
No files found.
src/common/utilities.cpp
View file @
cb127d3d
...
...
@@ -33,6 +33,9 @@ int UniformComponentCount(GLenum type)
case
GL_UNSIGNED_INT_SAMPLER_3D
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
case
GL_SAMPLER_2D_SHADOW
:
case
GL_SAMPLER_CUBE_SHADOW
:
case
GL_SAMPLER_2D_ARRAY_SHADOW
:
case
GL_UNSIGNED_INT
:
return
1
;
case
GL_BOOL_VEC2
:
...
...
@@ -107,6 +110,9 @@ GLenum UniformComponentType(GLenum type)
case
GL_UNSIGNED_INT_SAMPLER_3D
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
case
GL_SAMPLER_2D_SHADOW
:
case
GL_SAMPLER_CUBE_SHADOW
:
case
GL_SAMPLER_2D_ARRAY_SHADOW
:
case
GL_INT_VEC2
:
case
GL_INT_VEC3
:
case
GL_INT_VEC4
:
...
...
@@ -209,6 +215,9 @@ int VariableRowCount(GLenum type)
case
GL_UNSIGNED_INT_SAMPLER_3D
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
case
GL_SAMPLER_2D_SHADOW
:
case
GL_SAMPLER_CUBE_SHADOW
:
case
GL_SAMPLER_2D_ARRAY_SHADOW
:
return
1
;
case
GL_FLOAT_MAT2
:
case
GL_FLOAT_MAT3x2
:
...
...
@@ -251,6 +260,9 @@ int VariableColumnCount(GLenum type)
case
GL_UNSIGNED_INT_SAMPLER_3D
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
case
GL_SAMPLER_2D_SHADOW
:
case
GL_SAMPLER_CUBE_SHADOW
:
case
GL_SAMPLER_2D_ARRAY_SHADOW
:
return
1
;
case
GL_BOOL_VEC2
:
case
GL_FLOAT_VEC2
:
...
...
@@ -299,6 +311,9 @@ bool IsSampler(GLenum type)
case
GL_UNSIGNED_INT_SAMPLER_3D
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
case
GL_SAMPLER_2D_SHADOW
:
case
GL_SAMPLER_CUBE_SHADOW
:
case
GL_SAMPLER_2D_ARRAY_SHADOW
:
return
true
;
}
...
...
src/compiler/BaseTypes.h
View file @
cb127d3d
...
...
@@ -254,6 +254,36 @@ inline bool IsSamplerArray(TBasicType type)
return
false
;
}
inline
bool
IsShadowSampler
(
TBasicType
type
)
{
switch
(
type
)
{
case
EbtSampler2DShadow
:
case
EbtSamplerCubeShadow
:
case
EbtSampler2DArrayShadow
:
return
true
;
case
EbtISampler2D
:
case
EbtISampler3D
:
case
EbtISamplerCube
:
case
EbtISampler2DArray
:
case
EbtUSampler2D
:
case
EbtUSampler3D
:
case
EbtUSamplerCube
:
case
EbtUSampler2DArray
:
case
EbtSampler2D
:
case
EbtSampler3D
:
case
EbtSamplerCube
:
case
EbtSamplerExternalOES
:
case
EbtSampler2DRect
:
case
EbtSampler2DArray
:
return
false
;
default:
assert
(
!
IsSampler
(
type
));
}
return
false
;
}
//
// Qualifiers and built-ins. These are mainly used to see what can be read
// or written, and by the machine dependent translator to know which registers
...
...
src/compiler/OutputHLSL.cpp
View file @
cb127d3d
This diff is collapsed.
Click to expand it.
src/compiler/OutputHLSL.h
View file @
cb127d3d
...
...
@@ -39,6 +39,7 @@ class OutputHLSL : public TIntermTraverser
TString
typeString
(
const
TType
&
type
);
TString
textureString
(
const
TType
&
type
);
TString
samplerString
(
const
TType
&
type
);
TString
interpolationString
(
TQualifier
qualifier
);
TString
structureString
(
const
TStructure
&
structure
,
bool
useHLSLRowMajorPacking
,
bool
useStd140Packing
);
TString
structureTypeName
(
const
TStructure
&
structure
,
bool
useHLSLRowMajorPacking
,
bool
useStd140Packing
);
...
...
src/libGLESv2/ProgramBinary.cpp
View file @
cb127d3d
...
...
@@ -2267,12 +2267,14 @@ TextureType ProgramBinary::getTextureType(GLenum samplerType, InfoLog &infoLog)
case
GL_SAMPLER_2D
:
case
GL_INT_SAMPLER_2D
:
case
GL_UNSIGNED_INT_SAMPLER_2D
:
case
GL_SAMPLER_2D_SHADOW
:
return
TEXTURE_2D
;
case
GL_SAMPLER_3D
:
case
GL_INT_SAMPLER_3D
:
case
GL_UNSIGNED_INT_SAMPLER_3D
:
return
TEXTURE_3D
;
case
GL_SAMPLER_CUBE
:
case
GL_SAMPLER_CUBE_SHADOW
:
return
TEXTURE_CUBE
;
case
GL_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
...
...
@@ -2282,6 +2284,7 @@ TextureType ProgramBinary::getTextureType(GLenum samplerType, InfoLog &infoLog)
case
GL_SAMPLER_2D_ARRAY
:
case
GL_INT_SAMPLER_2D_ARRAY
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
case
GL_SAMPLER_2D_ARRAY_SHADOW
:
return
TEXTURE_2D_ARRAY
;
default
:
UNREACHABLE
();
}
...
...
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