Add type for attribute locations.

This will allow the capture/replay tool to easily intercept and label
attribute locations for remapping.

There's some inconsistency in implementation in the GL desktop front-
end. This is a quick fix and the full implementation is left for when
we implement the full desktop GL API set.

Bug: angleproject:4598
Change-Id: Ibf11bcb8669d27265ea376494a2e3124825cf3be
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2171933
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Cody Northrop <cnorthrop@google.com>
This commit is contained in:
Jamie Madill 2020-04-29 16:36:17 -04:00 коммит произвёл Commit Bot
Родитель 9cac3c5823
Коммит 9349c14344
72 изменённых файлов: 1709 добавлений и 1209 удалений

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

@ -4,7 +4,7 @@
"scripts/egl_angle_ext.xml":
"854e99785af19f8f4eea4f73005a0451",
"scripts/entry_point_packed_gl_enums.json":
"63f508a08611e75810daedb297dca0e9",
"c4f855d7aa8d8cf88ae7e37c4cb49e16",
"scripts/generate_entry_points.py":
"e12540094b7f57778de97b05c16d2e28",
"scripts/gl.xml":
@ -28,11 +28,11 @@
"src/libANGLE/Context_gl_1_5_autogen.h":
"35533281995d8b77d0f3e13dad3aa101",
"src/libANGLE/Context_gl_2_0_autogen.h":
"1208793161611291014912e5340c9b93",
"54b4156711dc9d809e2db4b514502178",
"src/libANGLE/Context_gl_2_1_autogen.h":
"c1c72e57fcacc8bfd3ae9c3471d9e95a",
"src/libANGLE/Context_gl_3_0_autogen.h":
"19f4ee6e5c2496522eb597e845e6e435",
"a0868170300b62c5eafac95de93428ca",
"src/libANGLE/Context_gl_3_1_autogen.h":
"d1d4f7055bc57ff391b8cd6ad25b9d10",
"src/libANGLE/Context_gl_3_2_autogen.h":
@ -50,67 +50,67 @@
"src/libANGLE/Context_gl_4_4_autogen.h":
"27b04d8d3b1f7a2804d49b85627e78a9",
"src/libANGLE/Context_gl_4_5_autogen.h":
"f06e102c161b2804caaa943027f157ad",
"fc757530e32255475305b6259829f1ac",
"src/libANGLE/Context_gl_4_6_autogen.h":
"738e344919d9a867e8823cbf52d10394",
"src/libANGLE/Context_gles_1_0_autogen.h":
"51fce95acbf8de72d21255adbbe0e8cd",
"src/libANGLE/Context_gles_2_0_autogen.h":
"443d00d45de147d1d1e3b66846ea0c29",
"bb2bc23b0d41126fd396a14c94d55835",
"src/libANGLE/Context_gles_3_0_autogen.h":
"fe61c2c821816d9561dcb4fe1fef74e5",
"ac51aa521eef0e97f022f261e8e5d21a",
"src/libANGLE/Context_gles_3_1_autogen.h":
"bb8198422232ca9ceaa06a5d37c3cd92",
"fed1989ef81ac6990228c0316403b3f4",
"src/libANGLE/Context_gles_3_2_autogen.h":
"e26f7ee7b59a89a4f5337171816b8336",
"src/libANGLE/Context_gles_ext_autogen.h":
"c4882553e6cef2a53b922ebe9ec88556",
"6b4d9ea28b2724c92e11d0762ecfa937",
"src/libANGLE/capture_gles_1_0_autogen.cpp":
"96fc0f501e2e696ab911dad8b400dfb2",
"src/libANGLE/capture_gles_1_0_autogen.h":
"546173090c85ad28a580ca76cd117484",
"src/libANGLE/capture_gles_2_0_autogen.cpp":
"9e47542f50b29581f5fcaf5a69f6b518",
"d1f2ebf66b3ab306f0aef0e452c547d3",
"src/libANGLE/capture_gles_2_0_autogen.h":
"6985d5e3d0126bc8e02dd982267a904f",
"6f161a6ce9d17a2d9fd9ccecb96f92dd",
"src/libANGLE/capture_gles_3_0_autogen.cpp":
"a12c9470569b9d1d63ab0b8be910055f",
"f4e80998ce6633f02db47a5f8efbca99",
"src/libANGLE/capture_gles_3_0_autogen.h":
"b963fec070e0becdcf4af69216cd1c7b",
"f8e2accfcb4dc82b73af0ed014a4ab86",
"src/libANGLE/capture_gles_3_1_autogen.cpp":
"c7c4ee0fcebc9bd19f8f4a498f935ac1",
"66728c3e8ab8ffaac7851da275ea1249",
"src/libANGLE/capture_gles_3_1_autogen.h":
"3d363f4de97b47ecff61e29939dcf11a",
"7a5b64ebdc8616dd869804352b71213d",
"src/libANGLE/capture_gles_3_2_autogen.cpp":
"f3497a63d27a30b9a10ffffd4c25c023",
"src/libANGLE/capture_gles_3_2_autogen.h":
"2fbca7168541c2e9ff8a055c256f8531",
"src/libANGLE/capture_gles_ext_autogen.cpp":
"96cb5043ebfce349c89ece3afec6d9f8",
"15624347fd2a9c06ef86f1d40cc3db25",
"src/libANGLE/capture_gles_ext_autogen.h":
"f6604f279558cf5d965e3dce61e0dc91",
"e33bccfcecea5989becd18a29d773a78",
"src/libANGLE/entry_points_enum_autogen.cpp":
"66f09d4f9e6f8e83f2f6f0cf8fc3f3d9",
"src/libANGLE/entry_points_enum_autogen.h":
"872069598e67c358ee4cbb14260d28bf",
"src/libANGLE/frame_capture_replay_autogen.cpp":
"c0d57704c21e0032a486a6195ddb87e4",
"b94bdb27534b671d6325f2197ed1eab9",
"src/libANGLE/frame_capture_utils_autogen.cpp":
"7a4f16a96714e43faaa0bef299ad7028",
"045056f1837b084566f3022de4851581",
"src/libANGLE/frame_capture_utils_autogen.h":
"86e368be9083fa542a08c1c143c8b87e",
"f2cbfb37396ee3035c345ab7600f17b8",
"src/libANGLE/validationES1_autogen.h":
"c8edb0a5b26303bf7c4692b9d0b05c1f",
"src/libANGLE/validationES2_autogen.h":
"1fc4c7017ae5949160ac2561e6d2e22e",
"a02715f8d47ff2b5ae6264922389543d",
"src/libANGLE/validationES31_autogen.h":
"ed9066cbf406b6f782c058019895c65e",
"27f7cda92b0304485aef757732759240",
"src/libANGLE/validationES32_autogen.h":
"7b4b5f9398a4c088feab8ba2c6bfc024",
"src/libANGLE/validationES3_autogen.h":
"86ba503835328438158d9a464943f3bd",
"c4e054fdc737fadba6e9b339caf1fbf4",
"src/libANGLE/validationESEXT_autogen.h":
"a48272ec357016df88899f85ad33d0ef",
"02e973e269d9ea89a4bf582e67cb8824",
"src/libANGLE/validationGL11_autogen.h":
"aadd145c1404de9c34d6b7c00404f10f",
"src/libANGLE/validationGL12_autogen.h":
@ -126,7 +126,7 @@
"src/libANGLE/validationGL21_autogen.h":
"e8fbcf4149d939eac029eab87d78a6ea",
"src/libANGLE/validationGL2_autogen.h":
"d4838ffcbbec95e59ce134c5fb203dc3",
"69bf6337be5e3cc4d3245ace1ddefd42",
"src/libANGLE/validationGL31_autogen.h":
"d37df5e87e5a43c169554bcff5225f2c",
"src/libANGLE/validationGL32_autogen.h":
@ -134,7 +134,7 @@
"src/libANGLE/validationGL33_autogen.h":
"192adeb93d903c166bf36c847428a902",
"src/libANGLE/validationGL3_autogen.h":
"7cefaa9e5568cb86df01371ad5390a29",
"e52fedf37753f11ae7e37a7390d81359",
"src/libANGLE/validationGL41_autogen.h":
"f92033868e2a6ecf707b730c70d44f2c",
"src/libANGLE/validationGL42_autogen.h":
@ -144,7 +144,7 @@
"src/libANGLE/validationGL44_autogen.h":
"ee89bec1bf4eab31b3b653c0f1a88d33",
"src/libANGLE/validationGL45_autogen.h":
"a0af5104f0d3949c9d945387d11e6302",
"ce729de0f7b066abd0c968d064bb3b67",
"src/libANGLE/validationGL46_autogen.h":
"46f74a3b19fd7e243ddd47a7478ae818",
"src/libANGLE/validationGL4_autogen.h":
@ -174,7 +174,7 @@
"src/libGL/entry_points_gl_1_5_autogen.h":
"978457aa9a40e427846b6dea24608903",
"src/libGL/entry_points_gl_2_0_autogen.cpp":
"68fbf332b51401391978bc4bb3ece654",
"21e1b85146de26e36adae8fd5dc552f5",
"src/libGL/entry_points_gl_2_0_autogen.h":
"41b0cd064167fac84bcdb1896a275b1b",
"src/libGL/entry_points_gl_2_1_autogen.cpp":
@ -182,7 +182,7 @@
"src/libGL/entry_points_gl_2_1_autogen.h":
"1da48dec560ea5ff8cadf4d0b6bfde1c",
"src/libGL/entry_points_gl_3_0_autogen.cpp":
"6decc6494c9acdfb63d5379b0bb7e767",
"34b63a8b952454e8af3632bc691e55f5",
"src/libGL/entry_points_gl_3_0_autogen.h":
"0fad8005f23815beb8ee9b3797c00b83",
"src/libGL/entry_points_gl_3_1_autogen.cpp":
@ -194,7 +194,7 @@
"src/libGL/entry_points_gl_3_2_autogen.h":
"f162c4e93a64ab2e43048a0937f7c46f",
"src/libGL/entry_points_gl_3_3_autogen.cpp":
"30f8dfd5b902d203abab84c5795e4e4b",
"5f603e977f5e3fe5acf6def6bcb54cf5",
"src/libGL/entry_points_gl_3_3_autogen.h":
"51c0e4f074c85447f5d910c63b9ea61c",
"src/libGL/entry_points_gl_4_0_autogen.cpp":
@ -210,7 +210,7 @@
"src/libGL/entry_points_gl_4_2_autogen.h":
"a2cb2a48cceaf6131f96bf8ec556aa55",
"src/libGL/entry_points_gl_4_3_autogen.cpp":
"7201a2e9773d607756ffcd1e3a0f14f5",
"e98dd0e5b47dbeae2b028af5c5d433a9",
"src/libGL/entry_points_gl_4_3_autogen.h":
"abfa431742a2b643db21220944e10ab0",
"src/libGL/entry_points_gl_4_4_autogen.cpp":
@ -218,7 +218,7 @@
"src/libGL/entry_points_gl_4_4_autogen.h":
"cdf1651f00d26db547b153afc09acc1c",
"src/libGL/entry_points_gl_4_5_autogen.cpp":
"506e903d618ca6039eafe639a0d358f4",
"ef2c286bbb1504506fcbce25499bf361",
"src/libGL/entry_points_gl_4_5_autogen.h":
"9f5de9513c06b82aca60856860f7b716",
"src/libGL/entry_points_gl_4_6_autogen.cpp":
@ -234,15 +234,15 @@
"src/libGLESv2/entry_points_gles_1_0_autogen.h":
"899dcff9383465380f94fbdfe5bcf0a0",
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp":
"5a54d106e1196795ab9bb22d24f32dc4",
"b823a8ea69e89ca8ad043cd7c2777b45",
"src/libGLESv2/entry_points_gles_2_0_autogen.h":
"26387e27cbddf5e34d6cd9f850cb8b64",
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
"bce7650df5a83ae9c6b080b1a4a9164b",
"fca6c786c5e3b5527f46d78fe670f067",
"src/libGLESv2/entry_points_gles_3_0_autogen.h":
"0d246024379fbf55b87204db5d6a37e3",
"src/libGLESv2/entry_points_gles_3_1_autogen.cpp":
"f449340852be3a389f52fb10ddd29d94",
"a19d9791de0e5a606424638967607039",
"src/libGLESv2/entry_points_gles_3_1_autogen.h":
"69bae5c94ed4665836a8464b6c353f9a",
"src/libGLESv2/entry_points_gles_3_2_autogen.cpp":
@ -250,7 +250,7 @@
"src/libGLESv2/entry_points_gles_3_2_autogen.h":
"5798aa0a73af1d4ba5dfe99b6217a247",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"b10a0a6c1becd3bfc8149c29dfc268b1",
"64881c667babfcd3d9d70fc338aada15",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"b564ae1ca4e312bd9d8138f593d8110c",
"src/libGLESv2/libGLESv2_autogen.cpp":

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

@ -34,7 +34,8 @@
"primitiveMode": "PrimitiveMode"
},
"glBindAttribLocation": {
"program": "ShaderProgramID"
"program": "ShaderProgramID",
"location": "AttributeLocation"
},
"glBindBuffer": {
"buffer": "BufferID",
@ -315,8 +316,12 @@
"glDisableClientState": {
"array": "ClientVertexArrayType"
},
"glDisableVertexAttribArray": {
"index": "AttributeLocation"
},
"glDisableVertexArrayAttrib": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"index": "AttributeLocation"
},
"glDrawArrays": {
"mode": "PrimitiveMode"
@ -380,8 +385,12 @@
"glEnableClientState": {
"array": "ClientVertexArrayType"
},
"glEnableVertexAttribArray": {
"index": "AttributeLocation"
},
"glEnableVertexArrayAttrib": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"index": "AttributeLocation"
},
"glEndQuery": {
"target": "QueryType"
@ -881,13 +890,49 @@
"location": "UniformLocation"
},
"glGetVertexArrayIndexed64iv": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"index": "AttributeLocation"
},
"glGetVertexArrayIndexediv": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"index": "AttributeLocation"
},
"glGetVertexArrayiv": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"index": "AttributeLocation"
},
"glGetVertexAttribPointerv": {
"index": "AttributeLocation"
},
"glGetVertexAttribPointervRobust": {
"index": "AttributeLocation"
},
"glGetVertexAttribdv": {
"index": "AttributeLocation"
},
"glGetVertexAttribfv": {
"index": "AttributeLocation"
},
"glGetVertexAttribfvRobust": {
"index": "AttributeLocation"
},
"glGetVertexAttribiv": {
"index": "AttributeLocation"
},
"glGetVertexAttribivRobust": {
"index": "AttributeLocation"
},
"glGetVertexAttribIiv": {
"index": "AttributeLocation"
},
"glGetVertexAttribIivRobust": {
"index": "AttributeLocation"
},
"glGetVertexAttribIuiv": {
"index": "AttributeLocation"
},
"glGetVertexAttribIuivRobust": {
"index": "AttributeLocation"
},
"glImportMemoryFd": {
"handleType": "HandleType",
@ -1818,16 +1863,20 @@
"pipeline": "ProgramPipelineID"
},
"glVertexArrayAttribBinding": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"attribindex": "AttributeLocation"
},
"glVertexArrayAttribFormat": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"attribindex": "AttributeLocation"
},
"glVertexArrayAttribIFormat": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"attribindex": "AttributeLocation"
},
"glVertexArrayAttribLFormat": {
"vaobj": "VertexArrayID"
"vaobj": "VertexArrayID",
"attribindex": "AttributeLocation"
},
"glVertexArrayBindingDivisor": {
"vaobj": "VertexArrayID"
@ -1844,16 +1893,122 @@
"buffers": "const BufferID *",
"vaobj": "VertexArrayID"
},
"glVertexAttrib1d": {
"index": "AttributeLocation"
},
"glVertexAttrib1dv": {
"index": "AttributeLocation"
},
"glVertexAttrib1f": {
"index": "AttributeLocation"
},
"glVertexAttrib1fv": {
"index": "AttributeLocation"
},
"glVertexAttrib2d": {
"index": "AttributeLocation"
},
"glVertexAttrib2dv": {
"index": "AttributeLocation"
},
"glVertexAttrib2f": {
"index": "AttributeLocation"
},
"glVertexAttrib2fv": {
"index": "AttributeLocation"
},
"glVertexAttrib3d": {
"index": "AttributeLocation"
},
"glVertexAttrib3dv": {
"index": "AttributeLocation"
},
"glVertexAttrib3f": {
"index": "AttributeLocation"
},
"glVertexAttrib3fv": {
"index": "AttributeLocation"
},
"glVertexAttrib4d": {
"index": "AttributeLocation"
},
"glVertexAttrib4dv": {
"index": "AttributeLocation"
},
"glVertexAttrib4f": {
"index": "AttributeLocation"
},
"glVertexAttrib4fv": {
"index": "AttributeLocation"
},
"glVertexAttribI1i": {
"index": "AttributeLocation"
},
"glVertexAttribI1iv": {
"index": "AttributeLocation"
},
"glVertexAttribI1ui": {
"index": "AttributeLocation"
},
"glVertexAttribI1uiv": {
"index": "AttributeLocation"
},
"glVertexAttribI2i": {
"index": "AttributeLocation"
},
"glVertexAttribI2iv": {
"index": "AttributeLocation"
},
"glVertexAttribI2ui": {
"index": "AttributeLocation"
},
"glVertexAttribI2uiv": {
"index": "AttributeLocation"
},
"glVertexAttribI3i": {
"index": "AttributeLocation"
},
"glVertexAttribI3iv": {
"index": "AttributeLocation"
},
"glVertexAttribI3ui": {
"index": "AttributeLocation"
},
"glVertexAttribI3uiv": {
"index": "AttributeLocation"
},
"glVertexAttribI4i": {
"index": "AttributeLocation"
},
"glVertexAttribI4iv": {
"index": "AttributeLocation"
},
"glVertexAttribI4ui": {
"index": "AttributeLocation"
},
"glVertexAttribI4uiv": {
"index": "AttributeLocation"
},
"glVertexAttribBinding": {
"attribindex": "AttributeLocation"
},
"glVertexAttribDivisor": {
"index": "AttributeLocation"
},
"glVertexAttribFormat": {
"attribindex": "AttributeLocation",
"type": "VertexAttribType"
},
"glVertexAttribIFormat": {
"attribindex": "AttributeLocation",
"type": "VertexAttribType"
},
"glVertexAttribIPointer": {
"index": "AttributeLocation",
"type": "VertexAttribType"
},
"glVertexAttribPointer": {
"index": "AttributeLocation",
"type": "VertexAttribType"
},
"glVertexPointer": {

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

@ -680,6 +680,11 @@ struct UniformLocation
{
int value;
};
struct AttributeLocation
{
uint32_t value;
};
} // namespace gl
namespace egl

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

@ -1809,8 +1809,7 @@ void Context::getIntegervImpl(GLenum pname, GLint *params) const
void Context::getIntegerVertexAttribImpl(GLenum pname, GLenum attribpname, GLint *params) const
{
getVertexAttribivImpl(static_cast<GLuint>(vertexArrayIndex(ParamToVertexArrayType(pname))),
attribpname, params);
getVertexAttribivImpl(vertexArrayIndex(ParamToVertexArrayType(pname)), attribpname, params);
}
void Context::getInteger64vImpl(GLenum pname, GLint64 *params) const
@ -2689,7 +2688,7 @@ void Context::detachProgramPipeline(ProgramPipelineID pipeline)
mState.detachProgramPipeline(this, pipeline);
}
void Context::vertexAttribDivisor(GLuint index, GLuint divisor)
void Context::vertexAttribDivisor(AttributeLocation index, GLuint divisor)
{
mState.setVertexAttribDivisor(this, index, divisor);
mStateCache.onVertexArrayStateChange(this);
@ -4733,7 +4732,7 @@ void Context::disablei(GLenum target, GLuint index)
mStateCache.onContextCapChange(this);
}
void Context::disableVertexAttribArray(GLuint index)
void Context::disableVertexAttribArray(AttributeLocation index)
{
mState.setEnableVertexAttribArray(index, false);
mStateCache.onVertexArrayStateChange(this);
@ -4751,7 +4750,7 @@ void Context::enablei(GLenum target, GLuint index)
mStateCache.onContextCapChange(this);
}
void Context::enableVertexAttribArray(GLuint index)
void Context::enableVertexAttribArray(AttributeLocation index)
{
mState.setEnableVertexAttribArray(index, true);
mStateCache.onVertexArrayStateChange(this);
@ -4917,62 +4916,62 @@ void Context::stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum z
}
}
void Context::vertexAttrib1f(GLuint index, GLfloat x)
void Context::vertexAttrib1f(AttributeLocation index, GLfloat x)
{
GLfloat vals[4] = {x, 0, 0, 1};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib1fv(GLuint index, const GLfloat *values)
void Context::vertexAttrib1fv(AttributeLocation index, const GLfloat *values)
{
GLfloat vals[4] = {values[0], 0, 0, 1};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
void Context::vertexAttrib2f(AttributeLocation index, GLfloat x, GLfloat y)
{
GLfloat vals[4] = {x, y, 0, 1};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib2fv(GLuint index, const GLfloat *values)
void Context::vertexAttrib2fv(AttributeLocation index, const GLfloat *values)
{
GLfloat vals[4] = {values[0], values[1], 0, 1};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
void Context::vertexAttrib3f(AttributeLocation index, GLfloat x, GLfloat y, GLfloat z)
{
GLfloat vals[4] = {x, y, z, 1};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib3fv(GLuint index, const GLfloat *values)
void Context::vertexAttrib3fv(AttributeLocation index, const GLfloat *values)
{
GLfloat vals[4] = {values[0], values[1], values[2], 1};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void Context::vertexAttrib4f(AttributeLocation index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
GLfloat vals[4] = {x, y, z, w};
mState.setVertexAttribf(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttrib4fv(GLuint index, const GLfloat *values)
void Context::vertexAttrib4fv(AttributeLocation index, const GLfloat *values)
{
mState.setVertexAttribf(index, values);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttribPointer(GLuint index,
void Context::vertexAttribPointer(AttributeLocation index,
GLint size,
VertexAttribType type,
GLboolean normalized,
@ -4984,7 +4983,7 @@ void Context::vertexAttribPointer(GLuint index,
mStateCache.onVertexArrayStateChange(this);
}
void Context::vertexAttribFormat(GLuint attribIndex,
void Context::vertexAttribFormat(AttributeLocation attribIndex,
GLint size,
VertexAttribType type,
GLboolean normalized,
@ -4995,7 +4994,7 @@ void Context::vertexAttribFormat(GLuint attribIndex,
mStateCache.onVertexArrayFormatChange(this);
}
void Context::vertexAttribIFormat(GLuint attribIndex,
void Context::vertexAttribIFormat(AttributeLocation attribIndex,
GLint size,
VertexAttribType type,
GLuint relativeOffset)
@ -5004,7 +5003,7 @@ void Context::vertexAttribIFormat(GLuint attribIndex,
mStateCache.onVertexArrayFormatChange(this);
}
void Context::vertexAttribBinding(GLuint attribIndex, GLuint bindingIndex)
void Context::vertexAttribBinding(AttributeLocation attribIndex, GLuint bindingIndex)
{
mState.setVertexAttribBinding(this, attribIndex, bindingIndex);
mStateCache.onVertexArrayStateChange(this);
@ -5021,7 +5020,7 @@ void Context::viewport(GLint x, GLint y, GLsizei width, GLsizei height)
mState.setViewportParams(x, y, width, height);
}
void Context::vertexAttribIPointer(GLuint index,
void Context::vertexAttribIPointer(AttributeLocation index,
GLint size,
VertexAttribType type,
GLsizei stride,
@ -5032,33 +5031,33 @@ void Context::vertexAttribIPointer(GLuint index,
mStateCache.onVertexArrayStateChange(this);
}
void Context::vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w)
void Context::vertexAttribI4i(AttributeLocation index, GLint x, GLint y, GLint z, GLint w)
{
GLint vals[4] = {x, y, z, w};
mState.setVertexAttribi(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
void Context::vertexAttribI4ui(AttributeLocation index, GLuint x, GLuint y, GLuint z, GLuint w)
{
GLuint vals[4] = {x, y, z, w};
mState.setVertexAttribu(index, vals);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttribI4iv(GLuint index, const GLint *v)
void Context::vertexAttribI4iv(AttributeLocation index, const GLint *v)
{
mState.setVertexAttribi(index, v);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::vertexAttribI4uiv(GLuint index, const GLuint *v)
void Context::vertexAttribI4uiv(AttributeLocation index, const GLuint *v)
{
mState.setVertexAttribu(index, v);
mStateCache.onDefaultVertexAttributeChange(this);
}
void Context::getVertexAttribivImpl(GLuint index, GLenum pname, GLint *params) const
void Context::getVertexAttribivImpl(AttributeLocation index, GLenum pname, GLint *params) const
{
const VertexAttribCurrentValueData &currentValues =
getState().getVertexAttribCurrentValue(index);
@ -5067,12 +5066,12 @@ void Context::getVertexAttribivImpl(GLuint index, GLenum pname, GLint *params) c
currentValues, pname, params);
}
void Context::getVertexAttribiv(GLuint index, GLenum pname, GLint *params)
void Context::getVertexAttribiv(AttributeLocation index, GLenum pname, GLint *params)
{
return getVertexAttribivImpl(index, pname, params);
}
void Context::getVertexAttribivRobust(GLuint index,
void Context::getVertexAttribivRobust(AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -5081,7 +5080,7 @@ void Context::getVertexAttribivRobust(GLuint index,
getVertexAttribiv(index, pname, params);
}
void Context::getVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
void Context::getVertexAttribfv(AttributeLocation index, GLenum pname, GLfloat *params)
{
const VertexAttribCurrentValueData &currentValues =
getState().getVertexAttribCurrentValue(index);
@ -5090,7 +5089,7 @@ void Context::getVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
currentValues, pname, params);
}
void Context::getVertexAttribfvRobust(GLuint index,
void Context::getVertexAttribfvRobust(AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -5099,7 +5098,7 @@ void Context::getVertexAttribfvRobust(GLuint index,
getVertexAttribfv(index, pname, params);
}
void Context::getVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
void Context::getVertexAttribIiv(AttributeLocation index, GLenum pname, GLint *params)
{
const VertexAttribCurrentValueData &currentValues =
getState().getVertexAttribCurrentValue(index);
@ -5108,7 +5107,7 @@ void Context::getVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
currentValues, pname, params);
}
void Context::getVertexAttribIivRobust(GLuint index,
void Context::getVertexAttribIivRobust(AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -5117,7 +5116,7 @@ void Context::getVertexAttribIivRobust(GLuint index,
getVertexAttribIiv(index, pname, params);
}
void Context::getVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
void Context::getVertexAttribIuiv(AttributeLocation index, GLenum pname, GLuint *params)
{
const VertexAttribCurrentValueData &currentValues =
getState().getVertexAttribCurrentValue(index);
@ -5126,7 +5125,7 @@ void Context::getVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
currentValues, pname, params);
}
void Context::getVertexAttribIuivRobust(GLuint index,
void Context::getVertexAttribIuivRobust(AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -5135,13 +5134,13 @@ void Context::getVertexAttribIuivRobust(GLuint index,
getVertexAttribIuiv(index, pname, params);
}
void Context::getVertexAttribPointerv(GLuint index, GLenum pname, void **pointer)
void Context::getVertexAttribPointerv(AttributeLocation index, GLenum pname, void **pointer)
{
const VertexAttribute &attrib = getState().getVertexArray()->getVertexAttribute(index);
QueryVertexAttribPointerv(attrib, pname, pointer);
}
void Context::getVertexAttribPointervRobust(GLuint index,
void Context::getVertexAttribPointervRobust(AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -5809,7 +5808,7 @@ void Context::drawArraysInstancedBaseInstance(PrimitiveMode mode,
ResetBaseVertexBaseInstance resetUniforms(programObject, false, hasBaseInstance);
// The input gl_InstanceID does not follow the baseinstance. gl_InstanceID always falls on
// the half-open range [0, instancecount). No need to set other stuff. Except for Vulkan.
// the half-open range [0, instanceCount). No need to set other stuff. Except for Vulkan.
ANGLE_CONTEXT_TRY(mImplementation->drawArraysInstancedBaseInstance(
this, mode, first, count, instanceCount, baseInstance));
@ -6140,7 +6139,7 @@ GLint Context::getAttribLocation(ShaderProgramID program, const GLchar *name)
{
Program *programObject = getProgramResolveLink(program);
ASSERT(programObject);
return programObject->getAttributeLocation(name);
return programObject->getAttributeLocation(name).value;
}
void Context::getBooleanv(GLenum pname, GLboolean *params)

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

@ -409,7 +409,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
void getIntegervImpl(GLenum pname, GLint *params) const;
void getInteger64vImpl(GLenum pname, GLint64 *params) const;
void getIntegerVertexAttribImpl(GLenum pname, GLenum attribpname, GLint *params) const;
void getVertexAttribivImpl(GLuint index, GLenum pname, GLint *params) const;
void getVertexAttribivImpl(AttributeLocation index, GLenum pname, GLint *params) const;
// Framebuffers are owned by the Context, so these methods do not pass through
FramebufferID createFramebuffer();
@ -571,8 +571,8 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
bool isValidBufferBinding(BufferBinding binding) const { return mValidBufferBindings[binding]; }
// GLES1 emulation: Renderer level (for validation)
int vertexArrayIndex(ClientVertexArrayType type) const;
static int TexCoordArrayIndex(unsigned int unit);
AttributeLocation vertexArrayIndex(ClientVertexArrayType type) const;
static AttributeLocation TexCoordArrayIndex(unsigned int unit);
// GL_KHR_parallel_shader_compile
std::shared_ptr<angle::WorkerThreadPool> getWorkerThreadPool() const { return mThreadPool; }

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

@ -215,17 +215,17 @@ void Context::multiTexCoord4sv(GLenum target, const GLshort *v)
UNIMPLEMENTED();
}
void Context::getVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
void Context::getVertexAttribdv(AttributeLocation index, GLenum pname, GLdouble *params)
{
UNIMPLEMENTED();
}
void Context::vertexAttrib1d(GLuint index, GLdouble x)
void Context::vertexAttrib1d(AttributeLocation index, GLdouble x)
{
UNIMPLEMENTED();
}
void Context::vertexAttrib1dv(GLuint index, const GLdouble *v)
void Context::vertexAttrib1dv(AttributeLocation index, const GLdouble *v)
{
UNIMPLEMENTED();
}
@ -240,12 +240,12 @@ void Context::vertexAttrib1sv(GLuint index, const GLshort *v)
UNIMPLEMENTED();
}
void Context::vertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
void Context::vertexAttrib2d(AttributeLocation index, GLdouble x, GLdouble y)
{
UNIMPLEMENTED();
}
void Context::vertexAttrib2dv(GLuint index, const GLdouble *v)
void Context::vertexAttrib2dv(AttributeLocation index, const GLdouble *v)
{
UNIMPLEMENTED();
}
@ -260,12 +260,12 @@ void Context::vertexAttrib2sv(GLuint index, const GLshort *v)
UNIMPLEMENTED();
}
void Context::vertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
void Context::vertexAttrib3d(AttributeLocation index, GLdouble x, GLdouble y, GLdouble z)
{
UNIMPLEMENTED();
}
void Context::vertexAttrib3dv(GLuint index, const GLdouble *v)
void Context::vertexAttrib3dv(AttributeLocation index, const GLdouble *v)
{
UNIMPLEMENTED();
}
@ -320,12 +320,16 @@ void Context::vertexAttrib4bv(GLuint index, const GLbyte *v)
UNIMPLEMENTED();
}
void Context::vertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void Context::vertexAttrib4d(AttributeLocation index,
GLdouble x,
GLdouble y,
GLdouble z,
GLdouble w)
{
UNIMPLEMENTED();
}
void Context::vertexAttrib4dv(GLuint index, const GLdouble *v)
void Context::vertexAttrib4dv(AttributeLocation index, const GLdouble *v)
{
UNIMPLEMENTED();
}
@ -384,62 +388,62 @@ void Context::framebufferTexture1D(GLenum target,
UNIMPLEMENTED();
}
void Context::vertexAttribI1i(GLuint index, GLint x)
void Context::vertexAttribI1i(AttributeLocation index, GLint x)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI1iv(GLuint index, const GLint *v)
void Context::vertexAttribI1iv(AttributeLocation index, const GLint *v)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI1ui(GLuint index, GLuint x)
void Context::vertexAttribI1ui(AttributeLocation index, GLuint x)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI1uiv(GLuint index, const GLuint *v)
void Context::vertexAttribI1uiv(AttributeLocation index, const GLuint *v)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI2i(GLuint index, GLint x, GLint y)
void Context::vertexAttribI2i(AttributeLocation index, GLint x, GLint y)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI2iv(GLuint index, const GLint *v)
void Context::vertexAttribI2iv(AttributeLocation index, const GLint *v)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI2ui(GLuint index, GLuint x, GLuint y)
void Context::vertexAttribI2ui(AttributeLocation index, GLuint x, GLuint y)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI2uiv(GLuint index, const GLuint *v)
void Context::vertexAttribI2uiv(AttributeLocation index, const GLuint *v)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
void Context::vertexAttribI3i(AttributeLocation index, GLint x, GLint y, GLint z)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI3iv(GLuint index, const GLint *v)
void Context::vertexAttribI3iv(AttributeLocation index, const GLint *v)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
void Context::vertexAttribI3ui(AttributeLocation index, GLuint x, GLuint y, GLuint z)
{
UNIMPLEMENTED();
}
void Context::vertexAttribI3uiv(GLuint index, const GLuint *v)
void Context::vertexAttribI3uiv(AttributeLocation index, const GLuint *v)
{
UNIMPLEMENTED();
}
@ -3073,12 +3077,12 @@ void Context::createVertexArrays(GLsizei n, VertexArrayID *arrays)
UNIMPLEMENTED();
}
void Context::disableVertexArrayAttrib(VertexArrayID vaobj, GLuint index)
void Context::disableVertexArrayAttrib(VertexArrayID vaobj, AttributeLocation index)
{
UNIMPLEMENTED();
}
void Context::enableVertexArrayAttrib(VertexArrayID vaobj, GLuint index)
void Context::enableVertexArrayAttrib(VertexArrayID vaobj, AttributeLocation index)
{
UNIMPLEMENTED();
}
@ -3253,14 +3257,17 @@ void Context::getTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
}
void Context::getVertexArrayIndexed64iv(VertexArrayID vaobj,
GLuint index,
AttributeLocation index,
GLenum pname,
GLint64 *param)
{
UNIMPLEMENTED();
}
void Context::getVertexArrayIndexediv(VertexArrayID vaobj, GLuint index, GLenum pname, GLint *param)
void Context::getVertexArrayIndexediv(VertexArrayID vaobj,
AttributeLocation index,
GLenum pname,
GLint *param)
{
UNIMPLEMENTED();
}
@ -3658,13 +3665,15 @@ GLboolean Context::unmapNamedBuffer(BufferID buffer)
return false;
}
void Context::vertexArrayAttribBinding(VertexArrayID vaobj, GLuint attribindex, GLuint bindingindex)
void Context::vertexArrayAttribBinding(VertexArrayID vaobj,
AttributeLocation attribindex,
GLuint bindingindex)
{
UNIMPLEMENTED();
}
void Context::vertexArrayAttribFormat(VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
GLenum type,
GLboolean normalized,
@ -3674,7 +3683,7 @@ void Context::vertexArrayAttribFormat(VertexArrayID vaobj,
}
void Context::vertexArrayAttribIFormat(VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
GLenum type,
GLuint relativeoffset)
@ -3683,7 +3692,7 @@ void Context::vertexArrayAttribIFormat(VertexArrayID vaobj,
}
void Context::vertexArrayAttribLFormat(VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
GLenum type,
GLuint relativeoffset)

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

@ -10,35 +10,36 @@
#ifndef ANGLE_CONTEXT_GL_2_0_AUTOGEN_H_
#define ANGLE_CONTEXT_GL_2_0_AUTOGEN_H_
#define ANGLE_GL_2_0_CONTEXT_API \
void getVertexAttribdv(GLuint index, GLenum pname, GLdouble *params); \
void vertexAttrib1d(GLuint index, GLdouble x); \
void vertexAttrib1dv(GLuint index, const GLdouble *v); \
void vertexAttrib1s(GLuint index, GLshort x); \
void vertexAttrib1sv(GLuint index, const GLshort *v); \
void vertexAttrib2d(GLuint index, GLdouble x, GLdouble y); \
void vertexAttrib2dv(GLuint index, const GLdouble *v); \
void vertexAttrib2s(GLuint index, GLshort x, GLshort y); \
void vertexAttrib2sv(GLuint index, const GLshort *v); \
void vertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z); \
void vertexAttrib3dv(GLuint index, const GLdouble *v); \
void vertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z); \
void vertexAttrib3sv(GLuint index, const GLshort *v); \
void vertexAttrib4Nbv(GLuint index, const GLbyte *v); \
void vertexAttrib4Niv(GLuint index, const GLint *v); \
void vertexAttrib4Nsv(GLuint index, const GLshort *v); \
void vertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); \
void vertexAttrib4Nubv(GLuint index, const GLubyte *v); \
void vertexAttrib4Nuiv(GLuint index, const GLuint *v); \
void vertexAttrib4Nusv(GLuint index, const GLushort *v); \
void vertexAttrib4bv(GLuint index, const GLbyte *v); \
void vertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); \
void vertexAttrib4dv(GLuint index, const GLdouble *v); \
void vertexAttrib4iv(GLuint index, const GLint *v); \
void vertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); \
void vertexAttrib4sv(GLuint index, const GLshort *v); \
void vertexAttrib4ubv(GLuint index, const GLubyte *v); \
void vertexAttrib4uiv(GLuint index, const GLuint *v); \
#define ANGLE_GL_2_0_CONTEXT_API \
void getVertexAttribdv(AttributeLocation indexPacked, GLenum pname, GLdouble *params); \
void vertexAttrib1d(AttributeLocation indexPacked, GLdouble x); \
void vertexAttrib1dv(AttributeLocation indexPacked, const GLdouble *v); \
void vertexAttrib1s(GLuint index, GLshort x); \
void vertexAttrib1sv(GLuint index, const GLshort *v); \
void vertexAttrib2d(AttributeLocation indexPacked, GLdouble x, GLdouble y); \
void vertexAttrib2dv(AttributeLocation indexPacked, const GLdouble *v); \
void vertexAttrib2s(GLuint index, GLshort x, GLshort y); \
void vertexAttrib2sv(GLuint index, const GLshort *v); \
void vertexAttrib3d(AttributeLocation indexPacked, GLdouble x, GLdouble y, GLdouble z); \
void vertexAttrib3dv(AttributeLocation indexPacked, const GLdouble *v); \
void vertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z); \
void vertexAttrib3sv(GLuint index, const GLshort *v); \
void vertexAttrib4Nbv(GLuint index, const GLbyte *v); \
void vertexAttrib4Niv(GLuint index, const GLint *v); \
void vertexAttrib4Nsv(GLuint index, const GLshort *v); \
void vertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); \
void vertexAttrib4Nubv(GLuint index, const GLubyte *v); \
void vertexAttrib4Nuiv(GLuint index, const GLuint *v); \
void vertexAttrib4Nusv(GLuint index, const GLushort *v); \
void vertexAttrib4bv(GLuint index, const GLbyte *v); \
void vertexAttrib4d(AttributeLocation indexPacked, GLdouble x, GLdouble y, GLdouble z, \
GLdouble w); \
void vertexAttrib4dv(AttributeLocation indexPacked, const GLdouble *v); \
void vertexAttrib4iv(GLuint index, const GLint *v); \
void vertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); \
void vertexAttrib4sv(GLuint index, const GLshort *v); \
void vertexAttrib4ubv(GLuint index, const GLubyte *v); \
void vertexAttrib4uiv(GLuint index, const GLuint *v); \
void vertexAttrib4usv(GLuint index, const GLushort *v);
#endif // ANGLE_CONTEXT_API_2_0_AUTOGEN_H_

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

@ -16,18 +16,18 @@
void endConditionalRender(); \
void framebufferTexture1D(GLenum target, GLenum attachment, TextureTarget textargetPacked, \
TextureID texturePacked, GLint level); \
void vertexAttribI1i(GLuint index, GLint x); \
void vertexAttribI1iv(GLuint index, const GLint *v); \
void vertexAttribI1ui(GLuint index, GLuint x); \
void vertexAttribI1uiv(GLuint index, const GLuint *v); \
void vertexAttribI2i(GLuint index, GLint x, GLint y); \
void vertexAttribI2iv(GLuint index, const GLint *v); \
void vertexAttribI2ui(GLuint index, GLuint x, GLuint y); \
void vertexAttribI2uiv(GLuint index, const GLuint *v); \
void vertexAttribI3i(GLuint index, GLint x, GLint y, GLint z); \
void vertexAttribI3iv(GLuint index, const GLint *v); \
void vertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z); \
void vertexAttribI3uiv(GLuint index, const GLuint *v); \
void vertexAttribI1i(AttributeLocation indexPacked, GLint x); \
void vertexAttribI1iv(AttributeLocation indexPacked, const GLint *v); \
void vertexAttribI1ui(AttributeLocation indexPacked, GLuint x); \
void vertexAttribI1uiv(AttributeLocation indexPacked, const GLuint *v); \
void vertexAttribI2i(AttributeLocation indexPacked, GLint x, GLint y); \
void vertexAttribI2iv(AttributeLocation indexPacked, const GLint *v); \
void vertexAttribI2ui(AttributeLocation indexPacked, GLuint x, GLuint y); \
void vertexAttribI2uiv(AttributeLocation indexPacked, const GLuint *v); \
void vertexAttribI3i(AttributeLocation indexPacked, GLint x, GLint y, GLint z); \
void vertexAttribI3iv(AttributeLocation indexPacked, const GLint *v); \
void vertexAttribI3ui(AttributeLocation indexPacked, GLuint x, GLuint y, GLuint z); \
void vertexAttribI3uiv(AttributeLocation indexPacked, const GLuint *v); \
void vertexAttribI4bv(GLuint index, const GLbyte *v); \
void vertexAttribI4sv(GLuint index, const GLshort *v); \
void vertexAttribI4ubv(GLuint index, const GLubyte *v); \

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

@ -56,8 +56,8 @@
void createTextures(GLenum target, GLsizei n, GLuint *textures); \
void createTransformFeedbacks(GLsizei n, GLuint *ids); \
void createVertexArrays(GLsizei n, VertexArrayID *arraysPacked); \
void disableVertexArrayAttrib(VertexArrayID vaobjPacked, GLuint index); \
void enableVertexArrayAttrib(VertexArrayID vaobjPacked, GLuint index); \
void disableVertexArrayAttrib(VertexArrayID vaobjPacked, AttributeLocation indexPacked); \
void enableVertexArrayAttrib(VertexArrayID vaobjPacked, AttributeLocation indexPacked); \
void flushMappedNamedBufferRange(BufferID bufferPacked, GLintptr offset, GLsizeiptr length); \
void generateTextureMipmap(TextureID texturePacked); \
void getCompressedTextureImage(TextureID texturePacked, GLint level, GLsizei bufSize, \
@ -98,10 +98,10 @@
void getTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param); \
void getTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param); \
void getTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param); \
void getVertexArrayIndexed64iv(VertexArrayID vaobjPacked, GLuint index, GLenum pname, \
GLint64 *param); \
void getVertexArrayIndexediv(VertexArrayID vaobjPacked, GLuint index, GLenum pname, \
GLint *param); \
void getVertexArrayIndexed64iv(VertexArrayID vaobjPacked, AttributeLocation indexPacked, \
GLenum pname, GLint64 *param); \
void getVertexArrayIndexediv(VertexArrayID vaobjPacked, AttributeLocation indexPacked, \
GLenum pname, GLint *param); \
void getVertexArrayiv(VertexArrayID vaobjPacked, GLenum pname, GLint *param); \
void getnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table); \
void getnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels); \
@ -188,14 +188,15 @@
void transformFeedbackBufferRange(GLuint xfb, GLuint index, BufferID bufferPacked, \
GLintptr offset, GLsizeiptr size); \
GLboolean unmapNamedBuffer(BufferID bufferPacked); \
void vertexArrayAttribBinding(VertexArrayID vaobjPacked, GLuint attribindex, \
void vertexArrayAttribBinding(VertexArrayID vaobjPacked, AttributeLocation attribindexPacked, \
GLuint bindingindex); \
void vertexArrayAttribFormat(VertexArrayID vaobjPacked, GLuint attribindex, GLint size, \
GLenum type, GLboolean normalized, GLuint relativeoffset); \
void vertexArrayAttribIFormat(VertexArrayID vaobjPacked, GLuint attribindex, GLint size, \
GLenum type, GLuint relativeoffset); \
void vertexArrayAttribLFormat(VertexArrayID vaobjPacked, GLuint attribindex, GLint size, \
GLenum type, GLuint relativeoffset); \
void vertexArrayAttribFormat(VertexArrayID vaobjPacked, AttributeLocation attribindexPacked, \
GLint size, GLenum type, GLboolean normalized, \
GLuint relativeoffset); \
void vertexArrayAttribIFormat(VertexArrayID vaobjPacked, AttributeLocation attribindexPacked, \
GLint size, GLenum type, GLuint relativeoffset); \
void vertexArrayAttribLFormat(VertexArrayID vaobjPacked, AttributeLocation attribindexPacked, \
GLint size, GLenum type, GLuint relativeoffset); \
void vertexArrayBindingDivisor(VertexArrayID vaobjPacked, GLuint bindingindex, \
GLuint divisor); \
void vertexArrayElementBuffer(VertexArrayID vaobjPacked, BufferID bufferPacked); \

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

@ -731,13 +731,13 @@ void Context::texGenxv(GLenum coord, GLenum pname, const GLint *params)
UNIMPLEMENTED();
}
int Context::vertexArrayIndex(ClientVertexArrayType type) const
AttributeLocation Context::vertexArrayIndex(ClientVertexArrayType type) const
{
return GLES1Renderer::VertexArrayIndex(type, mState.gles1());
return {GLES1Renderer::VertexArrayIndex(type, mState.gles1())};
}
// static
int Context::TexCoordArrayIndex(unsigned int unit)
AttributeLocation Context::TexCoordArrayIndex(unsigned int unit)
{
return GLES1Renderer::TexCoordArrayIndex(unit);
}

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

@ -59,12 +59,12 @@
void depthRangef(GLfloat n, GLfloat f); \
void detachShader(ShaderProgramID programPacked, ShaderProgramID shaderPacked); \
void disable(GLenum cap); \
void disableVertexAttribArray(GLuint index); \
void disableVertexAttribArray(AttributeLocation indexPacked); \
void drawArrays(PrimitiveMode modePacked, GLint first, GLsizei count); \
void drawElements(PrimitiveMode modePacked, GLsizei count, DrawElementsType typePacked, \
const void *indices); \
void enable(GLenum cap); \
void enableVertexAttribArray(GLuint index); \
void enableVertexAttribArray(AttributeLocation indexPacked); \
void finish(); \
void flush(); \
void framebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, \
@ -110,9 +110,9 @@
GLfloat *params); \
void getUniformiv(ShaderProgramID programPacked, UniformLocation locationPacked, \
GLint *params); \
void getVertexAttribPointerv(GLuint index, GLenum pname, void **pointer); \
void getVertexAttribfv(GLuint index, GLenum pname, GLfloat *params); \
void getVertexAttribiv(GLuint index, GLenum pname, GLint *params); \
void getVertexAttribPointerv(AttributeLocation indexPacked, GLenum pname, void **pointer); \
void getVertexAttribfv(AttributeLocation indexPacked, GLenum pname, GLfloat *params); \
void getVertexAttribiv(AttributeLocation indexPacked, GLenum pname, GLint *params); \
void hint(GLenum target, GLenum mode); \
GLboolean isBuffer(BufferID bufferPacked) const; \
GLboolean isEnabled(GLenum cap) const; \
@ -175,16 +175,18 @@
const GLfloat *value); \
void useProgram(ShaderProgramID programPacked); \
void validateProgram(ShaderProgramID programPacked); \
void vertexAttrib1f(GLuint index, GLfloat x); \
void vertexAttrib1fv(GLuint index, const GLfloat *v); \
void vertexAttrib2f(GLuint index, GLfloat x, GLfloat y); \
void vertexAttrib2fv(GLuint index, const GLfloat *v); \
void vertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); \
void vertexAttrib3fv(GLuint index, const GLfloat *v); \
void vertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); \
void vertexAttrib4fv(GLuint index, const GLfloat *v); \
void vertexAttribPointer(GLuint index, GLint size, VertexAttribType typePacked, \
GLboolean normalized, GLsizei stride, const void *pointer); \
void vertexAttrib1f(AttributeLocation indexPacked, GLfloat x); \
void vertexAttrib1fv(AttributeLocation indexPacked, const GLfloat *v); \
void vertexAttrib2f(AttributeLocation indexPacked, GLfloat x, GLfloat y); \
void vertexAttrib2fv(AttributeLocation indexPacked, const GLfloat *v); \
void vertexAttrib3f(AttributeLocation indexPacked, GLfloat x, GLfloat y, GLfloat z); \
void vertexAttrib3fv(AttributeLocation indexPacked, const GLfloat *v); \
void vertexAttrib4f(AttributeLocation indexPacked, GLfloat x, GLfloat y, GLfloat z, \
GLfloat w); \
void vertexAttrib4fv(AttributeLocation indexPacked, const GLfloat *v); \
void vertexAttribPointer(AttributeLocation indexPacked, GLint size, \
VertexAttribType typePacked, GLboolean normalized, GLsizei stride, \
const void *pointer); \
void viewport(GLint x, GLint y, GLsizei width, GLsizei height);
#endif // ANGLE_CONTEXT_API_2_0_AUTOGEN_H_

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

@ -89,8 +89,8 @@
const GLchar *const *uniformNames, GLuint *uniformIndices); \
void getUniformuiv(ShaderProgramID programPacked, UniformLocation locationPacked, \
GLuint *params); \
void getVertexAttribIiv(GLuint index, GLenum pname, GLint *params); \
void getVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params); \
void getVertexAttribIiv(AttributeLocation indexPacked, GLenum pname, GLint *params); \
void getVertexAttribIuiv(AttributeLocation indexPacked, GLenum pname, GLuint *params); \
void invalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments); \
void invalidateSubFramebuffer(GLenum target, GLsizei numAttachments, \
const GLenum *attachments, GLint x, GLint y, GLsizei width, \
@ -149,13 +149,13 @@
void uniformMatrix4x3fv(UniformLocation locationPacked, GLsizei count, GLboolean transpose, \
const GLfloat *value); \
GLboolean unmapBuffer(BufferBinding targetPacked); \
void vertexAttribDivisor(GLuint index, GLuint divisor); \
void vertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); \
void vertexAttribI4iv(GLuint index, const GLint *v); \
void vertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); \
void vertexAttribI4uiv(GLuint index, const GLuint *v); \
void vertexAttribIPointer(GLuint index, GLint size, VertexAttribType typePacked, \
GLsizei stride, const void *pointer); \
void vertexAttribDivisor(AttributeLocation indexPacked, GLuint divisor); \
void vertexAttribI4i(AttributeLocation indexPacked, GLint x, GLint y, GLint z, GLint w); \
void vertexAttribI4iv(AttributeLocation indexPacked, const GLint *v); \
void vertexAttribI4ui(AttributeLocation indexPacked, GLuint x, GLuint y, GLuint z, GLuint w); \
void vertexAttribI4uiv(AttributeLocation indexPacked, const GLuint *v); \
void vertexAttribIPointer(AttributeLocation indexPacked, GLint size, \
VertexAttribType typePacked, GLsizei stride, const void *pointer); \
void waitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
#endif // ANGLE_CONTEXT_API_3_0_AUTOGEN_H_

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

@ -123,11 +123,12 @@
void useProgramStages(ProgramPipelineID pipelinePacked, GLbitfield stages, \
ShaderProgramID programPacked); \
void validateProgramPipeline(ProgramPipelineID pipelinePacked); \
void vertexAttribBinding(GLuint attribindex, GLuint bindingindex); \
void vertexAttribFormat(GLuint attribindex, GLint size, VertexAttribType typePacked, \
GLboolean normalized, GLuint relativeoffset); \
void vertexAttribIFormat(GLuint attribindex, GLint size, VertexAttribType typePacked, \
GLuint relativeoffset); \
void vertexAttribBinding(AttributeLocation attribindexPacked, GLuint bindingindex); \
void vertexAttribFormat(AttributeLocation attribindexPacked, GLint size, \
VertexAttribType typePacked, GLboolean normalized, \
GLuint relativeoffset); \
void vertexAttribIFormat(AttributeLocation attribindexPacked, GLint size, \
VertexAttribType typePacked, GLuint relativeoffset); \
void vertexBindingDivisor(GLuint bindingindex, GLuint divisor);
#endif // ANGLE_CONTEXT_API_3_1_AUTOGEN_H_

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

@ -87,12 +87,12 @@
GLsizei bufSize, GLsizei *length, GLfloat *params); \
void getUniformivRobust(ShaderProgramID programPacked, UniformLocation locationPacked, \
GLsizei bufSize, GLsizei *length, GLint *params); \
void getVertexAttribfvRobust(GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLfloat *params); \
void getVertexAttribivRobust(GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLint *params); \
void getVertexAttribPointervRobust(GLuint index, GLenum pname, GLsizei bufSize, \
GLsizei *length, void **pointer); \
void getVertexAttribfvRobust(AttributeLocation indexPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLfloat *params); \
void getVertexAttribivRobust(AttributeLocation indexPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLint *params); \
void getVertexAttribPointervRobust(AttributeLocation indexPacked, GLenum pname, \
GLsizei bufSize, GLsizei *length, void **pointer); \
void readPixelsRobust(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, \
GLenum type, GLsizei bufSize, GLsizei *length, GLsizei *columns, \
GLsizei *rows, void *pixels); \
@ -137,10 +137,10 @@
GLint *data); \
void getInternalformativRobust(GLenum target, GLenum internalformat, GLenum pname, \
GLsizei bufSize, GLsizei *length, GLint *params); \
void getVertexAttribIivRobust(GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLint *params); \
void getVertexAttribIuivRobust(GLuint index, GLenum pname, GLsizei bufSize, GLsizei *length, \
GLuint *params); \
void getVertexAttribIivRobust(AttributeLocation indexPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLint *params); \
void getVertexAttribIuivRobust(AttributeLocation indexPacked, GLenum pname, GLsizei bufSize, \
GLsizei *length, GLuint *params); \
void getUniformuivRobust(ShaderProgramID programPacked, UniformLocation locationPacked, \
GLsizei bufSize, GLsizei *length, GLuint *params); \
void getActiveUniformBlockivRobust(ShaderProgramID programPacked, GLuint uniformBlockIndex, \

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

@ -1578,9 +1578,11 @@ void CaptureVertexArrayData(std::vector<CallCapture> *setupCalls,
const gl::VertexAttribute &attrib = vertexAttribs[attribIndex];
const gl::VertexBinding &binding = vertexBindings[attrib.bindingIndex];
gl::AttributeLocation attribLoc = {attribIndex};
if (attrib.enabled != defaultAttrib.enabled)
{
Capture(setupCalls, CaptureEnableVertexAttribArray(*replayState, false, attribIndex));
Capture(setupCalls, CaptureEnableVertexAttribArray(*replayState, false, attribLoc));
}
if (attrib.format != defaultAttrib.format || attrib.pointer != defaultAttrib.pointer ||
@ -1597,14 +1599,14 @@ void CaptureVertexArrayData(std::vector<CallCapture> *setupCalls,
}
Capture(setupCalls, CaptureVertexAttribPointer(
*replayState, true, attribIndex, attrib.format->channelCount,
*replayState, true, attribLoc, attrib.format->channelCount,
attrib.format->vertexAttribType, attrib.format->isNorm(),
binding.getStride(), attrib.pointer));
}
if (binding.getDivisor() != 0)
{
Capture(setupCalls, CaptureVertexAttribDivisor(*replayState, true, attribIndex,
Capture(setupCalls, CaptureVertexAttribDivisor(*replayState, true, attribLoc,
binding.getDivisor()));
}
}
@ -1804,12 +1806,12 @@ void CaptureMidExecutionSetup(const gl::Context *context,
const std::vector<gl::VertexAttribCurrentValueData> &currentValues =
apiState.getVertexAttribCurrentValues();
for (GLuint attribIndex = 0; attribIndex < gl::MAX_VERTEX_ATTRIBS; ++attribIndex)
for (uint32_t attribIndex = 0; attribIndex < gl::MAX_VERTEX_ATTRIBS; ++attribIndex)
{
const gl::VertexAttribCurrentValueData &defaultValue = currentValues[attribIndex];
if (!IsDefaultCurrentValue(defaultValue))
{
Capture(setupCalls, CaptureVertexAttrib4fv(replayState, true, attribIndex,
Capture(setupCalls, CaptureVertexAttrib4fv(replayState, true, {attribIndex},
defaultValue.Values.FloatValues));
}
}
@ -3445,8 +3447,9 @@ void FrameCapture::captureClientArraySnapshot(const gl::Context *context,
// Capture client array data.
for (size_t attribIndex : context->getStateCache().getActiveClientAttribsMask())
{
const gl::VertexAttribute &attrib = vao->getVertexAttribute(attribIndex);
const gl::VertexBinding &binding = vao->getVertexBinding(attrib.bindingIndex);
const gl::VertexAttribute &attrib =
vao->getVertexAttribute({static_cast<uint32_t>(attribIndex)});
const gl::VertexBinding &binding = vao->getVertexBinding(attrib.bindingIndex);
int callIndex = mClientVertexArrayMap[attribIndex];
@ -3888,6 +3891,15 @@ bool FindShaderProgramIDInCall(const CallCapture &call, gl::ShaderProgramID *idO
return false;
}
template <>
void WriteParamValueReplay<ParamType::TAttributeLocation>(std::ostream &os,
const CallCapture &call,
gl::AttributeLocation value)
{
// TODO(jmadill): Use attribute map. http://anglebug.com/4598
os << value.value;
}
template <>
void WriteParamValueReplay<ParamType::TUniformLocation>(std::ostream &os,
const CallCapture &call,

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

@ -313,6 +313,11 @@ void CaptureGenHandles(GLsizei n, T *handles, ParamCapture *paramCapture)
template <ParamType ParamT, typename T>
void WriteParamValueReplay(std::ostream &os, const CallCapture &call, T value);
template <>
void WriteParamValueReplay<ParamType::TAttributeLocation>(std::ostream &os,
const CallCapture &call,
gl::AttributeLocation value);
template <>
void WriteParamValueReplay<ParamType::TGLboolean>(std::ostream &os,
const CallCapture &call,
@ -348,6 +353,11 @@ void WriteParamValueReplay<ParamType::TFramebufferID>(std::ostream &os,
const CallCapture &call,
gl::FramebufferID value);
template <>
void WriteParamValueReplay<ParamType::TGLsync>(std::ostream &os,
const CallCapture &call,
GLsync value);
template <>
void WriteParamValueReplay<ParamType::TMemoryObjectID>(std::ostream &os,
const CallCapture &call,
@ -403,11 +413,6 @@ void WriteParamValueReplay<ParamType::TUniformLocation>(std::ostream &os,
const CallCapture &call,
gl::UniformLocation value);
template <>
void WriteParamValueReplay<ParamType::TGLsync>(std::ostream &os,
const CallCapture &call,
GLsync value);
// General fallback for any unspecific type.
template <ParamType ParamT, typename T>
void WriteParamValueReplay(std::ostream &os, const CallCapture &call, T value)

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

@ -24,10 +24,18 @@
namespace
{
#include "libANGLE/GLES1Shaders.inc"
} // anonymous namespace
} // namespace
namespace gl
{
namespace
{
static constexpr AttributeLocation kVertexAttribIndex = {0};
static constexpr AttributeLocation kNormalAttribIndex = {1};
static constexpr AttributeLocation kColorAttribIndex = {2};
static constexpr AttributeLocation kPointSizeAttribIndex = {3};
static constexpr AttributeLocation kTextureCoordAttribIndexBase = {4};
} // namespace
GLES1Renderer::GLES1Renderer() : mRendererProgramInitialized(false) {}
@ -180,8 +188,8 @@ angle::Result GLES1Renderer::prepareForDraw(PrimitiveMode mode, Context *context
if (!gles1State.mTexCoordArrayEnabled[i])
{
const TextureCoordF texcoord = gles1State.getCurrentTextureCoords(i);
context->vertexAttrib4f(kTextureCoordAttribIndexBase + i, texcoord.s, texcoord.t,
texcoord.r, texcoord.q);
context->vertexAttrib4f({kTextureCoordAttribIndexBase.value + i}, texcoord.s,
texcoord.t, texcoord.r, texcoord.q);
}
}
}
@ -434,7 +442,8 @@ angle::Result GLES1Renderer::prepareForDraw(PrimitiveMode mode, Context *context
}
// static
int GLES1Renderer::VertexArrayIndex(ClientVertexArrayType type, const GLES1State &gles1)
AttributeLocation GLES1Renderer::VertexArrayIndex(ClientVertexArrayType type,
const GLES1State &gles1)
{
switch (type)
{
@ -447,17 +456,18 @@ int GLES1Renderer::VertexArrayIndex(ClientVertexArrayType type, const GLES1State
case ClientVertexArrayType::PointSize:
return kPointSizeAttribIndex;
case ClientVertexArrayType::TextureCoord:
return kTextureCoordAttribIndexBase + gles1.getClientTextureUnit();
return {kTextureCoordAttribIndexBase.value +
static_cast<int>(gles1.getClientTextureUnit())};
default:
UNREACHABLE();
return 0;
return {0};
}
}
// static
int GLES1Renderer::TexCoordArrayIndex(unsigned int unit)
AttributeLocation GLES1Renderer::TexCoordArrayIndex(unsigned int unit)
{
return kTextureCoordAttribIndexBase + unit;
return {kTextureCoordAttribIndexBase.value + static_cast<int>(unit)};
}
void GLES1Renderer::drawTexture(Context *context,
@ -545,12 +555,13 @@ angle::Result GLES1Renderer::compileShader(Context *context,
return angle::Result::Continue;
}
angle::Result GLES1Renderer::linkProgram(Context *context,
State *glState,
ShaderProgramID vertexShader,
ShaderProgramID fragmentShader,
const std::unordered_map<GLint, std::string> &attribLocs,
ShaderProgramID *programOut)
angle::Result GLES1Renderer::linkProgram(
Context *context,
State *glState,
ShaderProgramID vertexShader,
ShaderProgramID fragmentShader,
const std::unordered_map<uint32_t, std::string> &attribLocs,
ShaderProgramID *programOut)
{
ShaderProgramID program = mShaderPrograms->createProgram(context->getImplementation());
@ -564,7 +575,7 @@ angle::Result GLES1Renderer::linkProgram(Context *context,
for (auto it : attribLocs)
{
GLint index = it.first;
uint32_t index = it.first;
const std::string &name = it.second;
programObject->bindAttributeLocation(index, name.c_str());
}
@ -615,18 +626,18 @@ angle::Result GLES1Renderer::initializeRendererProgram(Context *context, State *
ANGLE_TRY(compileShader(context, ShaderType::Fragment, fragmentStream.str().c_str(),
&fragmentShader));
std::unordered_map<GLint, std::string> attribLocs;
std::unordered_map<uint32_t, std::string> attribLocs;
attribLocs[(GLint)kVertexAttribIndex] = "pos";
attribLocs[(GLint)kNormalAttribIndex] = "normal";
attribLocs[(GLint)kColorAttribIndex] = "color";
attribLocs[(GLint)kPointSizeAttribIndex] = "pointsize";
attribLocs[kVertexAttribIndex.value] = "pos";
attribLocs[kNormalAttribIndex.value] = "normal";
attribLocs[kColorAttribIndex.value] = "color";
attribLocs[kPointSizeAttribIndex.value] = "pointsize";
for (int i = 0; i < kTexUnitCount; i++)
for (uint32_t i = 0; i < kTexUnitCount; i++)
{
std::stringstream ss;
ss << "texcoord" << i;
attribLocs[kTextureCoordAttribIndexBase + i] = ss.str();
attribLocs[{kTextureCoordAttribIndexBase.value + i}] = ss.str();
}
ANGLE_TRY(linkProgram(context, glState, vertexShader, fragmentShader, attribLocs,
@ -853,9 +864,9 @@ void GLES1Renderer::setAttributesEnabled(Context *context, State *glState, Attri
for (const ClientVertexArrayType attrib : nonTexcoordArrays)
{
int index = VertexArrayIndex(attrib, glState->gles1());
AttributeLocation index = VertexArrayIndex(attrib, glState->gles1());
if (mask.test(index))
if (mask.test(index.value))
{
gles1.setClientStateEnabled(attrib, true);
context->enableVertexAttribArray(index);
@ -869,9 +880,9 @@ void GLES1Renderer::setAttributesEnabled(Context *context, State *glState, Attri
for (unsigned int i = 0; i < kTexUnitCount; i++)
{
int index = TexCoordArrayIndex(i);
AttributeLocation index = TexCoordArrayIndex(i);
if (mask.test(index))
if (mask.test(index.value))
{
gles1.setTexCoordArrayEnabled(i, true);
context->enableVertexAttribArray(index);

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

@ -37,8 +37,8 @@ class GLES1Renderer final : angle::NonCopyable
angle::Result prepareForDraw(PrimitiveMode mode, Context *context, State *glState);
static int VertexArrayIndex(ClientVertexArrayType type, const GLES1State &gles1);
static int TexCoordArrayIndex(unsigned int unit);
static AttributeLocation VertexArrayIndex(ClientVertexArrayType type, const GLES1State &gles1);
static AttributeLocation TexCoordArrayIndex(unsigned int unit);
void drawTexture(Context *context,
State *glState,
@ -66,7 +66,7 @@ class GLES1Renderer final : angle::NonCopyable
State *glState,
ShaderProgramID vshader,
ShaderProgramID fshader,
const std::unordered_map<GLint, std::string> &attribLocs,
const std::unordered_map<uint32_t, std::string> &attribLocs,
ShaderProgramID *programOut);
angle::Result initializeRendererProgram(Context *context, State *glState);
@ -107,12 +107,6 @@ class GLES1Renderer final : angle::NonCopyable
static constexpr int kLightCount = 8;
static constexpr int kClipPlaneCount = 6;
static constexpr int kVertexAttribIndex = 0;
static constexpr int kNormalAttribIndex = 1;
static constexpr int kColorAttribIndex = 2;
static constexpr int kPointSizeAttribIndex = 3;
static constexpr int kTextureCoordAttribIndexBase = 4;
bool mRendererProgramInitialized;
ShaderProgramManager *mShaderPrograms;

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

@ -500,13 +500,13 @@ AttributesMask GLES1State::getVertexArraysAttributeMask() const
for (const ClientVertexArrayType attrib : nonTexcoordArrays)
{
attribsMask.set(GLES1Renderer::VertexArrayIndex(attrib, *this),
attribsMask.set(GLES1Renderer::VertexArrayIndex(attrib, *this).value,
isClientStateEnabled(attrib));
}
for (unsigned int i = 0; i < GLES1Renderer::kTexUnitCount; i++)
{
attribsMask.set(GLES1Renderer::TexCoordArrayIndex(i), isTexCoordArrayEnabled(i));
attribsMask.set(GLES1Renderer::TexCoordArrayIndex(i).value, isTexCoordArrayEnabled(i));
}
return attribsMask;

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

@ -1184,17 +1184,17 @@ GLuint ProgramState::getUniformIndexFromImageIndex(GLuint imageIndex) const
return imageIndex + mImageUniformRange.low();
}
GLuint ProgramState::getAttributeLocation(const std::string &name) const
AttributeLocation ProgramState::getAttributeLocation(const std::string &name) const
{
for (const sh::ShaderVariable &attribute : mProgramInputs)
{
if (attribute.name == name)
{
return attribute.location;
return {static_cast<uint32_t>(attribute.location)};
}
}
return static_cast<GLuint>(-1);
return {static_cast<uint32_t>(-1)};
}
bool ProgramState::hasAttachedShader() const
@ -2002,7 +2002,7 @@ void Program::getAttachedShaders(GLsizei maxCount, GLsizei *count, ShaderProgram
}
}
GLuint Program::getAttributeLocation(const std::string &name) const
AttributeLocation Program::getAttributeLocation(const std::string &name) const
{
ASSERT(mLinkResolved);
return mState.getAttributeLocation(name);

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

@ -316,7 +316,7 @@ class ProgramState final : angle::NonCopyable
bool isImageUniformIndex(GLuint index) const;
GLuint getImageIndexFromUniformIndex(GLuint uniformIndex) const;
GLuint getUniformIndexFromImageIndex(GLuint imageIndex) const;
GLuint getAttributeLocation(const std::string &name) const;
AttributeLocation getAttributeLocation(const std::string &name) const;
GLuint getBufferVariableIndexFromName(const std::string &name) const;
@ -548,7 +548,7 @@ class Program final : angle::NonCopyable, public LabeledObject
void getAttachedShaders(GLsizei maxCount, GLsizei *count, ShaderProgramID *shaders) const;
GLuint getAttributeLocation(const std::string &name) const;
AttributeLocation getAttributeLocation(const std::string &name) const;
void getActiveAttribute(GLuint index,
GLsizei bufsize,

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

@ -1745,7 +1745,7 @@ void State::bindVertexBuffer(const Context *context,
mDirtyObjects.set(DIRTY_OBJECT_VERTEX_ARRAY);
}
void State::setVertexAttribFormat(GLuint attribIndex,
void State::setVertexAttribFormat(AttributeLocation attribIndex,
GLint size,
VertexAttribType type,
bool normalized,
@ -2047,46 +2047,46 @@ angle::Result State::detachBuffer(Context *context, const Buffer *buffer)
return angle::Result::Continue;
}
void State::setEnableVertexAttribArray(unsigned int attribNum, bool enabled)
void State::setEnableVertexAttribArray(AttributeLocation attribNum, bool enabled)
{
getVertexArray()->enableAttribute(attribNum, enabled);
mDirtyObjects.set(DIRTY_OBJECT_VERTEX_ARRAY);
}
void State::setVertexAttribf(GLuint index, const GLfloat values[4])
void State::setVertexAttribf(AttributeLocation index, const GLfloat values[4])
{
ASSERT(static_cast<size_t>(index) < mVertexAttribCurrentValues.size());
mVertexAttribCurrentValues[index].setFloatValues(values);
ASSERT(static_cast<size_t>(index.value) < mVertexAttribCurrentValues.size());
mVertexAttribCurrentValues[index.value].setFloatValues(values);
mDirtyBits.set(DIRTY_BIT_CURRENT_VALUES);
mDirtyCurrentValues.set(index);
SetComponentTypeMask(ComponentType::Float, index, &mCurrentValuesTypeMask);
mDirtyCurrentValues.set(index.value);
SetComponentTypeMask(ComponentType::Float, index.value, &mCurrentValuesTypeMask);
}
void State::setVertexAttribu(GLuint index, const GLuint values[4])
void State::setVertexAttribu(AttributeLocation index, const GLuint values[4])
{
ASSERT(static_cast<size_t>(index) < mVertexAttribCurrentValues.size());
mVertexAttribCurrentValues[index].setUnsignedIntValues(values);
ASSERT(static_cast<size_t>(index.value) < mVertexAttribCurrentValues.size());
mVertexAttribCurrentValues[index.value].setUnsignedIntValues(values);
mDirtyBits.set(DIRTY_BIT_CURRENT_VALUES);
mDirtyCurrentValues.set(index);
SetComponentTypeMask(ComponentType::UnsignedInt, index, &mCurrentValuesTypeMask);
mDirtyCurrentValues.set(index.value);
SetComponentTypeMask(ComponentType::UnsignedInt, index.value, &mCurrentValuesTypeMask);
}
void State::setVertexAttribi(GLuint index, const GLint values[4])
void State::setVertexAttribi(AttributeLocation index, const GLint values[4])
{
ASSERT(static_cast<size_t>(index) < mVertexAttribCurrentValues.size());
mVertexAttribCurrentValues[index].setIntValues(values);
ASSERT(static_cast<size_t>(index.value) < mVertexAttribCurrentValues.size());
mVertexAttribCurrentValues[index.value].setIntValues(values);
mDirtyBits.set(DIRTY_BIT_CURRENT_VALUES);
mDirtyCurrentValues.set(index);
SetComponentTypeMask(ComponentType::Int, index, &mCurrentValuesTypeMask);
mDirtyCurrentValues.set(index.value);
SetComponentTypeMask(ComponentType::Int, index.value, &mCurrentValuesTypeMask);
}
void State::setVertexAttribDivisor(const Context *context, GLuint index, GLuint divisor)
void State::setVertexAttribDivisor(const Context *context, AttributeLocation index, GLuint divisor)
{
getVertexArray()->setVertexAttribDivisor(context, index, divisor);
mDirtyObjects.set(DIRTY_OBJECT_VERTEX_ARRAY);
}
const void *State::getVertexAttribPointer(unsigned int attribNum) const
const void *State::getVertexAttribPointer(AttributeLocation attribNum) const
{
return getVertexArray()->getVertexAttribute(attribNum).pointer;
}
@ -2845,10 +2845,12 @@ void State::getPointerv(const Context *context, GLenum pname, void **params) con
case GL_COLOR_ARRAY_POINTER:
case GL_TEXTURE_COORD_ARRAY_POINTER:
case GL_POINT_SIZE_ARRAY_POINTER_OES:
QueryVertexAttribPointerv(getVertexArray()->getVertexAttribute(
context->vertexArrayIndex(ParamToVertexArrayType(pname))),
{
AttributeLocation index = {context->vertexArrayIndex(ParamToVertexArrayType(pname))};
QueryVertexAttribPointerv(getVertexArray()->getVertexAttribute(index),
GL_VERTEX_ATTRIB_ARRAY_POINTER, params);
return;
}
default:
UNREACHABLE();
break;

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

@ -421,13 +421,13 @@ class State : angle::NonCopyable
angle::Result detachBuffer(Context *context, const Buffer *buffer);
// Vertex attrib manipulation
void setEnableVertexAttribArray(unsigned int attribNum, bool enabled);
void setVertexAttribf(GLuint index, const GLfloat values[4]);
void setVertexAttribu(GLuint index, const GLuint values[4]);
void setVertexAttribi(GLuint index, const GLint values[4]);
void setEnableVertexAttribArray(AttributeLocation attribNum, bool enabled);
void setVertexAttribf(AttributeLocation index, const GLfloat values[4]);
void setVertexAttribu(AttributeLocation index, const GLuint values[4]);
void setVertexAttribi(AttributeLocation index, const GLint values[4]);
ANGLE_INLINE void setVertexAttribPointer(const Context *context,
unsigned int attribNum,
AttributeLocation attribNum,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
@ -441,7 +441,7 @@ class State : angle::NonCopyable
}
ANGLE_INLINE void setVertexAttribIPointer(const Context *context,
unsigned int attribNum,
AttributeLocation attribNum,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
@ -453,11 +453,12 @@ class State : angle::NonCopyable
mDirtyObjects.set(DIRTY_OBJECT_VERTEX_ARRAY);
}
void setVertexAttribDivisor(const Context *context, GLuint index, GLuint divisor);
const VertexAttribCurrentValueData &getVertexAttribCurrentValue(size_t attribNum) const
void setVertexAttribDivisor(const Context *context, AttributeLocation index, GLuint divisor);
const VertexAttribCurrentValueData &getVertexAttribCurrentValue(
AttributeLocation attribNum) const
{
ASSERT(attribNum < mVertexAttribCurrentValues.size());
return mVertexAttribCurrentValues[attribNum];
ASSERT(attribNum.value < mVertexAttribCurrentValues.size());
return mVertexAttribCurrentValues[attribNum.value];
}
const std::vector<VertexAttribCurrentValueData> &getVertexAttribCurrentValues() const
@ -465,21 +466,23 @@ class State : angle::NonCopyable
return mVertexAttribCurrentValues;
}
const void *getVertexAttribPointer(unsigned int attribNum) const;
const void *getVertexAttribPointer(AttributeLocation attribNum) const;
void bindVertexBuffer(const Context *context,
GLuint bindingIndex,
Buffer *boundBuffer,
GLintptr offset,
GLsizei stride);
void setVertexAttribFormat(GLuint attribIndex,
void setVertexAttribFormat(AttributeLocation attribIndex,
GLint size,
VertexAttribType type,
bool normalized,
bool pureInteger,
GLuint relativeOffset);
void setVertexAttribBinding(const Context *context, GLuint attribIndex, GLuint bindingIndex)
void setVertexAttribBinding(const Context *context,
AttributeLocation attribIndex,
GLuint bindingIndex)
{
mVertexArray->setVertexAttribBinding(context, attribIndex, bindingIndex);
mDirtyObjects.set(DIRTY_OBJECT_VERTEX_ARRAY);

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

@ -60,12 +60,12 @@ AttributesMask VertexArrayState::getBindingToAttributesMask(GLuint bindingIndex)
// Set an attribute using a new binding.
void VertexArrayState::setAttribBinding(const Context *context,
size_t attribIndex,
AttributeLocation attribIndex,
GLuint newBindingIndex)
{
ASSERT(attribIndex < MAX_VERTEX_ATTRIBS && newBindingIndex < MAX_VERTEX_ATTRIB_BINDINGS);
ASSERT(attribIndex.value < MAX_VERTEX_ATTRIBS && newBindingIndex < MAX_VERTEX_ATTRIB_BINDINGS);
VertexAttribute &attrib = mVertexAttributes[attribIndex];
VertexAttribute &attrib = mVertexAttributes[attribIndex.value];
// Update the binding-attribute map.
const GLuint oldBindingIndex = attrib.bindingIndex;
@ -74,11 +74,11 @@ void VertexArrayState::setAttribBinding(const Context *context,
VertexBinding &oldBinding = mVertexBindings[oldBindingIndex];
VertexBinding &newBinding = mVertexBindings[newBindingIndex];
ASSERT(oldBinding.getBoundAttributesMask().test(attribIndex) &&
!newBinding.getBoundAttributesMask().test(attribIndex));
ASSERT(oldBinding.getBoundAttributesMask().test(attribIndex.value) &&
!newBinding.getBoundAttributesMask().test(attribIndex.value));
oldBinding.resetBoundAttribute(attribIndex);
newBinding.setBoundAttribute(attribIndex);
oldBinding.resetBoundAttribute(attribIndex.value);
newBinding.setBoundAttribute(attribIndex.value);
// Set the attribute using the new binding.
attrib.bindingIndex = newBindingIndex;
@ -89,8 +89,8 @@ void VertexArrayState::setAttribBinding(const Context *context,
}
bool isMapped = newBinding.getBuffer().get() && newBinding.getBuffer()->isMapped();
mCachedMappedArrayBuffers.set(attribIndex, isMapped);
mCachedEnabledMappedArrayBuffers.set(attribIndex, isMapped && attrib.enabled);
mCachedMappedArrayBuffers.set(attribIndex.value, isMapped);
mCachedEnabledMappedArrayBuffers.set(attribIndex.value, isMapped && attrib.enabled);
}
// VertexArray implementation.
@ -172,7 +172,7 @@ bool VertexArray::detachBuffer(const Context *context, BufferID bufferID)
// The redundant uint32_t cast here is required to avoid a warning on MSVC.
ASSERT(binding.getBoundAttributesMask() ==
AttributesMask(static_cast<uint32_t>(1 << bindingIndex)));
setDirtyAttribBit(bindingIndex, DIRTY_ATTRIB_POINTER);
setDirtyAttribBit({bindingIndex}, DIRTY_ATTRIB_POINTER);
}
anyBufferDetached = true;
@ -192,10 +192,10 @@ bool VertexArray::detachBuffer(const Context *context, BufferID bufferID)
return anyBufferDetached;
}
const VertexAttribute &VertexArray::getVertexAttribute(size_t attribIndex) const
const VertexAttribute &VertexArray::getVertexAttribute(AttributeLocation attribIndex) const
{
ASSERT(attribIndex < getMaxAttribs());
return mState.mVertexAttributes[attribIndex];
ASSERT(attribIndex.value < getMaxAttribs());
return mState.mVertexAttributes[attribIndex.value];
}
const VertexBinding &VertexArray::getVertexBinding(size_t bindingIndex) const
@ -212,11 +212,11 @@ size_t VertexArray::GetVertexIndexFromDirtyBit(size_t dirtyBit)
return (dirtyBit - DIRTY_BIT_ATTRIB_0) % gl::MAX_VERTEX_ATTRIBS;
}
ANGLE_INLINE void VertexArray::setDirtyAttribBit(size_t attribIndex,
ANGLE_INLINE void VertexArray::setDirtyAttribBit(AttributeLocation attribIndex,
DirtyAttribBitType dirtyAttribBit)
{
mDirtyBits.set(DIRTY_BIT_ATTRIB_0 + attribIndex);
mDirtyAttribBits[attribIndex].set(dirtyAttribBit);
mDirtyBits.set(DIRTY_BIT_ATTRIB_0 + attribIndex.value);
mDirtyAttribBits[attribIndex.value].set(dirtyAttribBit);
}
ANGLE_INLINE void VertexArray::setDirtyBindingBit(size_t bindingIndex,
@ -341,12 +341,12 @@ void VertexArray::bindVertexBuffer(const Context *context,
}
void VertexArray::setVertexAttribBinding(const Context *context,
size_t attribIndex,
AttributeLocation attribIndex,
GLuint bindingIndex)
{
ASSERT(attribIndex < getMaxAttribs() && bindingIndex < getMaxBindings());
ASSERT(attribIndex.value < getMaxAttribs() && bindingIndex < getMaxBindings());
if (mState.mVertexAttributes[attribIndex].bindingIndex != bindingIndex)
if (mState.mVertexAttributes[attribIndex.value].bindingIndex != bindingIndex)
{
// In ES 3.0 contexts, the binding cannot change, hence the code below is unreachable.
ASSERT(context->getClientVersion() >= ES_3_1);
@ -357,7 +357,7 @@ void VertexArray::setVertexAttribBinding(const Context *context,
// Update client attribs mask.
bool hasBuffer = mState.mVertexBindings[bindingIndex].getBuffer().get() != nullptr;
mState.mClientMemoryAttribsMask.set(attribIndex, !hasBuffer);
mState.mClientMemoryAttribsMask.set(attribIndex.value, !hasBuffer);
}
}
@ -396,17 +396,17 @@ ANGLE_INLINE bool VertexArray::setVertexAttribFormatImpl(VertexAttribute *attrib
return false;
}
void VertexArray::setVertexAttribFormat(size_t attribIndex,
void VertexArray::setVertexAttribFormat(AttributeLocation attribIndex,
GLint size,
VertexAttribType type,
bool normalized,
bool pureInteger,
GLuint relativeOffset)
{
VertexAttribute &attrib = mState.mVertexAttributes[attribIndex];
VertexAttribute &attrib = mState.mVertexAttributes[attribIndex.value];
ComponentType componentType = GetVertexAttributeComponentType(pureInteger, type);
SetComponentTypeMask(componentType, attribIndex, &mState.mVertexAttributesTypeMask);
SetComponentTypeMask(componentType, attribIndex.value, &mState.mVertexAttributesTypeMask);
if (setVertexAttribFormatImpl(&attrib, size, type, normalized, pureInteger, relativeOffset))
{
@ -416,21 +416,23 @@ void VertexArray::setVertexAttribFormat(size_t attribIndex,
attrib.updateCachedElementLimit(mState.mVertexBindings[attrib.bindingIndex]);
}
void VertexArray::setVertexAttribDivisor(const Context *context, size_t attribIndex, GLuint divisor)
void VertexArray::setVertexAttribDivisor(const Context *context,
AttributeLocation attribIndex,
GLuint divisor)
{
ASSERT(attribIndex < getMaxAttribs());
ASSERT(attribIndex.value < getMaxAttribs());
setVertexAttribBinding(context, attribIndex, static_cast<GLuint>(attribIndex));
setVertexBindingDivisor(attribIndex, divisor);
setVertexAttribBinding(context, attribIndex, static_cast<GLuint>(attribIndex.value));
setVertexBindingDivisor(attribIndex.value, divisor);
}
void VertexArray::enableAttribute(size_t attribIndex, bool enabledState)
void VertexArray::enableAttribute(AttributeLocation attribIndex, bool enabledState)
{
ASSERT(attribIndex < getMaxAttribs());
ASSERT(attribIndex.value < getMaxAttribs());
VertexAttribute &attrib = mState.mVertexAttributes[attribIndex];
VertexAttribute &attrib = mState.mVertexAttributes[attribIndex.value];
if (mState.mEnabledAttributesMask.test(attribIndex) == enabledState)
if (mState.mEnabledAttributesMask.test(attribIndex.value) == enabledState)
{
return;
}
@ -440,7 +442,7 @@ void VertexArray::enableAttribute(size_t attribIndex, bool enabledState)
setDirtyAttribBit(attribIndex, DIRTY_ATTRIB_ENABLED);
// Update state cache
mState.mEnabledAttributesMask.set(attribIndex, enabledState);
mState.mEnabledAttributesMask.set(attribIndex.value, enabledState);
mState.mCachedEnabledMappedArrayBuffers =
mState.mCachedMappedArrayBuffers & mState.mEnabledAttributesMask;
}
@ -448,7 +450,7 @@ void VertexArray::enableAttribute(size_t attribIndex, bool enabledState)
ANGLE_INLINE void VertexArray::setVertexAttribPointerImpl(const Context *context,
ComponentType componentType,
bool pureInteger,
size_t attribIndex,
AttributeLocation attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
@ -456,17 +458,17 @@ ANGLE_INLINE void VertexArray::setVertexAttribPointerImpl(const Context *context
GLsizei stride,
const void *pointer)
{
ASSERT(attribIndex < getMaxAttribs());
ASSERT(attribIndex.value < getMaxAttribs());
VertexAttribute &attrib = mState.mVertexAttributes[attribIndex];
VertexAttribute &attrib = mState.mVertexAttributes[attribIndex.value];
SetComponentTypeMask(componentType, attribIndex, &mState.mVertexAttributesTypeMask);
SetComponentTypeMask(componentType, attribIndex.value, &mState.mVertexAttributesTypeMask);
bool attribDirty = setVertexAttribFormatImpl(&attrib, size, type, normalized, pureInteger, 0);
if (attrib.bindingIndex != attribIndex)
if (attrib.bindingIndex != static_cast<GLuint>(attribIndex.value))
{
setVertexAttribBinding(context, attribIndex, static_cast<GLuint>(attribIndex));
setVertexAttribBinding(context, attribIndex, static_cast<GLuint>(attribIndex.value));
}
GLsizei effectiveStride =
@ -480,7 +482,7 @@ ANGLE_INLINE void VertexArray::setVertexAttribPointerImpl(const Context *context
// If we switch from an array buffer to a client pointer(or vice-versa), we set the whole
// attribute dirty. This notifies the Vulkan back-end to update all its caches.
const VertexBinding &binding = mState.mVertexBindings[attribIndex];
const VertexBinding &binding = mState.mVertexBindings[attribIndex.value];
if ((boundBuffer == nullptr) != (binding.getBuffer().get() == nullptr))
{
attribDirty = true;
@ -491,7 +493,7 @@ ANGLE_INLINE void VertexArray::setVertexAttribPointerImpl(const Context *context
attrib.pointer = pointer;
GLintptr offset = boundBuffer ? reinterpret_cast<GLintptr>(pointer) : 0;
const bool bufferDirty =
bindVertexBufferImpl(context, attribIndex, boundBuffer, offset, effectiveStride);
bindVertexBufferImpl(context, attribIndex.value, boundBuffer, offset, effectiveStride);
if (attribDirty)
{
@ -502,12 +504,12 @@ ANGLE_INLINE void VertexArray::setVertexAttribPointerImpl(const Context *context
setDirtyAttribBit(attribIndex, DIRTY_ATTRIB_POINTER_BUFFER);
}
mState.mNullPointerClientMemoryAttribsMask.set(attribIndex,
mState.mNullPointerClientMemoryAttribsMask.set(attribIndex.value,
boundBuffer == nullptr && pointer == nullptr);
}
void VertexArray::setVertexAttribPointer(const Context *context,
size_t attribIndex,
AttributeLocation attribIndex,
gl::Buffer *boundBuffer,
GLint size,
VertexAttribType type,
@ -520,7 +522,7 @@ void VertexArray::setVertexAttribPointer(const Context *context,
}
void VertexArray::setVertexAttribIPointer(const Context *context,
size_t attribIndex,
AttributeLocation attribIndex,
gl::Buffer *boundBuffer,
GLint size,
VertexAttribType type,

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

@ -45,25 +45,27 @@ class VertexArrayState final : angle::NonCopyable
size_t getMaxBindings() const { return mVertexBindings.size(); }
const AttributesMask &getEnabledAttributesMask() const { return mEnabledAttributesMask; }
const std::vector<VertexAttribute> &getVertexAttributes() const { return mVertexAttributes; }
const VertexAttribute &getVertexAttribute(size_t attribIndex) const
const VertexAttribute &getVertexAttribute(AttributeLocation attribIndex) const
{
return mVertexAttributes[attribIndex];
return mVertexAttributes[attribIndex.value];
}
const std::vector<VertexBinding> &getVertexBindings() const { return mVertexBindings; }
const VertexBinding &getVertexBinding(size_t bindingIndex) const
{
return mVertexBindings[bindingIndex];
}
const VertexBinding &getBindingFromAttribIndex(size_t attribIndex) const
const VertexBinding &getBindingFromAttribIndex(AttributeLocation attribIndex) const
{
return mVertexBindings[mVertexAttributes[attribIndex].bindingIndex];
return mVertexBindings[mVertexAttributes[attribIndex.value].bindingIndex];
}
size_t getBindingIndexFromAttribIndex(size_t attribIndex) const
size_t getBindingIndexFromAttribIndex(AttributeLocation attribIndex) const
{
return mVertexAttributes[attribIndex].bindingIndex;
return mVertexAttributes[attribIndex.value].bindingIndex;
}
void setAttribBinding(const Context *context, size_t attribIndex, GLuint newBindingIndex);
void setAttribBinding(const Context *context,
AttributeLocation attribIndex,
GLuint newBindingIndex);
// Extra validation performed on the Vertex Array.
bool hasEnabledNullPointerClientArray() const;
@ -172,8 +174,8 @@ class VertexArray final : public angle::ObserverInterface,
const std::string &getLabel() const override;
const VertexBinding &getVertexBinding(size_t bindingIndex) const;
const VertexAttribute &getVertexAttribute(size_t attribIndex) const;
const VertexBinding &getBindingFromAttribIndex(size_t attribIndex) const
const VertexAttribute &getVertexAttribute(AttributeLocation attribIndex) const;
const VertexBinding &getBindingFromAttribIndex(AttributeLocation attribIndex) const
{
return mState.getBindingFromAttribIndex(attribIndex);
}
@ -181,11 +183,11 @@ class VertexArray final : public angle::ObserverInterface,
// Returns true if the function finds and detaches a bound buffer.
bool detachBuffer(const Context *context, BufferID bufferID);
void setVertexAttribDivisor(const Context *context, size_t index, GLuint divisor);
void enableAttribute(size_t attribIndex, bool enabledState);
void setVertexAttribDivisor(const Context *context, AttributeLocation index, GLuint divisor);
void enableAttribute(AttributeLocation attribIndex, bool enabledState);
void setVertexAttribPointer(const Context *context,
size_t attribIndex,
AttributeLocation attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
@ -194,14 +196,14 @@ class VertexArray final : public angle::ObserverInterface,
const void *pointer);
void setVertexAttribIPointer(const Context *context,
size_t attribIndex,
AttributeLocation attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,
GLsizei stride,
const void *pointer);
void setVertexAttribFormat(size_t attribIndex,
void setVertexAttribFormat(AttributeLocation attribIndex,
GLint size,
VertexAttribType type,
bool normalized,
@ -212,7 +214,9 @@ class VertexArray final : public angle::ObserverInterface,
Buffer *boundBuffer,
GLintptr offset,
GLsizei stride);
void setVertexAttribBinding(const Context *context, size_t attribIndex, GLuint bindingIndex);
void setVertexAttribBinding(const Context *context,
AttributeLocation attribIndex,
GLuint bindingIndex);
void setVertexBindingDivisor(size_t bindingIndex, GLuint divisor);
Buffer *getElementArrayBuffer() const { return mState.getElementArrayBuffer(); }
@ -287,7 +291,7 @@ class VertexArray final : public angle::ObserverInterface,
// This is a performance optimization for buffer binding. Allows element array buffer updates.
friend class State;
void setDirtyAttribBit(size_t attribIndex, DirtyAttribBitType dirtyAttribBit);
void setDirtyAttribBit(AttributeLocation attribIndex, DirtyAttribBitType dirtyAttribBit);
void setDirtyBindingBit(size_t bindingIndex, DirtyBindingBitType dirtyBindingBit);
DirtyBitType getDirtyBitFromIndex(bool contentsChanged, angle::SubjectIndex index) const;
@ -308,7 +312,7 @@ class VertexArray final : public angle::ObserverInterface,
void setVertexAttribPointerImpl(const Context *context,
ComponentType componentType,
bool pureInteger,
size_t attribIndex,
AttributeLocation attribIndex,
Buffer *boundBuffer,
GLint size,
VertexAttribType type,

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

@ -613,11 +613,13 @@ CallCapture CaptureDisable(const State &glState, bool isCallValid, GLenum cap)
return CallCapture(gl::EntryPoint::Disable, std::move(paramBuffer));
}
CallCapture CaptureDisableVertexAttribArray(const State &glState, bool isCallValid, GLuint index)
CallCapture CaptureDisableVertexAttribArray(const State &glState,
bool isCallValid,
AttributeLocation indexPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
return CallCapture(gl::EntryPoint::DisableVertexAttribArray, std::move(paramBuffer));
}
@ -668,11 +670,13 @@ CallCapture CaptureEnable(const State &glState, bool isCallValid, GLenum cap)
return CallCapture(gl::EntryPoint::Enable, std::move(paramBuffer));
}
CallCapture CaptureEnableVertexAttribArray(const State &glState, bool isCallValid, GLuint index)
CallCapture CaptureEnableVertexAttribArray(const State &glState,
bool isCallValid,
AttributeLocation indexPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
return CallCapture(gl::EntryPoint::EnableVertexAttribArray, std::move(paramBuffer));
}
@ -1344,18 +1348,18 @@ CallCapture CaptureGetUniformiv(const State &glState,
CallCapture CaptureGetVertexAttribPointerv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
void **pointer)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
ParamCapture pointerParam("pointer", ParamType::TvoidPointerPointer);
InitParamValue(ParamType::TvoidPointerPointer, pointer, &pointerParam.value);
CaptureGetVertexAttribPointerv_pointer(glState, isCallValid, index, pname, pointer,
CaptureGetVertexAttribPointerv_pointer(glState, isCallValid, indexPacked, pname, pointer,
&pointerParam);
paramBuffer.addParam(std::move(pointerParam));
@ -1364,18 +1368,18 @@ CallCapture CaptureGetVertexAttribPointerv(const State &glState,
CallCapture CaptureGetVertexAttribfv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLfloat *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
CaptureGetVertexAttribfv_params(glState, isCallValid, index, pname, params, &paramsParam);
CaptureGetVertexAttribfv_params(glState, isCallValid, indexPacked, pname, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribfv, std::move(paramBuffer));
@ -1383,18 +1387,18 @@ CallCapture CaptureGetVertexAttribfv(const State &glState,
CallCapture CaptureGetVertexAttribiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLint *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::DefaultGroup, ParamType::TGLenum, pname);
ParamCapture paramsParam("params", ParamType::TGLintPointer);
InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
CaptureGetVertexAttribiv_params(glState, isCallValid, index, pname, params, &paramsParam);
CaptureGetVertexAttribiv_params(glState, isCallValid, indexPacked, pname, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribiv, std::move(paramBuffer));
@ -2292,11 +2296,14 @@ CallCapture CaptureValidateProgram(const State &glState,
return CallCapture(gl::EntryPoint::ValidateProgram, std::move(paramBuffer));
}
CallCapture CaptureVertexAttrib1f(const State &glState, bool isCallValid, GLuint index, GLfloat x)
CallCapture CaptureVertexAttrib1f(const State &glState,
bool isCallValid,
AttributeLocation indexPacked,
GLfloat x)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
return CallCapture(gl::EntryPoint::VertexAttrib1f, std::move(paramBuffer));
@ -2304,16 +2311,16 @@ CallCapture CaptureVertexAttrib1f(const State &glState, bool isCallValid, GLuint
CallCapture CaptureVertexAttrib1fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
InitParamValue(ParamType::TGLfloatConstPointer, v, &vParam.value);
CaptureVertexAttrib1fv_v(glState, isCallValid, index, v, &vParam);
CaptureVertexAttrib1fv_v(glState, isCallValid, indexPacked, v, &vParam);
paramBuffer.addParam(std::move(vParam));
return CallCapture(gl::EntryPoint::VertexAttrib1fv, std::move(paramBuffer));
@ -2321,13 +2328,13 @@ CallCapture CaptureVertexAttrib1fv(const State &glState,
CallCapture CaptureVertexAttrib2f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
paramBuffer.addValueParam("y", ParamType::TGLfloat, y);
@ -2336,16 +2343,16 @@ CallCapture CaptureVertexAttrib2f(const State &glState,
CallCapture CaptureVertexAttrib2fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
InitParamValue(ParamType::TGLfloatConstPointer, v, &vParam.value);
CaptureVertexAttrib2fv_v(glState, isCallValid, index, v, &vParam);
CaptureVertexAttrib2fv_v(glState, isCallValid, indexPacked, v, &vParam);
paramBuffer.addParam(std::move(vParam));
return CallCapture(gl::EntryPoint::VertexAttrib2fv, std::move(paramBuffer));
@ -2353,14 +2360,14 @@ CallCapture CaptureVertexAttrib2fv(const State &glState,
CallCapture CaptureVertexAttrib3f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y,
GLfloat z)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
paramBuffer.addValueParam("y", ParamType::TGLfloat, y);
paramBuffer.addValueParam("z", ParamType::TGLfloat, z);
@ -2370,16 +2377,16 @@ CallCapture CaptureVertexAttrib3f(const State &glState,
CallCapture CaptureVertexAttrib3fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
InitParamValue(ParamType::TGLfloatConstPointer, v, &vParam.value);
CaptureVertexAttrib3fv_v(glState, isCallValid, index, v, &vParam);
CaptureVertexAttrib3fv_v(glState, isCallValid, indexPacked, v, &vParam);
paramBuffer.addParam(std::move(vParam));
return CallCapture(gl::EntryPoint::VertexAttrib3fv, std::move(paramBuffer));
@ -2387,7 +2394,7 @@ CallCapture CaptureVertexAttrib3fv(const State &glState,
CallCapture CaptureVertexAttrib4f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y,
GLfloat z,
@ -2395,7 +2402,7 @@ CallCapture CaptureVertexAttrib4f(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("x", ParamType::TGLfloat, x);
paramBuffer.addValueParam("y", ParamType::TGLfloat, y);
paramBuffer.addValueParam("z", ParamType::TGLfloat, z);
@ -2406,16 +2413,16 @@ CallCapture CaptureVertexAttrib4f(const State &glState,
CallCapture CaptureVertexAttrib4fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
ParamCapture vParam("v", ParamType::TGLfloatConstPointer);
InitParamValue(ParamType::TGLfloatConstPointer, v, &vParam.value);
CaptureVertexAttrib4fv_v(glState, isCallValid, index, v, &vParam);
CaptureVertexAttrib4fv_v(glState, isCallValid, indexPacked, v, &vParam);
paramBuffer.addParam(std::move(vParam));
return CallCapture(gl::EntryPoint::VertexAttrib4fv, std::move(paramBuffer));
@ -2423,7 +2430,7 @@ CallCapture CaptureVertexAttrib4fv(const State &glState,
CallCapture CaptureVertexAttribPointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,
@ -2432,7 +2439,7 @@ CallCapture CaptureVertexAttribPointer(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("size", ParamType::TGLint, size);
paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
paramBuffer.addValueParam("normalized", ParamType::TGLboolean, normalized);
@ -2440,8 +2447,8 @@ CallCapture CaptureVertexAttribPointer(const State &glState,
ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
CaptureVertexAttribPointer_pointer(glState, isCallValid, index, size, typePacked, normalized,
stride, pointer, &pointerParam);
CaptureVertexAttribPointer_pointer(glState, isCallValid, indexPacked, size, typePacked,
normalized, stride, pointer, &pointerParam);
paramBuffer.addParam(std::move(pointerParam));
return CallCapture(gl::EntryPoint::VertexAttribPointer, std::move(paramBuffer));

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

@ -179,7 +179,7 @@ angle::CallCapture CaptureDetachShader(const State &glState,
angle::CallCapture CaptureDisable(const State &glState, bool isCallValid, GLenum cap);
angle::CallCapture CaptureDisableVertexAttribArray(const State &glState,
bool isCallValid,
GLuint index);
AttributeLocation indexPacked);
angle::CallCapture CaptureDrawArrays(const State &glState,
bool isCallValid,
PrimitiveMode modePacked,
@ -194,7 +194,7 @@ angle::CallCapture CaptureDrawElements(const State &glState,
angle::CallCapture CaptureEnable(const State &glState, bool isCallValid, GLenum cap);
angle::CallCapture CaptureEnableVertexAttribArray(const State &glState,
bool isCallValid,
GLuint index);
AttributeLocation indexPacked);
angle::CallCapture CaptureFinish(const State &glState, bool isCallValid);
angle::CallCapture CaptureFlush(const State &glState, bool isCallValid);
angle::CallCapture CaptureFramebufferRenderbuffer(const State &glState,
@ -353,17 +353,17 @@ angle::CallCapture CaptureGetUniformiv(const State &glState,
GLint *params);
angle::CallCapture CaptureGetVertexAttribPointerv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
void **pointer);
angle::CallCapture CaptureGetVertexAttribfv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLfloat *params);
angle::CallCapture CaptureGetVertexAttribiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLint *params);
angle::CallCapture CaptureHint(const State &glState, bool isCallValid, GLenum target, GLenum mode);
@ -625,45 +625,45 @@ angle::CallCapture CaptureValidateProgram(const State &glState,
ShaderProgramID programPacked);
angle::CallCapture CaptureVertexAttrib1f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x);
angle::CallCapture CaptureVertexAttrib1fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v);
angle::CallCapture CaptureVertexAttrib2f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y);
angle::CallCapture CaptureVertexAttrib2fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v);
angle::CallCapture CaptureVertexAttrib3f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y,
GLfloat z);
angle::CallCapture CaptureVertexAttrib3fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v);
angle::CallCapture CaptureVertexAttrib4f(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w);
angle::CallCapture CaptureVertexAttrib4fv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v);
angle::CallCapture CaptureVertexAttribPointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,
@ -1000,19 +1000,19 @@ void CaptureGetUniformiv_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribPointerv_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
void **pointer,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribfv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLfloat *params,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribiv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLint *params,
angle::ParamCapture *paramCapture);
@ -1163,27 +1163,27 @@ void CaptureUniformMatrix4fv_value(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureVertexAttrib1fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v,
angle::ParamCapture *paramCapture);
void CaptureVertexAttrib2fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v,
angle::ParamCapture *paramCapture);
void CaptureVertexAttrib3fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v,
angle::ParamCapture *paramCapture);
void CaptureVertexAttrib4fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLfloat *v,
angle::ParamCapture *paramCapture);
void CaptureVertexAttribPointer_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,

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

@ -562,7 +562,7 @@ void CaptureGetUniformiv_params(const State &glState,
void CaptureGetVertexAttribPointerv_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
void **pointer,
ParamCapture *paramCapture)
@ -572,7 +572,7 @@ void CaptureGetVertexAttribPointerv_pointer(const State &glState,
void CaptureGetVertexAttribfv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLfloat *params,
ParamCapture *paramCapture)
@ -583,7 +583,7 @@ void CaptureGetVertexAttribfv_params(const State &glState,
void CaptureGetVertexAttribiv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLint *params,
ParamCapture *paramCapture)
@ -859,7 +859,7 @@ void CaptureUniformMatrix4fv_value(const State &glState,
void CaptureVertexAttrib1fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
const GLfloat *v,
ParamCapture *paramCapture)
{
@ -868,7 +868,7 @@ void CaptureVertexAttrib1fv_v(const State &glState,
void CaptureVertexAttrib2fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
const GLfloat *v,
ParamCapture *paramCapture)
{
@ -877,7 +877,7 @@ void CaptureVertexAttrib2fv_v(const State &glState,
void CaptureVertexAttrib3fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
const GLfloat *v,
ParamCapture *paramCapture)
{
@ -886,7 +886,7 @@ void CaptureVertexAttrib3fv_v(const State &glState,
void CaptureVertexAttrib4fv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
const GLfloat *v,
ParamCapture *paramCapture)
{
@ -895,7 +895,7 @@ void CaptureVertexAttrib4fv_v(const State &glState,
void CaptureVertexAttribPointer_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,
@ -906,7 +906,7 @@ void CaptureVertexAttribPointer_pointer(const State &glState,
paramCapture->value.voidConstPointerVal = pointer;
if (!glState.getTargetBuffer(gl::BufferBinding::Array))
{
paramCapture->arrayClientPointerIndex = index;
paramCapture->arrayClientPointerIndex = index.value;
}
}
} // namespace gl

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

@ -1156,18 +1156,19 @@ CallCapture CaptureGetUniformuiv(const State &glState,
CallCapture CaptureGetVertexAttribIiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLint *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::VertexAttribEnum, ParamType::TGLenum, pname);
ParamCapture paramsParam("params", ParamType::TGLintPointer);
InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
CaptureGetVertexAttribIiv_params(glState, isCallValid, index, pname, params, &paramsParam);
CaptureGetVertexAttribIiv_params(glState, isCallValid, indexPacked, pname, params,
&paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribIiv, std::move(paramBuffer));
@ -1175,18 +1176,19 @@ CallCapture CaptureGetVertexAttribIiv(const State &glState,
CallCapture CaptureGetVertexAttribIuiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLuint *params)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addEnumParam("pname", GLenumGroup::VertexAttribEnum, ParamType::TGLenum, pname);
ParamCapture paramsParam("params", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
CaptureGetVertexAttribIuiv_params(glState, isCallValid, index, pname, params, &paramsParam);
CaptureGetVertexAttribIuiv_params(glState, isCallValid, indexPacked, pname, params,
&paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribIuiv, std::move(paramBuffer));
@ -1937,12 +1939,12 @@ CallCapture CaptureUnmapBuffer(const State &glState,
CallCapture CaptureVertexAttribDivisor(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint divisor)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
return CallCapture(gl::EntryPoint::VertexAttribDivisor, std::move(paramBuffer));
@ -1950,7 +1952,7 @@ CallCapture CaptureVertexAttribDivisor(const State &glState,
CallCapture CaptureVertexAttribI4i(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint x,
GLint y,
GLint z,
@ -1958,7 +1960,7 @@ CallCapture CaptureVertexAttribI4i(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("x", ParamType::TGLint, x);
paramBuffer.addValueParam("y", ParamType::TGLint, y);
paramBuffer.addValueParam("z", ParamType::TGLint, z);
@ -1969,16 +1971,16 @@ CallCapture CaptureVertexAttribI4i(const State &glState,
CallCapture CaptureVertexAttribI4iv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLint *v)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
ParamCapture vParam("v", ParamType::TGLintConstPointer);
InitParamValue(ParamType::TGLintConstPointer, v, &vParam.value);
CaptureVertexAttribI4iv_v(glState, isCallValid, index, v, &vParam);
CaptureVertexAttribI4iv_v(glState, isCallValid, indexPacked, v, &vParam);
paramBuffer.addParam(std::move(vParam));
return CallCapture(gl::EntryPoint::VertexAttribI4iv, std::move(paramBuffer));
@ -1986,7 +1988,7 @@ CallCapture CaptureVertexAttribI4iv(const State &glState,
CallCapture CaptureVertexAttribI4ui(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint x,
GLuint y,
GLuint z,
@ -1994,7 +1996,7 @@ CallCapture CaptureVertexAttribI4ui(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("x", ParamType::TGLuint, x);
paramBuffer.addValueParam("y", ParamType::TGLuint, y);
paramBuffer.addValueParam("z", ParamType::TGLuint, z);
@ -2005,16 +2007,16 @@ CallCapture CaptureVertexAttribI4ui(const State &glState,
CallCapture CaptureVertexAttribI4uiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLuint *v)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
ParamCapture vParam("v", ParamType::TGLuintConstPointer);
InitParamValue(ParamType::TGLuintConstPointer, v, &vParam.value);
CaptureVertexAttribI4uiv_v(glState, isCallValid, index, v, &vParam);
CaptureVertexAttribI4uiv_v(glState, isCallValid, indexPacked, v, &vParam);
paramBuffer.addParam(std::move(vParam));
return CallCapture(gl::EntryPoint::VertexAttribI4uiv, std::move(paramBuffer));
@ -2022,7 +2024,7 @@ CallCapture CaptureVertexAttribI4uiv(const State &glState,
CallCapture CaptureVertexAttribIPointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLsizei stride,
@ -2030,14 +2032,14 @@ CallCapture CaptureVertexAttribIPointer(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("size", ParamType::TGLint, size);
paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
paramBuffer.addValueParam("stride", ParamType::TGLsizei, stride);
ParamCapture pointerParam("pointer", ParamType::TvoidConstPointer);
InitParamValue(ParamType::TvoidConstPointer, pointer, &pointerParam.value);
CaptureVertexAttribIPointer_pointer(glState, isCallValid, index, size, typePacked, stride,
CaptureVertexAttribIPointer_pointer(glState, isCallValid, indexPacked, size, typePacked, stride,
pointer, &pointerParam);
paramBuffer.addParam(std::move(pointerParam));

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

@ -329,12 +329,12 @@ angle::CallCapture CaptureGetUniformuiv(const State &glState,
GLuint *params);
angle::CallCapture CaptureGetVertexAttribIiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLint *params);
angle::CallCapture CaptureGetVertexAttribIuiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLuint *params);
angle::CallCapture CaptureInvalidateFramebuffer(const State &glState,
@ -554,33 +554,33 @@ angle::CallCapture CaptureUnmapBuffer(const State &glState,
GLboolean returnValue);
angle::CallCapture CaptureVertexAttribDivisor(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint divisor);
angle::CallCapture CaptureVertexAttribI4i(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint x,
GLint y,
GLint z,
GLint w);
angle::CallCapture CaptureVertexAttribI4iv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLint *v);
angle::CallCapture CaptureVertexAttribI4ui(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint x,
GLuint y,
GLuint z,
GLuint w);
angle::CallCapture CaptureVertexAttribI4uiv(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLuint *v);
angle::CallCapture CaptureVertexAttribIPointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLsizei stride,
@ -911,13 +911,13 @@ void CaptureGetUniformuiv_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribIiv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLint *params,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribIuiv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLuint *params,
angle::ParamCapture *paramCapture);
@ -1058,17 +1058,17 @@ void CaptureUniformMatrix4x3fv_value(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureVertexAttribI4iv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLint *v,
angle::ParamCapture *paramCapture);
void CaptureVertexAttribI4uiv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
const GLuint *v,
angle::ParamCapture *paramCapture);
void CaptureVertexAttribIPointer_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLsizei stride,

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

@ -581,7 +581,7 @@ void CaptureGetUniformuiv_params(const State &glState,
void CaptureGetVertexAttribIiv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLint *params,
ParamCapture *paramCapture)
@ -591,7 +591,7 @@ void CaptureGetVertexAttribIiv_params(const State &glState,
void CaptureGetVertexAttribIuiv_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLuint *params,
ParamCapture *paramCapture)
@ -833,7 +833,7 @@ void CaptureUniformMatrix4x3fv_value(const State &glState,
void CaptureVertexAttribI4iv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
const GLint *v,
ParamCapture *paramCapture)
{
@ -842,7 +842,7 @@ void CaptureVertexAttribI4iv_v(const State &glState,
void CaptureVertexAttribI4uiv_v(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
const GLuint *v,
ParamCapture *paramCapture)
{
@ -851,7 +851,7 @@ void CaptureVertexAttribI4uiv_v(const State &glState,
void CaptureVertexAttribIPointer_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribType typePacked,
GLsizei stride,

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

@ -1325,12 +1325,13 @@ CallCapture CaptureValidateProgramPipeline(const State &glState,
CallCapture CaptureVertexAttribBinding(const State &glState,
bool isCallValid,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLuint bindingindex)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
paramBuffer.addValueParam("attribindexPacked", ParamType::TAttributeLocation,
attribindexPacked);
paramBuffer.addValueParam("bindingindex", ParamType::TGLuint, bindingindex);
return CallCapture(gl::EntryPoint::VertexAttribBinding, std::move(paramBuffer));
@ -1338,7 +1339,7 @@ CallCapture CaptureVertexAttribBinding(const State &glState,
CallCapture CaptureVertexAttribFormat(const State &glState,
bool isCallValid,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,
@ -1346,7 +1347,8 @@ CallCapture CaptureVertexAttribFormat(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
paramBuffer.addValueParam("attribindexPacked", ParamType::TAttributeLocation,
attribindexPacked);
paramBuffer.addValueParam("size", ParamType::TGLint, size);
paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
paramBuffer.addValueParam("normalized", ParamType::TGLboolean, normalized);
@ -1357,14 +1359,15 @@ CallCapture CaptureVertexAttribFormat(const State &glState,
CallCapture CaptureVertexAttribIFormat(const State &glState,
bool isCallValid,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
VertexAttribType typePacked,
GLuint relativeoffset)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("attribindex", ParamType::TGLuint, attribindex);
paramBuffer.addValueParam("attribindexPacked", ParamType::TAttributeLocation,
attribindexPacked);
paramBuffer.addValueParam("size", ParamType::TGLint, size);
paramBuffer.addValueParam("typePacked", ParamType::TVertexAttribType, typePacked);
paramBuffer.addValueParam("relativeoffset", ParamType::TGLuint, relativeoffset);

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

@ -396,18 +396,18 @@ angle::CallCapture CaptureValidateProgramPipeline(const State &glState,
ProgramPipelineID pipelinePacked);
angle::CallCapture CaptureVertexAttribBinding(const State &glState,
bool isCallValid,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLuint bindingindex);
angle::CallCapture CaptureVertexAttribFormat(const State &glState,
bool isCallValid,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,
GLuint relativeoffset);
angle::CallCapture CaptureVertexAttribIFormat(const State &glState,
bool isCallValid,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
VertexAttribType typePacked,
GLuint relativeoffset);

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

@ -393,12 +393,12 @@ CallCapture CaptureDrawElementsInstancedANGLE(const State &glState,
CallCapture CaptureVertexAttribDivisorANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint divisor)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
return CallCapture(gl::EntryPoint::VertexAttribDivisorANGLE, std::move(paramBuffer));
@ -941,7 +941,7 @@ CallCapture CaptureGetUniformivRobustANGLE(const State &glState,
CallCapture CaptureGetVertexAttribfvRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -949,20 +949,20 @@ CallCapture CaptureGetVertexAttribfvRobustANGLE(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
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);
CaptureGetVertexAttribfvRobustANGLE_length(glState, isCallValid, index, pname, bufSize, length,
params, &lengthParam);
CaptureGetVertexAttribfvRobustANGLE_length(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLfloatPointer);
InitParamValue(ParamType::TGLfloatPointer, params, &paramsParam.value);
CaptureGetVertexAttribfvRobustANGLE_params(glState, isCallValid, index, pname, bufSize, length,
params, &paramsParam);
CaptureGetVertexAttribfvRobustANGLE_params(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribfvRobustANGLE, std::move(paramBuffer));
@ -970,7 +970,7 @@ CallCapture CaptureGetVertexAttribfvRobustANGLE(const State &glState,
CallCapture CaptureGetVertexAttribivRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -978,20 +978,20 @@ CallCapture CaptureGetVertexAttribivRobustANGLE(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
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);
CaptureGetVertexAttribivRobustANGLE_length(glState, isCallValid, index, pname, bufSize, length,
params, &lengthParam);
CaptureGetVertexAttribivRobustANGLE_length(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLintPointer);
InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
CaptureGetVertexAttribivRobustANGLE_params(glState, isCallValid, index, pname, bufSize, length,
params, &paramsParam);
CaptureGetVertexAttribivRobustANGLE_params(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribivRobustANGLE, std::move(paramBuffer));
@ -999,7 +999,7 @@ CallCapture CaptureGetVertexAttribivRobustANGLE(const State &glState,
CallCapture CaptureGetVertexAttribPointervRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1007,20 +1007,20 @@ CallCapture CaptureGetVertexAttribPointervRobustANGLE(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
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);
CaptureGetVertexAttribPointervRobustANGLE_length(glState, isCallValid, index, pname, bufSize,
length, pointer, &lengthParam);
CaptureGetVertexAttribPointervRobustANGLE_length(glState, isCallValid, indexPacked, pname,
bufSize, length, pointer, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture pointerParam("pointer", ParamType::TvoidPointerPointer);
InitParamValue(ParamType::TvoidPointerPointer, pointer, &pointerParam.value);
CaptureGetVertexAttribPointervRobustANGLE_pointer(glState, isCallValid, index, pname, bufSize,
length, pointer, &pointerParam);
CaptureGetVertexAttribPointervRobustANGLE_pointer(glState, isCallValid, indexPacked, pname,
bufSize, length, pointer, &pointerParam);
paramBuffer.addParam(std::move(pointerParam));
return CallCapture(gl::EntryPoint::GetVertexAttribPointervRobustANGLE, std::move(paramBuffer));
@ -1561,7 +1561,7 @@ CallCapture CaptureGetInternalformativRobustANGLE(const State &glState,
CallCapture CaptureGetVertexAttribIivRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1569,20 +1569,20 @@ CallCapture CaptureGetVertexAttribIivRobustANGLE(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
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);
CaptureGetVertexAttribIivRobustANGLE_length(glState, isCallValid, index, pname, bufSize, length,
params, &lengthParam);
CaptureGetVertexAttribIivRobustANGLE_length(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLintPointer);
InitParamValue(ParamType::TGLintPointer, params, &paramsParam.value);
CaptureGetVertexAttribIivRobustANGLE_params(glState, isCallValid, index, pname, bufSize, length,
params, &paramsParam);
CaptureGetVertexAttribIivRobustANGLE_params(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
return CallCapture(gl::EntryPoint::GetVertexAttribIivRobustANGLE, std::move(paramBuffer));
@ -1590,7 +1590,7 @@ CallCapture CaptureGetVertexAttribIivRobustANGLE(const State &glState,
CallCapture CaptureGetVertexAttribIuivRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1598,19 +1598,19 @@ CallCapture CaptureGetVertexAttribIuivRobustANGLE(const State &glState,
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
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);
CaptureGetVertexAttribIuivRobustANGLE_length(glState, isCallValid, index, pname, bufSize,
CaptureGetVertexAttribIuivRobustANGLE_length(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &lengthParam);
paramBuffer.addParam(std::move(lengthParam));
ParamCapture paramsParam("params", ParamType::TGLuintPointer);
InitParamValue(ParamType::TGLuintPointer, params, &paramsParam.value);
CaptureGetVertexAttribIuivRobustANGLE_params(glState, isCallValid, index, pname, bufSize,
CaptureGetVertexAttribIuivRobustANGLE_params(glState, isCallValid, indexPacked, pname, bufSize,
length, params, &paramsParam);
paramBuffer.addParam(std::move(paramsParam));
@ -3487,12 +3487,12 @@ CallCapture CaptureDrawElementsInstancedEXT(const State &glState,
CallCapture CaptureVertexAttribDivisorEXT(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint divisor)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("index", ParamType::TGLuint, index);
paramBuffer.addValueParam("indexPacked", ParamType::TAttributeLocation, indexPacked);
paramBuffer.addValueParam("divisor", ParamType::TGLuint, divisor);
return CallCapture(gl::EntryPoint::VertexAttribDivisorEXT, std::move(paramBuffer));

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

@ -144,7 +144,7 @@ angle::CallCapture CaptureDrawElementsInstancedANGLE(const State &glState,
GLsizei primcount);
angle::CallCapture CaptureVertexAttribDivisorANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint divisor);
// GL_ANGLE_memory_object_fuchsia
@ -285,21 +285,21 @@ angle::CallCapture CaptureGetUniformivRobustANGLE(const State &glState,
GLint *params);
angle::CallCapture CaptureGetVertexAttribfvRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLfloat *params);
angle::CallCapture CaptureGetVertexAttribivRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint *params);
angle::CallCapture CaptureGetVertexAttribPointervRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -467,14 +467,14 @@ angle::CallCapture CaptureGetInternalformativRobustANGLE(const State &glState,
GLint *params);
angle::CallCapture CaptureGetVertexAttribIivRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
GLint *params);
angle::CallCapture CaptureGetVertexAttribIuivRobustANGLE(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1017,7 +1017,7 @@ angle::CallCapture CaptureDrawElementsInstancedEXT(const State &glState,
GLsizei primcount);
angle::CallCapture CaptureVertexAttribDivisorEXT(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLuint divisor);
// GL_EXT_map_buffer_range
@ -2233,7 +2233,7 @@ void CaptureGetUniformivRobustANGLE_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribfvRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2241,7 +2241,7 @@ void CaptureGetVertexAttribfvRobustANGLE_length(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribfvRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2249,7 +2249,7 @@ void CaptureGetVertexAttribfvRobustANGLE_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribivRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2257,7 +2257,7 @@ void CaptureGetVertexAttribivRobustANGLE_length(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribivRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2265,7 +2265,7 @@ void CaptureGetVertexAttribivRobustANGLE_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribPointervRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2273,7 +2273,7 @@ void CaptureGetVertexAttribPointervRobustANGLE_length(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribPointervRobustANGLE_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2541,7 +2541,7 @@ void CaptureGetInternalformativRobustANGLE_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribIivRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2549,7 +2549,7 @@ void CaptureGetVertexAttribIivRobustANGLE_length(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribIivRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2557,7 +2557,7 @@ void CaptureGetVertexAttribIivRobustANGLE_params(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribIuivRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -2565,7 +2565,7 @@ void CaptureGetVertexAttribIuivRobustANGLE_length(const State &glState,
angle::ParamCapture *paramCapture);
void CaptureGetVertexAttribIuivRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
GLsizei *length,

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

@ -717,7 +717,7 @@ void CaptureGetUniformivRobustANGLE_params(const State &glState,
void CaptureGetVertexAttribfvRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -729,7 +729,7 @@ void CaptureGetVertexAttribfvRobustANGLE_length(const State &glState,
void CaptureGetVertexAttribfvRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -741,7 +741,7 @@ void CaptureGetVertexAttribfvRobustANGLE_params(const State &glState,
void CaptureGetVertexAttribivRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -753,7 +753,7 @@ void CaptureGetVertexAttribivRobustANGLE_length(const State &glState,
void CaptureGetVertexAttribivRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -765,7 +765,7 @@ void CaptureGetVertexAttribivRobustANGLE_params(const State &glState,
void CaptureGetVertexAttribPointervRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -777,7 +777,7 @@ void CaptureGetVertexAttribPointervRobustANGLE_length(const State &glState,
void CaptureGetVertexAttribPointervRobustANGLE_pointer(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1145,7 +1145,7 @@ void CaptureGetInternalformativRobustANGLE_params(const State &glState,
void CaptureGetVertexAttribIivRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1157,7 +1157,7 @@ void CaptureGetVertexAttribIivRobustANGLE_length(const State &glState,
void CaptureGetVertexAttribIivRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1169,7 +1169,7 @@ void CaptureGetVertexAttribIivRobustANGLE_params(const State &glState,
void CaptureGetVertexAttribIuivRobustANGLE_length(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,
@ -1181,7 +1181,7 @@ void CaptureGetVertexAttribIuivRobustANGLE_length(const State &glState,
void CaptureGetVertexAttribIuivRobustANGLE_params(const State &glState,
bool isCallValid,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
GLsizei *length,

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

@ -636,7 +636,8 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::DisableVertexAttribArray:
context->disableVertexAttribArray(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal);
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal);
break;
case gl::EntryPoint::Disablei:
context->disablei(params.getParam("target", ParamType::TGLenum, 0).value.GLenumVal,
@ -777,7 +778,8 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::EnableVertexAttribArray:
context->enableVertexAttribArray(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal);
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal);
break;
case gl::EntryPoint::Enablei:
context->enablei(params.getParam("target", ParamType::TGLenum, 0).value.GLenumVal,
@ -1632,35 +1634,40 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::GetVertexAttribIiv:
context->getVertexAttribIiv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLint *>(
params.getParam("params", ParamType::TGLintPointer, 2)));
break;
case gl::EntryPoint::GetVertexAttribIuiv:
context->getVertexAttribIuiv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLuint *>(
params.getParam("params", ParamType::TGLuintPointer, 2)));
break;
case gl::EntryPoint::GetVertexAttribPointerv:
context->getVertexAttribPointerv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<void **>(
params.getParam("pointer", ParamType::TvoidPointerPointer, 2)));
break;
case gl::EntryPoint::GetVertexAttribfv:
context->getVertexAttribfv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLfloat *>(
params.getParam("params", ParamType::TGLfloatPointer, 2)));
break;
case gl::EntryPoint::GetVertexAttribiv:
context->getVertexAttribiv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("pname", ParamType::TGLenum, 1).value.GLenumVal,
replayContext->getReadBufferPointer<GLint *>(
params.getParam("params", ParamType::TGLintPointer, 2)));
@ -3187,40 +3194,47 @@ void FrameCapture::ReplayCall(gl::Context *context,
.value.ProgramPipelineIDVal);
break;
case gl::EntryPoint::VertexAttrib1f:
context->vertexAttrib1f(params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
context->vertexAttrib1f(params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("x", ParamType::TGLfloat, 1).value.GLfloatVal);
break;
case gl::EntryPoint::VertexAttrib1fv:
context->vertexAttrib1fv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
replayContext->getAsConstPointer<const GLfloat *>(
params.getParam("v", ParamType::TGLfloatConstPointer, 1)));
break;
case gl::EntryPoint::VertexAttrib2f:
context->vertexAttrib2f(params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
context->vertexAttrib2f(params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("x", ParamType::TGLfloat, 1).value.GLfloatVal,
params.getParam("y", ParamType::TGLfloat, 2).value.GLfloatVal);
break;
case gl::EntryPoint::VertexAttrib2fv:
context->vertexAttrib2fv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
replayContext->getAsConstPointer<const GLfloat *>(
params.getParam("v", ParamType::TGLfloatConstPointer, 1)));
break;
case gl::EntryPoint::VertexAttrib3f:
context->vertexAttrib3f(params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
context->vertexAttrib3f(params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("x", ParamType::TGLfloat, 1).value.GLfloatVal,
params.getParam("y", ParamType::TGLfloat, 2).value.GLfloatVal,
params.getParam("z", ParamType::TGLfloat, 3).value.GLfloatVal);
break;
case gl::EntryPoint::VertexAttrib3fv:
context->vertexAttrib3fv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
replayContext->getAsConstPointer<const GLfloat *>(
params.getParam("v", ParamType::TGLfloatConstPointer, 1)));
break;
case gl::EntryPoint::VertexAttrib4f:
context->vertexAttrib4f(params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
context->vertexAttrib4f(params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("x", ParamType::TGLfloat, 1).value.GLfloatVal,
params.getParam("y", ParamType::TGLfloat, 2).value.GLfloatVal,
params.getParam("z", ParamType::TGLfloat, 3).value.GLfloatVal,
@ -3228,23 +3242,27 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::VertexAttrib4fv:
context->vertexAttrib4fv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
replayContext->getAsConstPointer<const GLfloat *>(
params.getParam("v", ParamType::TGLfloatConstPointer, 1)));
break;
case gl::EntryPoint::VertexAttribBinding:
context->vertexAttribBinding(
params.getParam("attribindex", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("attribindexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("bindingindex", ParamType::TGLuint, 1).value.GLuintVal);
break;
case gl::EntryPoint::VertexAttribDivisor:
context->vertexAttribDivisor(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("divisor", ParamType::TGLuint, 1).value.GLuintVal);
break;
case gl::EntryPoint::VertexAttribFormat:
context->vertexAttribFormat(
params.getParam("attribindex", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("attribindexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("size", ParamType::TGLint, 1).value.GLintVal,
params.getParam("typePacked", ParamType::TVertexAttribType, 2)
.value.VertexAttribTypeVal,
@ -3253,7 +3271,8 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::VertexAttribI4i:
context->vertexAttribI4i(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("x", ParamType::TGLint, 1).value.GLintVal,
params.getParam("y", ParamType::TGLint, 2).value.GLintVal,
params.getParam("z", ParamType::TGLint, 3).value.GLintVal,
@ -3261,13 +3280,15 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::VertexAttribI4iv:
context->vertexAttribI4iv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
replayContext->getAsConstPointer<const GLint *>(
params.getParam("v", ParamType::TGLintConstPointer, 1)));
break;
case gl::EntryPoint::VertexAttribI4ui:
context->vertexAttribI4ui(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("x", ParamType::TGLuint, 1).value.GLuintVal,
params.getParam("y", ParamType::TGLuint, 2).value.GLuintVal,
params.getParam("z", ParamType::TGLuint, 3).value.GLuintVal,
@ -3275,13 +3296,15 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::VertexAttribI4uiv:
context->vertexAttribI4uiv(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
replayContext->getAsConstPointer<const GLuint *>(
params.getParam("v", ParamType::TGLuintConstPointer, 1)));
break;
case gl::EntryPoint::VertexAttribIFormat:
context->vertexAttribIFormat(
params.getParam("attribindex", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("attribindexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("size", ParamType::TGLint, 1).value.GLintVal,
params.getParam("typePacked", ParamType::TVertexAttribType, 2)
.value.VertexAttribTypeVal,
@ -3289,7 +3312,8 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::VertexAttribIPointer:
context->vertexAttribIPointer(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("size", ParamType::TGLint, 1).value.GLintVal,
params.getParam("typePacked", ParamType::TVertexAttribType, 2)
.value.VertexAttribTypeVal,
@ -3299,7 +3323,8 @@ void FrameCapture::ReplayCall(gl::Context *context,
break;
case gl::EntryPoint::VertexAttribPointer:
context->vertexAttribPointer(
params.getParam("index", ParamType::TGLuint, 0).value.GLuintVal,
params.getParam("indexPacked", ParamType::TAttributeLocation, 0)
.value.AttributeLocationVal,
params.getParam("size", ParamType::TGLint, 1).value.GLintVal,
params.getParam("typePacked", ParamType::TVertexAttribType, 2)
.value.VertexAttribTypeVal,

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

@ -22,6 +22,10 @@ void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const Pa
WriteParamValueReplay<ParamType::TAlphaTestFunc>(os, call,
param.value.AlphaTestFuncVal);
break;
case ParamType::TAttributeLocation:
WriteParamValueReplay<ParamType::TAttributeLocation>(os, call,
param.value.AttributeLocationVal);
break;
case ParamType::TBufferBinding:
WriteParamValueReplay<ParamType::TBufferBinding>(os, call,
param.value.BufferBindingVal);
@ -475,6 +479,8 @@ const char *ParamTypeToString(ParamType paramType)
{
case ParamType::TAlphaTestFunc:
return "GLenum";
case ParamType::TAttributeLocation:
return "GLenum";
case ParamType::TBufferBinding:
return "GLenum";
case ParamType::TBufferID:

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

@ -18,6 +18,7 @@ namespace angle
enum class ParamType
{
TAlphaTestFunc,
TAttributeLocation,
TBufferBinding,
TBufferID,
TBufferIDConstPointer,
@ -139,11 +140,12 @@ enum class ParamType
TvoidPointerPointer,
};
constexpr uint32_t kParamTypeCount = 120;
constexpr uint32_t kParamTypeCount = 121;
union ParamValue
{
gl::AlphaTestFunc AlphaTestFuncVal;
gl::AttributeLocation AttributeLocationVal;
gl::BufferBinding BufferBindingVal;
gl::BufferID BufferIDVal;
const gl::BufferID *BufferIDConstPointerVal;
@ -275,6 +277,13 @@ inline gl::AlphaTestFunc GetParamVal<ParamType::TAlphaTestFunc, gl::AlphaTestFun
return value.AlphaTestFuncVal;
}
template <>
inline gl::AttributeLocation GetParamVal<ParamType::TAttributeLocation, gl::AttributeLocation>(
const ParamValue &value)
{
return value.AttributeLocationVal;
}
template <>
inline gl::BufferBinding GetParamVal<ParamType::TBufferBinding, gl::BufferBinding>(
const ParamValue &value)
@ -1079,6 +1088,8 @@ T AccessParamValue(ParamType paramType, const ParamValue &value)
{
case ParamType::TAlphaTestFunc:
return GetParamVal<ParamType::TAlphaTestFunc, T>(value);
case ParamType::TAttributeLocation:
return GetParamVal<ParamType::TAttributeLocation, T>(value);
case ParamType::TBufferBinding:
return GetParamVal<ParamType::TBufferBinding, T>(value);
case ParamType::TBufferID:
@ -1329,6 +1340,13 @@ inline void SetParamVal<ParamType::TAlphaTestFunc>(gl::AlphaTestFunc valueIn, Pa
valueOut->AlphaTestFuncVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TAttributeLocation>(gl::AttributeLocation valueIn,
ParamValue *valueOut)
{
valueOut->AttributeLocationVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TBufferBinding>(gl::BufferBinding valueIn, ParamValue *valueOut)
{
@ -2112,6 +2130,9 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
case ParamType::TAlphaTestFunc:
SetParamVal<ParamType::TAlphaTestFunc>(valueIn, valueOut);
break;
case ParamType::TAttributeLocation:
SetParamVal<ParamType::TAttributeLocation>(valueIn, valueOut);
break;
case ParamType::TBufferBinding:
SetParamVal<ParamType::TBufferBinding>(valueIn, valueOut);
break;

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

@ -3026,13 +3026,13 @@ void ProgramD3D::initAttribLocationsToD3DSemantic()
int semanticIndex = 0;
for (const sh::ShaderVariable &attribute : vertexShader->getActiveAttributes())
{
int regCount = gl::VariableRegisterCount(attribute.type);
GLuint location = mState.getAttributeLocation(attribute.name);
ASSERT(location != std::numeric_limits<GLuint>::max());
int regCount = gl::VariableRegisterCount(attribute.type);
gl::AttributeLocation location = mState.getAttributeLocation(attribute.name);
ASSERT(location.value != std::numeric_limits<uint32_t>::max());
for (int reg = 0; reg < regCount; ++reg)
{
mAttribLocationToD3DSemantic[location + reg] = semanticIndex++;
mAttribLocationToD3DSemantic[location.value + reg] = semanticIndex++;
}
}
}
@ -3061,9 +3061,9 @@ void ProgramD3D::updateCachedInputLayout(Serial associatedSerial, const gl::Stat
{
mCachedInputLayout.resize(d3dSemantic + 1, angle::FormatID::NONE);
}
mCachedInputLayout[d3dSemantic] =
GetVertexFormatID(vertexAttributes[locationIndex],
state.getVertexAttribCurrentValue(locationIndex).Type);
mCachedInputLayout[d3dSemantic] = GetVertexFormatID(
vertexAttributes[locationIndex],
state.getVertexAttribCurrentValue({static_cast<uint32_t>(locationIndex)}).Type);
}
}

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

@ -258,7 +258,8 @@ angle::Result VertexDataManager::prepareVertexData(
translatedAttribs->clear();
for (size_t attribIndex = 0; attribIndex < vertexAttributes.size(); ++attribIndex)
for (uint32_t attribIndex = 0; attribIndex < static_cast<uint32_t>(vertexAttributes.size());
++attribIndex)
{
// Skip attrib locations the program doesn't use.
if (!executable->isAttribLocationActive(attribIndex))
@ -271,7 +272,7 @@ angle::Result VertexDataManager::prepareVertexData(
translatedAttribs->resize(attribIndex + 1);
TranslatedAttribute *translated = &(*translatedAttribs)[attribIndex];
auto currentValueData = state.getVertexAttribCurrentValue(attribIndex);
auto currentValueData = state.getVertexAttribCurrentValue({attribIndex});
// Record the attribute now
translated->active = true;

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

@ -160,7 +160,7 @@ angle::Result InputLayoutCache::getInputLayout(
int d3dSemantic = locationToSemantic[attribIndex];
const auto &currentValue =
state.getVertexAttribCurrentValue(static_cast<unsigned int>(attribIndex));
state.getVertexAttribCurrentValue({static_cast<uint32_t>(attribIndex)});
angle::FormatID vertexFormatID = gl::GetVertexFormatID(attrib, currentValue.Type);
layout.addAttributeData(glslElementType, d3dSemantic, vertexFormatID,

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

@ -109,7 +109,7 @@ angle::Result VertexArray11::syncState(const gl::Context *context,
for (size_t attribIndex : attributesToUpdate)
{
updateVertexAttribStorage(context, stateManager, attribIndex);
updateVertexAttribStorage(context, stateManager, {static_cast<uint32_t>(attribIndex)});
}
if (invalidateVertexBuffer)
@ -211,25 +211,25 @@ angle::Result VertexArray11::updateElementArrayStorage(const gl::Context *contex
void VertexArray11::updateVertexAttribStorage(const gl::Context *context,
StateManager11 *stateManager,
size_t attribIndex)
gl::AttributeLocation attribLocation)
{
const gl::VertexAttribute &attrib = mState.getVertexAttribute(attribIndex);
const gl::VertexBinding &binding = mState.getBindingFromAttribIndex(attribIndex);
const gl::VertexAttribute &attrib = mState.getVertexAttribute(attribLocation);
const gl::VertexBinding &binding = mState.getBindingFromAttribIndex(attribLocation);
VertexStorageType newStorageType = ClassifyAttributeStorage(context, attrib, binding);
// Note: having an unchanged storage type doesn't mean the attribute is clean.
mAttribsToTranslate.set(attribIndex, newStorageType != VertexStorageType::DYNAMIC);
mAttribsToTranslate.set(attribLocation.value, newStorageType != VertexStorageType::DYNAMIC);
if (mAttributeStorageTypes[attribIndex] == newStorageType)
if (mAttributeStorageTypes[attribLocation.value] == newStorageType)
return;
mAttributeStorageTypes[attribIndex] = newStorageType;
mDynamicAttribsMask.set(attribIndex, newStorageType == VertexStorageType::DYNAMIC);
mAttributeStorageTypes[attribLocation.value] = newStorageType;
mDynamicAttribsMask.set(attribLocation.value, newStorageType == VertexStorageType::DYNAMIC);
if (newStorageType == VertexStorageType::CURRENT_VALUE)
{
stateManager->invalidateCurrentValueAttrib(attribIndex);
stateManager->invalidateCurrentValueAttrib(attribLocation.value);
}
}
@ -252,8 +252,9 @@ angle::Result VertexArray11::updateDirtyAttribs(const gl::Context *context,
{
mAttribsToTranslate.reset(dirtyAttribIndex);
auto *translatedAttrib = &mTranslatedAttribs[dirtyAttribIndex];
const auto &currentValue = glState.getVertexAttribCurrentValue(dirtyAttribIndex);
auto *translatedAttrib = &mTranslatedAttribs[dirtyAttribIndex];
const auto &currentValue =
glState.getVertexAttribCurrentValue({static_cast<uint32_t>(dirtyAttribIndex)});
// Record basic attrib info
translatedAttrib->attribute = &attribs[dirtyAttribIndex];
@ -305,8 +306,9 @@ angle::Result VertexArray11::updateDynamicAttribs(const gl::Context *context,
for (size_t dynamicAttribIndex : activeDynamicAttribs)
{
auto *dynamicAttrib = &mTranslatedAttribs[dynamicAttribIndex];
const auto &currentValue = glState.getVertexAttribCurrentValue(dynamicAttribIndex);
auto *dynamicAttrib = &mTranslatedAttribs[dynamicAttribIndex];
const auto &currentValue =
glState.getVertexAttribCurrentValue({static_cast<uint32_t>(dynamicAttribIndex)});
// Record basic attrib info
dynamicAttrib->attribute = &attribs[dynamicAttribIndex];

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

@ -61,7 +61,7 @@ class VertexArray11 : public VertexArrayImpl
private:
void updateVertexAttribStorage(const gl::Context *context,
StateManager11 *stateManager,
size_t attribIndex);
gl::AttributeLocation attribLocation);
angle::Result updateDirtyAttribs(const gl::Context *context,
const gl::AttributesMask &activeDirtyAttribs);
angle::Result updateDynamicAttribs(const gl::Context *context,

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

@ -2042,10 +2042,10 @@ angle::Result StateManagerGL::syncState(const gl::Context *context,
(state.getAndResetDirtyCurrentValues() | mLocalDirtyCurrentValues);
mLocalDirtyCurrentValues.reset();
for (auto attribIndex : combinedMask)
for (size_t attribIndex : combinedMask)
{
setAttributeCurrentData(attribIndex,
state.getVertexAttribCurrentValue(attribIndex));
setAttributeCurrentData(attribIndex, state.getVertexAttribCurrentValue(
{static_cast<uint32_t>(attribIndex)}));
}
break;
}

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

@ -439,30 +439,32 @@ GLuint VertexArrayGL::getAppliedElementArrayBufferID() const
return GetImplAs<BufferGL>(mAppliedElementArrayBuffer.get())->getBufferID();
}
void VertexArrayGL::updateAttribEnabled(size_t attribIndex)
void VertexArrayGL::updateAttribEnabled(gl::AttributeLocation attribIndex)
{
const bool enabled = mState.getVertexAttribute(attribIndex).enabled &
mProgramActiveAttribLocationsMask.test(attribIndex);
if (mAppliedAttributes[attribIndex].enabled == enabled)
mProgramActiveAttribLocationsMask.test(attribIndex.value);
if (mAppliedAttributes[attribIndex.value].enabled == enabled)
{
return;
}
if (enabled)
{
mFunctions->enableVertexAttribArray(static_cast<GLuint>(attribIndex));
mFunctions->enableVertexAttribArray(static_cast<GLuint>(attribIndex.value));
}
else
{
mFunctions->disableVertexAttribArray(static_cast<GLuint>(attribIndex));
mFunctions->disableVertexAttribArray(static_cast<GLuint>(attribIndex.value));
}
mAppliedAttributes[attribIndex].enabled = enabled;
mAppliedAttributes[attribIndex.value].enabled = enabled;
}
void VertexArrayGL::updateAttribPointer(const gl::Context *context, size_t attribIndex)
void VertexArrayGL::updateAttribPointer(const gl::Context *context,
gl::AttributeLocation attribLocation)
{
const VertexAttribute &attrib = mState.getVertexAttribute(attribIndex);
int attribIndex = attribLocation.value;
const VertexAttribute &attrib = mState.getVertexAttribute(attribLocation);
// According to SPEC, VertexAttribPointer should update the binding indexed attribIndex instead
// of the binding indexed attrib.bindingIndex (unless attribIndex == attrib.bindingIndex).
@ -545,11 +547,13 @@ bool VertexArrayGL::supportVertexAttribBinding() const
return (mFunctions->vertexAttribBinding != nullptr);
}
void VertexArrayGL::updateAttribFormat(size_t attribIndex)
void VertexArrayGL::updateAttribFormat(gl::AttributeLocation attribLocation)
{
int attribIndex = attribLocation.value;
ASSERT(supportVertexAttribBinding());
const VertexAttribute &attrib = mState.getVertexAttribute(attribIndex);
const VertexAttribute &attrib = mState.getVertexAttribute(attribLocation);
if (SameVertexAttribFormat(mAppliedAttributes[attribIndex], attrib))
{
return;
@ -574,11 +578,12 @@ void VertexArrayGL::updateAttribFormat(size_t attribIndex)
mAppliedAttributes[attribIndex].relativeOffset = attrib.relativeOffset;
}
void VertexArrayGL::updateAttribBinding(size_t attribIndex)
void VertexArrayGL::updateAttribBinding(gl::AttributeLocation attribLocation)
{
int attribIndex = attribLocation.value;
ASSERT(supportVertexAttribBinding());
GLuint bindingIndex = mState.getVertexAttribute(attribIndex).bindingIndex;
GLuint bindingIndex = mState.getVertexAttribute(attribLocation).bindingIndex;
if (mAppliedAttributes[attribIndex].bindingIndex == bindingIndex)
{
return;
@ -638,7 +643,7 @@ void VertexArrayGL::updateBindingDivisor(size_t bindingIndex)
}
void VertexArrayGL::syncDirtyAttrib(const gl::Context *context,
size_t attribIndex,
gl::AttributeLocation attribLocation,
const gl::VertexArray::DirtyAttribBits &dirtyAttribBits)
{
ASSERT(dirtyAttribBits.any());
@ -648,22 +653,22 @@ void VertexArrayGL::syncDirtyAttrib(const gl::Context *context,
switch (dirtyBit)
{
case VertexArray::DIRTY_ATTRIB_ENABLED:
updateAttribEnabled(attribIndex);
updateAttribEnabled(attribLocation);
break;
case VertexArray::DIRTY_ATTRIB_POINTER_BUFFER:
case VertexArray::DIRTY_ATTRIB_POINTER:
updateAttribPointer(context, attribIndex);
updateAttribPointer(context, attribLocation);
break;
case VertexArray::DIRTY_ATTRIB_FORMAT:
ASSERT(supportVertexAttribBinding());
updateAttribFormat(attribIndex);
updateAttribFormat(attribLocation);
break;
case VertexArray::DIRTY_ATTRIB_BINDING:
ASSERT(supportVertexAttribBinding());
updateAttribBinding(attribIndex);
updateAttribBinding(attribLocation);
break;
default:
@ -699,10 +704,10 @@ void VertexArrayGL::syncDirtyBinding(const gl::Context *context,
}
}
#define ANGLE_DIRTY_ATTRIB_FUNC(INDEX) \
case VertexArray::DIRTY_BIT_ATTRIB_0 + INDEX: \
syncDirtyAttrib(context, INDEX, (*attribBits)[INDEX]); \
(*attribBits)[INDEX].reset(); \
#define ANGLE_DIRTY_ATTRIB_FUNC(INDEX) \
case VertexArray::DIRTY_BIT_ATTRIB_0 + INDEX: \
syncDirtyAttrib(context, {INDEX}, (*attribBits)[INDEX]); \
(*attribBits)[INDEX].reset(); \
break;
#define ANGLE_DIRTY_BINDING_FUNC(INDEX) \
@ -771,7 +776,7 @@ void VertexArrayGL::applyActiveAttribLocationsMask(const gl::AttributesMask &act
for (size_t attribIndex : updateMask)
{
updateAttribEnabled(attribIndex);
updateAttribEnabled({static_cast<uint32_t>(attribIndex)});
}
}

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

@ -93,19 +93,19 @@ class VertexArrayGL : public VertexArrayImpl
GLsizei instanceCount,
const gl::IndexRange &indexRange) const;
void syncDirtyAttrib(const gl::Context *context,
size_t attribIndex,
gl::AttributeLocation attribLocation,
const gl::VertexArray::DirtyAttribBits &dirtyAttribBits);
void syncDirtyBinding(const gl::Context *context,
size_t bindingIndex,
const gl::VertexArray::DirtyBindingBits &dirtyBindingBits);
void updateAttribEnabled(size_t attribIndex);
void updateAttribPointer(const gl::Context *context, size_t attribIndex);
void updateAttribEnabled(gl::AttributeLocation attribIndex);
void updateAttribPointer(const gl::Context *context, gl::AttributeLocation attribLocation);
bool supportVertexAttribBinding() const;
void updateAttribFormat(size_t attribIndex);
void updateAttribBinding(size_t attribIndex);
void updateAttribFormat(gl::AttributeLocation attribLocation);
void updateAttribBinding(gl::AttributeLocation attribLocation);
void updateBindingBuffer(const gl::Context *context, size_t bindingIndex);
void updateBindingDivisor(size_t bindingIndex);

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

@ -666,7 +666,7 @@ bool ValidateDrawElementsInstancedBase(const Context *context,
PrimitiveMode mode,
GLsizei count,
DrawElementsType type,
const GLvoid *indices,
const void *indices,
GLsizei primcount)
{
if (primcount <= 0)
@ -4903,7 +4903,7 @@ bool ValidateSamplerParameterIuivRobustANGLE(const Context *context,
}
bool ValidateGetVertexAttribfvRobustANGLE(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -4931,7 +4931,7 @@ bool ValidateGetVertexAttribfvRobustANGLE(const Context *context,
}
bool ValidateGetVertexAttribivRobustANGLE(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -4960,7 +4960,7 @@ bool ValidateGetVertexAttribivRobustANGLE(const Context *context,
}
bool ValidateGetVertexAttribPointervRobustANGLE(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -4989,7 +4989,7 @@ bool ValidateGetVertexAttribPointervRobustANGLE(const Context *context,
}
bool ValidateGetVertexAttribIivRobustANGLE(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -5018,7 +5018,7 @@ bool ValidateGetVertexAttribIivRobustANGLE(const Context *context,
}
bool ValidateGetVertexAttribIuivRobustANGLE(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -5538,7 +5538,7 @@ bool ValidateGetTexParameterBase(const Context *context,
}
bool ValidateGetVertexAttribBase(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei *length,
bool pointer,
@ -5555,7 +5555,7 @@ bool ValidateGetVertexAttribBase(const Context *context,
return false;
}
if (index >= static_cast<GLuint>(context->getCaps().maxVertexAttributes))
if (index.value >= static_cast<uint32_t>(context->getCaps().maxVertexAttributes))
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;
@ -6222,9 +6222,9 @@ template bool ValidateTexParameterBase(const Context *,
bool,
const GLuint *);
bool ValidateVertexAttribIndex(const Context *context, GLuint index)
bool ValidateVertexAttribIndex(const Context *context, AttributeLocation index)
{
if (index >= MAX_VERTEX_ATTRIBS)
if (index.value >= MAX_VERTEX_ATTRIBS)
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;

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

@ -390,7 +390,6 @@ bool ValidateDrawElementsInstancedEXT(const Context *context,
GLsizei primcount);
bool ValidateDrawInstancedANGLE(const Context *context);
bool ValidateDrawInstancedEXT(const Context *context);
bool ValidateFramebufferTextureBase(const Context *context,
GLenum target,
@ -542,19 +541,19 @@ bool ValidateTexParameterBase(const Context *context,
const ParamType *params);
bool ValidateGetVertexAttribBase(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
GLsizei *length,
bool pointer,
bool pureIntegerEntryPoint);
ANGLE_INLINE bool ValidateVertexFormat(const Context *context,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribTypeCase validation)
{
const Caps &caps = context->getCaps();
if (index >= static_cast<GLuint>(caps.maxVertexAttributes))
if (index.value >= static_cast<uint32_t>(caps.maxVertexAttributes))
{
context->validationError(GL_INVALID_VALUE, err::kIndexExceedsMaxVertexAttribute);
return false;
@ -595,7 +594,7 @@ ANGLE_INLINE bool ValidateVertexFormat(const Context *context,
// Note: These byte, short, and int types are all converted to float for the shader.
ANGLE_INLINE bool ValidateFloatVertexFormat(const Context *context,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribType type)
{
@ -604,7 +603,7 @@ ANGLE_INLINE bool ValidateFloatVertexFormat(const Context *context,
}
ANGLE_INLINE bool ValidateIntegerVertexFormat(const Context *context,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribType type)
{
@ -621,7 +620,7 @@ bool ValidateRobustCompressedTexImageBase(const Context *context,
GLsizei imageSize,
GLsizei dataSize);
bool ValidateVertexAttribIndex(const Context *context, GLuint index);
bool ValidateVertexAttribIndex(const Context *context, AttributeLocation index);
bool ValidateGetActiveUniformBlockivBase(const Context *context,
ShaderProgramID program,

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

@ -4725,9 +4725,9 @@ bool ValidateDetachShader(const Context *context, ShaderProgramID program, Shade
return true;
}
bool ValidateDisableVertexAttribArray(const Context *context, GLuint index)
bool ValidateDisableVertexAttribArray(const Context *context, AttributeLocation index)
{
if (index >= MAX_VERTEX_ATTRIBS)
if (index.value >= MAX_VERTEX_ATTRIBS)
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;
@ -4736,9 +4736,9 @@ bool ValidateDisableVertexAttribArray(const Context *context, GLuint index)
return true;
}
bool ValidateEnableVertexAttribArray(const Context *context, GLuint index)
bool ValidateEnableVertexAttribArray(const Context *context, AttributeLocation index)
{
if (index >= MAX_VERTEX_ATTRIBS)
if (index.value >= MAX_VERTEX_ATTRIBS)
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;
@ -5513,38 +5513,42 @@ bool ValidateValidateProgram(const Context *context, ShaderProgramID program)
return true;
}
bool ValidateVertexAttrib1f(const Context *context, GLuint index, GLfloat x)
bool ValidateVertexAttrib1f(const Context *context, AttributeLocation index, GLfloat x)
{
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib1fv(const Context *context, GLuint index, const GLfloat *values)
bool ValidateVertexAttrib1fv(const Context *context, AttributeLocation index, const GLfloat *values)
{
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib2f(const Context *context, GLuint index, GLfloat x, GLfloat y)
bool ValidateVertexAttrib2f(const Context *context, AttributeLocation index, GLfloat x, GLfloat y)
{
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib2fv(const Context *context, GLuint index, const GLfloat *values)
bool ValidateVertexAttrib2fv(const Context *context, AttributeLocation index, const GLfloat *values)
{
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib3f(const Context *context, GLuint index, GLfloat x, GLfloat y, GLfloat z)
bool ValidateVertexAttrib3f(const Context *context,
AttributeLocation index,
GLfloat x,
GLfloat y,
GLfloat z)
{
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib3fv(const Context *context, GLuint index, const GLfloat *values)
bool ValidateVertexAttrib3fv(const Context *context, AttributeLocation index, const GLfloat *values)
{
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib4f(const Context *context,
GLuint index,
AttributeLocation index,
GLfloat x,
GLfloat y,
GLfloat z,
@ -5553,7 +5557,7 @@ bool ValidateVertexAttrib4f(const Context *context,
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttrib4fv(const Context *context, GLuint index, const GLfloat *values)
bool ValidateVertexAttrib4fv(const Context *context, AttributeLocation index, const GLfloat *values)
{
return ValidateVertexAttribIndex(context, index);
}
@ -5643,24 +5647,26 @@ bool ValidateCopyTexSubImage3DOES(const Context *context,
height);
}
bool ValidateDeleteBuffers(const Context *context, GLint n, const BufferID *buffers)
bool ValidateDeleteBuffers(const Context *context, GLsizei n, const BufferID *buffersPacked)
{
return ValidateGenOrDelete(context, n);
}
bool ValidateDeleteFramebuffers(const Context *context, GLint n, const FramebufferID *framebuffers)
bool ValidateDeleteFramebuffers(const Context *context,
GLsizei n,
const FramebufferID *framebuffers)
{
return ValidateGenOrDelete(context, n);
}
bool ValidateDeleteRenderbuffers(const Context *context,
GLint n,
GLsizei n,
const RenderbufferID *renderbuffers)
{
return ValidateGenOrDelete(context, n);
}
bool ValidateDeleteTextures(const Context *context, GLint n, const TextureID *textures)
bool ValidateDeleteTextures(const Context *context, GLsizei n, const TextureID *textures)
{
return ValidateGenOrDelete(context, n);
}
@ -5901,22 +5907,24 @@ bool ValidateFramebufferTexture3DOES(const Context *context,
return true;
}
bool ValidateGenBuffers(const Context *context, GLint n, const BufferID *buffers)
bool ValidateGenBuffers(const Context *context, GLsizei n, const BufferID *buffers)
{
return ValidateGenOrDelete(context, n);
}
bool ValidateGenFramebuffers(const Context *context, GLint n, const FramebufferID *framebuffers)
bool ValidateGenFramebuffers(const Context *context, GLsizei n, const FramebufferID *framebuffers)
{
return ValidateGenOrDelete(context, n);
}
bool ValidateGenRenderbuffers(const Context *context, GLint n, const RenderbufferID *renderbuffers)
bool ValidateGenRenderbuffers(const Context *context,
GLsizei n,
const RenderbufferID *renderbuffers)
{
return ValidateGenOrDelete(context, n);
}
bool ValidateGenTextures(const Context *context, GLint n, const TextureID *textures)
bool ValidateGenTextures(const Context *context, GLsizei n, const TextureID *textures)
{
return ValidateGenOrDelete(context, n);
}
@ -6097,7 +6105,7 @@ bool ValidateGetUniformiv(const Context *context,
}
bool ValidateGetVertexAttribfv(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLfloat *params)
{
@ -6105,7 +6113,7 @@ bool ValidateGetVertexAttribfv(const Context *context,
}
bool ValidateGetVertexAttribiv(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLint *params)
{
@ -6113,7 +6121,7 @@ bool ValidateGetVertexAttribiv(const Context *context,
}
bool ValidateGetVertexAttribPointerv(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
void *const *pointer)
{
@ -6472,7 +6480,9 @@ bool ValidateTexStorage2DEXT(const Context *context,
1);
}
bool ValidateVertexAttribDivisorANGLE(const Context *context, GLuint index, GLuint divisor)
bool ValidateVertexAttribDivisorANGLE(const Context *context,
AttributeLocation index,
GLuint divisor)
{
if (!context->getExtensions().instancedArraysANGLE)
{
@ -6480,7 +6490,7 @@ bool ValidateVertexAttribDivisorANGLE(const Context *context, GLuint index, GLui
return false;
}
if (index >= MAX_VERTEX_ATTRIBS)
if (index.value >= MAX_VERTEX_ATTRIBS)
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;
@ -6488,7 +6498,7 @@ bool ValidateVertexAttribDivisorANGLE(const Context *context, GLuint index, GLui
if (context->getLimitations().attributeZeroRequiresZeroDivisorInEXT)
{
if (index == 0 && divisor != 0)
if (index.value == 0 && divisor != 0)
{
context->validationError(GL_INVALID_OPERATION, kAttributeZeroRequiresDivisorLimitation);
@ -6502,7 +6512,7 @@ bool ValidateVertexAttribDivisorANGLE(const Context *context, GLuint index, GLui
return true;
}
bool ValidateVertexAttribDivisorEXT(const Context *context, GLuint index, GLuint divisor)
bool ValidateVertexAttribDivisorEXT(const Context *context, AttributeLocation index, GLuint divisor)
{
if (!context->getExtensions().instancedArraysEXT)
{
@ -6510,7 +6520,7 @@ bool ValidateVertexAttribDivisorEXT(const Context *context, GLuint index, GLuint
return false;
}
if (index >= MAX_VERTEX_ATTRIBS)
if (index.value >= MAX_VERTEX_ATTRIBS)
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;

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

@ -59,7 +59,7 @@ ANGLE_INLINE bool ValidateDrawElements(const Context *context,
}
ANGLE_INLINE bool ValidateVertexAttribPointer(const Context *context,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribType type,
GLboolean normalized,
@ -86,7 +86,7 @@ ANGLE_INLINE bool ValidateVertexAttribPointer(const Context *context,
return false;
}
if (index >= static_cast<GLuint>(caps.maxVertexAttribBindings))
if (index.value >= static_cast<uint32_t>(caps.maxVertexAttribBindings))
{
context->validationError(GL_INVALID_VALUE, err::kExceedsMaxVertexAttribBindings);
return false;

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

@ -128,7 +128,7 @@ bool ValidateDetachShader(const Context *context,
ShaderProgramID programPacked,
ShaderProgramID shaderPacked);
bool ValidateDisable(const Context *context, GLenum cap);
bool ValidateDisableVertexAttribArray(const Context *context, GLuint index);
bool ValidateDisableVertexAttribArray(const Context *context, AttributeLocation indexPacked);
bool ValidateDrawArrays(const Context *context,
PrimitiveMode modePacked,
GLint first,
@ -139,7 +139,7 @@ bool ValidateDrawElements(const Context *context,
DrawElementsType typePacked,
const void *indices);
bool ValidateEnable(const Context *context, GLenum cap);
bool ValidateEnableVertexAttribArray(const Context *context, GLuint index);
bool ValidateEnableVertexAttribArray(const Context *context, AttributeLocation indexPacked);
bool ValidateFinish(const Context *context);
bool ValidateFlush(const Context *context);
bool ValidateFramebufferRenderbuffer(const Context *context,
@ -253,15 +253,15 @@ bool ValidateGetUniformiv(const Context *context,
UniformLocation locationPacked,
const GLint *params);
bool ValidateGetVertexAttribPointerv(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
void *const *pointer);
bool ValidateGetVertexAttribfv(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLfloat *params);
bool ValidateGetVertexAttribiv(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLint *params);
bool ValidateHint(const Context *context, GLenum target, GLenum mode);
@ -431,21 +431,36 @@ bool ValidateUniformMatrix4fv(const Context *context,
const GLfloat *value);
bool ValidateUseProgram(const Context *context, ShaderProgramID programPacked);
bool ValidateValidateProgram(const Context *context, ShaderProgramID programPacked);
bool ValidateVertexAttrib1f(const Context *context, GLuint index, GLfloat x);
bool ValidateVertexAttrib1fv(const Context *context, GLuint index, const GLfloat *v);
bool ValidateVertexAttrib2f(const Context *context, GLuint index, GLfloat x, GLfloat y);
bool ValidateVertexAttrib2fv(const Context *context, GLuint index, const GLfloat *v);
bool ValidateVertexAttrib3f(const Context *context, GLuint index, GLfloat x, GLfloat y, GLfloat z);
bool ValidateVertexAttrib3fv(const Context *context, GLuint index, const GLfloat *v);
bool ValidateVertexAttrib1f(const Context *context, AttributeLocation indexPacked, GLfloat x);
bool ValidateVertexAttrib1fv(const Context *context,
AttributeLocation indexPacked,
const GLfloat *v);
bool ValidateVertexAttrib2f(const Context *context,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y);
bool ValidateVertexAttrib2fv(const Context *context,
AttributeLocation indexPacked,
const GLfloat *v);
bool ValidateVertexAttrib3f(const Context *context,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y,
GLfloat z);
bool ValidateVertexAttrib3fv(const Context *context,
AttributeLocation indexPacked,
const GLfloat *v);
bool ValidateVertexAttrib4f(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLfloat x,
GLfloat y,
GLfloat z,
GLfloat w);
bool ValidateVertexAttrib4fv(const Context *context, GLuint index, const GLfloat *v);
bool ValidateVertexAttrib4fv(const Context *context,
AttributeLocation indexPacked,
const GLfloat *v);
bool ValidateVertexAttribPointer(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,

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

@ -1851,7 +1851,7 @@ bool ValidateProgramBinary(const Context *context,
ShaderProgramID program,
GLenum binaryFormat,
const void *binary,
GLint length)
GLsizei length)
{
if (context->getClientMajorVersion() < 3)
{
@ -2452,33 +2452,35 @@ bool ValidateCompressedTexSubImage3DRobustANGLE(const Context *context,
height, depth, format, imageSize, data);
}
bool ValidateGenQueries(const Context *context, GLint n, const QueryID *queries)
bool ValidateGenQueries(const Context *context, GLsizei n, const QueryID *queries)
{
return ValidateGenOrDeleteES3(context, n);
}
bool ValidateDeleteQueries(const Context *context, GLint n, const QueryID *queries)
bool ValidateDeleteQueries(const Context *context, GLsizei n, const QueryID *queries)
{
return ValidateGenOrDeleteES3(context, n);
}
bool ValidateGenSamplers(const Context *context, GLint count, const SamplerID *samplers)
bool ValidateGenSamplers(const Context *context, GLsizei count, const SamplerID *samplers)
{
return ValidateGenOrDeleteCountES3(context, count);
}
bool ValidateDeleteSamplers(const Context *context, GLint count, const SamplerID *samplers)
bool ValidateDeleteSamplers(const Context *context, GLsizei count, const SamplerID *samplers)
{
return ValidateGenOrDeleteCountES3(context, count);
}
bool ValidateGenTransformFeedbacks(const Context *context, GLint n, const TransformFeedbackID *ids)
bool ValidateGenTransformFeedbacks(const Context *context,
GLsizei n,
const TransformFeedbackID *ids)
{
return ValidateGenOrDeleteES3(context, n);
}
bool ValidateDeleteTransformFeedbacks(const Context *context,
GLint n,
GLsizei n,
const TransformFeedbackID *ids)
{
if (!ValidateGenOrDeleteES3(context, n))
@ -2498,12 +2500,12 @@ bool ValidateDeleteTransformFeedbacks(const Context *context,
return true;
}
bool ValidateGenVertexArrays(const Context *context, GLint n, const VertexArrayID *arrays)
bool ValidateGenVertexArrays(const Context *context, GLsizei n, const VertexArrayID *arrays)
{
return ValidateGenOrDeleteES3(context, n);
}
bool ValidateDeleteVertexArrays(const Context *context, GLint n, const VertexArrayID *arrays)
bool ValidateDeleteVertexArrays(const Context *context, GLsizei n, const VertexArrayID *arrays)
{
return ValidateGenOrDeleteES3(context, n);
}
@ -3087,7 +3089,7 @@ bool ValidateRenderbufferStorageMultisample(const Context *context,
}
bool ValidateVertexAttribIPointer(const Context *context,
GLuint index,
AttributeLocation index,
GLint size,
VertexAttribType type,
GLsizei stride,
@ -3122,7 +3124,7 @@ bool ValidateVertexAttribIPointer(const Context *context,
// [OpenGL ES 3.1] Section 10.3.1 page 245:
// glVertexAttribBinding is part of the equivalent code of VertexAttribIPointer, so its
// validation should be inherited.
if (index >= static_cast<GLuint>(caps.maxVertexAttribBindings))
if (index.value >= static_cast<uint32_t>(caps.maxVertexAttribBindings))
{
context->validationError(GL_INVALID_VALUE, kExceedsMaxVertexAttribBindings);
return false;
@ -3788,7 +3790,7 @@ bool ValidateResumeTransformFeedback(const Context *context)
}
bool ValidateVertexAttribI4i(const Context *context,
GLuint index,
AttributeLocation index,
GLint x,
GLint y,
GLint z,
@ -3804,7 +3806,7 @@ bool ValidateVertexAttribI4i(const Context *context,
}
bool ValidateVertexAttribI4ui(const Context *context,
GLuint index,
AttributeLocation index,
GLuint x,
GLuint y,
GLuint z,
@ -3819,7 +3821,7 @@ bool ValidateVertexAttribI4ui(const Context *context,
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttribI4iv(const Context *context, GLuint index, const GLint *v)
bool ValidateVertexAttribI4iv(const Context *context, AttributeLocation index, const GLint *v)
{
if (context->getClientMajorVersion() < 3)
{
@ -3830,7 +3832,7 @@ bool ValidateVertexAttribI4iv(const Context *context, GLuint index, const GLint
return ValidateVertexAttribIndex(context, index);
}
bool ValidateVertexAttribI4uiv(const Context *context, GLuint index, const GLuint *v)
bool ValidateVertexAttribI4uiv(const Context *context, AttributeLocation index, const GLuint *v)
{
if (context->getClientMajorVersion() < 3)
{
@ -4223,7 +4225,7 @@ bool ValidateBindSampler(const Context *context, GLuint unit, SamplerID sampler)
return true;
}
bool ValidateVertexAttribDivisor(const Context *context, GLuint index, GLuint divisor)
bool ValidateVertexAttribDivisor(const Context *context, AttributeLocation index, GLuint divisor)
{
if (context->getClientMajorVersion() < 3)
{
@ -4385,7 +4387,7 @@ bool ValidateSamplerParameterIuivOES(const Context *context,
}
bool ValidateGetVertexAttribIiv(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLint *params)
{
@ -4393,7 +4395,7 @@ bool ValidateGetVertexAttribIiv(const Context *context,
}
bool ValidateGetVertexAttribIuiv(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLuint *params)
{

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

@ -1248,7 +1248,7 @@ bool ValidateVertexBindingDivisor(const Context *context, GLuint bindingIndex, G
}
bool ValidateVertexAttribFormat(const Context *context,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
VertexAttribType type,
GLboolean normalized,
@ -1263,7 +1263,7 @@ bool ValidateVertexAttribFormat(const Context *context,
}
bool ValidateVertexAttribIFormat(const Context *context,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
VertexAttribType type,
GLuint relativeoffset)
@ -1276,7 +1276,9 @@ bool ValidateVertexAttribIFormat(const Context *context,
return ValidateIntegerVertexFormat(context, attribindex, size, type);
}
bool ValidateVertexAttribBinding(const Context *context, GLuint attribIndex, GLuint bindingIndex)
bool ValidateVertexAttribBinding(const Context *context,
AttributeLocation attribIndex,
GLuint bindingIndex)
{
if (context->getClientVersion() < ES_3_1)
{
@ -1293,7 +1295,7 @@ bool ValidateVertexAttribBinding(const Context *context, GLuint attribIndex, GLu
}
const Caps &caps = context->getCaps();
if (attribIndex >= static_cast<GLuint>(caps.maxVertexAttributes))
if (attribIndex.value >= static_cast<uint32_t>(caps.maxVertexAttributes))
{
context->validationError(GL_INVALID_VALUE, kIndexExceedsMaxVertexAttribute);
return false;
@ -1684,14 +1686,14 @@ static bool ValidateGenOrDeleteES31(const Context *context, GLint n)
}
bool ValidateGenProgramPipelines(const Context *context,
GLint n,
GLsizei n,
const ProgramPipelineID *pipelines)
{
return ValidateGenOrDeleteES31(context, n);
}
bool ValidateDeleteProgramPipelines(const Context *context,
GLint n,
GLsizei n,
const ProgramPipelineID *pipelines)
{
return ValidateGenOrDeleteES31(context, n);

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

@ -316,15 +316,17 @@ bool ValidateUseProgramStages(const Context *context,
GLbitfield stages,
ShaderProgramID programPacked);
bool ValidateValidateProgramPipeline(const Context *context, ProgramPipelineID pipelinePacked);
bool ValidateVertexAttribBinding(const Context *context, GLuint attribindex, GLuint bindingindex);
bool ValidateVertexAttribBinding(const Context *context,
AttributeLocation attribindexPacked,
GLuint bindingindex);
bool ValidateVertexAttribFormat(const Context *context,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
VertexAttribType typePacked,
GLboolean normalized,
GLuint relativeoffset);
bool ValidateVertexAttribIFormat(const Context *context,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
VertexAttribType typePacked,
GLuint relativeoffset);

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

@ -241,11 +241,11 @@ bool ValidateGetUniformuiv(const Context *context,
UniformLocation locationPacked,
const GLuint *params);
bool ValidateGetVertexAttribIiv(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLint *params);
bool ValidateGetVertexAttribIuiv(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLuint *params);
bool ValidateInvalidateFramebuffer(const Context *context,
@ -412,23 +412,29 @@ bool ValidateUniformMatrix4x3fv(const Context *context,
GLboolean transpose,
const GLfloat *value);
bool ValidateUnmapBuffer(const Context *context, BufferBinding targetPacked);
bool ValidateVertexAttribDivisor(const Context *context, GLuint index, GLuint divisor);
bool ValidateVertexAttribDivisor(const Context *context,
AttributeLocation indexPacked,
GLuint divisor);
bool ValidateVertexAttribI4i(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLint x,
GLint y,
GLint z,
GLint w);
bool ValidateVertexAttribI4iv(const Context *context, GLuint index, const GLint *v);
bool ValidateVertexAttribI4iv(const Context *context,
AttributeLocation indexPacked,
const GLint *v);
bool ValidateVertexAttribI4ui(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLuint x,
GLuint y,
GLuint z,
GLuint w);
bool ValidateVertexAttribI4uiv(const Context *context, GLuint index, const GLuint *v);
bool ValidateVertexAttribI4uiv(const Context *context,
AttributeLocation indexPacked,
const GLuint *v);
bool ValidateVertexAttribIPointer(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLint size,
VertexAttribType typePacked,
GLsizei stride,

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

@ -126,7 +126,9 @@ bool ValidateDrawElementsInstancedANGLE(const Context *context,
DrawElementsType typePacked,
const void *indices,
GLsizei primcount);
bool ValidateVertexAttribDivisorANGLE(const Context *context, GLuint index, GLuint divisor);
bool ValidateVertexAttribDivisorANGLE(const Context *context,
AttributeLocation indexPacked,
GLuint divisor);
// GL_ANGLE_memory_object_fuchsia
bool ValidateImportMemoryZirconHandleANGLE(const Context *context,
@ -242,19 +244,19 @@ bool ValidateGetUniformivRobustANGLE(const Context *context,
const GLsizei *length,
const GLint *params);
bool ValidateGetVertexAttribfvRobustANGLE(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
const GLfloat *params);
bool ValidateGetVertexAttribivRobustANGLE(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
const GLint *params);
bool ValidateGetVertexAttribPointervRobustANGLE(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -405,13 +407,13 @@ bool ValidateGetInternalformativRobustANGLE(const Context *context,
const GLsizei *length,
const GLint *params);
bool ValidateGetVertexAttribIivRobustANGLE(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
const GLint *params);
bool ValidateGetVertexAttribIuivRobustANGLE(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
GLsizei bufSize,
const GLsizei *length,
@ -834,7 +836,9 @@ bool ValidateDrawElementsInstancedEXT(const Context *context,
DrawElementsType typePacked,
const void *indices,
GLsizei primcount);
bool ValidateVertexAttribDivisorEXT(const Context *context, GLuint index, GLuint divisor);
bool ValidateVertexAttribDivisorEXT(const Context *context,
AttributeLocation indexPacked,
GLuint divisor);
// GL_EXT_map_buffer_range
bool ValidateFlushMappedBufferRangeEXT(const Context *context,

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

@ -12,19 +12,19 @@ namespace gl
{
bool ValidateGetVertexAttribdv(const Context *context,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLdouble *params)
{
return true;
}
bool ValidateVertexAttrib1d(const Context *context, GLuint index, GLdouble x)
bool ValidateVertexAttrib1d(const Context *context, AttributeLocation index, GLdouble x)
{
return true;
}
bool ValidateVertexAttrib1dv(const Context *context, GLuint index, const GLdouble *v)
bool ValidateVertexAttrib1dv(const Context *context, AttributeLocation index, const GLdouble *v)
{
return true;
}
@ -39,12 +39,12 @@ bool ValidateVertexAttrib1sv(const Context *context, GLuint index, const GLshort
return true;
}
bool ValidateVertexAttrib2d(const Context *context, GLuint index, GLdouble x, GLdouble y)
bool ValidateVertexAttrib2d(const Context *context, AttributeLocation index, GLdouble x, GLdouble y)
{
return true;
}
bool ValidateVertexAttrib2dv(const Context *context, GLuint index, const GLdouble *v)
bool ValidateVertexAttrib2dv(const Context *context, AttributeLocation index, const GLdouble *v)
{
return true;
}
@ -60,7 +60,7 @@ bool ValidateVertexAttrib2sv(const Context *context, GLuint index, const GLshort
}
bool ValidateVertexAttrib3d(const Context *context,
GLuint index,
AttributeLocation index,
GLdouble x,
GLdouble y,
GLdouble z)
@ -68,7 +68,7 @@ bool ValidateVertexAttrib3d(const Context *context,
return true;
}
bool ValidateVertexAttrib3dv(const Context *context, GLuint index, const GLdouble *v)
bool ValidateVertexAttrib3dv(const Context *context, AttributeLocation index, const GLdouble *v)
{
return true;
}
@ -129,7 +129,7 @@ bool ValidateVertexAttrib4bv(const Context *context, GLuint index, const GLbyte
}
bool ValidateVertexAttrib4d(const Context *context,
GLuint index,
AttributeLocation index,
GLdouble x,
GLdouble y,
GLdouble z,
@ -138,7 +138,7 @@ bool ValidateVertexAttrib4d(const Context *context,
return true;
}
bool ValidateVertexAttrib4dv(const Context *context, GLuint index, const GLdouble *v)
bool ValidateVertexAttrib4dv(const Context *context, AttributeLocation index, const GLdouble *v)
{
return true;
}

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

@ -18,23 +18,32 @@ namespace gl
class Context;
bool ValidateGetVertexAttribdv(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLdouble *params);
bool ValidateVertexAttrib1d(const Context *context, GLuint index, GLdouble x);
bool ValidateVertexAttrib1dv(const Context *context, GLuint index, const GLdouble *v);
bool ValidateVertexAttrib1d(const Context *context, AttributeLocation indexPacked, GLdouble x);
bool ValidateVertexAttrib1dv(const Context *context,
AttributeLocation indexPacked,
const GLdouble *v);
bool ValidateVertexAttrib1s(const Context *context, GLuint index, GLshort x);
bool ValidateVertexAttrib1sv(const Context *context, GLuint index, const GLshort *v);
bool ValidateVertexAttrib2d(const Context *context, GLuint index, GLdouble x, GLdouble y);
bool ValidateVertexAttrib2dv(const Context *context, GLuint index, const GLdouble *v);
bool ValidateVertexAttrib2d(const Context *context,
AttributeLocation indexPacked,
GLdouble x,
GLdouble y);
bool ValidateVertexAttrib2dv(const Context *context,
AttributeLocation indexPacked,
const GLdouble *v);
bool ValidateVertexAttrib2s(const Context *context, GLuint index, GLshort x, GLshort y);
bool ValidateVertexAttrib2sv(const Context *context, GLuint index, const GLshort *v);
bool ValidateVertexAttrib3d(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLdouble x,
GLdouble y,
GLdouble z);
bool ValidateVertexAttrib3dv(const Context *context, GLuint index, const GLdouble *v);
bool ValidateVertexAttrib3dv(const Context *context,
AttributeLocation indexPacked,
const GLdouble *v);
bool ValidateVertexAttrib3s(const Context *context, GLuint index, GLshort x, GLshort y, GLshort z);
bool ValidateVertexAttrib3sv(const Context *context, GLuint index, const GLshort *v);
bool ValidateVertexAttrib4Nbv(const Context *context, GLuint index, const GLbyte *v);
@ -51,12 +60,14 @@ bool ValidateVertexAttrib4Nuiv(const Context *context, GLuint index, const GLuin
bool ValidateVertexAttrib4Nusv(const Context *context, GLuint index, const GLushort *v);
bool ValidateVertexAttrib4bv(const Context *context, GLuint index, const GLbyte *v);
bool ValidateVertexAttrib4d(const Context *context,
GLuint index,
AttributeLocation indexPacked,
GLdouble x,
GLdouble y,
GLdouble z,
GLdouble w);
bool ValidateVertexAttrib4dv(const Context *context, GLuint index, const GLdouble *v);
bool ValidateVertexAttrib4dv(const Context *context,
AttributeLocation indexPacked,
const GLdouble *v);
bool ValidateVertexAttrib4iv(const Context *context, GLuint index, const GLint *v);
bool ValidateVertexAttrib4s(const Context *context,
GLuint index,

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

@ -54,62 +54,70 @@ bool ValidateFramebufferTexture3D(const Context *context,
return true;
}
bool ValidateVertexAttribI1i(const Context *context, GLuint index, GLint x)
bool ValidateVertexAttribI1i(const Context *context, AttributeLocation index, GLint x)
{
return true;
}
bool ValidateVertexAttribI1iv(const Context *context, GLuint index, const GLint *v)
bool ValidateVertexAttribI1iv(const Context *context, AttributeLocation index, const GLint *v)
{
return true;
}
bool ValidateVertexAttribI1ui(const Context *context, GLuint index, GLuint x)
bool ValidateVertexAttribI1ui(const Context *context, AttributeLocation index, GLuint x)
{
return true;
}
bool ValidateVertexAttribI1uiv(const Context *context, GLuint index, const GLuint *v)
bool ValidateVertexAttribI1uiv(const Context *context, AttributeLocation index, const GLuint *v)
{
return true;
}
bool ValidateVertexAttribI2i(const Context *context, GLuint index, GLint x, GLint y)
bool ValidateVertexAttribI2i(const Context *context, AttributeLocation index, GLint x, GLint y)
{
return true;
}
bool ValidateVertexAttribI2iv(const Context *context, GLuint index, const GLint *v)
bool ValidateVertexAttribI2iv(const Context *context, AttributeLocation index, const GLint *v)
{
return true;
}
bool ValidateVertexAttribI2ui(const Context *context, GLuint index, GLuint x, GLuint y)
bool ValidateVertexAttribI2ui(const Context *context, AttributeLocation index, GLuint x, GLuint y)
{
return true;
}
bool ValidateVertexAttribI2uiv(const Context *context, GLuint index, const GLuint *v)
bool ValidateVertexAttribI2uiv(const Context *context, AttributeLocation index, const GLuint *v)
{
return true;
}
bool ValidateVertexAttribI3i(const Context *context, GLuint index, GLint x, GLint y, GLint z)
bool ValidateVertexAttribI3i(const Context *context,
AttributeLocation index,
GLint x,
GLint y,
GLint z)
{
return true;
}
bool ValidateVertexAttribI3iv(const Context *context, GLuint index, const GLint *v)
bool ValidateVertexAttribI3iv(const Context *context, AttributeLocation index, const GLint *v)
{
return true;
}
bool ValidateVertexAttribI3ui(const Context *context, GLuint index, GLuint x, GLuint y, GLuint z)
bool ValidateVertexAttribI3ui(const Context *context,
AttributeLocation index,
GLuint x,
GLuint y,
GLuint z)
{
return true;
}
bool ValidateVertexAttribI3uiv(const Context *context, GLuint index, const GLuint *v)
bool ValidateVertexAttribI3uiv(const Context *context, AttributeLocation index, const GLuint *v)
{
return true;
}

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

@ -37,18 +37,44 @@ bool ValidateFramebufferTexture3D(const Context *context,
TextureID texturePacked,
GLint level,
GLint zoffset);
bool ValidateVertexAttribI1i(const Context *context, GLuint index, GLint x);
bool ValidateVertexAttribI1iv(const Context *context, GLuint index, const GLint *v);
bool ValidateVertexAttribI1ui(const Context *context, GLuint index, GLuint x);
bool ValidateVertexAttribI1uiv(const Context *context, GLuint index, const GLuint *v);
bool ValidateVertexAttribI2i(const Context *context, GLuint index, GLint x, GLint y);
bool ValidateVertexAttribI2iv(const Context *context, GLuint index, const GLint *v);
bool ValidateVertexAttribI2ui(const Context *context, GLuint index, GLuint x, GLuint y);
bool ValidateVertexAttribI2uiv(const Context *context, GLuint index, const GLuint *v);
bool ValidateVertexAttribI3i(const Context *context, GLuint index, GLint x, GLint y, GLint z);
bool ValidateVertexAttribI3iv(const Context *context, GLuint index, const GLint *v);
bool ValidateVertexAttribI3ui(const Context *context, GLuint index, GLuint x, GLuint y, GLuint z);
bool ValidateVertexAttribI3uiv(const Context *context, GLuint index, const GLuint *v);
bool ValidateVertexAttribI1i(const Context *context, AttributeLocation indexPacked, GLint x);
bool ValidateVertexAttribI1iv(const Context *context,
AttributeLocation indexPacked,
const GLint *v);
bool ValidateVertexAttribI1ui(const Context *context, AttributeLocation indexPacked, GLuint x);
bool ValidateVertexAttribI1uiv(const Context *context,
AttributeLocation indexPacked,
const GLuint *v);
bool ValidateVertexAttribI2i(const Context *context,
AttributeLocation indexPacked,
GLint x,
GLint y);
bool ValidateVertexAttribI2iv(const Context *context,
AttributeLocation indexPacked,
const GLint *v);
bool ValidateVertexAttribI2ui(const Context *context,
AttributeLocation indexPacked,
GLuint x,
GLuint y);
bool ValidateVertexAttribI2uiv(const Context *context,
AttributeLocation indexPacked,
const GLuint *v);
bool ValidateVertexAttribI3i(const Context *context,
AttributeLocation indexPacked,
GLint x,
GLint y,
GLint z);
bool ValidateVertexAttribI3iv(const Context *context,
AttributeLocation indexPacked,
const GLint *v);
bool ValidateVertexAttribI3ui(const Context *context,
AttributeLocation indexPacked,
GLuint x,
GLuint y,
GLuint z);
bool ValidateVertexAttribI3uiv(const Context *context,
AttributeLocation indexPacked,
const GLuint *v);
bool ValidateVertexAttribI4bv(const Context *context, GLuint index, const GLbyte *v);
bool ValidateVertexAttribI4sv(const Context *context, GLuint index, const GLshort *v);
bool ValidateVertexAttribI4ubv(const Context *context, GLuint index, const GLubyte *v);

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

@ -244,12 +244,16 @@ bool ValidateCreateVertexArrays(const Context *context, GLsizei n, const VertexA
return true;
}
bool ValidateDisableVertexArrayAttrib(const Context *context, VertexArrayID vaobj, GLuint index)
bool ValidateDisableVertexArrayAttrib(const Context *context,
VertexArrayID vaobj,
AttributeLocation index)
{
return true;
}
bool ValidateEnableVertexArrayAttrib(const Context *context, VertexArrayID vaobj, GLuint index)
bool ValidateEnableVertexArrayAttrib(const Context *context,
VertexArrayID vaobj,
AttributeLocation index)
{
return true;
}
@ -491,7 +495,7 @@ bool ValidateGetTransformFeedbackiv(const Context *context,
bool ValidateGetVertexArrayIndexed64iv(const Context *context,
VertexArrayID vaobj,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLint64 *param)
{
@ -500,7 +504,7 @@ bool ValidateGetVertexArrayIndexed64iv(const Context *context,
bool ValidateGetVertexArrayIndexediv(const Context *context,
VertexArrayID vaobj,
GLuint index,
AttributeLocation index,
GLenum pname,
const GLint *param)
{
@ -981,7 +985,7 @@ bool ValidateUnmapNamedBuffer(const Context *context, BufferID buffer)
bool ValidateVertexArrayAttribBinding(const Context *context,
VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLuint bindingindex)
{
return true;
@ -989,7 +993,7 @@ bool ValidateVertexArrayAttribBinding(const Context *context,
bool ValidateVertexArrayAttribFormat(const Context *context,
VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
GLenum type,
GLboolean normalized,
@ -1000,7 +1004,7 @@ bool ValidateVertexArrayAttribFormat(const Context *context,
bool ValidateVertexArrayAttribIFormat(const Context *context,
VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
GLenum type,
GLuint relativeoffset)
@ -1010,7 +1014,7 @@ bool ValidateVertexArrayAttribIFormat(const Context *context,
bool ValidateVertexArrayAttribLFormat(const Context *context,
VertexArrayID vaobj,
GLuint attribindex,
AttributeLocation attribindex,
GLint size,
GLenum type,
GLuint relativeoffset)

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

@ -150,10 +150,10 @@ bool ValidateCreateVertexArrays(const Context *context,
const VertexArrayID *arraysPacked);
bool ValidateDisableVertexArrayAttrib(const Context *context,
VertexArrayID vaobjPacked,
GLuint index);
AttributeLocation indexPacked);
bool ValidateEnableVertexArrayAttrib(const Context *context,
VertexArrayID vaobjPacked,
GLuint index);
AttributeLocation indexPacked);
bool ValidateFlushMappedNamedBufferRange(const Context *context,
BufferID bufferPacked,
GLintptr offset,
@ -287,12 +287,12 @@ bool ValidateGetTransformFeedbackiv(const Context *context,
const GLint *param);
bool ValidateGetVertexArrayIndexed64iv(const Context *context,
VertexArrayID vaobjPacked,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLint64 *param);
bool ValidateGetVertexArrayIndexediv(const Context *context,
VertexArrayID vaobjPacked,
GLuint index,
AttributeLocation indexPacked,
GLenum pname,
const GLint *param);
bool ValidateGetVertexArrayiv(const Context *context,
@ -564,24 +564,24 @@ bool ValidateTransformFeedbackBufferRange(const Context *context,
bool ValidateUnmapNamedBuffer(const Context *context, BufferID bufferPacked);
bool ValidateVertexArrayAttribBinding(const Context *context,
VertexArrayID vaobjPacked,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLuint bindingindex);
bool ValidateVertexArrayAttribFormat(const Context *context,
VertexArrayID vaobjPacked,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
GLenum type,
GLboolean normalized,
GLuint relativeoffset);
bool ValidateVertexArrayAttribIFormat(const Context *context,
VertexArrayID vaobjPacked,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
GLenum type,
GLuint relativeoffset);
bool ValidateVertexArrayAttribLFormat(const Context *context,
VertexArrayID vaobjPacked,
GLuint attribindex,
AttributeLocation attribindexPacked,
GLint size,
GLenum type,
GLuint relativeoffset);

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

@ -232,14 +232,15 @@ void GL_APIENTRY DisableVertexAttribArray(GLuint index)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDisableVertexAttribArray(context, index));
(context->skipValidation() || ValidateDisableVertexAttribArray(context, indexPacked));
if (isCallValid)
{
context->disableVertexAttribArray(index);
context->disableVertexAttribArray(indexPacked);
}
ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, index);
ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, indexPacked);
}
}
@ -268,14 +269,15 @@ void GL_APIENTRY EnableVertexAttribArray(GLuint index)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateEnableVertexAttribArray(context, index));
(context->skipValidation() || ValidateEnableVertexAttribArray(context, indexPacked));
if (isCallValid)
{
context->enableVertexAttribArray(index);
context->enableVertexAttribArray(indexPacked);
}
ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, index);
ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, indexPacked);
}
}
@ -609,14 +611,15 @@ void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **poin
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribPointerv(context, index, pname, pointer));
ValidateGetVertexAttribPointerv(context, indexPacked, pname, pointer));
if (isCallValid)
{
context->getVertexAttribPointerv(index, pname, pointer);
context->getVertexAttribPointerv(indexPacked, pname, pointer);
}
ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, index, pname, pointer);
ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, indexPacked, pname, pointer);
}
}
@ -630,14 +633,15 @@ void GL_APIENTRY GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribdv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribdv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribdv(index, pname, params);
context->getVertexAttribdv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribdv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribdv, isCallValid, context, indexPacked, pname, params);
}
}
@ -650,14 +654,15 @@ void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribfv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribfv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribfv(index, pname, params);
context->getVertexAttribfv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, indexPacked, pname, params);
}
}
@ -670,14 +675,15 @@ void GL_APIENTRY GetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribiv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribiv(index, pname, params);
context->getVertexAttribiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -1318,13 +1324,15 @@ void GL_APIENTRY VertexAttrib1d(GLuint index, GLdouble x)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateVertexAttrib1d(context, index, x));
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1d(context, indexPacked, x));
if (isCallValid)
{
context->vertexAttrib1d(index, x);
context->vertexAttrib1d(indexPacked, x);
}
ANGLE_CAPTURE(VertexAttrib1d, isCallValid, context, index, x);
ANGLE_CAPTURE(VertexAttrib1d, isCallValid, context, indexPacked, x);
}
}
@ -1337,14 +1345,15 @@ void GL_APIENTRY VertexAttrib1dv(GLuint index, const GLdouble *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1dv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib1dv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib1dv(index, v);
context->vertexAttrib1dv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib1dv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib1dv, isCallValid, context, indexPacked, v);
}
}
@ -1356,13 +1365,15 @@ void GL_APIENTRY VertexAttrib1f(GLuint index, GLfloat x)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateVertexAttrib1f(context, index, x));
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1f(context, indexPacked, x));
if (isCallValid)
{
context->vertexAttrib1f(index, x);
context->vertexAttrib1f(indexPacked, x);
}
ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, index, x);
ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, indexPacked, x);
}
}
@ -1375,14 +1386,15 @@ void GL_APIENTRY VertexAttrib1fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib1fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib1fv(index, v);
context->vertexAttrib1fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, indexPacked, v);
}
}
@ -1432,14 +1444,15 @@ void GL_APIENTRY VertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2d(context, index, x, y));
(context->skipValidation() || ValidateVertexAttrib2d(context, indexPacked, x, y));
if (isCallValid)
{
context->vertexAttrib2d(index, x, y);
context->vertexAttrib2d(indexPacked, x, y);
}
ANGLE_CAPTURE(VertexAttrib2d, isCallValid, context, index, x, y);
ANGLE_CAPTURE(VertexAttrib2d, isCallValid, context, indexPacked, x, y);
}
}
@ -1452,14 +1465,15 @@ void GL_APIENTRY VertexAttrib2dv(GLuint index, const GLdouble *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2dv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib2dv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib2dv(index, v);
context->vertexAttrib2dv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib2dv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib2dv, isCallValid, context, indexPacked, v);
}
}
@ -1471,14 +1485,15 @@ void GL_APIENTRY VertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2f(context, index, x, y));
(context->skipValidation() || ValidateVertexAttrib2f(context, indexPacked, x, y));
if (isCallValid)
{
context->vertexAttrib2f(index, x, y);
context->vertexAttrib2f(indexPacked, x, y);
}
ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, index, x, y);
ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, indexPacked, x, y);
}
}
@ -1491,14 +1506,15 @@ void GL_APIENTRY VertexAttrib2fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib2fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib2fv(index, v);
context->vertexAttrib2fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, indexPacked, v);
}
}
@ -1550,14 +1566,15 @@ void GL_APIENTRY VertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3d(context, index, x, y, z));
(context->skipValidation() || ValidateVertexAttrib3d(context, indexPacked, x, y, z));
if (isCallValid)
{
context->vertexAttrib3d(index, x, y, z);
context->vertexAttrib3d(indexPacked, x, y, z);
}
ANGLE_CAPTURE(VertexAttrib3d, isCallValid, context, index, x, y, z);
ANGLE_CAPTURE(VertexAttrib3d, isCallValid, context, indexPacked, x, y, z);
}
}
@ -1570,14 +1587,15 @@ void GL_APIENTRY VertexAttrib3dv(GLuint index, const GLdouble *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3dv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib3dv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib3dv(index, v);
context->vertexAttrib3dv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib3dv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib3dv, isCallValid, context, indexPacked, v);
}
}
@ -1590,14 +1608,15 @@ void GL_APIENTRY VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3f(context, index, x, y, z));
(context->skipValidation() || ValidateVertexAttrib3f(context, indexPacked, x, y, z));
if (isCallValid)
{
context->vertexAttrib3f(index, x, y, z);
context->vertexAttrib3f(indexPacked, x, y, z);
}
ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, index, x, y, z);
ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, indexPacked, x, y, z);
}
}
@ -1610,14 +1629,15 @@ void GL_APIENTRY VertexAttrib3fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib3fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib3fv(index, v);
context->vertexAttrib3fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, indexPacked, v);
}
}
@ -1832,14 +1852,15 @@ void GL_APIENTRY VertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4d(context, index, x, y, z, w));
(context->skipValidation() || ValidateVertexAttrib4d(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttrib4d(index, x, y, z, w);
context->vertexAttrib4d(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttrib4d, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttrib4d, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -1852,14 +1873,15 @@ void GL_APIENTRY VertexAttrib4dv(GLuint index, const GLdouble *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4dv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib4dv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib4dv(index, v);
context->vertexAttrib4dv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib4dv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib4dv, isCallValid, context, indexPacked, v);
}
}
@ -1873,14 +1895,15 @@ void GL_APIENTRY VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, G
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4f(context, index, x, y, z, w));
(context->skipValidation() || ValidateVertexAttrib4f(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttrib4f(index, x, y, z, w);
context->vertexAttrib4f(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -1893,14 +1916,15 @@ void GL_APIENTRY VertexAttrib4fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib4fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib4fv(index, v);
context->vertexAttrib4fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, indexPacked, v);
}
}
@ -2041,16 +2065,18 @@ void GL_APIENTRY VertexAttribPointer(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribPointer(context, index, size, typePacked,
ValidateVertexAttribPointer(context, indexPacked, size, typePacked,
normalized, stride, pointer));
if (isCallValid)
{
context->vertexAttribPointer(index, size, typePacked, normalized, stride, pointer);
context->vertexAttribPointer(indexPacked, size, typePacked, normalized, stride,
pointer);
}
ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, index, size, typePacked,
ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, indexPacked, size, typePacked,
normalized, stride, pointer);
}
}

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

@ -1040,14 +1040,15 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIiv(context, index, pname, params));
ValidateGetVertexAttribIiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribIiv(index, pname, params);
context->getVertexAttribIiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -1061,14 +1062,15 @@ void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIuiv(context, index, pname, params));
ValidateGetVertexAttribIuiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribIuiv(index, pname, params);
context->getVertexAttribIuiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -1536,14 +1538,15 @@ void GL_APIENTRY VertexAttribI1i(GLuint index, GLint x)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI1i(context, index, x));
(context->skipValidation() || ValidateVertexAttribI1i(context, indexPacked, x));
if (isCallValid)
{
context->vertexAttribI1i(index, x);
context->vertexAttribI1i(indexPacked, x);
}
ANGLE_CAPTURE(VertexAttribI1i, isCallValid, context, index, x);
ANGLE_CAPTURE(VertexAttribI1i, isCallValid, context, indexPacked, x);
}
}
@ -1556,14 +1559,15 @@ void GL_APIENTRY VertexAttribI1iv(GLuint index, const GLint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI1iv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI1iv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI1iv(index, v);
context->vertexAttribI1iv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI1iv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI1iv, isCallValid, context, indexPacked, v);
}
}
@ -1575,14 +1579,15 @@ void GL_APIENTRY VertexAttribI1ui(GLuint index, GLuint x)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI1ui(context, index, x));
(context->skipValidation() || ValidateVertexAttribI1ui(context, indexPacked, x));
if (isCallValid)
{
context->vertexAttribI1ui(index, x);
context->vertexAttribI1ui(indexPacked, x);
}
ANGLE_CAPTURE(VertexAttribI1ui, isCallValid, context, index, x);
ANGLE_CAPTURE(VertexAttribI1ui, isCallValid, context, indexPacked, x);
}
}
@ -1595,14 +1600,15 @@ void GL_APIENTRY VertexAttribI1uiv(GLuint index, const GLuint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI1uiv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI1uiv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI1uiv(index, v);
context->vertexAttribI1uiv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI1uiv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI1uiv, isCallValid, context, indexPacked, v);
}
}
@ -1614,14 +1620,15 @@ void GL_APIENTRY VertexAttribI2i(GLuint index, GLint x, GLint y)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI2i(context, index, x, y));
(context->skipValidation() || ValidateVertexAttribI2i(context, indexPacked, x, y));
if (isCallValid)
{
context->vertexAttribI2i(index, x, y);
context->vertexAttribI2i(indexPacked, x, y);
}
ANGLE_CAPTURE(VertexAttribI2i, isCallValid, context, index, x, y);
ANGLE_CAPTURE(VertexAttribI2i, isCallValid, context, indexPacked, x, y);
}
}
@ -1634,14 +1641,15 @@ void GL_APIENTRY VertexAttribI2iv(GLuint index, const GLint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI2iv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI2iv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI2iv(index, v);
context->vertexAttribI2iv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI2iv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI2iv, isCallValid, context, indexPacked, v);
}
}
@ -1653,14 +1661,15 @@ void GL_APIENTRY VertexAttribI2ui(GLuint index, GLuint x, GLuint y)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI2ui(context, index, x, y));
(context->skipValidation() || ValidateVertexAttribI2ui(context, indexPacked, x, y));
if (isCallValid)
{
context->vertexAttribI2ui(index, x, y);
context->vertexAttribI2ui(indexPacked, x, y);
}
ANGLE_CAPTURE(VertexAttribI2ui, isCallValid, context, index, x, y);
ANGLE_CAPTURE(VertexAttribI2ui, isCallValid, context, indexPacked, x, y);
}
}
@ -1673,14 +1682,15 @@ void GL_APIENTRY VertexAttribI2uiv(GLuint index, const GLuint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI2uiv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI2uiv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI2uiv(index, v);
context->vertexAttribI2uiv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI2uiv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI2uiv, isCallValid, context, indexPacked, v);
}
}
@ -1693,14 +1703,15 @@ void GL_APIENTRY VertexAttribI3i(GLuint index, GLint x, GLint y, GLint z)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI3i(context, index, x, y, z));
(context->skipValidation() || ValidateVertexAttribI3i(context, indexPacked, x, y, z));
if (isCallValid)
{
context->vertexAttribI3i(index, x, y, z);
context->vertexAttribI3i(indexPacked, x, y, z);
}
ANGLE_CAPTURE(VertexAttribI3i, isCallValid, context, index, x, y, z);
ANGLE_CAPTURE(VertexAttribI3i, isCallValid, context, indexPacked, x, y, z);
}
}
@ -1713,14 +1724,15 @@ void GL_APIENTRY VertexAttribI3iv(GLuint index, const GLint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI3iv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI3iv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI3iv(index, v);
context->vertexAttribI3iv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI3iv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI3iv, isCallValid, context, indexPacked, v);
}
}
@ -1733,14 +1745,15 @@ void GL_APIENTRY VertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI3ui(context, index, x, y, z));
(context->skipValidation() || ValidateVertexAttribI3ui(context, indexPacked, x, y, z));
if (isCallValid)
{
context->vertexAttribI3ui(index, x, y, z);
context->vertexAttribI3ui(indexPacked, x, y, z);
}
ANGLE_CAPTURE(VertexAttribI3ui, isCallValid, context, index, x, y, z);
ANGLE_CAPTURE(VertexAttribI3ui, isCallValid, context, indexPacked, x, y, z);
}
}
@ -1753,14 +1766,15 @@ void GL_APIENTRY VertexAttribI3uiv(GLuint index, const GLuint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI3uiv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI3uiv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI3uiv(index, v);
context->vertexAttribI3uiv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI3uiv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI3uiv, isCallValid, context, indexPacked, v);
}
}
@ -1793,14 +1807,15 @@ void GL_APIENTRY VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribI4i(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttribI4i(index, x, y, z, w);
context->vertexAttribI4i(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -1813,14 +1828,15 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4iv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI4iv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI4iv(index, v);
context->vertexAttribI4iv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, indexPacked, v);
}
}
@ -1874,14 +1890,15 @@ void GL_APIENTRY VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GL
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribI4ui(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttribI4ui(index, x, y, z, w);
context->vertexAttribI4ui(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -1894,14 +1911,15 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI4uiv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI4uiv(index, v);
context->vertexAttribI4uiv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, indexPacked, v);
}
}
@ -1937,17 +1955,18 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIPointer(context, index, size, typePacked, stride, pointer));
ValidateVertexAttribIPointer(context, indexPacked, size, typePacked, stride, pointer));
if (isCallValid)
{
context->vertexAttribIPointer(index, size, typePacked, stride, pointer);
context->vertexAttribIPointer(indexPacked, size, typePacked, stride, pointer);
}
ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, index, size, typePacked, stride,
pointer);
ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, indexPacked, size, typePacked,
stride, pointer);
}
}
} // namespace gl

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

@ -955,14 +955,15 @@ void GL_APIENTRY VertexAttribDivisor(GLuint index, GLuint divisor)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisor(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, indexPacked, divisor);
}
}

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

@ -1117,14 +1117,15 @@ void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
if (context)
{
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribBinding(context, attribindex, bindingindex));
ValidateVertexAttribBinding(context, attribindexPacked, bindingindex));
if (isCallValid)
{
context->vertexAttribBinding(attribindex, bindingindex);
context->vertexAttribBinding(attribindexPacked, bindingindex);
}
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex);
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindexPacked, bindingindex);
}
}
@ -1143,16 +1144,18 @@ void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribFormat(context, attribindex, size, typePacked,
ValidateVertexAttribFormat(context, attribindexPacked, size, typePacked,
normalized, relativeoffset));
if (isCallValid)
{
context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset);
context->vertexAttribFormat(attribindexPacked, size, typePacked, normalized,
relativeoffset);
}
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked,
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindexPacked, size, typePacked,
normalized, relativeoffset);
}
}
@ -1171,17 +1174,18 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindexPacked, size,
typePacked, relativeoffset));
if (isCallValid)
{
context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset);
context->vertexAttribIFormat(attribindexPacked, size, typePacked, relativeoffset);
}
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked,
relativeoffset);
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindexPacked, size,
typePacked, relativeoffset);
}
}

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

@ -731,14 +731,15 @@ void GL_APIENTRY DisableVertexArrayAttrib(GLuint vaobj, GLuint index)
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateDisableVertexArrayAttrib(context, vaobjPacked, index));
ValidateDisableVertexArrayAttrib(context, vaobjPacked, indexPacked));
if (isCallValid)
{
context->disableVertexArrayAttrib(vaobjPacked, index);
context->disableVertexArrayAttrib(vaobjPacked, indexPacked);
}
ANGLE_CAPTURE(DisableVertexArrayAttrib, isCallValid, context, vaobjPacked, index);
ANGLE_CAPTURE(DisableVertexArrayAttrib, isCallValid, context, vaobjPacked, indexPacked);
}
}
@ -751,14 +752,15 @@ void GL_APIENTRY EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateEnableVertexArrayAttrib(context, vaobjPacked, index));
ValidateEnableVertexArrayAttrib(context, vaobjPacked, indexPacked));
if (isCallValid)
{
context->enableVertexArrayAttrib(vaobjPacked, index);
context->enableVertexArrayAttrib(vaobjPacked, indexPacked);
}
ANGLE_CAPTURE(EnableVertexArrayAttrib, isCallValid, context, vaobjPacked, index);
ANGLE_CAPTURE(EnableVertexArrayAttrib, isCallValid, context, vaobjPacked, indexPacked);
}
}
@ -1465,16 +1467,17 @@ void GL_APIENTRY GetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pn
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexArrayIndexed64iv(context, vaobjPacked, index, pname, param));
ValidateGetVertexArrayIndexed64iv(context, vaobjPacked, indexPacked, pname, param));
if (isCallValid)
{
context->getVertexArrayIndexed64iv(vaobjPacked, index, pname, param);
context->getVertexArrayIndexed64iv(vaobjPacked, indexPacked, pname, param);
}
ANGLE_CAPTURE(GetVertexArrayIndexed64iv, isCallValid, context, vaobjPacked, index, pname,
param);
ANGLE_CAPTURE(GetVertexArrayIndexed64iv, isCallValid, context, vaobjPacked, indexPacked,
pname, param);
}
}
@ -1490,16 +1493,17 @@ void GL_APIENTRY GetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pnam
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexArrayIndexediv(context, vaobjPacked, index, pname, param));
ValidateGetVertexArrayIndexediv(context, vaobjPacked, indexPacked, pname, param));
if (isCallValid)
{
context->getVertexArrayIndexediv(vaobjPacked, index, pname, param);
context->getVertexArrayIndexediv(vaobjPacked, indexPacked, pname, param);
}
ANGLE_CAPTURE(GetVertexArrayIndexediv, isCallValid, context, vaobjPacked, index, pname,
param);
ANGLE_CAPTURE(GetVertexArrayIndexediv, isCallValid, context, vaobjPacked, indexPacked,
pname, param);
}
}
@ -3018,17 +3022,18 @@ void GL_APIENTRY VertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLui
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexArrayAttribBinding(context, vaobjPacked, attribindex, bindingindex));
bool isCallValid = (context->skipValidation() ||
ValidateVertexArrayAttribBinding(context, vaobjPacked,
attribindexPacked, bindingindex));
if (isCallValid)
{
context->vertexArrayAttribBinding(vaobjPacked, attribindex, bindingindex);
context->vertexArrayAttribBinding(vaobjPacked, attribindexPacked, bindingindex);
}
ANGLE_CAPTURE(VertexArrayAttribBinding, isCallValid, context, vaobjPacked, attribindex,
bindingindex);
ANGLE_CAPTURE(VertexArrayAttribBinding, isCallValid, context, vaobjPacked,
attribindexPacked, bindingindex);
}
}
@ -3049,18 +3054,20 @@ void GL_APIENTRY VertexArrayAttribFormat(GLuint vaobj,
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexArrayAttribFormat(context, vaobjPacked, attribindex, size,
type, normalized, relativeoffset));
bool isCallValid =
(context->skipValidation() ||
ValidateVertexArrayAttribFormat(context, vaobjPacked, attribindexPacked, size, type,
normalized, relativeoffset));
if (isCallValid)
{
context->vertexArrayAttribFormat(vaobjPacked, attribindex, size, type, normalized,
context->vertexArrayAttribFormat(vaobjPacked, attribindexPacked, size, type, normalized,
relativeoffset);
}
ANGLE_CAPTURE(VertexArrayAttribFormat, isCallValid, context, vaobjPacked, attribindex, size,
type, normalized, relativeoffset);
ANGLE_CAPTURE(VertexArrayAttribFormat, isCallValid, context, vaobjPacked, attribindexPacked,
size, type, normalized, relativeoffset);
}
}
@ -3079,17 +3086,20 @@ void GL_APIENTRY VertexArrayAttribIFormat(GLuint vaobj,
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexArrayAttribIFormat(context, vaobjPacked, attribindex,
size, type, relativeoffset));
bool isCallValid =
(context->skipValidation() ||
ValidateVertexArrayAttribIFormat(context, vaobjPacked, attribindexPacked, size, type,
relativeoffset));
if (isCallValid)
{
context->vertexArrayAttribIFormat(vaobjPacked, attribindex, size, type, relativeoffset);
context->vertexArrayAttribIFormat(vaobjPacked, attribindexPacked, size, type,
relativeoffset);
}
ANGLE_CAPTURE(VertexArrayAttribIFormat, isCallValid, context, vaobjPacked, attribindex,
size, type, relativeoffset);
ANGLE_CAPTURE(VertexArrayAttribIFormat, isCallValid, context, vaobjPacked,
attribindexPacked, size, type, relativeoffset);
}
}
@ -3108,17 +3118,20 @@ void GL_APIENTRY VertexArrayAttribLFormat(GLuint vaobj,
if (context)
{
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexArrayAttribLFormat(context, vaobjPacked, attribindex,
size, type, relativeoffset));
bool isCallValid =
(context->skipValidation() ||
ValidateVertexArrayAttribLFormat(context, vaobjPacked, attribindexPacked, size, type,
relativeoffset));
if (isCallValid)
{
context->vertexArrayAttribLFormat(vaobjPacked, attribindex, size, type, relativeoffset);
context->vertexArrayAttribLFormat(vaobjPacked, attribindexPacked, size, type,
relativeoffset);
}
ANGLE_CAPTURE(VertexArrayAttribLFormat, isCallValid, context, vaobjPacked, attribindex,
size, type, relativeoffset);
ANGLE_CAPTURE(VertexArrayAttribLFormat, isCallValid, context, vaobjPacked,
attribindexPacked, size, type, relativeoffset);
}
}

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

@ -898,14 +898,15 @@ void GL_APIENTRY DisableVertexAttribArray(GLuint index)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDisableVertexAttribArray(context, index));
(context->skipValidation() || ValidateDisableVertexAttribArray(context, indexPacked));
if (isCallValid)
{
context->disableVertexAttribArray(index);
context->disableVertexAttribArray(indexPacked);
}
ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, index);
ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, indexPacked);
}
}
@ -978,14 +979,15 @@ void GL_APIENTRY EnableVertexAttribArray(GLuint index)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateEnableVertexAttribArray(context, index));
(context->skipValidation() || ValidateEnableVertexAttribArray(context, indexPacked));
if (isCallValid)
{
context->enableVertexAttribArray(index);
context->enableVertexAttribArray(indexPacked);
}
ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, index);
ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, indexPacked);
}
}
@ -1790,14 +1792,15 @@ void GL_APIENTRY GetVertexAttribPointerv(GLuint index, GLenum pname, void **poin
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribPointerv(context, index, pname, pointer));
ValidateGetVertexAttribPointerv(context, indexPacked, pname, pointer));
if (isCallValid)
{
context->getVertexAttribPointerv(index, pname, pointer);
context->getVertexAttribPointerv(indexPacked, pname, pointer);
}
ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, index, pname, pointer);
ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, indexPacked, pname, pointer);
}
}
@ -1810,14 +1813,15 @@ void GL_APIENTRY GetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribfv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribfv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribfv(index, pname, params);
context->getVertexAttribfv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, indexPacked, pname, params);
}
}
@ -1830,14 +1834,15 @@ void GL_APIENTRY GetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribiv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribiv(index, pname, params);
context->getVertexAttribiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -3054,13 +3059,15 @@ void GL_APIENTRY VertexAttrib1f(GLuint index, GLfloat x)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateVertexAttrib1f(context, index, x));
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1f(context, indexPacked, x));
if (isCallValid)
{
context->vertexAttrib1f(index, x);
context->vertexAttrib1f(indexPacked, x);
}
ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, index, x);
ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, indexPacked, x);
}
}
@ -3073,14 +3080,15 @@ void GL_APIENTRY VertexAttrib1fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib1fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib1fv(index, v);
context->vertexAttrib1fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, indexPacked, v);
}
}
@ -3092,14 +3100,15 @@ void GL_APIENTRY VertexAttrib2f(GLuint index, GLfloat x, GLfloat y)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2f(context, index, x, y));
(context->skipValidation() || ValidateVertexAttrib2f(context, indexPacked, x, y));
if (isCallValid)
{
context->vertexAttrib2f(index, x, y);
context->vertexAttrib2f(indexPacked, x, y);
}
ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, index, x, y);
ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, indexPacked, x, y);
}
}
@ -3112,14 +3121,15 @@ void GL_APIENTRY VertexAttrib2fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib2fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib2fv(index, v);
context->vertexAttrib2fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, indexPacked, v);
}
}
@ -3132,14 +3142,15 @@ void GL_APIENTRY VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3f(context, index, x, y, z));
(context->skipValidation() || ValidateVertexAttrib3f(context, indexPacked, x, y, z));
if (isCallValid)
{
context->vertexAttrib3f(index, x, y, z);
context->vertexAttrib3f(indexPacked, x, y, z);
}
ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, index, x, y, z);
ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, indexPacked, x, y, z);
}
}
@ -3152,14 +3163,15 @@ void GL_APIENTRY VertexAttrib3fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib3fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib3fv(index, v);
context->vertexAttrib3fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, indexPacked, v);
}
}
@ -3173,14 +3185,15 @@ void GL_APIENTRY VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, G
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4f(context, index, x, y, z, w));
(context->skipValidation() || ValidateVertexAttrib4f(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttrib4f(index, x, y, z, w);
context->vertexAttrib4f(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -3193,14 +3206,15 @@ void GL_APIENTRY VertexAttrib4fv(GLuint index, const GLfloat *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib4fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib4fv(index, v);
context->vertexAttrib4fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, indexPacked, v);
}
}
@ -3220,16 +3234,18 @@ void GL_APIENTRY VertexAttribPointer(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribPointer(context, index, size, typePacked,
ValidateVertexAttribPointer(context, indexPacked, size, typePacked,
normalized, stride, pointer));
if (isCallValid)
{
context->vertexAttribPointer(index, size, typePacked, normalized, stride, pointer);
context->vertexAttribPointer(indexPacked, size, typePacked, normalized, stride,
pointer);
}
ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, index, size, typePacked,
ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, indexPacked, size, typePacked,
normalized, stride, pointer);
}
}

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

@ -1415,14 +1415,15 @@ void GL_APIENTRY GetVertexAttribIiv(GLuint index, GLenum pname, GLint *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIiv(context, index, pname, params));
ValidateGetVertexAttribIiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribIiv(index, pname, params);
context->getVertexAttribIiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -1436,14 +1437,15 @@ void GL_APIENTRY GetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIuiv(context, index, pname, params));
ValidateGetVertexAttribIuiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribIuiv(index, pname, params);
context->getVertexAttribIuiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -2460,14 +2462,15 @@ void GL_APIENTRY VertexAttribDivisor(GLuint index, GLuint divisor)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisor(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, indexPacked, divisor);
}
}
@ -2480,14 +2483,15 @@ void GL_APIENTRY VertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribI4i(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttribI4i(index, x, y, z, w);
context->vertexAttribI4i(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -2500,14 +2504,15 @@ void GL_APIENTRY VertexAttribI4iv(GLuint index, const GLint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4iv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI4iv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI4iv(index, v);
context->vertexAttribI4iv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, indexPacked, v);
}
}
@ -2521,14 +2526,15 @@ void GL_APIENTRY VertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GL
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribI4ui(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttribI4ui(index, x, y, z, w);
context->vertexAttribI4ui(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -2541,14 +2547,15 @@ void GL_APIENTRY VertexAttribI4uiv(GLuint index, const GLuint *v)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI4uiv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI4uiv(index, v);
context->vertexAttribI4uiv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, indexPacked, v);
}
}
@ -2564,17 +2571,18 @@ VertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, cons
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIPointer(context, index, size, typePacked, stride, pointer));
ValidateVertexAttribIPointer(context, indexPacked, size, typePacked, stride, pointer));
if (isCallValid)
{
context->vertexAttribIPointer(index, size, typePacked, stride, pointer);
context->vertexAttribIPointer(indexPacked, size, typePacked, stride, pointer);
}
ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, index, size, typePacked, stride,
pointer);
ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, indexPacked, size, typePacked,
stride, pointer);
}
}

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

@ -1709,14 +1709,15 @@ void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
if (context)
{
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribBinding(context, attribindex, bindingindex));
ValidateVertexAttribBinding(context, attribindexPacked, bindingindex));
if (isCallValid)
{
context->vertexAttribBinding(attribindex, bindingindex);
context->vertexAttribBinding(attribindexPacked, bindingindex);
}
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex);
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindexPacked, bindingindex);
}
}
@ -1735,16 +1736,18 @@ void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribFormat(context, attribindex, size, typePacked,
ValidateVertexAttribFormat(context, attribindexPacked, size, typePacked,
normalized, relativeoffset));
if (isCallValid)
{
context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset);
context->vertexAttribFormat(attribindexPacked, size, typePacked, normalized,
relativeoffset);
}
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked,
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindexPacked, size, typePacked,
normalized, relativeoffset);
}
}
@ -1763,17 +1766,18 @@ void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
if (context)
{
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindexPacked, size,
typePacked, relativeoffset));
if (isCallValid)
{
context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset);
context->vertexAttribIFormat(attribindexPacked, size, typePacked, relativeoffset);
}
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked,
relativeoffset);
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindexPacked, size,
typePacked, relativeoffset);
}
}

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

@ -463,14 +463,15 @@ void GL_APIENTRY VertexAttribDivisorANGLE(GLuint index, GLuint divisor)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisorANGLE(context, index, divisor));
ValidateVertexAttribDivisorANGLE(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisorANGLE, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisorANGLE, isCallValid, context, indexPacked, divisor);
}
}
@ -1045,16 +1046,17 @@ void GL_APIENTRY GetVertexAttribfvRobustANGLE(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexAttribfvRobustANGLE(context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribfvRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribfvRobust(index, pname, bufSize, length, params);
context->getVertexAttribfvRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribfvRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribfvRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -1073,16 +1075,17 @@ void GL_APIENTRY GetVertexAttribivRobustANGLE(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexAttribivRobustANGLE(context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribivRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribivRobust(index, pname, bufSize, length, params);
context->getVertexAttribivRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribivRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribivRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -1101,15 +1104,16 @@ void GL_APIENTRY GetVertexAttribPointervRobustANGLE(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribPointervRobustANGLE(
context, index, pname, bufSize, length, pointer));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribPointervRobustANGLE(context, indexPacked, pname,
bufSize, length, pointer));
if (isCallValid)
{
context->getVertexAttribPointervRobust(index, pname, bufSize, length, pointer);
context->getVertexAttribPointervRobust(indexPacked, pname, bufSize, length, pointer);
}
ANGLE_CAPTURE(GetVertexAttribPointervRobustANGLE, isCallValid, context, index, pname,
ANGLE_CAPTURE(GetVertexAttribPointervRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, pointer);
}
}
@ -1681,16 +1685,17 @@ void GL_APIENTRY GetVertexAttribIivRobustANGLE(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexAttribIivRobustANGLE(context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIivRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribIivRobust(index, pname, bufSize, length, params);
context->getVertexAttribIivRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribIivRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribIivRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -1709,16 +1714,17 @@ void GL_APIENTRY GetVertexAttribIuivRobustANGLE(GLuint index,
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribIuivRobustANGLE(
context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIuivRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribIuivRobust(index, pname, bufSize, length, params);
context->getVertexAttribIuivRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribIuivRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribIuivRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -3959,14 +3965,15 @@ void GL_APIENTRY VertexAttribDivisorEXT(GLuint index, GLuint divisor)
if (context)
{
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribDivisorEXT(context, index, divisor));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisorEXT(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisorEXT, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisorEXT, isCallValid, context, indexPacked, divisor);
}
}
@ -10452,14 +10459,15 @@ void GL_APIENTRY DisableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint i
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateDisableVertexAttribArray(context, index));
(context->skipValidation() || ValidateDisableVertexAttribArray(context, indexPacked));
if (isCallValid)
{
context->disableVertexAttribArray(index);
context->disableVertexAttribArray(indexPacked);
}
ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, index);
ANGLE_CAPTURE(DisableVertexAttribArray, isCallValid, context, indexPacked);
}
}
@ -11535,14 +11543,15 @@ void GL_APIENTRY EnableVertexAttribArrayContextANGLE(GLeglContext ctx, GLuint in
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateEnableVertexAttribArray(context, index));
(context->skipValidation() || ValidateEnableVertexAttribArray(context, indexPacked));
if (isCallValid)
{
context->enableVertexAttribArray(index);
context->enableVertexAttribArray(indexPacked);
}
ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, index);
ANGLE_CAPTURE(EnableVertexAttribArray, isCallValid, context, indexPacked);
}
}
@ -15670,14 +15679,15 @@ void GL_APIENTRY GetVertexAttribIivContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIiv(context, index, pname, params));
ValidateGetVertexAttribIiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribIiv(index, pname, params);
context->getVertexAttribIiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribIiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -15695,14 +15705,15 @@ void GL_APIENTRY GetVertexAttribIuivContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIuiv(context, index, pname, params));
ValidateGetVertexAttribIuiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribIuiv(index, pname, params);
context->getVertexAttribIuiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribIuiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -15720,14 +15731,15 @@ void GL_APIENTRY GetVertexAttribPointervContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribPointerv(context, index, pname, pointer));
ValidateGetVertexAttribPointerv(context, indexPacked, pname, pointer));
if (isCallValid)
{
context->getVertexAttribPointerv(index, pname, pointer);
context->getVertexAttribPointerv(indexPacked, pname, pointer);
}
ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, index, pname, pointer);
ANGLE_CAPTURE(GetVertexAttribPointerv, isCallValid, context, indexPacked, pname, pointer);
}
}
@ -15744,14 +15756,15 @@ void GL_APIENTRY GetVertexAttribfvContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribfv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribfv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribfv(index, pname, params);
context->getVertexAttribfv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribfv, isCallValid, context, indexPacked, pname, params);
}
}
@ -15768,14 +15781,15 @@ void GL_APIENTRY GetVertexAttribivContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribiv(context, index, pname, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribiv(context, indexPacked, pname, params));
if (isCallValid)
{
context->getVertexAttribiv(index, pname, params);
context->getVertexAttribiv(indexPacked, pname, params);
}
ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, index, pname, params);
ANGLE_CAPTURE(GetVertexAttribiv, isCallValid, context, indexPacked, pname, params);
}
}
@ -22842,13 +22856,15 @@ void GL_APIENTRY VertexAttrib1fContextANGLE(GLeglContext ctx, GLuint index, GLfl
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateVertexAttrib1f(context, index, x));
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1f(context, indexPacked, x));
if (isCallValid)
{
context->vertexAttrib1f(index, x);
context->vertexAttrib1f(indexPacked, x);
}
ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, index, x);
ANGLE_CAPTURE(VertexAttrib1f, isCallValid, context, indexPacked, x);
}
}
@ -22862,14 +22878,15 @@ void GL_APIENTRY VertexAttrib1fvContextANGLE(GLeglContext ctx, GLuint index, con
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib1fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib1fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib1fv(index, v);
context->vertexAttrib1fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib1fv, isCallValid, context, indexPacked, v);
}
}
@ -22882,14 +22899,15 @@ void GL_APIENTRY VertexAttrib2fContextANGLE(GLeglContext ctx, GLuint index, GLfl
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2f(context, index, x, y));
(context->skipValidation() || ValidateVertexAttrib2f(context, indexPacked, x, y));
if (isCallValid)
{
context->vertexAttrib2f(index, x, y);
context->vertexAttrib2f(indexPacked, x, y);
}
ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, index, x, y);
ANGLE_CAPTURE(VertexAttrib2f, isCallValid, context, indexPacked, x, y);
}
}
@ -22903,14 +22921,15 @@ void GL_APIENTRY VertexAttrib2fvContextANGLE(GLeglContext ctx, GLuint index, con
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib2fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib2fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib2fv(index, v);
context->vertexAttrib2fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib2fv, isCallValid, context, indexPacked, v);
}
}
@ -22925,14 +22944,15 @@ VertexAttrib3fContextANGLE(GLeglContext ctx, GLuint index, GLfloat x, GLfloat y,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3f(context, index, x, y, z));
(context->skipValidation() || ValidateVertexAttrib3f(context, indexPacked, x, y, z));
if (isCallValid)
{
context->vertexAttrib3f(index, x, y, z);
context->vertexAttrib3f(indexPacked, x, y, z);
}
ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, index, x, y, z);
ANGLE_CAPTURE(VertexAttrib3f, isCallValid, context, indexPacked, x, y, z);
}
}
@ -22946,14 +22966,15 @@ void GL_APIENTRY VertexAttrib3fvContextANGLE(GLeglContext ctx, GLuint index, con
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib3fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib3fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib3fv(index, v);
context->vertexAttrib3fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib3fv, isCallValid, context, indexPacked, v);
}
}
@ -22973,14 +22994,15 @@ void GL_APIENTRY VertexAttrib4fContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4f(context, index, x, y, z, w));
(context->skipValidation() || ValidateVertexAttrib4f(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttrib4f(index, x, y, z, w);
context->vertexAttrib4f(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttrib4f, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -22994,14 +23016,15 @@ void GL_APIENTRY VertexAttrib4fvContextANGLE(GLeglContext ctx, GLuint index, con
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttrib4fv(context, index, v));
(context->skipValidation() || ValidateVertexAttrib4fv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttrib4fv(index, v);
context->vertexAttrib4fv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttrib4fv, isCallValid, context, indexPacked, v);
}
}
@ -23017,14 +23040,15 @@ void GL_APIENTRY VertexAttribBindingContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribBinding(context, attribindex, bindingindex));
ValidateVertexAttribBinding(context, attribindexPacked, bindingindex));
if (isCallValid)
{
context->vertexAttribBinding(attribindex, bindingindex);
context->vertexAttribBinding(attribindexPacked, bindingindex);
}
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex);
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindexPacked, bindingindex);
}
}
@ -23037,14 +23061,15 @@ void GL_APIENTRY VertexAttribDivisorContextANGLE(GLeglContext ctx, GLuint index,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisor(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, indexPacked, divisor);
}
}
@ -23059,14 +23084,15 @@ void GL_APIENTRY VertexAttribDivisorANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisorANGLE(context, index, divisor));
ValidateVertexAttribDivisorANGLE(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisorANGLE, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisorANGLE, isCallValid, context, indexPacked, divisor);
}
}
@ -23079,14 +23105,15 @@ void GL_APIENTRY VertexAttribDivisorEXTContextANGLE(GLeglContext ctx, GLuint ind
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribDivisorEXT(context, index, divisor));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribDivisorEXT(context, indexPacked, divisor));
if (isCallValid)
{
context->vertexAttribDivisor(index, divisor);
context->vertexAttribDivisor(indexPacked, divisor);
}
ANGLE_CAPTURE(VertexAttribDivisorEXT, isCallValid, context, index, divisor);
ANGLE_CAPTURE(VertexAttribDivisorEXT, isCallValid, context, indexPacked, divisor);
}
}
@ -23107,16 +23134,18 @@ void GL_APIENTRY VertexAttribFormatContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribFormat(context, attribindex, size, typePacked,
ValidateVertexAttribFormat(context, attribindexPacked, size, typePacked,
normalized, relativeoffset));
if (isCallValid)
{
context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset);
context->vertexAttribFormat(attribindexPacked, size, typePacked, normalized,
relativeoffset);
}
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked,
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindexPacked, size, typePacked,
normalized, relativeoffset);
}
}
@ -23132,14 +23161,15 @@ VertexAttribI4iContextANGLE(GLeglContext ctx, GLuint index, GLint x, GLint y, GL
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4i(context, index, x, y, z, w));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribI4i(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttribI4i(index, x, y, z, w);
context->vertexAttribI4i(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttribI4i, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -23153,14 +23183,15 @@ void GL_APIENTRY VertexAttribI4ivContextANGLE(GLeglContext ctx, GLuint index, co
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4iv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI4iv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI4iv(index, v);
context->vertexAttribI4iv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI4iv, isCallValid, context, indexPacked, v);
}
}
@ -23176,14 +23207,15 @@ VertexAttribI4uiContextANGLE(GLeglContext ctx, GLuint index, GLuint x, GLuint y,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4ui(context, index, x, y, z, w));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribI4ui(context, indexPacked, x, y, z, w));
if (isCallValid)
{
context->vertexAttribI4ui(index, x, y, z, w);
context->vertexAttribI4ui(indexPacked, x, y, z, w);
}
ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, index, x, y, z, w);
ANGLE_CAPTURE(VertexAttribI4ui, isCallValid, context, indexPacked, x, y, z, w);
}
}
@ -23197,14 +23229,15 @@ void GL_APIENTRY VertexAttribI4uivContextANGLE(GLeglContext ctx, GLuint index, c
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateVertexAttribI4uiv(context, index, v));
(context->skipValidation() || ValidateVertexAttribI4uiv(context, indexPacked, v));
if (isCallValid)
{
context->vertexAttribI4uiv(index, v);
context->vertexAttribI4uiv(indexPacked, v);
}
ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, index, v);
ANGLE_CAPTURE(VertexAttribI4uiv, isCallValid, context, indexPacked, v);
}
}
@ -23224,17 +23257,18 @@ void GL_APIENTRY VertexAttribIFormatContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
AttributeLocation attribindexPacked = FromGL<AttributeLocation>(attribindex);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset));
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribIFormat(context, attribindexPacked, size,
typePacked, relativeoffset));
if (isCallValid)
{
context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset);
context->vertexAttribIFormat(attribindexPacked, size, typePacked, relativeoffset);
}
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked,
relativeoffset);
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindexPacked, size,
typePacked, relativeoffset);
}
}
@ -23255,17 +23289,18 @@ void GL_APIENTRY VertexAttribIPointerContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateVertexAttribIPointer(context, index, size, typePacked, stride, pointer));
ValidateVertexAttribIPointer(context, indexPacked, size, typePacked, stride, pointer));
if (isCallValid)
{
context->vertexAttribIPointer(index, size, typePacked, stride, pointer);
context->vertexAttribIPointer(indexPacked, size, typePacked, stride, pointer);
}
ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, index, size, typePacked, stride,
pointer);
ANGLE_CAPTURE(VertexAttribIPointer, isCallValid, context, indexPacked, size, typePacked,
stride, pointer);
}
}
@ -23287,16 +23322,18 @@ void GL_APIENTRY VertexAttribPointerContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateVertexAttribPointer(context, index, size, typePacked,
ValidateVertexAttribPointer(context, indexPacked, size, typePacked,
normalized, stride, pointer));
if (isCallValid)
{
context->vertexAttribPointer(index, size, typePacked, normalized, stride, pointer);
context->vertexAttribPointer(indexPacked, size, typePacked, normalized, stride,
pointer);
}
ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, index, size, typePacked,
ANGLE_CAPTURE(VertexAttribPointer, isCallValid, context, indexPacked, size, typePacked,
normalized, stride, pointer);
}
}
@ -24062,16 +24099,17 @@ void GL_APIENTRY GetVertexAttribfvRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexAttribfvRobustANGLE(context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribfvRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribfvRobust(index, pname, bufSize, length, params);
context->getVertexAttribfvRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribfvRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribfvRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -24092,16 +24130,17 @@ void GL_APIENTRY GetVertexAttribivRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexAttribivRobustANGLE(context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribivRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribivRobust(index, pname, bufSize, length, params);
context->getVertexAttribivRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribivRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribivRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -24122,15 +24161,16 @@ void GL_APIENTRY GetVertexAttribPointervRobustANGLEContextANGLE(GLeglContext ctx
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribPointervRobustANGLE(
context, index, pname, bufSize, length, pointer));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribPointervRobustANGLE(context, indexPacked, pname,
bufSize, length, pointer));
if (isCallValid)
{
context->getVertexAttribPointervRobust(index, pname, bufSize, length, pointer);
context->getVertexAttribPointervRobust(indexPacked, pname, bufSize, length, pointer);
}
ANGLE_CAPTURE(GetVertexAttribPointervRobustANGLE, isCallValid, context, index, pname,
ANGLE_CAPTURE(GetVertexAttribPointervRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, pointer);
}
}
@ -24742,16 +24782,17 @@ void GL_APIENTRY GetVertexAttribIivRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateGetVertexAttribIivRobustANGLE(context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIivRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribIivRobust(index, pname, bufSize, length, params);
context->getVertexAttribIivRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribIivRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribIivRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}
@ -24772,16 +24813,17 @@ void GL_APIENTRY GetVertexAttribIuivRobustANGLEContextANGLE(GLeglContext ctx,
if (context)
{
ASSERT(context == GetValidGlobalContext());
AttributeLocation indexPacked = FromGL<AttributeLocation>(index);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateGetVertexAttribIuivRobustANGLE(
context, index, pname, bufSize, length, params));
bool isCallValid = (context->skipValidation() ||
ValidateGetVertexAttribIuivRobustANGLE(context, indexPacked, pname,
bufSize, length, params));
if (isCallValid)
{
context->getVertexAttribIuivRobust(index, pname, bufSize, length, params);
context->getVertexAttribIuivRobust(indexPacked, pname, bufSize, length, params);
}
ANGLE_CAPTURE(GetVertexAttribIuivRobustANGLE, isCallValid, context, index, pname, bufSize,
length, params);
ANGLE_CAPTURE(GetVertexAttribIuivRobustANGLE, isCallValid, context, indexPacked, pname,
bufSize, length, params);
}
}