Commit bbf1c102 by Olli Etuaho Committed by Commit Bot

Fix BeginQuery validation

ANY_SAMPLES_PASSED and ANY_SAMPLES_PASSED_CONSERVATIVE queries can not be active at the same time. The only place where the State::isQueryActive function is used is validating whether a BeginQuery call is correct, so it can be changed to check for this. BUG=angleproject:1101 TEST=dEQP-GLES3.functional.negative_api.fragment.begin_query Change-Id: Idadf129c6a036570f6e28857bdb24ffc11eeebe8 Reviewed-on: https://chromium-review.googlesource.com/356363Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
parent 3c754194
......@@ -23,6 +23,16 @@
#include "libANGLE/VertexArray.h"
#include "libANGLE/formatutils.h"
namespace
{
GLenum ActiveQueryType(const GLenum type)
{
return (type == GL_ANY_SAMPLES_PASSED_CONSERVATIVE) ? GL_ANY_SAMPLES_PASSED : type;
}
} // anonymous namepace
namespace gl
{
......@@ -1026,12 +1036,12 @@ bool State::removeTransformFeedbackBinding(GLuint transformFeedback)
return false;
}
bool State::isQueryActive(GLenum type) const
bool State::isQueryActive(const GLenum type) const
{
for (auto &iter : mActiveQueries)
{
Query *query = iter.second.get();
if (query != nullptr && query->getType() == type)
const Query *query = iter.second.get();
if (query != nullptr && ActiveQueryType(query->getType()) == ActiveQueryType(type))
{
return true;
}
......
......@@ -198,7 +198,7 @@ class State : angle::NonCopyable
bool removeTransformFeedbackBinding(GLuint transformFeedback);
// Query binding manipulation
bool isQueryActive(GLenum type) const;
bool isQueryActive(const GLenum type) const;
bool isQueryActive(Query *query) const;
void setActiveQuery(GLenum target, Query *query);
GLuint getActiveQueryId(GLenum target) const;
......
......@@ -53,7 +53,6 @@
1101 WIN LINUX : dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage2d_invalid_size = FAIL
1101 WIN LINUX : dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d = FAIL
1101 WIN LINUX : dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d_invalid_buffer_target = FAIL
1101 WIN LINUX : dEQP-GLES3.functional.negative_api.fragment.begin_query = FAIL
1101 WIN LINUX : dEQP-GLES3.functional.negative_api.vertex_array.vertex_attrib_i_pointer = FAIL
1095 WIN LINUX : dEQP-GLES3.functional.texture.mipmap.2d.projected.nearest_nearest_clamp = FAIL
1095 WIN LINUX : dEQP-GLES3.functional.texture.mipmap.2d.projected.nearest_nearest_repeat = 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