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
b74c769a
Commit
b74c769a
authored
Jul 11, 2017
by
Commit Bot
Committed by
Gerrit Code Review
Jul 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Fix Clear validation assert for default FBOs"
parents
315ecd20
59c41597
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
3 deletions
+26
-3
validationES2.cpp
src/libANGLE/validationES2.cpp
+1
-1
WebGLCompatibilityTest.cpp
src/tests/gl_tests/WebGLCompatibilityTest.cpp
+25
-2
No files found.
src/libANGLE/validationES2.cpp
View file @
b74c769a
...
...
@@ -2302,7 +2302,7 @@ bool ValidateClear(ValidationContext *context, GLbitfield mask)
constexpr
GLenum
validComponentTypes
[]
=
{
GL_FLOAT
,
GL_UNSIGNED_NORMALIZED
,
GL_SIGNED_NORMALIZED
};
for
(
GLuint
drawBufferIdx
=
0
;
drawBufferIdx
<
context
->
getCaps
().
maxDrawBuffers
;
for
(
GLuint
drawBufferIdx
=
0
;
drawBufferIdx
<
fbo
->
getDrawbufferStateCount
()
;
drawBufferIdx
++
)
{
if
(
!
ValidateWebGLFramebufferAttachmentClearType
(
...
...
src/tests/gl_tests/WebGLCompatibilityTest.cpp
View file @
b74c769a
...
...
@@ -2317,8 +2317,8 @@ TEST_P(WebGL2CompatibilityTest, TextureCopyingFeedbackLoop3D)
EXPECT_GL_ERROR
(
GL_INVALID_OPERATION
);
}
// Verify that errors are generated when there isn
not a defined conversion between the clear type
//
and
the buffer type.
// Verify that errors are generated when there isn
't a defined conversion between the clear type and
// the buffer type.
TEST_P
(
WebGL2CompatibilityTest
,
ClearBufferTypeCompatibity
)
{
if
(
IsD3D11
())
...
...
@@ -2413,6 +2413,29 @@ TEST_P(WebGL2CompatibilityTest, ClearBufferTypeCompatibity)
EXPECT_GL_NO_ERROR
();
}
// Test the interaction of WebGL compatibility clears with default framebuffers
TEST_P
(
WebGL2CompatibilityTest
,
ClearBufferDefaultFramebuffer
)
{
constexpr
float
clearFloat
[]
=
{
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
};
constexpr
int
clearInt
[]
=
{
0
,
0
,
0
,
0
};
constexpr
unsigned
int
clearUint
[]
=
{
0
,
0
,
0
,
0
};
// glClear works as usual, this is also a regression test for a bug where we
// iterated on maxDrawBuffers for default framebuffers, triggering an assert
glClear
(
GL_COLOR_BUFFER_BIT
);
EXPECT_GL_NO_ERROR
();
// Default framebuffers are normalized uints, so only glClearBufferfv works.
glClearBufferfv
(
GL_COLOR
,
0
,
clearFloat
);
EXPECT_GL_NO_ERROR
();
glClearBufferiv
(
GL_COLOR
,
0
,
clearInt
);
EXPECT_GL_ERROR
(
GL_INVALID_OPERATION
);
glClearBufferuiv
(
GL_COLOR
,
0
,
clearUint
);
EXPECT_GL_ERROR
(
GL_INVALID_OPERATION
);
}
// Verify that errors are generate when trying to blit from an image to itself
TEST_P
(
WebGL2CompatibilityTest
,
BlitFramebufferSameImage
)
{
...
...
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