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
75fb4752
Commit
75fb4752
authored
Jul 10, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement textureSize.
TRAC #23485 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
c98406ab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
Initialize.cpp
src/compiler/Initialize.cpp
+14
-0
OutputHLSL.cpp
src/compiler/OutputHLSL.cpp
+0
-0
OutputHLSL.h
src/compiler/OutputHLSL.h
+5
-4
No files found.
src/compiler/Initialize.cpp
View file @
75fb4752
...
...
@@ -22,6 +22,7 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI
TType
*
float3
=
new
TType
(
EbtFloat
,
EbpUndefined
,
EvqGlobal
,
3
);
TType
*
float4
=
new
TType
(
EbtFloat
,
EbpUndefined
,
EvqGlobal
,
4
);
TType
*
int1
=
new
TType
(
EbtInt
,
EbpUndefined
,
EvqGlobal
,
1
);
TType
*
int2
=
new
TType
(
EbtInt
,
EbpUndefined
,
EvqGlobal
,
2
);
TType
*
int3
=
new
TType
(
EbtInt
,
EbpUndefined
,
EvqGlobal
,
3
);
TType
*
int4
=
new
TType
(
EbtInt
,
EbpUndefined
,
EvqGlobal
,
4
);
...
...
@@ -459,6 +460,19 @@ void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltI
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
uint4
,
"textureProj"
,
usampler3D
,
"sampler"
,
float4
,
"coord"
,
float1
,
"bias"
);
}
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int2
,
"textureSize"
,
sampler2D
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int2
,
"textureSize"
,
isampler2D
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int2
,
"textureSize"
,
usampler2D
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int3
,
"textureSize"
,
sampler3D
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int3
,
"textureSize"
,
isampler3D
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int3
,
"textureSize"
,
usampler3D
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int2
,
"textureSize"
,
samplerCube
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int2
,
"textureSize"
,
isamplerCube
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int2
,
"textureSize"
,
usamplerCube
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int3
,
"textureSize"
,
sampler2DArray
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int3
,
"textureSize"
,
isampler2DArray
,
"sampler"
,
int1
,
"lod"
);
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
int3
,
"textureSize"
,
usampler2DArray
,
"sampler"
,
int1
,
"lod"
);
if
(
type
==
SH_FRAGMENT_SHADER
)
{
symbolTable
.
insertBuiltIn
(
ESSL3_BUILTINS
,
float1
,
"dFdx"
,
float1
,
"p"
);
...
...
src/compiler/OutputHLSL.cpp
View file @
75fb4752
This diff is collapsed.
Click to expand it.
src/compiler/OutputHLSL.h
View file @
75fb4752
...
...
@@ -96,18 +96,19 @@ class OutputHLSL : public TIntermTraverser
struct
TextureFunction
{
enum
M
ipmap
enum
M
ethod
{
IMPLICIT
,
IMPLICIT
,
// Mipmap LOD determined implicitly (standard lookup)
BIAS
,
LOD
,
LOD0
LOD0
,
SIZE
// textureSize()
};
TBasicType
sampler
;
int
coords
;
bool
proj
;
M
ipmap
mipmap
;
M
ethod
method
;
TString
name
()
const
;
...
...
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