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
0fe1949d
Commit
0fe1949d
authored
Jul 25, 2013
by
Geoff Lang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated gl::IsInternalTextureTarget to have a client version parameter.
TRAC #23470 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang
parent
3ed0c484
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
11 deletions
+24
-11
utilities.cpp
src/common/utilities.cpp
+15
-2
utilities.h
src/common/utilities.h
+1
-1
Framebuffer.cpp
src/libGLESv2/Framebuffer.cpp
+6
-6
libGLESv2.cpp
src/libGLESv2/libGLESv2.cpp
+2
-2
No files found.
src/common/utilities.cpp
View file @
0fe1949d
...
@@ -459,9 +459,22 @@ bool IsCubemapTextureTarget(GLenum target)
...
@@ -459,9 +459,22 @@ bool IsCubemapTextureTarget(GLenum target)
return
(
target
>=
GL_TEXTURE_CUBE_MAP_POSITIVE_X
&&
target
<=
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
);
return
(
target
>=
GL_TEXTURE_CUBE_MAP_POSITIVE_X
&&
target
<=
GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
);
}
}
bool
IsInternalTextureTarget
(
GLenum
target
)
bool
IsInternalTextureTarget
(
GLenum
target
,
GLuint
clientVersion
)
{
{
return
target
==
GL_TEXTURE_2D
||
IsCubemapTextureTarget
(
target
);
if
(
clientVersion
==
2
)
{
return
target
==
GL_TEXTURE_2D
||
IsCubemapTextureTarget
(
target
);
}
else
if
(
clientVersion
==
3
)
{
return
target
==
GL_TEXTURE_2D
||
IsCubemapTextureTarget
(
target
)
||
target
==
GL_TEXTURE_3D
||
target
==
GL_TEXTURE_2D_ARRAY
;
}
else
{
UNREACHABLE
();
return
false
;
}
}
}
bool
IsTriangleMode
(
GLenum
drawMode
)
bool
IsTriangleMode
(
GLenum
drawMode
)
...
...
src/common/utilities.h
View file @
0fe1949d
...
@@ -40,7 +40,7 @@ int MatrixComponentCount(GLenum type, bool isRowMajorMatrix);
...
@@ -40,7 +40,7 @@ int MatrixComponentCount(GLenum type, bool isRowMajorMatrix);
int
AllocateFirstFreeBits
(
unsigned
int
*
bits
,
unsigned
int
allocationSize
,
unsigned
int
bitsSize
);
int
AllocateFirstFreeBits
(
unsigned
int
*
bits
,
unsigned
int
allocationSize
,
unsigned
int
bitsSize
);
bool
IsCubemapTextureTarget
(
GLenum
target
);
bool
IsCubemapTextureTarget
(
GLenum
target
);
bool
IsInternalTextureTarget
(
GLenum
target
);
bool
IsInternalTextureTarget
(
GLenum
target
,
GLuint
clientVersion
);
bool
IsTriangleMode
(
GLenum
drawMode
);
bool
IsTriangleMode
(
GLenum
drawMode
);
...
...
src/libGLESv2/Framebuffer.cpp
View file @
0fe1949d
...
@@ -177,18 +177,18 @@ void Framebuffer::detachTexture(GLuint texture)
...
@@ -177,18 +177,18 @@ void Framebuffer::detachTexture(GLuint texture)
for
(
unsigned
int
colorAttachment
=
0
;
colorAttachment
<
IMPLEMENTATION_MAX_DRAW_BUFFERS
;
colorAttachment
++
)
for
(
unsigned
int
colorAttachment
=
0
;
colorAttachment
<
IMPLEMENTATION_MAX_DRAW_BUFFERS
;
colorAttachment
++
)
{
{
if
(
mColorbuffers
[
colorAttachment
].
id
()
==
texture
&&
if
(
mColorbuffers
[
colorAttachment
].
id
()
==
texture
&&
IsInternalTextureTarget
(
mColorbuffers
[
colorAttachment
].
type
()))
IsInternalTextureTarget
(
mColorbuffers
[
colorAttachment
].
type
()
,
mRenderer
->
getCurrentClientVersion
()
))
{
{
mColorbuffers
[
colorAttachment
].
set
(
NULL
,
GL_NONE
,
0
,
0
);
mColorbuffers
[
colorAttachment
].
set
(
NULL
,
GL_NONE
,
0
,
0
);
}
}
}
}
if
(
mDepthbuffer
.
id
()
==
texture
&&
IsInternalTextureTarget
(
mDepthbuffer
.
type
()))
if
(
mDepthbuffer
.
id
()
==
texture
&&
IsInternalTextureTarget
(
mDepthbuffer
.
type
()
,
mRenderer
->
getCurrentClientVersion
()
))
{
{
mDepthbuffer
.
set
(
NULL
,
GL_NONE
,
0
,
0
);
mDepthbuffer
.
set
(
NULL
,
GL_NONE
,
0
,
0
);
}
}
if
(
mStencilbuffer
.
id
()
==
texture
&&
IsInternalTextureTarget
(
mStencilbuffer
.
type
()))
if
(
mStencilbuffer
.
id
()
==
texture
&&
IsInternalTextureTarget
(
mStencilbuffer
.
type
()
,
mRenderer
->
getCurrentClientVersion
()
))
{
{
mStencilbuffer
.
set
(
NULL
,
GL_NONE
,
0
,
0
);
mStencilbuffer
.
set
(
NULL
,
GL_NONE
,
0
,
0
);
}
}
...
@@ -478,7 +478,7 @@ GLenum Framebuffer::completeness() const
...
@@ -478,7 +478,7 @@ GLenum Framebuffer::completeness() const
return
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
;
return
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
;
}
}
}
}
else
if
(
IsInternalTextureTarget
(
mColorbuffers
[
colorAttachment
].
type
()))
else
if
(
IsInternalTextureTarget
(
mColorbuffers
[
colorAttachment
].
type
()
,
mRenderer
->
getCurrentClientVersion
()
))
{
{
GLint
internalformat
=
colorbuffer
->
getInternalFormat
();
GLint
internalformat
=
colorbuffer
->
getInternalFormat
();
...
@@ -568,7 +568,7 @@ GLenum Framebuffer::completeness() const
...
@@ -568,7 +568,7 @@ GLenum Framebuffer::completeness() const
return
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
;
return
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
;
}
}
}
}
else
if
(
IsInternalTextureTarget
(
mDepthbuffer
.
type
()))
else
if
(
IsInternalTextureTarget
(
mDepthbuffer
.
type
()
,
mRenderer
->
getCurrentClientVersion
()
))
{
{
GLint
internalformat
=
depthbuffer
->
getInternalFormat
();
GLint
internalformat
=
depthbuffer
->
getInternalFormat
();
...
@@ -627,7 +627,7 @@ GLenum Framebuffer::completeness() const
...
@@ -627,7 +627,7 @@ GLenum Framebuffer::completeness() const
return
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
;
return
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
;
}
}
}
}
else
if
(
IsInternalTextureTarget
(
mStencilbuffer
.
type
()))
else
if
(
IsInternalTextureTarget
(
mStencilbuffer
.
type
()
,
mRenderer
->
getCurrentClientVersion
()
))
{
{
GLint
internalformat
=
stencilbuffer
->
getInternalFormat
();
GLint
internalformat
=
stencilbuffer
->
getInternalFormat
();
...
...
src/libGLESv2/libGLESv2.cpp
View file @
0fe1949d
...
@@ -800,7 +800,7 @@ bool validateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin
...
@@ -800,7 +800,7 @@ bool validateES2CopyTexImageParameters(gl::Context* context, GLenum target, GLin
GLint
xoffset
,
GLint
yoffset
,
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
,
GLint
xoffset
,
GLint
yoffset
,
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
,
GLint
border
)
GLint
border
)
{
{
if
(
!
gl
::
IsInternalTextureTarget
(
target
))
if
(
!
gl
::
IsInternalTextureTarget
(
target
,
context
->
getClientVersion
()
))
{
{
return
gl
::
error
(
GL_INVALID_ENUM
,
false
);
return
gl
::
error
(
GL_INVALID_ENUM
,
false
);
}
}
...
@@ -5290,7 +5290,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
...
@@ -5290,7 +5290,7 @@ void __stdcall glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attac
{
{
attachmentObjectType
=
attachmentType
;
attachmentObjectType
=
attachmentType
;
}
}
else
if
(
gl
::
IsInternalTextureTarget
(
attachmentType
))
else
if
(
gl
::
IsInternalTextureTarget
(
attachmentType
,
context
->
getClientVersion
()
))
{
{
attachmentObjectType
=
GL_TEXTURE
;
attachmentObjectType
=
GL_TEXTURE
;
}
}
...
...
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