Commit 984ef41a by Jamie Madill

Ignore clear commands if rasterizer discard is enabled.

From the 3.0 spec (Section 3.1): "When enabled, RASTERIZER_DISCARD also causes the Clear and ClearBuffer* commands to be ignored." BUG=angleproject:1227 Change-Id: I0316103827927e8af9732d7b4565d787b881ccb8 Reviewed-on: https://chromium-review.googlesource.com/313993 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 8d9f35f1
...@@ -559,6 +559,11 @@ Error Framebuffer::invalidateSub(size_t count, const GLenum *attachments, const ...@@ -559,6 +559,11 @@ Error Framebuffer::invalidateSub(size_t count, const GLenum *attachments, const
Error Framebuffer::clear(Context *context, GLbitfield mask) Error Framebuffer::clear(Context *context, GLbitfield mask)
{ {
if (context->getState().isRasterizerDiscardEnabled())
{
return gl::Error(GL_NO_ERROR);
}
// Sync the clear state // Sync the clear state
context->syncRendererState(context->getState().clearStateBitMask()); context->syncRendererState(context->getState().clearStateBitMask());
...@@ -570,6 +575,11 @@ Error Framebuffer::clearBufferfv(Context *context, ...@@ -570,6 +575,11 @@ Error Framebuffer::clearBufferfv(Context *context,
GLint drawbuffer, GLint drawbuffer,
const GLfloat *values) const GLfloat *values)
{ {
if (context->getState().isRasterizerDiscardEnabled())
{
return gl::Error(GL_NO_ERROR);
}
// Sync the clear state // Sync the clear state
context->syncRendererState(context->getState().clearStateBitMask()); context->syncRendererState(context->getState().clearStateBitMask());
...@@ -581,6 +591,11 @@ Error Framebuffer::clearBufferuiv(Context *context, ...@@ -581,6 +591,11 @@ Error Framebuffer::clearBufferuiv(Context *context,
GLint drawbuffer, GLint drawbuffer,
const GLuint *values) const GLuint *values)
{ {
if (context->getState().isRasterizerDiscardEnabled())
{
return gl::Error(GL_NO_ERROR);
}
// Sync the clear state // Sync the clear state
context->syncRendererState(context->getState().clearStateBitMask()); context->syncRendererState(context->getState().clearStateBitMask());
...@@ -592,6 +607,11 @@ Error Framebuffer::clearBufferiv(Context *context, ...@@ -592,6 +607,11 @@ Error Framebuffer::clearBufferiv(Context *context,
GLint drawbuffer, GLint drawbuffer,
const GLint *values) const GLint *values)
{ {
if (context->getState().isRasterizerDiscardEnabled())
{
return gl::Error(GL_NO_ERROR);
}
// Sync the clear state // Sync the clear state
context->syncRendererState(context->getState().clearStateBitMask()); context->syncRendererState(context->getState().clearStateBitMask());
...@@ -604,6 +624,11 @@ Error Framebuffer::clearBufferfi(Context *context, ...@@ -604,6 +624,11 @@ Error Framebuffer::clearBufferfi(Context *context,
GLfloat depth, GLfloat depth,
GLint stencil) GLint stencil)
{ {
if (context->getState().isRasterizerDiscardEnabled())
{
return gl::Error(GL_NO_ERROR);
}
// Sync the clear state // Sync the clear state
context->syncRendererState(context->getState().clearStateBitMask()); context->syncRendererState(context->getState().clearStateBitMask());
......
...@@ -805,10 +805,6 @@ ...@@ -805,10 +805,6 @@
1099 WIN : dEQP-GLES3.functional.attribute_location.bind_relink_hole.mat2x2 = FAIL 1099 WIN : dEQP-GLES3.functional.attribute_location.bind_relink_hole.mat2x2 = FAIL
1099 WIN : dEQP-GLES3.functional.attribute_location.mixed_relink_hole.mat2 = FAIL 1099 WIN : dEQP-GLES3.functional.attribute_location.mixed_relink_hole.mat2 = FAIL
1099 WIN : dEQP-GLES3.functional.attribute_location.mixed_relink_hole.mat2x2 = FAIL 1099 WIN : dEQP-GLES3.functional.attribute_location.mixed_relink_hole.mat2x2 = FAIL
1101 WIN : dEQP-GLES3.functional.rasterizer_discard.basic.clear_color = FAIL
1101 WIN : dEQP-GLES3.functional.rasterizer_discard.scissor.clear_color = FAIL
1101 WIN : dEQP-GLES3.functional.rasterizer_discard.fbo.clear_color = FAIL
1101 WIN : dEQP-GLES3.functional.rasterizer_discard.fbo.clear_depth = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.buffer.draw_buffers = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.buffer.draw_buffers = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.buffer.read_buffer = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.buffer.read_buffer = FAIL
1101 WIN : dEQP-GLES3.functional.negative_api.buffer.renderbuffer_storage = FAIL 1101 WIN : dEQP-GLES3.functional.negative_api.buffer.renderbuffer_storage = FAIL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment