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
0e7c2fd2
Commit
0e7c2fd2
authored
Jun 12, 2013
by
Geoff Lang
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow depth textures to be used as destinations of glCopy*Image*.
TRAC #23262 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang
parent
0ef98739
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
libGLESv2.cpp
src/libGLESv2/libGLESv2.cpp
+10
-0
No files found.
src/libGLESv2/libGLESv2.cpp
View file @
0e7c2fd2
...
@@ -1096,6 +1096,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
...
@@ -1096,6 +1096,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
gl
::
Texture
*
texture
=
NULL
;
gl
::
Texture
*
texture
=
NULL
;
GLenum
textureInternalFormat
=
GL_NONE
;
GLenum
textureInternalFormat
=
GL_NONE
;
bool
textureCompressed
=
false
;
bool
textureCompressed
=
false
;
bool
textureIsDepth
=
false
;
GLint
textureLevelWidth
=
0
;
GLint
textureLevelWidth
=
0
;
GLint
textureLevelHeight
=
0
;
GLint
textureLevelHeight
=
0
;
GLint
textureLevelDepth
=
0
;
GLint
textureLevelDepth
=
0
;
...
@@ -1108,6 +1109,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
...
@@ -1108,6 +1109,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
{
{
textureInternalFormat
=
texture2d
->
getInternalFormat
(
level
);
textureInternalFormat
=
texture2d
->
getInternalFormat
(
level
);
textureCompressed
=
texture2d
->
isCompressed
(
level
);
textureCompressed
=
texture2d
->
isCompressed
(
level
);
textureIsDepth
=
texture2d
->
isDepth
(
level
);
textureLevelWidth
=
texture2d
->
getWidth
(
level
);
textureLevelWidth
=
texture2d
->
getWidth
(
level
);
textureLevelHeight
=
texture2d
->
getHeight
(
level
);
textureLevelHeight
=
texture2d
->
getHeight
(
level
);
textureLevelDepth
=
1
;
textureLevelDepth
=
1
;
...
@@ -1128,6 +1130,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
...
@@ -1128,6 +1130,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
{
{
textureInternalFormat
=
textureCube
->
getInternalFormat
(
target
,
level
);
textureInternalFormat
=
textureCube
->
getInternalFormat
(
target
,
level
);
textureCompressed
=
textureCube
->
isCompressed
(
target
,
level
);
textureCompressed
=
textureCube
->
isCompressed
(
target
,
level
);
textureIsDepth
=
false
;
textureLevelWidth
=
textureCube
->
getWidth
(
target
,
level
);
textureLevelWidth
=
textureCube
->
getWidth
(
target
,
level
);
textureLevelHeight
=
textureCube
->
getHeight
(
target
,
level
);
textureLevelHeight
=
textureCube
->
getHeight
(
target
,
level
);
textureLevelDepth
=
1
;
textureLevelDepth
=
1
;
...
@@ -1143,6 +1146,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
...
@@ -1143,6 +1146,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
{
{
textureInternalFormat
=
texture2dArray
->
getInternalFormat
(
level
);
textureInternalFormat
=
texture2dArray
->
getInternalFormat
(
level
);
textureCompressed
=
texture2dArray
->
isCompressed
(
level
);
textureCompressed
=
texture2dArray
->
isCompressed
(
level
);
textureIsDepth
=
texture2dArray
->
isDepth
(
level
);
textureLevelWidth
=
texture2dArray
->
getWidth
(
level
);
textureLevelWidth
=
texture2dArray
->
getWidth
(
level
);
textureLevelHeight
=
texture2dArray
->
getHeight
(
level
);
textureLevelHeight
=
texture2dArray
->
getHeight
(
level
);
textureLevelDepth
=
texture2dArray
->
getDepth
(
level
);
textureLevelDepth
=
texture2dArray
->
getDepth
(
level
);
...
@@ -1158,6 +1162,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
...
@@ -1158,6 +1162,7 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
{
{
textureInternalFormat
=
texture3d
->
getInternalFormat
(
level
);
textureInternalFormat
=
texture3d
->
getInternalFormat
(
level
);
textureCompressed
=
texture3d
->
isCompressed
(
level
);
textureCompressed
=
texture3d
->
isCompressed
(
level
);
textureIsDepth
=
texture3d
->
isDepth
(
level
);
textureLevelWidth
=
texture3d
->
getWidth
(
level
);
textureLevelWidth
=
texture3d
->
getWidth
(
level
);
textureLevelHeight
=
texture3d
->
getHeight
(
level
);
textureLevelHeight
=
texture3d
->
getHeight
(
level
);
textureLevelDepth
=
texture3d
->
getDepth
(
level
);
textureLevelDepth
=
texture3d
->
getDepth
(
level
);
...
@@ -1180,6 +1185,11 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
...
@@ -1180,6 +1185,11 @@ bool validateES3CopyTexImageParameters(gl::Context *context, GLenum target, GLin
return
gl
::
error
(
GL_INVALID_OPERATION
,
false
);
return
gl
::
error
(
GL_INVALID_OPERATION
,
false
);
}
}
if
(
textureIsDepth
)
{
return
gl
::
error
(
GL_INVALID_OPERATION
,
false
);
}
if
(
textureCompressed
)
if
(
textureCompressed
)
{
{
if
((
width
%
4
!=
0
&&
width
!=
textureLevelWidth
)
||
if
((
width
%
4
!=
0
&&
width
!=
textureLevelWidth
)
||
...
...
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