Use QueryID in place of GLuint handle

Bug: angleproject:3804
Change-Id: I921bbe7f67c025ab2b624fe14530c04ac17346f3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1765889
Reviewed-by: Jiacheng Lu <lujc@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
This commit is contained in:
Jiacheng Lu 2019-08-22 11:50:43 -06:00 коммит произвёл Commit Bot
Родитель 7cd5f64acb
Коммит 814a0a1b3f
39 изменённых файлов: 658 добавлений и 456 удалений

Просмотреть файл

@ -4,7 +4,7 @@
"scripts/egl_angle_ext.xml":
"fc2e249239fb1365f6d145cdf1a3cfcf",
"scripts/entry_point_packed_gl_enums.json":
"7a8fdb26e6c70a091039789d51d6c30a",
"214f06af8a4b23f0a281fae2a419872b",
"scripts/generate_entry_points.py":
"00dc8410ad87e122314ac58579445188",
"scripts/gl.xml":
@ -40,7 +40,7 @@
"src/libANGLE/Context_gl_3_3_autogen.h":
"b7b4c2cb4ed98e35b176dca69fdb99e0",
"src/libANGLE/Context_gl_4_0_autogen.h":
"48da9105554e9dbe2153fb641be6ef2f",
"2cecd827df79e1280ae6d19c307296c7",
"src/libANGLE/Context_gl_4_1_autogen.h":
"e8984624e468a8c171f47c16932f0a90",
"src/libANGLE/Context_gl_4_2_autogen.h":
@ -58,11 +58,11 @@
"src/libANGLE/Context_gles_2_0_autogen.h":
"d3e840e582b521ca428a0c59bc9d128a",
"src/libANGLE/Context_gles_3_0_autogen.h":
"5beedc5554a2d2d030497ec2602aabe2",
"ae1b02b58df966375181d99768a6532b",
"src/libANGLE/Context_gles_3_1_autogen.h":
"f896134a6354cc9c87620c864d90367b",
"src/libANGLE/Context_gles_ext_autogen.h":
"79a27ba32164ca9cc3b4fbc2f715468a",
"cf7cc214a7d97ffafcbb6ca3df39830d",
"src/libANGLE/capture_gles_1_0_autogen.cpp":
"f4e1335bebff584d2ac5198571b19972",
"src/libANGLE/capture_gles_1_0_autogen.h":
@ -72,27 +72,27 @@
"src/libANGLE/capture_gles_2_0_autogen.h":
"01e6945536953188534ad9f26297e615",
"src/libANGLE/capture_gles_3_0_autogen.cpp":
"bb18d4a793cd5c80011c5cd3166b1335",
"e22bde9326a6f71c421c30ef3a0924cc",
"src/libANGLE/capture_gles_3_0_autogen.h":
"20b9aebaa026653652a4fd548581b562",
"56c861f0f6f1a1041f11061c3655e536",
"src/libANGLE/capture_gles_3_1_autogen.cpp":
"425db6415bebab91ae1bfe36d7891983",
"src/libANGLE/capture_gles_3_1_autogen.h":
"74352d1f4cfee29d5910213bbb91ff58",
"src/libANGLE/capture_gles_ext_autogen.cpp":
"b5056cf921fced871d4c57cad5c400fe",
"aa29ead7d7618eb5cf81727f8c9cb7ec",
"src/libANGLE/capture_gles_ext_autogen.h":
"a28d71d8a8745c0ceaeda6eeb596e1dc",
"bcff5309d0a39d162c3c114af0ba0899",
"src/libANGLE/entry_points_enum_autogen.cpp":
"97b5fe98b95b4ae36c68f723e64f993a",
"src/libANGLE/entry_points_enum_autogen.h":
"f028ca107fe86e586e676a32863d2167",
"src/libANGLE/frame_capture_replay_autogen.cpp":
"0775906ffd94eb20b8012a3e22c13dad",
"dbb3b97a92642d7ae1cc236bcfcc026e",
"src/libANGLE/frame_capture_utils_autogen.cpp":
"1b9e6440e9c7a67cfeb37aba06e7f9a8",
"3ba517eb7c220c22ebf23797448993f7",
"src/libANGLE/frame_capture_utils_autogen.h":
"d847a610224faa286787dae4fe81dc83",
"e0e8e0d9246ea7962bdadba90fdd7201",
"src/libANGLE/validationES1_autogen.h":
"8d3131d2bf2e6f521f46b44e64a6bff9",
"src/libANGLE/validationES2_autogen.h":
@ -100,9 +100,9 @@
"src/libANGLE/validationES31_autogen.h":
"64116ae48f4ffaecd508627f2d2b609e",
"src/libANGLE/validationES3_autogen.h":
"dd48a5fab3771d42101ca41fe038a58f",
"9eab21999d1a7ef3ffb1910a551188f4",
"src/libANGLE/validationESEXT_autogen.h":
"e1c61957e0c8afe48ecfe40bc94dd079",
"7fc3c4a80ca3b9a938cdb39d96bf9036",
"src/libANGLE/validationGL11_autogen.h":
"c5ac1ca523a39df2621d11e92c9c821a",
"src/libANGLE/validationGL12_autogen.h":
@ -112,7 +112,7 @@
"src/libANGLE/validationGL14_autogen.h":
"d58f8aa392b34a15cd5ddfea3142bca4",
"src/libANGLE/validationGL15_autogen.h":
"803c78e151ba6e71be81ed38decacf1d",
"6139e1c919b498e4306e4442783ae3dc",
"src/libANGLE/validationGL1_autogen.h":
"9f6aca8bc4d4f8f74d0a74a781eec5b4",
"src/libANGLE/validationGL21_autogen.h":
@ -124,7 +124,7 @@
"src/libANGLE/validationGL32_autogen.h":
"7de94df0bbfbf9f15ec7d9b44307ee0a",
"src/libANGLE/validationGL33_autogen.h":
"7f03760ce1960fb222bb695711b7a8a1",
"6c4d2af51d21ea0abeb25e34210d3ec5",
"src/libANGLE/validationGL3_autogen.h":
"ff223fd080b149fd6ed0bb15f8d08f1f",
"src/libANGLE/validationGL41_autogen.h":
@ -140,7 +140,7 @@
"src/libANGLE/validationGL46_autogen.h":
"08a145cbeb4ea627ce94c65cd881cc5d",
"src/libANGLE/validationGL4_autogen.h":
"ebbde7f5154a4d1736330d1fc53b3af7",
"433372e97de561360a481ef7e275ec55",
"src/libGL/entry_points_gl_1_0_autogen.cpp":
"bf3679cbb617daced44bca2f8ca011a0",
"src/libGL/entry_points_gl_1_0_autogen.h":
@ -162,7 +162,7 @@
"src/libGL/entry_points_gl_1_4_autogen.h":
"6f3dcfd98c18cd53f32e61ee01eabad6",
"src/libGL/entry_points_gl_1_5_autogen.cpp":
"6cac711f9a38e657f6a84d8ff6962d8d",
"cac38b77d1ad6af8c68034eb0e80e711",
"src/libGL/entry_points_gl_1_5_autogen.h":
"8caacff247caecb833b065afaf6e90ef",
"src/libGL/entry_points_gl_2_0_autogen.cpp":
@ -186,11 +186,11 @@
"src/libGL/entry_points_gl_3_2_autogen.h":
"347e40b5c9fd08a693bf4ffe713c61e6",
"src/libGL/entry_points_gl_3_3_autogen.cpp":
"fd71a4114364ba23ed83f87c158b3c61",
"c78355bf650eccc07cb7d6beb11b0d3a",
"src/libGL/entry_points_gl_3_3_autogen.h":
"2151c64b03364111ad1455609243caba",
"src/libGL/entry_points_gl_4_0_autogen.cpp":
"1356c2414286d4a65bacb135517c394c",
"03557fcf99d8fee2ef1318fe42a0ed3a",
"src/libGL/entry_points_gl_4_0_autogen.h":
"c5a258322ee6de37ffdbb6f40d5703a2",
"src/libGL/entry_points_gl_4_1_autogen.cpp":
@ -230,7 +230,7 @@
"src/libGLESv2/entry_points_gles_2_0_autogen.h":
"3bbaf1cf42fba5d675e5b54cd1d14df7",
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"935e405960248799897a0e03df879d56",
"8888509d052344b7b2717912607ca2e2",
"src/libGLESv2/entry_points_gles_3_0_autogen.h":
"395f6978219abd5182bbe80cc367e40c",
"src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
@ -238,7 +238,7 @@
"src/libGLESv2/entry_points_gles_3_1_autogen.h":
"043d09a964c740067bf4279e0b544aed",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"8ea5ac136e2db8232c992a0ec69141ae",
"a79a50a023864dfdb77d3178423cf527",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"fea36fa137e55dd2f244dbb49d31cc41",
"src/libGLESv2/libGLESv2_autogen.cpp":

Просмотреть файл

@ -17,7 +17,8 @@
"func": "AlphaTestFunc"
},
"glBeginQuery": {
"target": "QueryType"
"target": "QueryType",
"id": "QueryID"
},
"glBeginTransformFeedback": {
"primitiveMode": "PrimitiveMode"
@ -359,7 +360,8 @@
"target": "QueryType"
},
"glGetQueryivRobust": {
"target": "QueryType"
"target": "QueryType",
"id": "QueryID"
},
"glGetSamplerParameterfv": {
"sampler": "SamplerID"
@ -606,7 +608,8 @@
"mode": "ProvokingVertexConvention"
},
"glQueryCounter": {
"target": "QueryType"
"target": "QueryType",
"id": "QueryID"
},
"glSamplerParameterf": {
"sampler": "SamplerID"
@ -878,5 +881,41 @@
},
"glGenFencesNV": {
"fences": "FenceNVID *"
},
"glGenQueries": {
"ids": "QueryID *"
},
"glDeleteQueries": {
"ids": "const QueryID *"
},
"glBeginQueryIndexed": {
"id": "QueryID"
},
"glIsQuery": {
"id": "QueryID"
},
"glGetQueryObjectuiv": {
"id": "QueryID"
},
"glGetQueryObjectiv": {
"id": "QueryID"
},
"glGetQueryObjecti64v": {
"id": "QueryID"
},
"glGetQueryObjectui64v": {
"id": "QueryID"
},
"glGetQueryObjectivRobust": {
"id": "QueryID"
},
"glGetQueryObjecti64vRobust": {
"id": "QueryID"
},
"glGetQueryObjectui64vRobust": {
"id": "QueryID"
},
"glGetQueryObjectuivRobust": {
"id": "QueryID"
}
}

Просмотреть файл

@ -401,6 +401,11 @@ struct FenceNVID
GLuint value;
};
struct QueryID
{
GLuint value;
};
// Used to unbox typed values.
template <typename ResourceIDType>
GLuint GetIDValue(ResourceIDType id);

Просмотреть файл

@ -1006,7 +1006,7 @@ gl::LabeledObject *Context::getLabeledObject(GLenum identifier, GLuint name) con
case GL_VERTEX_ARRAY:
return getVertexArray(name);
case GL_QUERY:
return getQuery(name);
return getQuery({name});
case GL_TRANSFORM_FEEDBACK:
return getTransformFeedback(name);
case GL_SAMPLER:
@ -1180,7 +1180,7 @@ void Context::bindProgramPipeline(GLuint pipelineHandle)
mState.setProgramPipelineBinding(this, pipeline);
}
void Context::beginQuery(QueryType target, GLuint query)
void Context::beginQuery(QueryType target, QueryID query)
{
Query *queryObject = getQuery(query, true, target);
ASSERT(queryObject);
@ -1206,7 +1206,7 @@ void Context::endQuery(QueryType target)
mStateCache.onQueryChange(this);
}
void Context::queryCounter(GLuint id, QueryType target)
void Context::queryCounter(QueryID id, QueryType target)
{
ASSERT(target == QueryType::Timestamp);
@ -1263,12 +1263,12 @@ void Context::getUnsignedBytei_v(GLenum target, GLuint index, GLubyte *data)
UNIMPLEMENTED();
}
void Context::getQueryObjectiv(GLuint id, GLenum pname, GLint *params)
void Context::getQueryObjectiv(QueryID id, GLenum pname, GLint *params)
{
ANGLE_CONTEXT_TRY(GetQueryObjectParameter(this, getQuery(id), pname, params));
}
void Context::getQueryObjectivRobust(GLuint id,
void Context::getQueryObjectivRobust(QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1277,12 +1277,12 @@ void Context::getQueryObjectivRobust(GLuint id,
getQueryObjectiv(id, pname, params);
}
void Context::getQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
void Context::getQueryObjectuiv(QueryID id, GLenum pname, GLuint *params)
{
ANGLE_CONTEXT_TRY(GetQueryObjectParameter(this, getQuery(id), pname, params));
}
void Context::getQueryObjectuivRobust(GLuint id,
void Context::getQueryObjectuivRobust(QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1291,12 +1291,12 @@ void Context::getQueryObjectuivRobust(GLuint id,
getQueryObjectuiv(id, pname, params);
}
void Context::getQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
void Context::getQueryObjecti64v(QueryID id, GLenum pname, GLint64 *params)
{
ANGLE_CONTEXT_TRY(GetQueryObjectParameter(this, getQuery(id), pname, params));
}
void Context::getQueryObjecti64vRobust(GLuint id,
void Context::getQueryObjecti64vRobust(QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1305,12 +1305,12 @@ void Context::getQueryObjecti64vRobust(GLuint id,
getQueryObjecti64v(id, pname, params);
}
void Context::getQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
void Context::getQueryObjectui64v(QueryID id, GLenum pname, GLuint64 *params)
{
ANGLE_CONTEXT_TRY(GetQueryObjectParameter(this, getQuery(id), pname, params));
}
void Context::getQueryObjectui64vRobust(GLuint id,
void Context::getQueryObjectui64vRobust(QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1329,7 +1329,7 @@ FenceNV *Context::getFenceNV(FenceNVID handle)
return mFenceNVMap.query(handle);
}
Query *Context::getQuery(GLuint handle, bool create, QueryType type)
Query *Context::getQuery(QueryID handle, bool create, QueryType type)
{
if (!mQueryMap.contains(handle))
{
@ -1347,7 +1347,7 @@ Query *Context::getQuery(GLuint handle, bool create, QueryType type)
return query;
}
Query *Context::getQuery(GLuint handle) const
Query *Context::getQuery(QueryID handle) const
{
return mQueryMap.query(handle);
}
@ -6645,26 +6645,26 @@ void Context::uniform4uiv(GLint location, GLsizei count, const GLuint *value)
program->setUniform4uiv(location, count, value);
}
void Context::genQueries(GLsizei n, GLuint *ids)
void Context::genQueries(GLsizei n, QueryID *ids)
{
for (GLsizei i = 0; i < n; i++)
{
GLuint handle = mQueryHandleAllocator.allocate();
QueryID handle = QueryID{mQueryHandleAllocator.allocate()};
mQueryMap.assign(handle, nullptr);
ids[i] = handle;
}
}
void Context::deleteQueries(GLsizei n, const GLuint *ids)
void Context::deleteQueries(GLsizei n, const QueryID *ids)
{
for (int i = 0; i < n; i++)
{
GLuint query = ids[i];
QueryID query = ids[i];
Query *queryObject = nullptr;
if (mQueryMap.erase(query, &queryObject))
{
mQueryHandleAllocator.release(query);
mQueryHandleAllocator.release(query.value);
if (queryObject)
{
queryObject->release(this);
@ -6673,7 +6673,7 @@ void Context::deleteQueries(GLsizei n, const GLuint *ids)
}
}
GLboolean Context::isQuery(GLuint id)
GLboolean Context::isQuery(QueryID id)
{
return ConvertToGLBoolean(getQuery(id, false, QueryType::InvalidEnum) != nullptr);
}

Просмотреть файл

@ -381,8 +381,8 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
Renderbuffer *getRenderbuffer(RenderbufferID handle) const;
VertexArray *getVertexArray(GLuint handle) const;
Sampler *getSampler(SamplerID handle) const;
Query *getQuery(GLuint handle, bool create, QueryType type);
Query *getQuery(GLuint handle) const;
Query *getQuery(QueryID handle, bool create, QueryType type);
Query *getQuery(QueryID handle) const;
TransformFeedback *getTransformFeedback(GLuint handle) const;
ProgramPipeline *getProgramPipeline(GLuint handle) const;
MemoryObject *getMemoryObject(GLuint handle) const;
@ -650,7 +650,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
ResourceMap<FenceNV, FenceNVID> mFenceNVMap;
HandleAllocator mFenceNVHandleAllocator;
ResourceMap<Query> mQueryMap;
ResourceMap<Query, QueryID> mQueryMap;
HandleAllocator mQueryHandleAllocator;
ResourceMap<VertexArray> mVertexArrayMap;

Просмотреть файл

@ -2263,7 +2263,7 @@ void Context::vertexP4uiv(GLenum type, const GLuint *value)
UNIMPLEMENTED();
}
void Context::beginQueryIndexed(GLenum target, GLuint index, GLuint id)
void Context::beginQueryIndexed(GLenum target, GLuint index, QueryID id)
{
UNIMPLEMENTED();
}

Просмотреть файл

@ -11,7 +11,7 @@
#define ANGLE_CONTEXT_GL_4_0_AUTOGEN_H_
#define ANGLE_GL_4_0_CONTEXT_API \
void beginQueryIndexed(GLenum target, GLuint index, GLuint id); \
void beginQueryIndexed(GLenum target, GLuint index, QueryID idPacked); \
void blendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha); \
void blendEquationi(GLuint buf, GLenum mode); \
void blendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, \

Просмотреть файл

@ -11,7 +11,7 @@
#define ANGLE_CONTEXT_GLES_3_0_AUTOGEN_H_
#define ANGLE_GLES_3_0_CONTEXT_API \
void beginQuery(QueryType targetPacked, GLuint id); \
void beginQuery(QueryType targetPacked, QueryID idPacked); \
void beginTransformFeedback(PrimitiveMode primitiveModePacked); \
void bindBufferBase(BufferBinding targetPacked, GLuint index, BufferID bufferPacked); \
void bindBufferRange(BufferBinding targetPacked, GLuint index, BufferID bufferPacked, \
@ -37,7 +37,7 @@
GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); \
void copyTexSubImage3D(TextureTarget targetPacked, GLint level, GLint xoffset, GLint yoffset, \
GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); \
void deleteQueries(GLsizei n, const GLuint *ids); \
void deleteQueries(GLsizei n, const QueryID *idsPacked); \
void deleteSamplers(GLsizei count, const SamplerID *samplersPacked); \
void deleteSync(GLsync sync); \
void deleteTransformFeedbacks(GLsizei n, const GLuint *ids); \
@ -56,7 +56,7 @@
void flushMappedBufferRange(BufferBinding targetPacked, GLintptr offset, GLsizeiptr length); \
void framebufferTextureLayer(GLenum target, GLenum attachment, TextureID texturePacked, \
GLint level, GLint layer); \
void genQueries(GLsizei n, GLuint *ids); \
void genQueries(GLsizei n, QueryID *idsPacked); \
void genSamplers(GLsizei count, SamplerID *samplersPacked); \
void genTransformFeedbacks(GLsizei n, GLuint *ids); \
void genVertexArrays(GLsizei n, GLuint *arrays); \
@ -76,7 +76,7 @@
GLint *params); \
void getProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, \
void *binary); \
void getQueryObjectuiv(GLuint id, GLenum pname, GLuint *params); \
void getQueryObjectuiv(QueryID idPacked, GLenum pname, GLuint *params); \
void getQueryiv(QueryType targetPacked, GLenum pname, GLint *params); \
void getSamplerParameterfv(SamplerID samplerPacked, GLenum pname, GLfloat *params); \
void getSamplerParameteriv(SamplerID samplerPacked, GLenum pname, GLint *params); \
@ -94,7 +94,7 @@
void invalidateSubFramebuffer(GLenum target, GLsizei numAttachments, \
const GLenum *attachments, GLint x, GLint y, GLsizei width, \
GLsizei height); \
GLboolean isQuery(GLuint id); \
GLboolean isQuery(QueryID idPacked); \
GLboolean isSampler(SamplerID samplerPacked); \
GLboolean isSync(GLsync sync); \
GLboolean isTransformFeedback(GLuint id); \

Просмотреть файл

@ -123,7 +123,7 @@
GLsizei imageSize, GLsizei dataSize, const GLvoid *data); \
void getQueryivRobust(QueryType targetPacked, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLint *params); \
void getQueryObjectuivRobust(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, \
void getQueryObjectuivRobust(QueryID idPacked, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLuint *params); \
void getBufferPointervRobust(BufferBinding targetPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, void **params); \
@ -191,12 +191,12 @@
GLsizei *length, GLint *params); \
void getSamplerParameterIuivRobust(SamplerID samplerPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLuint *params); \
void getQueryObjectivRobust(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, \
void getQueryObjectivRobust(QueryID idPacked, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLint *params); \
void getQueryObjecti64vRobust(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLint64 *params); \
void getQueryObjectui64vRobust(GLuint id, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLuint64 *params); \
void getQueryObjecti64vRobust(QueryID idPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLint64 *params); \
void getQueryObjectui64vRobust(QueryID idPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLuint64 *params); \
/* GL_ANGLE_texture_external_update */ \
void texImage2DExternal(TextureTarget targetPacked, GLint level, GLint internalformat, \
GLsizei width, GLsizei height, GLint border, GLenum format, \
@ -313,10 +313,10 @@
/* GL_EXT_discard_framebuffer */ \
void discardFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments); \
/* GL_EXT_disjoint_timer_query */ \
void getQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params); \
void getQueryObjectiv(GLuint id, GLenum pname, GLint *params); \
void getQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params); \
void queryCounter(GLuint id, QueryType targetPacked); \
void getQueryObjecti64v(QueryID idPacked, GLenum pname, GLint64 *params); \
void getQueryObjectiv(QueryID idPacked, GLenum pname, GLint *params); \
void getQueryObjectui64v(QueryID idPacked, GLenum pname, GLuint64 *params); \
void queryCounter(QueryID idPacked, QueryType targetPacked); \
/* GL_EXT_draw_buffers */ \
/* GL_EXT_geometry_shader */ \
void framebufferTexture(GLenum target, GLenum attachment, TextureID texturePacked, \

Просмотреть файл

@ -878,5 +878,11 @@ void WriteParamValueToStream<ParamType::TFenceNVID>(std::ostream &os, gl::FenceN
os << value.value;
}
// TODO(jmadill): Use query ID map. http://anglebug.com/3611
template <>
void WriteParamValueToStream<ParamType::TQueryID>(std::ostream &os, gl::QueryID value)
{
os << value.value;
}
#endif // ANGLE_CAPTURE_ENABLED
} // namespace angle

Просмотреть файл

@ -275,6 +275,9 @@ void WriteParamValueToStream<ParamType::TSamplerID>(std::ostream &os, gl::Sample
template <>
void WriteParamValueToStream<ParamType::TFenceNVID>(std::ostream &os, gl::FenceNVID value);
template <>
void WriteParamValueToStream<ParamType::TQueryID>(std::ostream &os, gl::QueryID value);
// General fallback for any unspecific type.
template <ParamType ParamT, typename T>
void WriteParamValueToStream(std::ostream &os, T value)

Просмотреть файл

@ -11,7 +11,7 @@
namespace gl
{
Query::Query(rx::QueryImpl *impl, GLuint id) : RefCountObject(id), mQuery(impl), mLabel() {}
Query::Query(rx::QueryImpl *impl, QueryID id) : RefCountObject(id.value), mQuery(impl), mLabel() {}
Query::~Query()
{

Просмотреть файл

@ -29,7 +29,7 @@ namespace gl
class Query final : public RefCountObject, public LabeledObject
{
public:
Query(rx::QueryImpl *impl, GLuint id);
Query(rx::QueryImpl *impl, QueryID id);
~Query() override;
void onDestroy(const Context *context) override;

Просмотреть файл

@ -23,12 +23,12 @@ namespace gl
CallCapture CaptureBeginQuery(const Context *context,
bool isCallValid,
QueryType targetPacked,
GLuint id)
QueryID idPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
return CallCapture(gl::EntryPoint::BeginQuery, std::move(paramBuffer));
}
@ -358,16 +358,16 @@ CallCapture CaptureCopyTexSubImage3D(const Context *context,
CallCapture CaptureDeleteQueries(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids)
const QueryID *idsPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
CaptureDeleteQueries_ids(context, isCallValid, n, ids, &idsParam);
paramBuffer.addParam(std::move(idsParam));
ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDConstPointer);
InitParamValue(ParamType::TQueryIDConstPointer, idsPacked, &idsPackedParam.value);
CaptureDeleteQueries_idsPacked(context, isCallValid, n, idsPacked, &idsPackedParam);
paramBuffer.addParam(std::move(idsPackedParam));
return CallCapture(gl::EntryPoint::DeleteQueries, std::move(paramBuffer));
}
@ -588,16 +588,19 @@ CallCapture CaptureFramebufferTextureLayer(const Context *context,
return CallCapture(gl::EntryPoint::FramebufferTextureLayer, std::move(paramBuffer));
}
CallCapture CaptureGenQueries(const Context *context, bool isCallValid, GLsizei n, GLuint *ids)
CallCapture CaptureGenQueries(const Context *context,
bool isCallValid,
GLsizei n,
QueryID *idsPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
ParamCapture idsParam("ids", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
CaptureGenQueries_ids(context, isCallValid, n, ids, &idsParam);
paramBuffer.addParam(std::move(idsParam));
ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDPointer);
InitParamValue(ParamType::TQueryIDPointer, idsPacked, &idsPackedParam.value);
CaptureGenQueries_idsPacked(context, isCallValid, n, idsPacked, &idsPackedParam);
paramBuffer.addParam(std::move(idsPackedParam));
return CallCapture(gl::EntryPoint::GenQueries, std::move(paramBuffer));
}
@ -914,19 +917,19 @@ CallCapture CaptureGetProgramBinary(const Context *context,
CallCapture CaptureGetQueryObjectuiv(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
pname);
ParamCapture paramsParam("params", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
CaptureGetQueryObjectuiv_params(context, isCallValid, id, pname, params, &paramsParam);
CaptureGetQueryObjectuiv_params(context, isCallValid, idPacked, pname, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectuiv, std::move(paramBuffer));
@ -1240,12 +1243,12 @@ CallCapture CaptureInvalidateSubFramebuffer(const Context *context,
CallCapture CaptureIsQuery(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLboolean returnValue)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);

Просмотреть файл

@ -23,7 +23,7 @@ class Context;
angle::CallCapture CaptureBeginQuery(const Context *context,
bool isCallValid,
QueryType targetPacked,
GLuint id);
QueryID idPacked);
angle::CallCapture CaptureBeginTransformFeedback(const Context *context,
bool isCallValid,
PrimitiveMode primitiveModePacked);
@ -132,7 +132,7 @@ angle::CallCapture CaptureCopyTexSubImage3D(const Context *context,
angle::CallCapture CaptureDeleteQueries(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids);
const QueryID *idsPacked);
angle::CallCapture CaptureDeleteSamplers(const Context *context,
bool isCallValid,
GLsizei count,
@ -195,7 +195,7 @@ angle::CallCapture CaptureFramebufferTextureLayer(const Context *context,
angle::CallCapture CaptureGenQueries(const Context *context,
bool isCallValid,
GLsizei n,
GLuint *ids);
QueryID *idsPacked);
angle::CallCapture CaptureGenSamplers(const Context *context,
bool isCallValid,
GLsizei count,
@ -273,7 +273,7 @@ angle::CallCapture CaptureGetProgramBinary(const Context *context,
void *binary);
angle::CallCapture CaptureGetQueryObjectuiv(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint *params);
angle::CallCapture CaptureGetQueryiv(const Context *context,
@ -354,7 +354,7 @@ angle::CallCapture CaptureInvalidateSubFramebuffer(const Context *context,
GLsizei height);
angle::CallCapture CaptureIsQuery(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLboolean returnValue);
angle::CallCapture CaptureIsSampler(const Context *context,
bool isCallValid,
@ -638,10 +638,10 @@ void CaptureCompressedTexSubImage3D_data(const Context *context,
GLsizei imageSize,
const void *data,
angle::ParamCapture *paramCapture);
void CaptureDeleteQueries_ids(const Context *context,
void CaptureDeleteQueries_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids,
const QueryID *idsPacked,
angle::ParamCapture *paramCapture);
void CaptureDeleteSamplers_samplersPacked(const Context *context,
bool isCallValid,
@ -680,10 +680,10 @@ void CaptureDrawRangeElements_indices(const Context *context,
DrawElementsType typePacked,
const void *indices,
angle::ParamCapture *paramCapture);
void CaptureGenQueries_ids(const Context *context,
void CaptureGenQueries_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
GLuint *ids,
QueryID *idsPacked,
angle::ParamCapture *paramCapture);
void CaptureGenSamplers_samplersPacked(const Context *context,
bool isCallValid,
@ -807,7 +807,7 @@ void CaptureGetProgramBinary_binary(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectuiv_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint *params,
angle::ParamCapture *paramCapture);

Просмотреть файл

@ -76,10 +76,10 @@ void CaptureCompressedTexSubImage3D_data(const Context *context,
UNIMPLEMENTED();
}
void CaptureDeleteQueries_ids(const Context *context,
void CaptureDeleteQueries_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids,
const QueryID *ids,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
@ -146,10 +146,10 @@ void CaptureDrawRangeElements_indices(const Context *context,
UNIMPLEMENTED();
}
void CaptureGenQueries_ids(const Context *context,
void CaptureGenQueries_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
GLuint *ids,
QueryID *ids,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
@ -349,7 +349,7 @@ void CaptureGetProgramBinary_binary(const Context *context,
void CaptureGetQueryObjectuiv_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLuint *params,
ParamCapture *paramCapture)

Просмотреть файл

@ -1366,7 +1366,7 @@ CallCapture CaptureGetQueryivRobustANGLE(const Context *context,
CallCapture CaptureGetQueryObjectuivRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1374,20 +1374,20 @@ CallCapture CaptureGetQueryObjectuivRobustANGLE(const Context *context,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
CaptureGetQueryObjectuivRobustANGLE_length(context, isCallValid, id, pname, bufSize, length,
params, &lengthParam);
CaptureGetQueryObjectuivRobustANGLE_length(context, isCallValid, idPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
CaptureGetQueryObjectuivRobustANGLE_params(context, isCallValid, id, pname, bufSize, length,
params, &paramsParam);
CaptureGetQueryObjectuivRobustANGLE_params(context, isCallValid, idPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectuivRobustANGLE, std::move(paramBuffer));
@ -2343,7 +2343,7 @@ CallCapture CaptureGetSamplerParameterIuivRobustANGLE(const Context *context,
CallCapture CaptureGetQueryObjectivRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2351,20 +2351,20 @@ CallCapture CaptureGetQueryObjectivRobustANGLE(const Context *context,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
CaptureGetQueryObjectivRobustANGLE_length(context, isCallValid, id, pname, bufSize, length,
params, &lengthParam);
CaptureGetQueryObjectivRobustANGLE_length(context, isCallValid, idPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLintPointer);
InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
CaptureGetQueryObjectivRobustANGLE_params(context, isCallValid, id, pname, bufSize, length,
params, &paramsParam);
CaptureGetQueryObjectivRobustANGLE_params(context, isCallValid, idPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectivRobustANGLE, std::move(paramBuffer));
@ -2372,7 +2372,7 @@ CallCapture CaptureGetQueryObjectivRobustANGLE(const Context *context,
CallCapture CaptureGetQueryObjecti64vRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2380,20 +2380,20 @@ CallCapture CaptureGetQueryObjecti64vRobustANGLE(const Context *context,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
CaptureGetQueryObjecti64vRobustANGLE_length(context, isCallValid, id, pname, bufSize, length,
params, &lengthParam);
CaptureGetQueryObjecti64vRobustANGLE_length(context, isCallValid, idPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
CaptureGetQueryObjecti64vRobustANGLE_params(context, isCallValid, id, pname, bufSize, length,
params, &paramsParam);
CaptureGetQueryObjecti64vRobustANGLE_params(context, isCallValid, idPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjecti64vRobustANGLE, std::move(paramBuffer));
@ -2401,7 +2401,7 @@ CallCapture CaptureGetQueryObjecti64vRobustANGLE(const Context *context,
CallCapture CaptureGetQueryObjectui64vRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2409,20 +2409,20 @@ CallCapture CaptureGetQueryObjectui64vRobustANGLE(const Context *context,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
paramBuffer.addValueParam("bufSize", ParamType::TGLsizei, bufSize);
ParamCapture lengthParam("length", ParamType::TGLsizeiPointer);
InitParamValue(ParamType::TGLsizeiPointer, length, &lengthParam.value);
CaptureGetQueryObjectui64vRobustANGLE_length(context, isCallValid, id, pname, bufSize, length,
params, &lengthParam);
CaptureGetQueryObjectui64vRobustANGLE_length(context, isCallValid, idPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
CaptureGetQueryObjectui64vRobustANGLE_params(context, isCallValid, id, pname, bufSize, length,
params, &paramsParam);
CaptureGetQueryObjectui64vRobustANGLE_params(context, isCallValid, idPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectui64vRobustANGLE, std::move(paramBuffer));
@ -3436,12 +3436,12 @@ CallCapture CaptureDiscardFramebufferEXT(const Context *context,
CallCapture CaptureBeginQueryEXT(const Context *context,
bool isCallValid,
QueryType targetPacked,
GLuint id)
QueryID idPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
return CallCapture(gl::EntryPoint::BeginQueryEXT, std::move(paramBuffer));
}
@ -3449,16 +3449,16 @@ CallCapture CaptureBeginQueryEXT(const Context *context,
CallCapture CaptureDeleteQueriesEXT(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids)
const QueryID *idsPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
ParamCapture idsParam("ids", ParamType::TGLuintConstPointer);
InitParamValue(ParamType::TGLuintConstPointer, ids, &idsParam.value);
CaptureDeleteQueriesEXT_ids(context, isCallValid, n, ids, &idsParam);
paramBuffer.addParam(std::move(idsParam));
ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDConstPointer);
InitParamValue(ParamType::TQueryIDConstPointer, idsPacked, &idsPackedParam.value);
CaptureDeleteQueriesEXT_idsPacked(context, isCallValid, n, idsPacked, &idsPackedParam);
paramBuffer.addParam(std::move(idsPackedParam));
return CallCapture(gl::EntryPoint::DeleteQueriesEXT, std::move(paramBuffer));
}
@ -3472,35 +3472,39 @@ CallCapture CaptureEndQueryEXT(const Context *context, bool isCallValid, QueryTy
return CallCapture(gl::EntryPoint::EndQueryEXT, std::move(paramBuffer));
}
CallCapture CaptureGenQueriesEXT(const Context *context, bool isCallValid, GLsizei n, GLuint *ids)
CallCapture CaptureGenQueriesEXT(const Context *context,
bool isCallValid,
GLsizei n,
QueryID *idsPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
ParamCapture idsParam("ids", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, ids, &idsParam.value);
CaptureGenQueriesEXT_ids(context, isCallValid, n, ids, &idsParam);
paramBuffer.addParam(std::move(idsParam));
ParamCapture idsPackedParam("idsPacked", ParamType::TQueryIDPointer);
InitParamValue(ParamType::TQueryIDPointer, idsPacked, &idsPackedParam.value);
CaptureGenQueriesEXT_idsPacked(context, isCallValid, n, idsPacked, &idsPackedParam);
paramBuffer.addParam(std::move(idsPackedParam));
return CallCapture(gl::EntryPoint::GenQueriesEXT, std::move(paramBuffer));
}
CallCapture CaptureGetQueryObjecti64vEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLint64 *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
pname);
ParamCapture paramsParam("params", ParamType::TGLint64Pointer);
InitParamValue(ParamType::TGLint64Pointer, params, &paramsParam.value);
CaptureGetQueryObjecti64vEXT_params(context, isCallValid, id, pname, params, &paramsParam);
CaptureGetQueryObjecti64vEXT_params(context, isCallValid, idPacked, pname, params,
&paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjecti64vEXT, std::move(paramBuffer));
@ -3508,19 +3512,19 @@ CallCapture CaptureGetQueryObjecti64vEXT(const Context *context,
CallCapture CaptureGetQueryObjectivEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLint *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
pname);
ParamCapture paramsParam("params", ParamType::TGLintPointer);
InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
CaptureGetQueryObjectivEXT_params(context, isCallValid, id, pname, params, &paramsParam);
CaptureGetQueryObjectivEXT_params(context, isCallValid, idPacked, pname, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectivEXT, std::move(paramBuffer));
@ -3528,19 +3532,20 @@ CallCapture CaptureGetQueryObjectivEXT(const Context *context,
CallCapture CaptureGetQueryObjectui64vEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint64 *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
pname);
ParamCapture paramsParam("params", ParamType::TGLuint64Pointer);
InitParamValue(ParamType::TGLuint64Pointer, params, &paramsParam.value);
CaptureGetQueryObjectui64vEXT_params(context, isCallValid, id, pname, params, &paramsParam);
CaptureGetQueryObjectui64vEXT_params(context, isCallValid, idPacked, pname, params,
&paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectui64vEXT, std::move(paramBuffer));
@ -3548,19 +3553,19 @@ CallCapture CaptureGetQueryObjectui64vEXT(const Context *context,
CallCapture CaptureGetQueryObjectuivEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::QueryObjectParameterName, ParamType::TGLenum,
pname);
ParamCapture paramsParam("params", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
CaptureGetQueryObjectuivEXT_params(context, isCallValid, id, pname, params, &paramsParam);
CaptureGetQueryObjectuivEXT_params(context, isCallValid, idPacked, pname, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetQueryObjectuivEXT, std::move(paramBuffer));
@ -3587,12 +3592,12 @@ CallCapture CaptureGetQueryivEXT(const Context *context,
CallCapture CaptureIsQueryEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLboolean returnValue)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
@ -3603,12 +3608,12 @@ CallCapture CaptureIsQueryEXT(const Context *context,
CallCapture CaptureQueryCounterEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
QueryType targetPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("id", ParamType::TGLuint, id);
paramBuffer.addValueParam("idPacked", ParamType::TQueryID, idPacked);
paramBuffer.addValueParam("targetPacked", ParamType::TQueryType, targetPacked);
return CallCapture(gl::EntryPoint::QueryCounterEXT, std::move(paramBuffer));

Просмотреть файл

@ -411,7 +411,7 @@ angle::CallCapture CaptureGetQueryivRobustANGLE(const Context *context,
GLint *params);
angle::CallCapture CaptureGetQueryObjectuivRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -652,21 +652,21 @@ angle::CallCapture CaptureGetSamplerParameterIuivRobustANGLE(const Context *cont
GLuint *params);
angle::CallCapture CaptureGetQueryObjectivRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint *params);
angle::CallCapture CaptureGetQueryObjecti64vRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint64 *params);
angle::CallCapture CaptureGetQueryObjectui64vRobustANGLE(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -983,36 +983,36 @@ angle::CallCapture CaptureDiscardFramebufferEXT(const Context *context,
angle::CallCapture CaptureBeginQueryEXT(const Context *context,
bool isCallValid,
QueryType targetPacked,
GLuint id);
QueryID idPacked);
angle::CallCapture CaptureDeleteQueriesEXT(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids);
const QueryID *idsPacked);
angle::CallCapture CaptureEndQueryEXT(const Context *context,
bool isCallValid,
QueryType targetPacked);
angle::CallCapture CaptureGenQueriesEXT(const Context *context,
bool isCallValid,
GLsizei n,
GLuint *ids);
QueryID *idsPacked);
angle::CallCapture CaptureGetQueryObjecti64vEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLint64 *params);
angle::CallCapture CaptureGetQueryObjectivEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLint *params);
angle::CallCapture CaptureGetQueryObjectui64vEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint64 *params);
angle::CallCapture CaptureGetQueryObjectuivEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint *params);
angle::CallCapture CaptureGetQueryivEXT(const Context *context,
@ -1022,11 +1022,11 @@ angle::CallCapture CaptureGetQueryivEXT(const Context *context,
GLint *params);
angle::CallCapture CaptureIsQueryEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLboolean returnValue);
angle::CallCapture CaptureQueryCounterEXT(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
QueryType targetPacked);
// GL_EXT_draw_buffers
@ -2389,7 +2389,7 @@ void CaptureGetQueryivRobustANGLE_params(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectuivRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2397,7 +2397,7 @@ void CaptureGetQueryObjectuivRobustANGLE_length(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectuivRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2925,7 +2925,7 @@ void CaptureGetSamplerParameterIuivRobustANGLE_params(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectivRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2933,7 +2933,7 @@ void CaptureGetQueryObjectivRobustANGLE_length(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectivRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2941,7 +2941,7 @@ void CaptureGetQueryObjectivRobustANGLE_params(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjecti64vRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2949,7 +2949,7 @@ void CaptureGetQueryObjecti64vRobustANGLE_length(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjecti64vRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2957,7 +2957,7 @@ void CaptureGetQueryObjecti64vRobustANGLE_params(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectui64vRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2965,7 +2965,7 @@ void CaptureGetQueryObjectui64vRobustANGLE_length(const Context *context,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectui64vRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -3234,37 +3234,37 @@ void CaptureDiscardFramebufferEXT_attachments(const Context *context,
GLsizei numAttachments,
const GLenum *attachments,
angle::ParamCapture *paramCapture);
void CaptureDeleteQueriesEXT_ids(const Context *context,
void CaptureDeleteQueriesEXT_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids,
const QueryID *idsPacked,
angle::ParamCapture *paramCapture);
void CaptureGenQueriesEXT_ids(const Context *context,
void CaptureGenQueriesEXT_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
GLuint *ids,
QueryID *idsPacked,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjecti64vEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLint64 *params,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectivEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLint *params,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectui64vEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint64 *params,
angle::ParamCapture *paramCapture);
void CaptureGetQueryObjectuivEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID idPacked,
GLenum pname,
GLuint *params,
angle::ParamCapture *paramCapture);

Просмотреть файл

@ -918,7 +918,7 @@ void CaptureGetQueryivRobustANGLE_params(const Context *context,
void CaptureGetQueryObjectuivRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -930,7 +930,7 @@ void CaptureGetQueryObjectuivRobustANGLE_length(const Context *context,
void CaptureGetQueryObjectuivRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1710,7 +1710,7 @@ void CaptureGetSamplerParameterIuivRobustANGLE_params(const Context *context,
void CaptureGetQueryObjectivRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1722,7 +1722,7 @@ void CaptureGetQueryObjectivRobustANGLE_length(const Context *context,
void CaptureGetQueryObjectivRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1734,7 +1734,7 @@ void CaptureGetQueryObjectivRobustANGLE_params(const Context *context,
void CaptureGetQueryObjecti64vRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1746,7 +1746,7 @@ void CaptureGetQueryObjecti64vRobustANGLE_length(const Context *context,
void CaptureGetQueryObjecti64vRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1758,7 +1758,7 @@ void CaptureGetQueryObjecti64vRobustANGLE_params(const Context *context,
void CaptureGetQueryObjectui64vRobustANGLE_length(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1770,7 +1770,7 @@ void CaptureGetQueryObjectui64vRobustANGLE_length(const Context *context,
void CaptureGetQueryObjectui64vRobustANGLE_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2171,19 +2171,19 @@ void CaptureDiscardFramebufferEXT_attachments(const Context *context,
CaptureMemory(attachments, sizeof(GLenum) * numAttachments, paramCapture);
}
void CaptureDeleteQueriesEXT_ids(const Context *context,
void CaptureDeleteQueriesEXT_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
const GLuint *ids,
const QueryID *ids,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
}
void CaptureGenQueriesEXT_ids(const Context *context,
void CaptureGenQueriesEXT_idsPacked(const Context *context,
bool isCallValid,
GLsizei n,
GLuint *ids,
QueryID *ids,
ParamCapture *paramCapture)
{
UNIMPLEMENTED();
@ -2191,7 +2191,7 @@ void CaptureGenQueriesEXT_ids(const Context *context,
void CaptureGetQueryObjecti64vEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLint64 *params,
ParamCapture *paramCapture)
@ -2201,7 +2201,7 @@ void CaptureGetQueryObjecti64vEXT_params(const Context *context,
void CaptureGetQueryObjectivEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLint *params,
ParamCapture *paramCapture)
@ -2211,7 +2211,7 @@ void CaptureGetQueryObjectivEXT_params(const Context *context,
void CaptureGetQueryObjectui64vEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLuint64 *params,
ParamCapture *paramCapture)
@ -2221,7 +2221,7 @@ void CaptureGetQueryObjectui64vEXT_params(const Context *context,
void CaptureGetQueryObjectuivEXT_params(const Context *context,
bool isCallValid,
GLuint id,
QueryID id,
GLenum pname,
GLuint *params,
ParamCapture *paramCapture)

Просмотреть файл

@ -53,7 +53,7 @@ void FrameCapture::ReplayCall(gl::Context *context,
case gl::EntryPoint::BeginQuery:
context->beginQuery(
params.getParam("targetPacked", ParamType::TQueryType, 0).value.QueryTypeVal,
params.getParam("id", ParamType::TGLuint, 1).value.GLuintVal);
params.getParam("idPacked", ParamType::TQueryID, 1).value.QueryIDVal);
break;
case gl::EntryPoint::BeginTransformFeedback:
context->beginTransformFeedback(
@ -502,9 +502,10 @@ void FrameCapture::ReplayCall(gl::Context *context,
params.getParam("pipelines", ParamType::TGLuintConstPointer, 1)));
break;
case gl::EntryPoint::DeleteQueries:
context->deleteQueries(params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal,
replayContext->getAsConstPointer<const GLuint *>(
params.getParam("ids", ParamType::TGLuintConstPointer, 1)));
context->deleteQueries(
params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal,
replayContext->getAsConstPointer<const QueryID *>(
params.getParam("idsPacked", ParamType::TQueryIDConstPointer, 1)));
break;
case gl::EntryPoint::DeleteRenderbuffers:
context->deleteRenderbuffers(
@ -814,8 +815,8 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::GenQueries:
context->genQueries(params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal,
replayContext->getReadBufferPointer<GLuint *>(
params.getParam("ids", ParamType::TGLuintPointer, 1)));
replayContext->getReadBufferPointer<QueryID *>(
params.getParam("idsPacked", ParamType::TQueryIDPointer, 1)));
break;
case gl::EntryPoint::GenRenderbuffers:
context->genRenderbuffers(
@ -1221,28 +1222,28 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::GetQueryObjecti64v:
context->getQueryObjecti64v(
params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("idPacked", ParamType::TQueryID, 0).value.QueryIDVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLint64 *>(
params.getParam("params", ParamType::TGLint64Pointer, 2)));
break;
case gl::EntryPoint::GetQueryObjectiv:
context->getQueryObjectiv(
params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("idPacked", ParamType::TQueryID, 0).value.QueryIDVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLint *>(
params.getParam("params", ParamType::TGLintPointer, 2)));
break;
case gl::EntryPoint::GetQueryObjectui64v:
context->getQueryObjectui64v(
params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("idPacked", ParamType::TQueryID, 0).value.QueryIDVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLuint64 *>(
params.getParam("params", ParamType::TGLuint64Pointer, 2)));
break;
case gl::EntryPoint::GetQueryObjectuiv:
context->getQueryObjectuiv(
params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("idPacked", ParamType::TQueryID, 0).value.QueryIDVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLuint *>(
params.getParam("params", ParamType::TGLuintPointer, 2)));
@ -1577,7 +1578,7 @@ void FrameCapture::ReplayCall(gl::Context *context,
params.getParam("pipeline", ParamType::TGLuint, 0).value.GLuintVal);
break;
case gl::EntryPoint::IsQuery:
context->isQuery(params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal);
context->isQuery(params.getParam("idPacked", ParamType::TQueryID, 0).value.QueryIDVal);
break;
case gl::EntryPoint::IsRenderbuffer:
context->isRenderbuffer(
@ -2172,7 +2173,7 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::QueryCounter:
context->queryCounter(
params.getParam("id", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("idPacked", ParamType::TQueryID, 0).value.QueryIDVal,
params.getParam("targetPacked", ParamType::TQueryType, 1).value.QueryTypeVal);
break;
case gl::EntryPoint::ReadBuffer:

Просмотреть файл

@ -269,6 +269,16 @@ void WriteParamTypeToStream(std::ostream &os, ParamType paramType, const ParamVa
WriteParamValueToStream<ParamType::TProvokingVertexConvention>(
os, paramValue.ProvokingVertexConventionVal);
break;
case ParamType::TQueryID:
WriteParamValueToStream<ParamType::TQueryID>(os, paramValue.QueryIDVal);
break;
case ParamType::TQueryIDConstPointer:
WriteParamValueToStream<ParamType::TQueryIDConstPointer>(
os, paramValue.QueryIDConstPointerVal);
break;
case ParamType::TQueryIDPointer:
WriteParamValueToStream<ParamType::TQueryIDPointer>(os, paramValue.QueryIDPointerVal);
break;
case ParamType::TQueryType:
WriteParamValueToStream<ParamType::TQueryType>(os, paramValue.QueryTypeVal);
break;
@ -502,6 +512,12 @@ const char *ParamTypeToString(ParamType paramType)
return "GLenum";
case ParamType::TProvokingVertexConvention:
return "GLenum";
case ParamType::TQueryID:
return "GLuint";
case ParamType::TQueryIDConstPointer:
return "const GLuint *";
case ParamType::TQueryIDPointer:
return "GLuint *";
case ParamType::TQueryType:
return "GLenum";
case ParamType::TRenderbufferID:

Просмотреть файл

@ -91,6 +91,9 @@ enum class ParamType
TPointParameter,
TPrimitiveMode,
TProvokingVertexConvention,
TQueryID,
TQueryIDConstPointer,
TQueryIDPointer,
TQueryType,
TRenderbufferID,
TRenderbufferIDConstPointer,
@ -190,6 +193,9 @@ union ParamValue
gl::PointParameter PointParameterVal;
gl::PrimitiveMode PrimitiveModeVal;
gl::ProvokingVertexConvention ProvokingVertexConventionVal;
gl::QueryID QueryIDVal;
const gl::QueryID *QueryIDConstPointerVal;
gl::QueryID *QueryIDPointerVal;
gl::QueryType QueryTypeVal;
gl::RenderbufferID RenderbufferIDVal;
const gl::RenderbufferID *RenderbufferIDConstPointerVal;
@ -698,6 +704,25 @@ GetParamVal<ParamType::TProvokingVertexConvention, gl::ProvokingVertexConvention
return value.ProvokingVertexConventionVal;
}
template <>
inline gl::QueryID GetParamVal<ParamType::TQueryID, gl::QueryID>(const ParamValue &value)
{
return value.QueryIDVal;
}
template <>
inline const gl::QueryID *GetParamVal<ParamType::TQueryIDConstPointer, const gl::QueryID *>(
const ParamValue &value)
{
return value.QueryIDConstPointerVal;
}
template <>
inline gl::QueryID *GetParamVal<ParamType::TQueryIDPointer, gl::QueryID *>(const ParamValue &value)
{
return value.QueryIDPointerVal;
}
template <>
inline gl::QueryType GetParamVal<ParamType::TQueryType, gl::QueryType>(const ParamValue &value)
{
@ -998,6 +1023,12 @@ T AccessParamValue(ParamType paramType, const ParamValue &value)
return GetParamVal<ParamType::TPrimitiveMode, T>(value);
case ParamType::TProvokingVertexConvention:
return GetParamVal<ParamType::TProvokingVertexConvention, T>(value);
case ParamType::TQueryID:
return GetParamVal<ParamType::TQueryID, T>(value);
case ParamType::TQueryIDConstPointer:
return GetParamVal<ParamType::TQueryIDConstPointer, T>(value);
case ParamType::TQueryIDPointer:
return GetParamVal<ParamType::TQueryIDPointer, T>(value);
case ParamType::TQueryType:
return GetParamVal<ParamType::TQueryType, T>(value);
case ParamType::TRenderbufferID:
@ -1514,6 +1545,25 @@ inline void SetParamVal<ParamType::TProvokingVertexConvention>(
valueOut->ProvokingVertexConventionVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TQueryID>(gl::QueryID valueIn, ParamValue *valueOut)
{
valueOut->QueryIDVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TQueryIDConstPointer>(const gl::QueryID *valueIn,
ParamValue *valueOut)
{
valueOut->QueryIDConstPointerVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TQueryIDPointer>(gl::QueryID *valueIn, ParamValue *valueOut)
{
valueOut->QueryIDPointerVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TQueryType>(gl::QueryType valueIn, ParamValue *valueOut)
{
@ -1882,6 +1932,15 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
case ParamType::TProvokingVertexConvention:
SetParamVal<ParamType::TProvokingVertexConvention>(valueIn, valueOut);
break;
case ParamType::TQueryID:
SetParamVal<ParamType::TQueryID>(valueIn, valueOut);
break;
case ParamType::TQueryIDConstPointer:
SetParamVal<ParamType::TQueryIDConstPointer>(valueIn, valueOut);
break;
case ParamType::TQueryIDPointer:
SetParamVal<ParamType::TQueryIDPointer>(valueIn, valueOut);
break;
case ParamType::TQueryType:
SetParamVal<ParamType::TQueryType>(valueIn, valueOut);
break;

Просмотреть файл

@ -1595,7 +1595,7 @@ bool ValidateReadnPixelsRobustANGLE(Context *context,
return true;
}
bool ValidateGenQueriesEXT(Context *context, GLsizei n, GLuint *ids)
bool ValidateGenQueriesEXT(Context *context, GLsizei n, QueryID *ids)
{
if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery)
@ -1607,7 +1607,7 @@ bool ValidateGenQueriesEXT(Context *context, GLsizei n, GLuint *ids)
return ValidateGenOrDelete(context, n);
}
bool ValidateDeleteQueriesEXT(Context *context, GLsizei n, const GLuint *ids)
bool ValidateDeleteQueriesEXT(Context *context, GLsizei n, const QueryID *ids)
{
if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery)
@ -1619,7 +1619,7 @@ bool ValidateDeleteQueriesEXT(Context *context, GLsizei n, const GLuint *ids)
return ValidateGenOrDelete(context, n);
}
bool ValidateIsQueryEXT(Context *context, GLuint id)
bool ValidateIsQueryEXT(Context *context, QueryID id)
{
if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery)
@ -1631,7 +1631,7 @@ bool ValidateIsQueryEXT(Context *context, GLuint id)
return true;
}
bool ValidateBeginQueryBase(Context *context, QueryType target, GLuint id)
bool ValidateBeginQueryBase(Context *context, QueryType target, QueryID id)
{
if (!ValidQueryType(context, target))
{
@ -1639,7 +1639,7 @@ bool ValidateBeginQueryBase(Context *context, QueryType target, GLuint id)
return false;
}
if (id == 0)
if (id.value == 0)
{
context->validationError(GL_INVALID_OPERATION, kInvalidQueryId);
return false;
@ -1686,7 +1686,7 @@ bool ValidateBeginQueryBase(Context *context, QueryType target, GLuint id)
return true;
}
bool ValidateBeginQueryEXT(Context *context, QueryType target, GLuint id)
bool ValidateBeginQueryEXT(Context *context, QueryType target, QueryID id)
{
if (!context->getExtensions().occlusionQueryBoolean &&
!context->getExtensions().disjointTimerQuery && !context->getExtensions().syncQuery)
@ -1729,7 +1729,7 @@ bool ValidateEndQueryEXT(Context *context, QueryType target)
return ValidateEndQueryBase(context, target);
}
bool ValidateQueryCounterEXT(Context *context, GLuint id, QueryType target)
bool ValidateQueryCounterEXT(Context *context, QueryID id, QueryType target)
{
if (!context->getExtensions().disjointTimerQuery)
{
@ -1844,7 +1844,7 @@ bool ValidateGetQueryivRobustANGLE(Context *context,
return true;
}
bool ValidateGetQueryObjectValueBase(Context *context, GLuint id, GLenum pname, GLsizei *numParams)
bool ValidateGetQueryObjectValueBase(Context *context, QueryID id, GLenum pname, GLsizei *numParams)
{
if (numParams)
{
@ -1895,7 +1895,7 @@ bool ValidateGetQueryObjectValueBase(Context *context, GLuint id, GLenum pname,
return true;
}
bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params)
bool ValidateGetQueryObjectivEXT(Context *context, QueryID id, GLenum pname, GLint *params)
{
if (!context->getExtensions().disjointTimerQuery)
{
@ -1906,7 +1906,7 @@ bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLin
}
bool ValidateGetQueryObjectivRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1940,7 +1940,7 @@ bool ValidateGetQueryObjectivRobustANGLE(Context *context,
return true;
}
bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params)
bool ValidateGetQueryObjectuivEXT(Context *context, QueryID id, GLenum pname, GLuint *params)
{
if (!context->getExtensions().disjointTimerQuery &&
!context->getExtensions().occlusionQueryBoolean && !context->getExtensions().syncQuery)
@ -1952,7 +1952,7 @@ bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLu
}
bool ValidateGetQueryObjectuivRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1987,7 +1987,7 @@ bool ValidateGetQueryObjectuivRobustANGLE(Context *context,
return true;
}
bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params)
bool ValidateGetQueryObjecti64vEXT(Context *context, QueryID id, GLenum pname, GLint64 *params)
{
if (!context->getExtensions().disjointTimerQuery)
{
@ -1998,7 +1998,7 @@ bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GL
}
bool ValidateGetQueryObjecti64vRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2032,7 +2032,7 @@ bool ValidateGetQueryObjecti64vRobustANGLE(Context *context,
return true;
}
bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params)
bool ValidateGetQueryObjectui64vEXT(Context *context, QueryID id, GLenum pname, GLuint64 *params)
{
if (!context->getExtensions().disjointTimerQuery)
{
@ -2043,7 +2043,7 @@ bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, G
}
bool ValidateGetQueryObjectui64vRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,

Просмотреть файл

@ -172,14 +172,14 @@ bool ValidateReadnPixelsRobustANGLE(Context *context,
GLsizei *rows,
void *data);
bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n, GLuint *ids);
bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n, const GLuint *ids);
bool ValidateIsQueryEXT(gl::Context *context, GLuint id);
bool ValidateBeginQueryBase(Context *context, QueryType target, GLuint id);
bool ValidateBeginQueryEXT(Context *context, QueryType target, GLuint id);
bool ValidateGenQueriesEXT(gl::Context *context, GLsizei n, QueryID *ids);
bool ValidateDeleteQueriesEXT(gl::Context *context, GLsizei n, const QueryID *ids);
bool ValidateIsQueryEXT(gl::Context *context, QueryID id);
bool ValidateBeginQueryBase(Context *context, QueryType target, QueryID id);
bool ValidateBeginQueryEXT(Context *context, QueryType target, QueryID id);
bool ValidateEndQueryBase(Context *context, QueryType target);
bool ValidateEndQueryEXT(Context *context, QueryType target);
bool ValidateQueryCounterEXT(Context *context, GLuint id, QueryType target);
bool ValidateQueryCounterEXT(Context *context, QueryID id, QueryType target);
bool ValidateGetQueryivBase(Context *context, QueryType target, GLenum pname, GLsizei *numParams);
bool ValidateGetQueryivEXT(Context *context, QueryType target, GLenum pname, GLint *params);
bool ValidateGetQueryivRobustANGLE(Context *context,
@ -188,31 +188,34 @@ bool ValidateGetQueryivRobustANGLE(Context *context,
GLsizei bufSize,
GLsizei *length,
GLint *params);
bool ValidateGetQueryObjectValueBase(Context *context, GLuint id, GLenum pname, GLsizei *numParams);
bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params);
bool ValidateGetQueryObjectValueBase(Context *context,
QueryID id,
GLenum pname,
GLsizei *numParams);
bool ValidateGetQueryObjectivEXT(Context *context, QueryID id, GLenum pname, GLint *params);
bool ValidateGetQueryObjectivRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint *params);
bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params);
bool ValidateGetQueryObjectuivEXT(Context *context, QueryID id, GLenum pname, GLuint *params);
bool ValidateGetQueryObjectuivRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLuint *params);
bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params);
bool ValidateGetQueryObjecti64vEXT(Context *context, QueryID id, GLenum pname, GLint64 *params);
bool ValidateGetQueryObjecti64vRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint64 *params);
bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params);
bool ValidateGetQueryObjectui64vEXT(Context *context, QueryID id, GLenum pname, GLuint64 *params);
bool ValidateGetQueryObjectui64vRobustANGLE(Context *context,
GLuint id,
QueryID id,
GLenum pname,
GLsizei bufSize,
GLsizei *length,

Просмотреть файл

@ -2439,7 +2439,7 @@ static bool ValidateObjectIdentifierAndName(Context *context, GLenum identifier,
return true;
case GL_QUERY:
if (context->getQuery(name) == nullptr)
if (context->getQuery({name}) == nullptr)
{
context->validationError(GL_INVALID_VALUE, kInvalidQueryName);
return false;

Просмотреть файл

@ -1250,7 +1250,7 @@ bool ValidateES3TexStorage3DParameters(Context *context,
height, depth);
}
bool ValidateBeginQuery(gl::Context *context, QueryType target, GLuint id)
bool ValidateBeginQuery(gl::Context *context, QueryType target, QueryID id)
{
if (context->getClientMajorVersion() < 3)
{
@ -1283,7 +1283,7 @@ bool ValidateGetQueryiv(Context *context, QueryType target, GLenum pname, GLint
return ValidateGetQueryivBase(context, target, pname, nullptr);
}
bool ValidateGetQueryObjectuiv(Context *context, GLuint id, GLenum pname, GLuint *params)
bool ValidateGetQueryObjectuiv(Context *context, QueryID id, GLenum pname, GLuint *params)
{
if (context->getClientMajorVersion() < 3)
{
@ -2403,12 +2403,12 @@ bool ValidateCompressedTexSubImage3DRobustANGLE(Context *context,
height, depth, format, imageSize, data);
}
bool ValidateGenQueries(Context *context, GLint n, GLuint *)
bool ValidateGenQueries(Context *context, GLint n, QueryID *)
{
return ValidateGenOrDeleteES3(context, n);
}
bool ValidateDeleteQueries(Context *context, GLint n, const GLuint *)
bool ValidateDeleteQueries(Context *context, GLint n, const QueryID *)
{
return ValidateGenOrDeleteES3(context, n);
}
@ -3431,7 +3431,7 @@ bool ValidateUniform4uiv(Context *context, GLint location, GLsizei count, const
return ValidateUniformES3(context, GL_UNSIGNED_INT_VEC4, location, count);
}
bool ValidateIsQuery(Context *context, GLuint id)
bool ValidateIsQuery(Context *context, QueryID id)
{
if (context->getClientMajorVersion() < 3)
{

Просмотреть файл

@ -17,7 +17,7 @@ namespace gl
{
class Context;
bool ValidateBeginQuery(Context *context, QueryType targetPacked, GLuint id);
bool ValidateBeginQuery(Context *context, QueryType targetPacked, QueryID idPacked);
bool ValidateBeginTransformFeedback(Context *context, PrimitiveMode primitiveModePacked);
bool ValidateBindBufferBase(Context *context,
BufferBinding targetPacked,
@ -90,7 +90,7 @@ bool ValidateCopyTexSubImage3D(Context *context,
GLint y,
GLsizei width,
GLsizei height);
bool ValidateDeleteQueries(Context *context, GLsizei n, const GLuint *ids);
bool ValidateDeleteQueries(Context *context, GLsizei n, const QueryID *idsPacked);
bool ValidateDeleteSamplers(Context *context, GLsizei count, const SamplerID *samplersPacked);
bool ValidateDeleteSync(Context *context, GLsync sync);
bool ValidateDeleteTransformFeedbacks(Context *context, GLsizei n, const GLuint *ids);
@ -127,7 +127,7 @@ bool ValidateFramebufferTextureLayer(Context *context,
TextureID texturePacked,
GLint level,
GLint layer);
bool ValidateGenQueries(Context *context, GLsizei n, GLuint *ids);
bool ValidateGenQueries(Context *context, GLsizei n, QueryID *idsPacked);
bool ValidateGenSamplers(Context *context, GLsizei count, SamplerID *samplersPacked);
bool ValidateGenTransformFeedbacks(Context *context, GLsizei n, GLuint *ids);
bool ValidateGenVertexArrays(Context *context, GLsizei n, GLuint *arrays);
@ -172,7 +172,7 @@ bool ValidateGetProgramBinary(Context *context,
GLsizei *length,
GLenum *binaryFormat,
void *binary);
bool ValidateGetQueryObjectuiv(Context *context, GLuint id, GLenum pname, GLuint *params);
bool ValidateGetQueryObjectuiv(Context *context, QueryID idPacked, GLenum pname, GLuint *params);
bool ValidateGetQueryiv(Context *context, QueryType targetPacked, GLenum pname, GLint *params);
bool ValidateGetSamplerParameterfv(Context *context,
SamplerID samplerPacked,
@ -218,7 +218,7 @@ bool ValidateInvalidateSubFramebuffer(Context *context,
GLint y,
GLsizei width,
GLsizei height);
bool ValidateIsQuery(Context *context, GLuint id);
bool ValidateIsQuery(Context *context, QueryID idPacked);
bool ValidateIsSampler(Context *context, SamplerID samplerPacked);
bool ValidateIsSync(Context *context, GLsync sync);
bool ValidateIsTransformFeedback(Context *context, GLuint id);

Просмотреть файл

@ -357,7 +357,7 @@ bool ValidateGetQueryivRobustANGLE(Context *context,
GLsizei *length,
GLint *params);
bool ValidateGetQueryObjectuivRobustANGLE(Context *context,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -564,19 +564,19 @@ bool ValidateGetSamplerParameterIuivRobustANGLE(Context *context,
GLsizei *length,
GLuint *params);
bool ValidateGetQueryObjectivRobustANGLE(Context *context,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint *params);
bool ValidateGetQueryObjecti64vRobustANGLE(Context *context,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint64 *params);
bool ValidateGetQueryObjectui64vRobustANGLE(Context *context,
GLuint id,
QueryID idPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -797,17 +797,23 @@ bool ValidateDiscardFramebufferEXT(Context *context,
const GLenum *attachments);
// GL_EXT_disjoint_timer_query
bool ValidateBeginQueryEXT(Context *context, QueryType targetPacked, GLuint id);
bool ValidateDeleteQueriesEXT(Context *context, GLsizei n, const GLuint *ids);
bool ValidateBeginQueryEXT(Context *context, QueryType targetPacked, QueryID idPacked);
bool ValidateDeleteQueriesEXT(Context *context, GLsizei n, const QueryID *idsPacked);
bool ValidateEndQueryEXT(Context *context, QueryType targetPacked);
bool ValidateGenQueriesEXT(Context *context, GLsizei n, GLuint *ids);
bool ValidateGetQueryObjecti64vEXT(Context *context, GLuint id, GLenum pname, GLint64 *params);
bool ValidateGetQueryObjectivEXT(Context *context, GLuint id, GLenum pname, GLint *params);
bool ValidateGetQueryObjectui64vEXT(Context *context, GLuint id, GLenum pname, GLuint64 *params);
bool ValidateGetQueryObjectuivEXT(Context *context, GLuint id, GLenum pname, GLuint *params);
bool ValidateGenQueriesEXT(Context *context, GLsizei n, QueryID *idsPacked);
bool ValidateGetQueryObjecti64vEXT(Context *context,
QueryID idPacked,
GLenum pname,
GLint64 *params);
bool ValidateGetQueryObjectivEXT(Context *context, QueryID idPacked, GLenum pname, GLint *params);
bool ValidateGetQueryObjectui64vEXT(Context *context,
QueryID idPacked,
GLenum pname,
GLuint64 *params);
bool ValidateGetQueryObjectuivEXT(Context *context, QueryID idPacked, GLenum pname, GLuint *params);
bool ValidateGetQueryivEXT(Context *context, QueryType targetPacked, GLenum pname, GLint *params);
bool ValidateIsQueryEXT(Context *context, GLuint id);
bool ValidateQueryCounterEXT(Context *context, GLuint id, QueryType targetPacked);
bool ValidateIsQueryEXT(Context *context, QueryID idPacked);
bool ValidateQueryCounterEXT(Context *context, QueryID idPacked, QueryType targetPacked);
// GL_EXT_draw_buffers
bool ValidateDrawBuffersEXT(Context *context, GLsizei n, const GLenum *bufs);

Просмотреть файл

@ -20,7 +20,7 @@ bool ValidateGetBufferSubData(Context *context,
return true;
}
bool ValidateGetQueryObjectiv(Context *context, GLuint id, GLenum pname, GLint *params)
bool ValidateGetQueryObjectiv(Context *context, QueryID id, GLenum pname, GLint *params)
{
return true;
}

Просмотреть файл

@ -22,7 +22,7 @@ bool ValidateGetBufferSubData(Context *context,
GLintptr offset,
GLsizeiptr size,
void *data);
bool ValidateGetQueryObjectiv(Context *context, GLuint id, GLenum pname, GLint *params);
bool ValidateGetQueryObjectiv(Context *context, QueryID idPacked, GLenum pname, GLint *params);
bool ValidateMapBuffer(Context *context, BufferBinding targetPacked, GLenum access);
} // namespace gl

Просмотреть файл

@ -45,12 +45,12 @@ bool ValidateGetFragDataIndex(Context *context, GLuint program, const GLchar *na
return true;
}
bool ValidateGetQueryObjecti64v(Context *context, GLuint id, GLenum pname, GLint64 *params)
bool ValidateGetQueryObjecti64v(Context *context, QueryID id, GLenum pname, GLint64 *params)
{
return true;
}
bool ValidateGetQueryObjectui64v(Context *context, GLuint id, GLenum pname, GLuint64 *params)
bool ValidateGetQueryObjectui64v(Context *context, QueryID id, GLenum pname, GLuint64 *params)
{
return true;
}
@ -121,7 +121,7 @@ bool ValidateNormalP3uiv(Context *context, GLenum type, const GLuint *coords)
return true;
}
bool ValidateQueryCounter(Context *context, GLuint id, QueryType targetPacked)
bool ValidateQueryCounter(Context *context, QueryID id, QueryType targetPacked)
{
return true;
}

Просмотреть файл

@ -27,8 +27,11 @@ bool ValidateColorP3uiv(Context *context, GLenum type, const GLuint *color);
bool ValidateColorP4ui(Context *context, GLenum type, GLuint color);
bool ValidateColorP4uiv(Context *context, GLenum type, const GLuint *color);
bool ValidateGetFragDataIndex(Context *context, GLuint program, const GLchar *name);
bool ValidateGetQueryObjecti64v(Context *context, GLuint id, GLenum pname, GLint64 *params);
bool ValidateGetQueryObjectui64v(Context *context, GLuint id, GLenum pname, GLuint64 *params);
bool ValidateGetQueryObjecti64v(Context *context, QueryID idPacked, GLenum pname, GLint64 *params);
bool ValidateGetQueryObjectui64v(Context *context,
QueryID idPacked,
GLenum pname,
GLuint64 *params);
bool ValidateGetSamplerParameterIiv(Context *context,
SamplerID samplerPacked,
GLenum pname,
@ -59,7 +62,7 @@ bool ValidateMultiTexCoordP4uiv(Context *context,
const GLuint *coords);
bool ValidateNormalP3ui(Context *context, GLenum type, GLuint coords);
bool ValidateNormalP3uiv(Context *context, GLenum type, const GLuint *coords);
bool ValidateQueryCounter(Context *context, GLuint id, QueryType targetPacked);
bool ValidateQueryCounter(Context *context, QueryID idPacked, QueryType targetPacked);
bool ValidateSamplerParameterIiv(Context *context,
SamplerID samplerPacked,
GLenum pname,

Просмотреть файл

@ -11,7 +11,7 @@
namespace gl
{
bool ValidateBeginQueryIndexed(Context *context, GLenum target, GLuint index, GLuint id)
bool ValidateBeginQueryIndexed(Context *context, GLenum target, GLuint index, QueryID id)
{
return true;
}

Просмотреть файл

@ -17,7 +17,7 @@ namespace gl
{
class Context;
bool ValidateBeginQueryIndexed(Context *context, GLenum target, GLuint index, GLuint id);
bool ValidateBeginQueryIndexed(Context *context, GLenum target, GLuint index, QueryID idPacked);
bool ValidateBlendEquationSeparatei(Context *context, GLuint buf, GLenum modeRGB, GLenum modeAlpha);
bool ValidateBlendEquationi(Context *context, GLuint buf, GLenum mode);
bool ValidateBlendFuncSeparatei(Context *context,

Просмотреть файл

@ -35,14 +35,15 @@ void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
if (context)
{
QueryType targetPacked = FromGL<QueryType>(target);
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBeginQuery(context, targetPacked, id));
(context->skipValidation() || ValidateBeginQuery(context, targetPacked, idPacked));
if (isCallValid)
{
context->beginQuery(targetPacked, id);
context->beginQuery(targetPacked, idPacked);
}
ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, id);
ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, idPacked);
}
}
@ -145,13 +146,15 @@ void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids)
if (context)
{
const QueryID *idsPacked = FromGL<const QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDeleteQueries(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateDeleteQueries(context, n, idsPacked));
if (isCallValid)
{
context->deleteQueries(n, ids);
context->deleteQueries(n, idsPacked);
}
ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, ids);
ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, idsPacked);
}
}
@ -202,13 +205,14 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids)
if (context)
{
QueryID *idsPacked = FromGL<QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, ids));
bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, idsPacked));
if (isCallValid)
{
context->genQueries(n, ids);
context->genQueries(n, idsPacked);
}
ANGLE_CAPTURE(GenQueries, isCallValid, context, n, ids);
ANGLE_CAPTURE(GenQueries, isCallValid, context, n, idsPacked);
}
}
@ -289,14 +293,15 @@ void GL_APIENTRY GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectiv(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectiv(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectiv(id, pname, params);
context->getQueryObjectiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectiv, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectiv, isCallValid, context, idPacked, pname, params);
}
}
@ -310,14 +315,15 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectuiv(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectuiv(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectuiv(id, pname, params);
context->getQueryObjectuiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, idPacked, pname, params);
}
}
@ -379,17 +385,18 @@ GLboolean GL_APIENTRY IsQuery(GLuint id)
GLboolean returnValue;
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, id));
bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, idPacked));
if (isCallValid)
{
returnValue = context->isQuery(id);
returnValue = context->isQuery(idPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
}
ANGLE_CAPTURE(IsQuery, isCallValid, context, id, returnValue);
ANGLE_CAPTURE(IsQuery, isCallValid, context, idPacked, returnValue);
}
else
{

Просмотреть файл

@ -225,14 +225,15 @@ void GL_APIENTRY GetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjecti64v(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjecti64v(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjecti64v(id, pname, params);
context->getQueryObjecti64v(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjecti64v, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjecti64v, isCallValid, context, idPacked, pname, params);
}
}
@ -246,14 +247,15 @@ void GL_APIENTRY GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectui64v(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectui64v(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectui64v(id, pname, params);
context->getQueryObjectui64v(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectui64v, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectui64v, isCallValid, context, idPacked, pname, params);
}
}
@ -597,15 +599,16 @@ void GL_APIENTRY QueryCounter(GLuint id, GLenum target)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
QueryType targetPacked = FromGL<QueryType>(target);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateQueryCounter(context, id, targetPacked));
(context->skipValidation() || ValidateQueryCounter(context, idPacked, targetPacked));
if (isCallValid)
{
context->queryCounter(id, targetPacked);
context->queryCounter(idPacked, targetPacked);
}
ANGLE_CAPTURE(QueryCounter, isCallValid, context, id, targetPacked);
ANGLE_CAPTURE(QueryCounter, isCallValid, context, idPacked, targetPacked);
}
}

Просмотреть файл

@ -35,14 +35,15 @@ void GL_APIENTRY BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBeginQueryIndexed(context, target, index, id));
bool isCallValid = (context->skipValidation() ||
ValidateBeginQueryIndexed(context, target, index, idPacked));
if (isCallValid)
{
context->beginQueryIndexed(target, index, id);
context->beginQueryIndexed(target, index, idPacked);
}
ANGLE_CAPTURE(BeginQueryIndexed, isCallValid, context, target, index, id);
ANGLE_CAPTURE(BeginQueryIndexed, isCallValid, context, target, index, idPacked);
}
}

Просмотреть файл

@ -29,14 +29,15 @@ void GL_APIENTRY BeginQuery(GLenum target, GLuint id)
if (context)
{
QueryType targetPacked = FromGL<QueryType>(target);
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBeginQuery(context, targetPacked, id));
(context->skipValidation() || ValidateBeginQuery(context, targetPacked, idPacked));
if (isCallValid)
{
context->beginQuery(targetPacked, id);
context->beginQuery(targetPacked, idPacked);
}
ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, id);
ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, idPacked);
}
}
@ -470,13 +471,15 @@ void GL_APIENTRY DeleteQueries(GLsizei n, const GLuint *ids)
if (context)
{
const QueryID *idsPacked = FromGL<const QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDeleteQueries(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateDeleteQueries(context, n, idsPacked));
if (isCallValid)
{
context->deleteQueries(n, ids);
context->deleteQueries(n, idsPacked);
}
ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, ids);
ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, idsPacked);
}
}
@ -785,13 +788,14 @@ void GL_APIENTRY GenQueries(GLsizei n, GLuint *ids)
if (context)
{
QueryID *idsPacked = FromGL<QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, ids));
bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, idsPacked));
if (isCallValid)
{
context->genQueries(n, ids);
context->genQueries(n, idsPacked);
}
ANGLE_CAPTURE(GenQueries, isCallValid, context, n, ids);
ANGLE_CAPTURE(GenQueries, isCallValid, context, n, idsPacked);
}
}
@ -1141,14 +1145,15 @@ void GL_APIENTRY GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectuiv(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectuiv(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectuiv(id, pname, params);
context->getQueryObjectuiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, idPacked, pname, params);
}
}
@ -1488,17 +1493,18 @@ GLboolean GL_APIENTRY IsQuery(GLuint id)
GLboolean returnValue;
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, id));
bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, idPacked));
if (isCallValid)
{
returnValue = context->isQuery(id);
returnValue = context->isQuery(idPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
}
ANGLE_CAPTURE(IsQuery, isCallValid, context, id, returnValue);
ANGLE_CAPTURE(IsQuery, isCallValid, context, idPacked, returnValue);
}
else
{

Просмотреть файл

@ -1454,15 +1454,16 @@ void GL_APIENTRY GetQueryObjectuivRobustANGLE(GLuint id,
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjectuivRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjectuivRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjectuivRobust(id, pname, bufSize, length, params);
context->getQueryObjectuivRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjectuivRobustANGLE, isCallValid, context, id, pname, bufSize,
ANGLE_CAPTURE(GetQueryObjectuivRobustANGLE, isCallValid, context, idPacked, pname, bufSize,
length, params);
}
}
@ -2441,16 +2442,17 @@ void GL_APIENTRY GetQueryObjectivRobustANGLE(GLuint id,
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjectivRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjectivRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjectivRobust(id, pname, bufSize, length, params);
context->getQueryObjectivRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjectivRobustANGLE, isCallValid, context, id, pname, bufSize, length,
params);
ANGLE_CAPTURE(GetQueryObjectivRobustANGLE, isCallValid, context, idPacked, pname, bufSize,
length, params);
}
}
@ -2469,15 +2471,16 @@ void GL_APIENTRY GetQueryObjecti64vRobustANGLE(GLuint id,
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjecti64vRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjecti64vRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjecti64vRobust(id, pname, bufSize, length, params);
context->getQueryObjecti64vRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjecti64vRobustANGLE, isCallValid, context, id, pname, bufSize,
ANGLE_CAPTURE(GetQueryObjecti64vRobustANGLE, isCallValid, context, idPacked, pname, bufSize,
length, params);
}
}
@ -2497,16 +2500,17 @@ void GL_APIENTRY GetQueryObjectui64vRobustANGLE(GLuint id,
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjectui64vRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjectui64vRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjectui64vRobust(id, pname, bufSize, length, params);
context->getQueryObjectui64vRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjectui64vRobustANGLE, isCallValid, context, id, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetQueryObjectui64vRobustANGLE, isCallValid, context, idPacked, pname,
bufSize, length, params);
}
}
@ -3774,14 +3778,15 @@ void GL_APIENTRY BeginQueryEXT(GLenum target, GLuint id)
if (context)
{
QueryType targetPacked = FromGL<QueryType>(target);
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBeginQueryEXT(context, targetPacked, id));
(context->skipValidation() || ValidateBeginQueryEXT(context, targetPacked, idPacked));
if (isCallValid)
{
context->beginQuery(targetPacked, id);
context->beginQuery(targetPacked, idPacked);
}
ANGLE_CAPTURE(BeginQueryEXT, isCallValid, context, targetPacked, id);
ANGLE_CAPTURE(BeginQueryEXT, isCallValid, context, targetPacked, idPacked);
}
}
@ -3794,13 +3799,15 @@ void GL_APIENTRY DeleteQueriesEXT(GLsizei n, const GLuint *ids)
if (context)
{
const QueryID *idsPacked = FromGL<const QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDeleteQueriesEXT(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateDeleteQueriesEXT(context, n, idsPacked));
if (isCallValid)
{
context->deleteQueries(n, ids);
context->deleteQueries(n, idsPacked);
}
ANGLE_CAPTURE(DeleteQueriesEXT, isCallValid, context, n, ids);
ANGLE_CAPTURE(DeleteQueriesEXT, isCallValid, context, n, idsPacked);
}
}
@ -3832,13 +3839,15 @@ void GL_APIENTRY GenQueriesEXT(GLsizei n, GLuint *ids)
if (context)
{
QueryID *idsPacked = FromGL<QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateGenQueriesEXT(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateGenQueriesEXT(context, n, idsPacked));
if (isCallValid)
{
context->genQueries(n, ids);
context->genQueries(n, idsPacked);
}
ANGLE_CAPTURE(GenQueriesEXT, isCallValid, context, n, ids);
ANGLE_CAPTURE(GenQueriesEXT, isCallValid, context, n, idsPacked);
}
}
@ -3852,14 +3861,15 @@ void GL_APIENTRY GetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjecti64vEXT(context, id, pname, params));
ValidateGetQueryObjecti64vEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjecti64v(id, pname, params);
context->getQueryObjecti64v(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjecti64vEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjecti64vEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -3873,14 +3883,15 @@ void GL_APIENTRY GetQueryObjectivEXT(GLuint id, GLenum pname, GLint *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectivEXT(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectivEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectiv(id, pname, params);
context->getQueryObjectiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectivEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectivEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -3894,14 +3905,15 @@ void GL_APIENTRY GetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 *param
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectui64vEXT(context, id, pname, params));
ValidateGetQueryObjectui64vEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectui64v(id, pname, params);
context->getQueryObjectui64v(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectui64vEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectui64vEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -3915,14 +3927,15 @@ void GL_APIENTRY GetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectuivEXT(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectuivEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectuiv(id, pname, params);
context->getQueryObjectuiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectuivEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectuivEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -3956,17 +3969,18 @@ GLboolean GL_APIENTRY IsQueryEXT(GLuint id)
GLboolean returnValue;
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateIsQueryEXT(context, id));
bool isCallValid = (context->skipValidation() || ValidateIsQueryEXT(context, idPacked));
if (isCallValid)
{
returnValue = context->isQuery(id);
returnValue = context->isQuery(idPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsQueryEXT, GLboolean>();
}
ANGLE_CAPTURE(IsQueryEXT, isCallValid, context, id, returnValue);
ANGLE_CAPTURE(IsQueryEXT, isCallValid, context, idPacked, returnValue);
}
else
{
@ -3983,15 +3997,16 @@ void GL_APIENTRY QueryCounterEXT(GLuint id, GLenum target)
if (context)
{
QueryID idPacked = FromGL<QueryID>(id);
QueryType targetPacked = FromGL<QueryType>(target);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateQueryCounterEXT(context, id, targetPacked));
(context->skipValidation() || ValidateQueryCounterEXT(context, idPacked, targetPacked));
if (isCallValid)
{
context->queryCounter(id, targetPacked);
context->queryCounter(idPacked, targetPacked);
}
ANGLE_CAPTURE(QueryCounterEXT, isCallValid, context, id, targetPacked);
ANGLE_CAPTURE(QueryCounterEXT, isCallValid, context, idPacked, targetPacked);
}
}
@ -7123,14 +7138,15 @@ void GL_APIENTRY BeginQueryContextANGLE(GLeglContext ctx, GLenum target, GLuint
{
ASSERT(context == GetValidGlobalContext());
QueryType targetPacked = FromGL<QueryType>(target);
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBeginQuery(context, targetPacked, id));
(context->skipValidation() || ValidateBeginQuery(context, targetPacked, idPacked));
if (isCallValid)
{
context->beginQuery(targetPacked, id);
context->beginQuery(targetPacked, idPacked);
}
ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, id);
ANGLE_CAPTURE(BeginQuery, isCallValid, context, targetPacked, idPacked);
}
}
@ -7144,14 +7160,15 @@ void GL_APIENTRY BeginQueryEXTContextANGLE(GLeglContext ctx, GLenum target, GLui
{
ASSERT(context == GetValidGlobalContext());
QueryType targetPacked = FromGL<QueryType>(target);
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBeginQueryEXT(context, targetPacked, id));
(context->skipValidation() || ValidateBeginQueryEXT(context, targetPacked, idPacked));
if (isCallValid)
{
context->beginQuery(targetPacked, id);
context->beginQuery(targetPacked, idPacked);
}
ANGLE_CAPTURE(BeginQueryEXT, isCallValid, context, targetPacked, id);
ANGLE_CAPTURE(BeginQueryEXT, isCallValid, context, targetPacked, idPacked);
}
}
@ -9228,13 +9245,15 @@ void GL_APIENTRY DeleteQueriesContextANGLE(GLeglContext ctx, GLsizei n, const GL
if (context)
{
ASSERT(context == GetValidGlobalContext());
const QueryID *idsPacked = FromGL<const QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDeleteQueries(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateDeleteQueries(context, n, idsPacked));
if (isCallValid)
{
context->deleteQueries(n, ids);
context->deleteQueries(n, idsPacked);
}
ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, ids);
ANGLE_CAPTURE(DeleteQueries, isCallValid, context, n, idsPacked);
}
}
@ -9248,13 +9267,15 @@ void GL_APIENTRY DeleteQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, const
if (context)
{
ASSERT(context == GetValidGlobalContext());
const QueryID *idsPacked = FromGL<const QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateDeleteQueriesEXT(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateDeleteQueriesEXT(context, n, idsPacked));
if (isCallValid)
{
context->deleteQueries(n, ids);
context->deleteQueries(n, idsPacked);
}
ANGLE_CAPTURE(DeleteQueriesEXT, isCallValid, context, n, ids);
ANGLE_CAPTURE(DeleteQueriesEXT, isCallValid, context, n, idsPacked);
}
}
@ -11104,13 +11125,14 @@ void GL_APIENTRY GenQueriesContextANGLE(GLeglContext ctx, GLsizei n, GLuint *ids
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID *idsPacked = FromGL<QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, ids));
bool isCallValid = (context->skipValidation() || ValidateGenQueries(context, n, idsPacked));
if (isCallValid)
{
context->genQueries(n, ids);
context->genQueries(n, idsPacked);
}
ANGLE_CAPTURE(GenQueries, isCallValid, context, n, ids);
ANGLE_CAPTURE(GenQueries, isCallValid, context, n, idsPacked);
}
}
@ -11123,13 +11145,15 @@ void GL_APIENTRY GenQueriesEXTContextANGLE(GLeglContext ctx, GLsizei n, GLuint *
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID *idsPacked = FromGL<QueryID *>(ids);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateGenQueriesEXT(context, n, ids));
bool isCallValid =
(context->skipValidation() || ValidateGenQueriesEXT(context, n, idsPacked));
if (isCallValid)
{
context->genQueries(n, ids);
context->genQueries(n, idsPacked);
}
ANGLE_CAPTURE(GenQueriesEXT, isCallValid, context, n, ids);
ANGLE_CAPTURE(GenQueriesEXT, isCallValid, context, n, idsPacked);
}
}
@ -12841,14 +12865,15 @@ void GL_APIENTRY GetQueryObjecti64vEXTContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjecti64vEXT(context, id, pname, params));
ValidateGetQueryObjecti64vEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjecti64v(id, pname, params);
context->getQueryObjecti64v(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjecti64vEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjecti64vEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -12866,14 +12891,15 @@ void GL_APIENTRY GetQueryObjectivEXTContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectivEXT(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectivEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectiv(id, pname, params);
context->getQueryObjectiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectivEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectivEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -12891,14 +12917,15 @@ void GL_APIENTRY GetQueryObjectui64vEXTContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectui64vEXT(context, id, pname, params));
ValidateGetQueryObjectui64vEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectui64v(id, pname, params);
context->getQueryObjectui64v(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectui64vEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectui64vEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -12916,14 +12943,15 @@ void GL_APIENTRY GetQueryObjectuivContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectuiv(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectuiv(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectuiv(id, pname, params);
context->getQueryObjectuiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectuiv, isCallValid, context, idPacked, pname, params);
}
}
@ -12941,14 +12969,15 @@ void GL_APIENTRY GetQueryObjectuivEXTContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetQueryObjectuivEXT(context, id, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetQueryObjectuivEXT(context, idPacked, pname, params));
if (isCallValid)
{
context->getQueryObjectuiv(id, pname, params);
context->getQueryObjectuiv(idPacked, pname, params);
}
ANGLE_CAPTURE(GetQueryObjectuivEXT, isCallValid, context, id, pname, params);
ANGLE_CAPTURE(GetQueryObjectuivEXT, isCallValid, context, idPacked, pname, params);
}
}
@ -14587,17 +14616,18 @@ GLboolean GL_APIENTRY IsQueryContextANGLE(GLeglContext ctx, GLuint id)
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, id));
bool isCallValid = (context->skipValidation() || ValidateIsQuery(context, idPacked));
if (isCallValid)
{
returnValue = context->isQuery(id);
returnValue = context->isQuery(idPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsQuery, GLboolean>();
}
ANGLE_CAPTURE(IsQuery, isCallValid, context, id, returnValue);
ANGLE_CAPTURE(IsQuery, isCallValid, context, idPacked, returnValue);
}
else
{
@ -14615,17 +14645,18 @@ GLboolean GL_APIENTRY IsQueryEXTContextANGLE(GLeglContext ctx, GLuint id)
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateIsQueryEXT(context, id));
bool isCallValid = (context->skipValidation() || ValidateIsQueryEXT(context, idPacked));
if (isCallValid)
{
returnValue = context->isQuery(id);
returnValue = context->isQuery(idPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsQueryEXT, GLboolean>();
}
ANGLE_CAPTURE(IsQueryEXT, isCallValid, context, id, returnValue);
ANGLE_CAPTURE(IsQueryEXT, isCallValid, context, idPacked, returnValue);
}
else
{
@ -17186,15 +17217,16 @@ void GL_APIENTRY QueryCounterEXTContextANGLE(GLeglContext ctx, GLuint id, GLenum
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
QueryType targetPacked = FromGL<QueryType>(target);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateQueryCounterEXT(context, id, targetPacked));
(context->skipValidation() || ValidateQueryCounterEXT(context, idPacked, targetPacked));
if (isCallValid)
{
context->queryCounter(id, targetPacked);
context->queryCounter(idPacked, targetPacked);
}
ANGLE_CAPTURE(QueryCounterEXT, isCallValid, context, id, targetPacked);
ANGLE_CAPTURE(QueryCounterEXT, isCallValid, context, idPacked, targetPacked);
}
}
@ -22766,15 +22798,16 @@ void GL_APIENTRY GetQueryObjectuivRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjectuivRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjectuivRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjectuivRobust(id, pname, bufSize, length, params);
context->getQueryObjectuivRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjectuivRobustANGLE, isCallValid, context, id, pname, bufSize,
ANGLE_CAPTURE(GetQueryObjectuivRobustANGLE, isCallValid, context, idPacked, pname, bufSize,
length, params);
}
}
@ -23824,16 +23857,17 @@ void GL_APIENTRY GetQueryObjectivRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjectivRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjectivRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjectivRobust(id, pname, bufSize, length, params);
context->getQueryObjectivRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjectivRobustANGLE, isCallValid, context, id, pname, bufSize, length,
params);
ANGLE_CAPTURE(GetQueryObjectivRobustANGLE, isCallValid, context, idPacked, pname, bufSize,
length, params);
}
}
@ -23854,15 +23888,16 @@ void GL_APIENTRY GetQueryObjecti64vRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjecti64vRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjecti64vRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjecti64vRobust(id, pname, bufSize, length, params);
context->getQueryObjecti64vRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjecti64vRobustANGLE, isCallValid, context, id, pname, bufSize,
ANGLE_CAPTURE(GetQueryObjecti64vRobustANGLE, isCallValid, context, idPacked, pname, bufSize,
length, params);
}
}
@ -23884,16 +23919,17 @@ void GL_APIENTRY GetQueryObjectui64vRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
QueryID idPacked = FromGL<QueryID>(id);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetQueryObjectui64vRobustANGLE(context, id, pname, bufSize, length, params));
(context->skipValidation() || ValidateGetQueryObjectui64vRobustANGLE(
context, idPacked, pname, bufSize, length, params));
if (isCallValid)
{
context->getQueryObjectui64vRobust(id, pname, bufSize, length, params);
context->getQueryObjectui64vRobust(idPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetQueryObjectui64vRobustANGLE, isCallValid, context, id, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetQueryObjectui64vRobustANGLE, isCallValid, context, idPacked, pname,
bufSize, length, params);
}
}