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
354ed2d1
Commit
354ed2d1
authored
Jul 11, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compact sampler type translation.
TRAC #23394 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
8f80e024
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
48 deletions
+20
-48
OutputHLSL.cpp
src/compiler/OutputHLSL.cpp
+20
-48
No files found.
src/compiler/OutputHLSL.cpp
View file @
354ed2d1
...
...
@@ -3803,55 +3803,27 @@ GLenum OutputHLSL::glVariableType(const TType &type)
}
else
UNREACHABLE
();
}
else
if
(
type
.
getBasicType
()
==
EbtSampler2D
)
{
return
GL_SAMPLER_2D
;
}
else
if
(
type
.
getBasicType
()
==
EbtSampler3D
)
{
return
GL_SAMPLER_3D
;
}
else
if
(
type
.
getBasicType
()
==
EbtSamplerCube
)
{
return
GL_SAMPLER_CUBE
;
}
else
if
(
type
.
getBasicType
()
==
EbtSampler2DArray
)
{
return
GL_SAMPLER_2D_ARRAY
;
}
else
if
(
type
.
getBasicType
()
==
EbtISampler2D
)
{
return
GL_INT_SAMPLER_2D
;
}
else
if
(
type
.
getBasicType
()
==
EbtISampler3D
)
{
return
GL_INT_SAMPLER_3D
;
}
else
if
(
type
.
getBasicType
()
==
EbtISamplerCube
)
{
return
GL_INT_SAMPLER_CUBE
;
}
else
if
(
type
.
getBasicType
()
==
EbtISampler2DArray
)
{
return
GL_INT_SAMPLER_2D_ARRAY
;
}
else
if
(
type
.
getBasicType
()
==
EbtUSampler2D
)
{
return
GL_UNSIGNED_INT_SAMPLER_2D
;
}
else
if
(
type
.
getBasicType
()
==
EbtUSampler3D
)
{
return
GL_UNSIGNED_INT_SAMPLER_3D
;
}
else
if
(
type
.
getBasicType
()
==
EbtUSamplerCube
)
{
return
GL_UNSIGNED_INT_SAMPLER_CUBE
;
}
else
if
(
type
.
getBasicType
()
==
EbtUSampler2DArray
)
{
return
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
;
switch
(
type
.
getBasicType
())
{
case
EbtSampler2D
:
return
GL_SAMPLER_2D
;
case
EbtSampler3D
:
return
GL_SAMPLER_3D
;
case
EbtSamplerCube
:
return
GL_SAMPLER_CUBE
;
case
EbtSampler2DArray
:
return
GL_SAMPLER_2D_ARRAY
;
case
EbtISampler2D
:
return
GL_INT_SAMPLER_2D
;
case
EbtISampler3D
:
return
GL_INT_SAMPLER_3D
;
case
EbtISamplerCube
:
return
GL_INT_SAMPLER_CUBE
;
case
EbtISampler2DArray
:
return
GL_INT_SAMPLER_2D_ARRAY
;
case
EbtUSampler2D
:
return
GL_UNSIGNED_INT_SAMPLER_2D
;
case
EbtUSampler3D
:
return
GL_UNSIGNED_INT_SAMPLER_3D
;
case
EbtUSamplerCube
:
return
GL_UNSIGNED_INT_SAMPLER_CUBE
;
case
EbtUSampler2DArray
:
return
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
;
case
EbtSampler2DShadow
:
return
GL_SAMPLER_2D_SHADOW
;
case
EbtSamplerCubeShadow
:
return
GL_SAMPLER_CUBE_SHADOW
;
case
EbtSampler2DArrayShadow
:
return
GL_SAMPLER_2D_ARRAY_SHADOW
;
default
:
UNREACHABLE
();
}
else
UNREACHABLE
();
return
GL_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