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
43e8ba8a
Commit
43e8ba8a
authored
Jul 09, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support 3D textures.
TRAC #23472 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
6d232bb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
ProgramBinary.cpp
src/libGLESv2/ProgramBinary.cpp
+31
-2
ProgramBinary.h
src/libGLESv2/ProgramBinary.h
+2
-0
No files found.
src/libGLESv2/ProgramBinary.cpp
View file @
43e8ba8a
...
...
@@ -2260,6 +2260,35 @@ int totalRegisterCount(const sh::Uniform &uniform)
return
(
uniform
.
arraySize
>
0
)
?
uniform
.
arraySize
*
registerCount
:
registerCount
;
}
TextureType
ProgramBinary
::
getTextureType
(
GLenum
samplerType
,
InfoLog
&
infoLog
)
{
switch
(
samplerType
)
{
case
GL_SAMPLER_2D
:
case
GL_INT_SAMPLER_2D
:
case
GL_UNSIGNED_INT_SAMPLER_2D
:
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
:
return
TEXTURE_CUBE
;
case
GL_INT_SAMPLER_CUBE
:
case
GL_UNSIGNED_INT_SAMPLER_CUBE
:
//UNIMPLEMENTED();
infoLog
.
append
(
"Integer cube texture sampling is currently not supported by ANGLE and returns a black color."
);
return
TEXTURE_CUBE
;
case
GL_SAMPLER_2D_ARRAY
:
case
GL_INT_SAMPLER_2D_ARRAY
:
case
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY
:
return
TEXTURE_2D_ARRAY
;
default
:
UNREACHABLE
();
}
return
TEXTURE_2D
;
}
bool
ProgramBinary
::
defineUniform
(
GLenum
shader
,
const
sh
::
Uniform
&
constant
,
InfoLog
&
infoLog
)
{
if
(
!
constant
.
fields
.
empty
())
...
...
@@ -2317,7 +2346,7 @@ bool ProgramBinary::defineUniform(GLenum shader, const sh::Uniform &constant, In
if
(
samplerIndex
<
mRenderer
->
getMaxVertexTextureImageUnits
())
{
mSamplersVS
[
samplerIndex
].
active
=
true
;
mSamplersVS
[
samplerIndex
].
textureType
=
(
constant
.
type
==
GL_SAMPLER_CUBE
)
?
TEXTURE_CUBE
:
TEXTURE_2D
;
mSamplersVS
[
samplerIndex
].
textureType
=
getTextureType
(
constant
.
type
,
infoLog
)
;
mSamplersVS
[
samplerIndex
].
logicalTextureUnit
=
0
;
mUsedVertexSamplerRange
=
std
::
max
(
samplerIndex
+
1
,
mUsedVertexSamplerRange
);
}
...
...
@@ -2332,7 +2361,7 @@ bool ProgramBinary::defineUniform(GLenum shader, const sh::Uniform &constant, In
if
(
samplerIndex
<
MAX_TEXTURE_IMAGE_UNITS
)
{
mSamplersPS
[
samplerIndex
].
active
=
true
;
mSamplersPS
[
samplerIndex
].
textureType
=
(
constant
.
type
==
GL_SAMPLER_CUBE
)
?
TEXTURE_CUBE
:
TEXTURE_2D
;
mSamplersPS
[
samplerIndex
].
textureType
=
getTextureType
(
constant
.
type
,
infoLog
)
;
mSamplersPS
[
samplerIndex
].
logicalTextureUnit
=
0
;
mUsedPixelSamplerRange
=
std
::
max
(
samplerIndex
+
1
,
mUsedPixelSamplerRange
);
}
...
...
src/libGLESv2/ProgramBinary.h
View file @
43e8ba8a
...
...
@@ -180,6 +180,8 @@ class ProgramBinary : public RefCountObject
template
<
typename
T
>
bool
getUniformv
(
GLint
location
,
GLsizei
*
bufSize
,
T
*
params
,
GLenum
uniformType
);
static
TextureType
getTextureType
(
GLenum
samplerType
,
InfoLog
&
infoLog
);
rx
::
Renderer
*
const
mRenderer
;
rx
::
ShaderExecutable
*
mPixelExecutable
;
...
...
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