Use FramebufferID in place of GLuint handle
Bug: angleproject:3804
Change-Id: I5e1b5f1903b05a91468379e00ec130802315cdc2
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769039
Reviewed-by: Jiacheng Lu <lujc@google.com>
Commit-Queue: Jiacheng Lu <lujc@google.com>
diff --git a/scripts/code_generation_hashes/GL_EGL_entry_points.json b/scripts/code_generation_hashes/GL_EGL_entry_points.json
index 0173a8a..90b5fce 100644
--- a/scripts/code_generation_hashes/GL_EGL_entry_points.json
+++ b/scripts/code_generation_hashes/GL_EGL_entry_points.json
@@ -4,7 +4,7 @@
"scripts/egl_angle_ext.xml":
"fc2e249239fb1365f6d145cdf1a3cfcf",
"scripts/entry_point_packed_gl_enums.json":
- "d6644e669be59d2a2979a82ff8522785",
+ "8ee962008357069b1d2a8ec6f38b8305",
"scripts/generate_entry_points.py":
"00dc8410ad87e122314ac58579445188",
"scripts/gl.xml":
@@ -50,13 +50,13 @@
"src/libANGLE/Context_gl_4_4_autogen.h":
"89f752bdee0a28f791347a8d35e31364",
"src/libANGLE/Context_gl_4_5_autogen.h":
- "5d5b27fcc56c0d00068c1bea4bd15031",
+ "303ed63d6cccd7c4cbd979340c8cf121",
"src/libANGLE/Context_gl_4_6_autogen.h":
"8f94bff5e701e85d98d3b84f6d82f5bf",
"src/libANGLE/Context_gles_1_0_autogen.h":
"f30ed90e4ec23f886bda9344d82dd529",
"src/libANGLE/Context_gles_2_0_autogen.h":
- "2707a339f2bb98d0de4b28e04dc23331",
+ "f243d85c9d1c94c0d7302e0a57af56b6",
"src/libANGLE/Context_gles_3_0_autogen.h":
"1f5109accdd2cc0f197bcc76aa9fcfc7",
"src/libANGLE/Context_gles_3_1_autogen.h":
@@ -68,9 +68,9 @@
"src/libANGLE/capture_gles_1_0_autogen.h":
"06471d4526e8d0b824f5afc8bc8766fa",
"src/libANGLE/capture_gles_2_0_autogen.cpp":
- "d6d5fb0f3c59bfd170ec4400e449ff7a",
+ "928f64b38fefa6f69b1b9ddd3cb0a800",
"src/libANGLE/capture_gles_2_0_autogen.h":
- "273158684fa7a531a856478033bc4b85",
+ "1d7c76f7dfcb666161bc4675932511c5",
"src/libANGLE/capture_gles_3_0_autogen.cpp":
"6eac7825d90e655216febd2010d74476",
"src/libANGLE/capture_gles_3_0_autogen.h":
@@ -80,29 +80,29 @@
"src/libANGLE/capture_gles_3_1_autogen.h":
"389c0212c9d2da8bdc159aecee243551",
"src/libANGLE/capture_gles_ext_autogen.cpp":
- "49f141f04e7941af11c16457e313b981",
+ "cf79d27e5cf5392b653fa2cad155d393",
"src/libANGLE/capture_gles_ext_autogen.h":
- "5c4a4caac34a9caeaf7c6febabd16d0b",
+ "474ad56a50bff5e48d31415ce12658cf",
"src/libANGLE/entry_points_enum_autogen.cpp":
"97b5fe98b95b4ae36c68f723e64f993a",
"src/libANGLE/entry_points_enum_autogen.h":
"f028ca107fe86e586e676a32863d2167",
"src/libANGLE/frame_capture_replay_autogen.cpp":
- "d4f4f50b7ed2e5e1281afcdf7995ef45",
+ "00efb888e3ceff27fab7e9e85a497041",
"src/libANGLE/frame_capture_utils_autogen.cpp":
- "6f156f91b4ca27451f0a916681d14b9c",
+ "3f1dc6fe8700f440900af30ab5c105d4",
"src/libANGLE/frame_capture_utils_autogen.h":
- "0e5ae582213d42b9ba653fca6fac1346",
+ "0d1cdb72333963345387abf549058431",
"src/libANGLE/validationES1_autogen.h":
"8d3131d2bf2e6f521f46b44e64a6bff9",
"src/libANGLE/validationES2_autogen.h":
- "1ed6b23f218afb41103e8c895486f714",
+ "499e078fda5ba8ffb0ae85c79fd2c66a",
"src/libANGLE/validationES31_autogen.h":
"9bf34098be328bee8f9fc04d1afbdfde",
"src/libANGLE/validationES3_autogen.h":
"c3142a7eb36b6f4f132e7a1f66e15459",
"src/libANGLE/validationESEXT_autogen.h":
- "b7057957aaba66d1a33fa1098999786f",
+ "17f2b1279f7f60dc7bf26972bf958054",
"src/libANGLE/validationGL11_autogen.h":
"c5ac1ca523a39df2621d11e92c9c821a",
"src/libANGLE/validationGL12_autogen.h":
@@ -136,7 +136,7 @@
"src/libANGLE/validationGL44_autogen.h":
"eabe20f4cbb6e8fbc3fb77602504c2d8",
"src/libANGLE/validationGL45_autogen.h":
- "b6bdc858e4799b026154ced00b13ec5c",
+ "c018bf577132b4eafe3acde93b5169bc",
"src/libANGLE/validationGL46_autogen.h":
"08a145cbeb4ea627ce94c65cd881cc5d",
"src/libANGLE/validationGL4_autogen.h":
@@ -174,7 +174,7 @@
"src/libGL/entry_points_gl_2_1_autogen.h":
"87cd6d513a5852c56eed9b58484fbe19",
"src/libGL/entry_points_gl_3_0_autogen.cpp":
- "eea8c2ba8e0057ef9bdcaf39435bed5e",
+ "f31eef555c6b662db0adaf776faa9d32",
"src/libGL/entry_points_gl_3_0_autogen.h":
"47396290a846f808e598acdbca56e9b3",
"src/libGL/entry_points_gl_3_1_autogen.cpp":
@@ -210,7 +210,7 @@
"src/libGL/entry_points_gl_4_4_autogen.h":
"d0a8c556ffb1c9d4519a66b2868c68b2",
"src/libGL/entry_points_gl_4_5_autogen.cpp":
- "0024788ab79064103723701b4e4a7954",
+ "efe2f425d68eb104b2029ce8a1cb848d",
"src/libGL/entry_points_gl_4_5_autogen.h":
"0cc66bfbe40b1120e38ba977c2c95cc1",
"src/libGL/entry_points_gl_4_6_autogen.cpp":
@@ -226,7 +226,7 @@
"src/libGLESv2/entry_points_gles_1_0_autogen.h":
"77fa8d307ebf839838f8812786cddc1a",
"src/libGLESv2/entry_points_gles_2_0_autogen.cpp":
- "3e898e6f492fd68d65ebdac9d8482bbe",
+ "2a2a36cace079a1c836f9227811143e2",
"src/libGLESv2/entry_points_gles_2_0_autogen.h":
"3bbaf1cf42fba5d675e5b54cd1d14df7",
"src/libGLESv2/entry_points_gles_3_0_autogen.cpp":
@@ -238,7 +238,7 @@
"src/libGLESv2/entry_points_gles_3_1_autogen.h":
"043d09a964c740067bf4279e0b544aed",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
- "666ee0d97ec801ce07d69f3c209c9eff",
+ "a895e2ddf7e2ffdbab2bbb1957a15980",
"src/libGLESv2/entry_points_gles_ext_autogen.h":
"fea36fa137e55dd2f244dbb49d31cc41",
"src/libGLESv2/libGLESv2_autogen.cpp":
diff --git a/scripts/entry_point_packed_gl_enums.json b/scripts/entry_point_packed_gl_enums.json
index 0419603..fb02691 100644
--- a/scripts/entry_point_packed_gl_enums.json
+++ b/scripts/entry_point_packed_gl_enums.json
@@ -572,12 +572,15 @@
"buffer": "BufferID"
},
"glNamedFramebufferRenderbuffer": {
+ "framebuffer": "FramebufferID",
"renderbuffer": "RenderbufferID"
},
"glNamedFramebufferTexture": {
+ "framebuffer": "FramebufferID",
"texture": "TextureID"
},
"glNamedFramebufferTextureLayer": {
+ "framebuffer": "FramebufferID",
"texture": "TextureID"
},
"glNamedRenderbufferStorage": {
@@ -1457,5 +1460,56 @@
},
"glShaderStorageBlockBinding": {
"program": "ShaderProgramID"
+ },
+ "glIsFramebuffer": {
+ "framebuffer": "FramebufferID"
+ },
+ "glBindFramebuffer": {
+ "framebuffer": "FramebufferID"
+ },
+ "glClearNamedFramebufferfi": {
+ "framebuffer": "FramebufferID"
+ },
+ "glClearNamedFramebufferfv": {
+ "framebuffer": "FramebufferID"
+ },
+ "glClearNamedFramebufferiv": {
+ "framebuffer": "FramebufferID"
+ },
+ "glClearNamedFramebufferuiv": {
+ "framebuffer": "FramebufferID"
+ },
+ "glCheckNamedFramebufferStatus": {
+ "framebuffer": "FramebufferID"
+ },
+ "glGetNamedFramebufferAttachmentParameteriv": {
+ "framebuffer": "FramebufferID"
+ },
+ "glGetNamedFramebufferParameteriv": {
+ "framebuffer": "FramebufferID"
+ },
+ "glInvalidateNamedFramebufferData": {
+ "framebuffer": "FramebufferID"
+ },
+ "glInvalidateNamedFramebufferSubData": {
+ "framebuffer": "FramebufferID"
+ },
+ "glNamedFramebufferDrawBuffer": {
+ "framebuffer": "FramebufferID"
+ },
+ "glNamedFramebufferDrawBuffers": {
+ "framebuffer": "FramebufferID"
+ },
+ "glNamedFramebufferParameteri": {
+ "framebuffer": "FramebufferID"
+ },
+ "glNamedFramebufferReadBuffer": {
+ "framebuffer": "FramebufferID"
+ },
+ "glGenFramebuffers": {
+ "framebuffers": "FramebufferID *"
+ },
+ "glDeleteFramebuffers": {
+ "framebuffers": "const FramebufferID *"
}
}
diff --git a/src/common/PackedEnums.h b/src/common/PackedEnums.h
index b1c22ad..a7f36dc 100644
--- a/src/common/PackedEnums.h
+++ b/src/common/PackedEnums.h
@@ -386,6 +386,11 @@
GLuint value;
};
+struct FramebufferID
+{
+ GLuint value;
+};
+
struct RenderbufferID
{
GLuint value;
@@ -421,6 +426,16 @@
GLuint value;
};
+// Util funcs for resourceIDs
+inline bool operator==(const FramebufferID &lhs, const FramebufferID &rhs)
+{
+ return lhs.value == rhs.value;
+}
+inline bool operator!=(const FramebufferID &lhs, const FramebufferID &rhs)
+{
+ return lhs.value != rhs.value;
+}
+
// Used to unbox typed values.
template <typename ResourceIDType>
GLuint GetIDValue(ResourceIDType id);
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index a731607..37cea14 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -719,7 +719,7 @@
}
// Returns an unused framebuffer name
-GLuint Context::createFramebuffer()
+FramebufferID Context::createFramebuffer()
{
return mState.mFramebufferManager->createFramebuffer();
}
@@ -937,7 +937,7 @@
markContextLost(current);
}
-void Context::deleteFramebuffer(GLuint framebuffer)
+void Context::deleteFramebuffer(FramebufferID framebuffer)
{
if (mState.mFramebufferManager->getFramebuffer(framebuffer))
{
@@ -1020,7 +1020,7 @@
case GL_RENDERBUFFER:
return getRenderbuffer({name});
case GL_FRAMEBUFFER:
- return getFramebuffer(name);
+ return getFramebuffer({name});
default:
UNREACHABLE();
return nullptr;
@@ -1100,7 +1100,7 @@
mStateCache.onActiveTextureChange(this);
}
-void Context::bindReadFramebuffer(GLuint framebufferHandle)
+void Context::bindReadFramebuffer(FramebufferID framebufferHandle)
{
Framebuffer *framebuffer = mState.mFramebufferManager->checkFramebufferAllocation(
mImplementation.get(), mState.mCaps, framebufferHandle);
@@ -1108,7 +1108,7 @@
mReadFramebufferObserverBinding.bind(framebuffer);
}
-void Context::bindDrawFramebuffer(GLuint framebufferHandle)
+void Context::bindDrawFramebuffer(FramebufferID framebufferHandle)
{
Framebuffer *framebuffer = mState.mFramebufferManager->checkFramebufferAllocation(
mImplementation.get(), mState.mCaps, framebufferHandle);
@@ -1325,7 +1325,7 @@
getQueryObjectui64v(id, pname, params);
}
-Framebuffer *Context::getFramebuffer(GLuint handle) const
+Framebuffer *Context::getFramebuffer(FramebufferID handle) const
{
return mState.mFramebufferManager->getFramebuffer(handle);
}
@@ -2805,7 +2805,7 @@
ANGLE_CONTEXT_TRY(mState.detachBuffer(this, buffer));
}
-void Context::detachFramebuffer(GLuint framebuffer)
+void Context::detachFramebuffer(FramebufferID framebuffer)
{
// Framebuffer detachment is handled by Context, because 0 is a valid
// Framebuffer object, and a pointer to it must be passed from Context
@@ -2816,14 +2816,14 @@
// though BindFramebuffer had been executed with the target of FRAMEBUFFER and framebuffer of
// zero.
- if (mState.removeReadFramebufferBinding(framebuffer) && framebuffer != 0)
+ if (mState.removeReadFramebufferBinding(framebuffer) && framebuffer.value != 0)
{
- bindReadFramebuffer(0);
+ bindReadFramebuffer({0});
}
- if (mState.removeDrawFramebufferBinding(framebuffer) && framebuffer != 0)
+ if (mState.removeDrawFramebufferBinding(framebuffer) && framebuffer.value != 0)
{
- bindDrawFramebuffer(0);
+ bindDrawFramebuffer({0});
}
}
@@ -5261,7 +5261,7 @@
}
}
-void Context::bindFramebuffer(GLenum target, GLuint framebuffer)
+void Context::bindFramebuffer(GLenum target, FramebufferID framebuffer)
{
if (target == GL_READ_FRAMEBUFFER || target == GL_FRAMEBUFFER)
{
@@ -5916,11 +5916,11 @@
}
}
-void Context::deleteFramebuffers(GLsizei n, const GLuint *framebuffers)
+void Context::deleteFramebuffers(GLsizei n, const FramebufferID *framebuffers)
{
for (int i = 0; i < n; i++)
{
- if (framebuffers[i] != 0)
+ if (framebuffers[i].value != 0)
{
deleteFramebuffer(framebuffers[i]);
}
@@ -5965,7 +5965,7 @@
}
}
-void Context::genFramebuffers(GLsizei n, GLuint *framebuffers)
+void Context::genFramebuffers(GLsizei n, FramebufferID *framebuffers)
{
for (int i = 0; i < n; i++)
{
@@ -6317,9 +6317,9 @@
return mState.getEnableFeature(cap);
}
-GLboolean Context::isFramebuffer(GLuint framebuffer)
+GLboolean Context::isFramebuffer(FramebufferID framebuffer)
{
- if (framebuffer == 0)
+ if (framebuffer.value == 0)
{
return GL_FALSE;
}
@@ -8681,7 +8681,7 @@
return mState.mRenderbufferManager->isHandleGenerated(renderbuffer);
}
-bool Context::isFramebufferGenerated(GLuint framebuffer) const
+bool Context::isFramebufferGenerated(FramebufferID framebuffer) const
{
return mState.mFramebufferManager->isHandleGenerated(framebuffer);
}
diff --git a/src/libANGLE/Context.h b/src/libANGLE/Context.h
index e93f409..9b006d9 100644
--- a/src/libANGLE/Context.h
+++ b/src/libANGLE/Context.h
@@ -368,8 +368,8 @@
// CHROMIUM_path_rendering
bool isPathGenerated(PathID path) const;
- void bindReadFramebuffer(GLuint framebufferHandle);
- void bindDrawFramebuffer(GLuint framebufferHandle);
+ void bindReadFramebuffer(FramebufferID framebufferHandle);
+ void bindDrawFramebuffer(FramebufferID framebufferHandle);
Buffer *getBuffer(BufferID handle) const;
FenceNV *getFenceNV(FenceNVID handle);
@@ -379,7 +379,7 @@
return mState.mTextureManager->getTexture(handle);
}
- Framebuffer *getFramebuffer(GLuint handle) const;
+ Framebuffer *getFramebuffer(FramebufferID handle) const;
Renderbuffer *getRenderbuffer(RenderbufferID handle) const;
VertexArray *getVertexArray(GLuint handle) const;
Sampler *getSampler(SamplerID handle) const;
@@ -406,8 +406,8 @@
void getPointerv(GLenum pname, void **params) const;
// Framebuffers are owned by the Context, so these methods do not pass through
- GLuint createFramebuffer();
- void deleteFramebuffer(GLuint framebuffer);
+ FramebufferID createFramebuffer();
+ void deleteFramebuffer(FramebufferID framebuffer);
bool hasActiveTransformFeedback(ShaderProgramID program) const;
@@ -537,7 +537,7 @@
}
bool isRenderbufferGenerated(RenderbufferID renderbuffer) const;
- bool isFramebufferGenerated(GLuint framebuffer) const;
+ bool isFramebufferGenerated(FramebufferID framebuffer) const;
bool isProgramPipelineGenerated(ProgramPipelineID pipeline) const;
bool usingDisplayTextureShareGroup() const;
@@ -597,7 +597,7 @@
void detachBuffer(Buffer *buffer);
void detachTexture(TextureID texture);
- void detachFramebuffer(GLuint framebuffer);
+ void detachFramebuffer(FramebufferID framebuffer);
void detachRenderbuffer(RenderbufferID renderbuffer);
void detachVertexArray(GLuint vertexArray);
void detachTransformFeedback(GLuint transformFeedback);
diff --git a/src/libANGLE/Context_gl.cpp b/src/libANGLE/Context_gl.cpp
index 09b4b12..6ac52c3 100644
--- a/src/libANGLE/Context_gl.cpp
+++ b/src/libANGLE/Context_gl.cpp
@@ -2999,7 +2999,7 @@
UNIMPLEMENTED();
}
-GLenum Context::checkNamedFramebufferStatus(GLuint framebuffer, GLenum target)
+GLenum Context::checkNamedFramebufferStatus(FramebufferID framebuffer, GLenum target)
{
UNIMPLEMENTED();
return 0;
@@ -3025,7 +3025,7 @@
UNIMPLEMENTED();
}
-void Context::clearNamedFramebufferfi(GLuint framebuffer,
+void Context::clearNamedFramebufferfi(FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
GLfloat depth,
@@ -3034,7 +3034,7 @@
UNIMPLEMENTED();
}
-void Context::clearNamedFramebufferfv(GLuint framebuffer,
+void Context::clearNamedFramebufferfv(FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
const GLfloat *value)
@@ -3042,7 +3042,7 @@
UNIMPLEMENTED();
}
-void Context::clearNamedFramebufferiv(GLuint framebuffer,
+void Context::clearNamedFramebufferiv(FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
const GLint *value)
@@ -3050,7 +3050,7 @@
UNIMPLEMENTED();
}
-void Context::clearNamedFramebufferuiv(GLuint framebuffer,
+void Context::clearNamedFramebufferuiv(FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
const GLuint *value)
@@ -3253,7 +3253,7 @@
UNIMPLEMENTED();
}
-void Context::getNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
+void Context::getNamedFramebufferAttachmentParameteriv(FramebufferID framebuffer,
GLenum attachment,
GLenum pname,
GLint *params)
@@ -3261,7 +3261,7 @@
UNIMPLEMENTED();
}
-void Context::getNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param)
+void Context::getNamedFramebufferParameteriv(FramebufferID framebuffer, GLenum pname, GLint *param)
{
UNIMPLEMENTED();
}
@@ -3501,14 +3501,14 @@
UNIMPLEMENTED();
}
-void Context::invalidateNamedFramebufferData(GLuint framebuffer,
+void Context::invalidateNamedFramebufferData(FramebufferID framebuffer,
GLsizei numAttachments,
const GLenum *attachments)
{
UNIMPLEMENTED();
}
-void Context::invalidateNamedFramebufferSubData(GLuint framebuffer,
+void Context::invalidateNamedFramebufferSubData(FramebufferID framebuffer,
GLsizei numAttachments,
const GLenum *attachments,
GLint x,
@@ -3555,27 +3555,27 @@
UNIMPLEMENTED();
}
-void Context::namedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
+void Context::namedFramebufferDrawBuffer(FramebufferID framebuffer, GLenum buf)
{
UNIMPLEMENTED();
}
-void Context::namedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs)
+void Context::namedFramebufferDrawBuffers(FramebufferID framebuffer, GLsizei n, const GLenum *bufs)
{
UNIMPLEMENTED();
}
-void Context::namedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param)
+void Context::namedFramebufferParameteri(FramebufferID framebuffer, GLenum pname, GLint param)
{
UNIMPLEMENTED();
}
-void Context::namedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
+void Context::namedFramebufferReadBuffer(FramebufferID framebuffer, GLenum src)
{
UNIMPLEMENTED();
}
-void Context::namedFramebufferRenderbuffer(GLuint framebuffer,
+void Context::namedFramebufferRenderbuffer(FramebufferID framebuffer,
GLenum attachment,
GLenum renderbuffertarget,
RenderbufferID renderbuffer)
@@ -3583,7 +3583,7 @@
UNIMPLEMENTED();
}
-void Context::namedFramebufferTexture(GLuint framebuffer,
+void Context::namedFramebufferTexture(FramebufferID framebuffer,
GLenum attachment,
TextureID texture,
GLint level)
@@ -3591,7 +3591,7 @@
UNIMPLEMENTED();
}
-void Context::namedFramebufferTextureLayer(GLuint framebuffer,
+void Context::namedFramebufferTextureLayer(FramebufferID framebuffer,
GLenum attachment,
TextureID texture,
GLint level,
diff --git a/src/libANGLE/Context_gl_4_5_autogen.h b/src/libANGLE/Context_gl_4_5_autogen.h
index 1e38bc2..64ebdf1 100644
--- a/src/libANGLE/Context_gl_4_5_autogen.h
+++ b/src/libANGLE/Context_gl_4_5_autogen.h
@@ -15,19 +15,19 @@
void blitNamedFramebuffer(GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, \
GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, \
GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); \
- GLenum checkNamedFramebufferStatus(GLuint framebuffer, GLenum target); \
+ GLenum checkNamedFramebufferStatus(FramebufferID framebufferPacked, GLenum target); \
void clearNamedBufferData(BufferID bufferPacked, GLenum internalformat, GLenum format, \
GLenum type, const void *data); \
void clearNamedBufferSubData(BufferID bufferPacked, GLenum internalformat, GLintptr offset, \
GLsizeiptr size, GLenum format, GLenum type, const void *data); \
- void clearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, GLint drawbuffer, \
+ void clearNamedFramebufferfi(FramebufferID framebufferPacked, GLenum buffer, GLint drawbuffer, \
GLfloat depth, GLint stencil); \
- void clearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, \
+ void clearNamedFramebufferfv(FramebufferID framebufferPacked, GLenum buffer, GLint drawbuffer, \
const GLfloat *value); \
- void clearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, \
+ void clearNamedFramebufferiv(FramebufferID framebufferPacked, GLenum buffer, GLint drawbuffer, \
const GLint *value); \
- void clearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, GLint drawbuffer, \
- const GLuint *value); \
+ void clearNamedFramebufferuiv(FramebufferID framebufferPacked, GLenum buffer, \
+ GLint drawbuffer, const GLuint *value); \
void clipControl(GLenum origin, GLenum depth); \
void compressedTextureSubImage1D(TextureID texturePacked, GLint level, GLint xoffset, \
GLsizei width, GLenum format, GLsizei imageSize, \
@@ -70,9 +70,10 @@
void getNamedBufferPointerv(BufferID bufferPacked, GLenum pname, void **params); \
void getNamedBufferSubData(BufferID bufferPacked, GLintptr offset, GLsizeiptr size, \
void *data); \
- void getNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, \
- GLenum pname, GLint *params); \
- void getNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param); \
+ void getNamedFramebufferAttachmentParameteriv(FramebufferID framebufferPacked, \
+ GLenum attachment, GLenum pname, GLint *params); \
+ void getNamedFramebufferParameteriv(FramebufferID framebufferPacked, GLenum pname, \
+ GLint *param); \
void getNamedRenderbufferParameteriv(RenderbufferID renderbufferPacked, GLenum pname, \
GLint *params); \
void getQueryBufferObjecti64v(GLuint id, BufferID bufferPacked, GLenum pname, \
@@ -123,11 +124,11 @@
GLdouble *params); \
void getnUniformuiv(ShaderProgramID programPacked, GLint location, GLsizei bufSize, \
GLuint *params); \
- void invalidateNamedFramebufferData(GLuint framebuffer, GLsizei numAttachments, \
+ void invalidateNamedFramebufferData(FramebufferID framebufferPacked, GLsizei numAttachments, \
const GLenum *attachments); \
- void invalidateNamedFramebufferSubData(GLuint framebuffer, GLsizei numAttachments, \
- const GLenum *attachments, GLint x, GLint y, \
- GLsizei width, GLsizei height); \
+ void invalidateNamedFramebufferSubData(FramebufferID framebufferPacked, \
+ GLsizei numAttachments, const GLenum *attachments, \
+ GLint x, GLint y, GLsizei width, GLsizei height); \
void *mapNamedBuffer(BufferID bufferPacked, GLenum access); \
void *mapNamedBufferRange(BufferID bufferPacked, GLintptr offset, GLsizeiptr length, \
GLbitfield access); \
@@ -136,16 +137,17 @@
GLbitfield flags); \
void namedBufferSubData(BufferID bufferPacked, GLintptr offset, GLsizeiptr size, \
const void *data); \
- void namedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf); \
- void namedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs); \
- void namedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param); \
- void namedFramebufferReadBuffer(GLuint framebuffer, GLenum src); \
- void namedFramebufferRenderbuffer(GLuint framebuffer, GLenum attachment, \
+ void namedFramebufferDrawBuffer(FramebufferID framebufferPacked, GLenum buf); \
+ void namedFramebufferDrawBuffers(FramebufferID framebufferPacked, GLsizei n, \
+ const GLenum *bufs); \
+ void namedFramebufferParameteri(FramebufferID framebufferPacked, GLenum pname, GLint param); \
+ void namedFramebufferReadBuffer(FramebufferID framebufferPacked, GLenum src); \
+ void namedFramebufferRenderbuffer(FramebufferID framebufferPacked, GLenum attachment, \
GLenum renderbuffertarget, \
RenderbufferID renderbufferPacked); \
- void namedFramebufferTexture(GLuint framebuffer, GLenum attachment, TextureID texturePacked, \
- GLint level); \
- void namedFramebufferTextureLayer(GLuint framebuffer, GLenum attachment, \
+ void namedFramebufferTexture(FramebufferID framebufferPacked, GLenum attachment, \
+ TextureID texturePacked, GLint level); \
+ void namedFramebufferTextureLayer(FramebufferID framebufferPacked, GLenum attachment, \
TextureID texturePacked, GLint level, GLint layer); \
void namedRenderbufferStorage(RenderbufferID renderbufferPacked, GLenum internalformat, \
GLsizei width, GLsizei height); \
diff --git a/src/libANGLE/Context_gles_2_0_autogen.h b/src/libANGLE/Context_gles_2_0_autogen.h
index 3e0f91c..28f4fd5 100644
--- a/src/libANGLE/Context_gles_2_0_autogen.h
+++ b/src/libANGLE/Context_gles_2_0_autogen.h
@@ -15,7 +15,7 @@
void attachShader(ShaderProgramID programPacked, ShaderProgramID shaderPacked); \
void bindAttribLocation(ShaderProgramID programPacked, GLuint index, const GLchar *name); \
void bindBuffer(BufferBinding targetPacked, BufferID bufferPacked); \
- void bindFramebuffer(GLenum target, GLuint framebuffer); \
+ void bindFramebuffer(GLenum target, FramebufferID framebufferPacked); \
void bindRenderbuffer(GLenum target, RenderbufferID renderbufferPacked); \
void bindTexture(TextureType targetPacked, TextureID texturePacked); \
void blendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); \
@@ -49,7 +49,7 @@
GLuint createShader(ShaderType typePacked); \
void cullFace(CullFaceMode modePacked); \
void deleteBuffers(GLsizei n, const BufferID *buffersPacked); \
- void deleteFramebuffers(GLsizei n, const GLuint *framebuffers); \
+ void deleteFramebuffers(GLsizei n, const FramebufferID *framebuffersPacked); \
void deleteProgram(ShaderProgramID programPacked); \
void deleteRenderbuffers(GLsizei n, const RenderbufferID *renderbuffersPacked); \
void deleteShader(ShaderProgramID shaderPacked); \
@@ -73,7 +73,7 @@
TextureID texturePacked, GLint level); \
void frontFace(GLenum mode); \
void genBuffers(GLsizei n, BufferID *buffersPacked); \
- void genFramebuffers(GLsizei n, GLuint *framebuffers); \
+ void genFramebuffers(GLsizei n, FramebufferID *framebuffersPacked); \
void genRenderbuffers(GLsizei n, RenderbufferID *renderbuffersPacked); \
void genTextures(GLsizei n, TextureID *texturesPacked); \
void generateMipmap(TextureType targetPacked); \
@@ -114,7 +114,7 @@
void hint(GLenum target, GLenum mode); \
GLboolean isBuffer(BufferID bufferPacked); \
GLboolean isEnabled(GLenum cap); \
- GLboolean isFramebuffer(GLuint framebuffer); \
+ GLboolean isFramebuffer(FramebufferID framebufferPacked); \
GLboolean isProgram(ShaderProgramID programPacked); \
GLboolean isRenderbuffer(RenderbufferID renderbufferPacked); \
GLboolean isShader(ShaderProgramID shaderPacked); \
diff --git a/src/libANGLE/FrameCapture.cpp b/src/libANGLE/FrameCapture.cpp
index 77ca712..56cdd61 100644
--- a/src/libANGLE/FrameCapture.cpp
+++ b/src/libANGLE/FrameCapture.cpp
@@ -870,6 +870,12 @@
}
template <>
+void WriteParamValueToStream<ParamType::TFramebufferID>(std::ostream &os, gl::FramebufferID value)
+{
+ os << value.value;
+}
+
+template <>
void WriteParamValueToStream<ParamType::TRenderbufferID>(std::ostream &os, gl::RenderbufferID value)
{
os << "gRenderbufferMap[" << value.value << "]";
diff --git a/src/libANGLE/FrameCapture.h b/src/libANGLE/FrameCapture.h
index 3760214..22f3c45 100644
--- a/src/libANGLE/FrameCapture.h
+++ b/src/libANGLE/FrameCapture.h
@@ -263,6 +263,9 @@
void WriteParamValueToStream<ParamType::TBufferID>(std::ostream &os, gl::BufferID value);
template <>
+void WriteParamValueToStream<ParamType::TFramebufferID>(std::ostream &os, gl::FramebufferID value);
+
+template <>
void WriteParamValueToStream<ParamType::TProgramPipelineID>(std::ostream &os,
gl::ProgramPipelineID value);
diff --git a/src/libANGLE/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index f56e177..98a6d53 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -277,7 +277,7 @@
mEnabledDrawBuffers.set(0);
}
-FramebufferState::FramebufferState(const Caps &caps, GLuint id)
+FramebufferState::FramebufferState(const Caps &caps, FramebufferID id)
: mId(id),
mLabel(),
mColorAttachments(caps.maxColorAttachments),
@@ -628,7 +628,9 @@
return mId == Framebuffer::kDefaultDrawFramebufferHandle;
}
-Framebuffer::Framebuffer(const Caps &caps, rx::GLImplFactory *factory, GLuint id)
+const FramebufferID Framebuffer::kDefaultDrawFramebufferHandle = {0};
+
+Framebuffer::Framebuffer(const Caps &caps, rx::GLImplFactory *factory, FramebufferID id)
: mState(caps, id),
mImpl(factory->createFramebuffer(mState)),
mCachedStatus(),
@@ -1947,7 +1949,7 @@
const Program *program = state.getProgram();
// TODO(jmadill): Default framebuffer feedback loops.
- if (mState.mId == 0)
+ if (mState.isDefault())
{
return false;
}
@@ -2011,7 +2013,7 @@
GLint copyTextureLevel,
GLint copyTextureLayer) const
{
- if (mState.mId == 0)
+ if (mState.isDefault())
{
// It seems impossible to form a texture copying feedback loop with the default FBO.
return false;
diff --git a/src/libANGLE/Framebuffer.h b/src/libANGLE/Framebuffer.h
index 357da0b..9fe7731 100644
--- a/src/libANGLE/Framebuffer.h
+++ b/src/libANGLE/Framebuffer.h
@@ -53,7 +53,7 @@
{
public:
FramebufferState();
- explicit FramebufferState(const Caps &caps, GLuint id);
+ explicit FramebufferState(const Caps &caps, FramebufferID id);
~FramebufferState();
const std::string &getLabel();
@@ -110,7 +110,7 @@
GLint getBaseViewIndex() const;
- GLuint id() const { return mId; }
+ FramebufferID id() const { return mId; }
bool isDefault() const;
@@ -121,7 +121,7 @@
friend class Framebuffer;
- GLuint mId;
+ FramebufferID mId;
std::string mLabel;
std::vector<FramebufferAttachment> mColorAttachments;
@@ -159,7 +159,7 @@
{
public:
// Constructor to build application-defined framebuffers
- Framebuffer(const Caps &caps, rx::GLImplFactory *factory, GLuint id);
+ Framebuffer(const Caps &caps, rx::GLImplFactory *factory, FramebufferID id);
// Constructor to build default framebuffers for a surface and context pair
Framebuffer(const Context *context, egl::Surface *surface, egl::Surface *readSurface);
// Constructor to build a fake default framebuffer when surfaceless
@@ -174,7 +174,7 @@
rx::FramebufferImpl *getImplementation() const { return mImpl; }
- GLuint id() const { return mState.mId; }
+ FramebufferID id() const { return mState.mId; }
void setAttachment(const Context *context,
GLenum type,
@@ -368,7 +368,7 @@
angle::Result ensureReadAttachmentsInitialized(const Context *context);
Box getDimensions() const;
- static const GLuint kDefaultDrawFramebufferHandle = 0;
+ static const FramebufferID kDefaultDrawFramebufferHandle;
private:
bool detachResourceById(const Context *context, GLenum resourceType, GLuint resourceId);
diff --git a/src/libANGLE/ResourceManager.cpp b/src/libANGLE/ResourceManager.cpp
index b2371cd..bb70073 100644
--- a/src/libANGLE/ResourceManager.cpp
+++ b/src/libANGLE/ResourceManager.cpp
@@ -111,7 +111,10 @@
RenderbufferID>;
template class TypedResourceManager<Sampler, HandleAllocator, SamplerManager, SamplerID>;
template class TypedResourceManager<Sync, HandleAllocator, SyncManager, GLuint>;
-template class TypedResourceManager<Framebuffer, HandleAllocator, FramebufferManager, GLuint>;
+template class TypedResourceManager<Framebuffer,
+ HandleAllocator,
+ FramebufferManager,
+ FramebufferID>;
template class TypedResourceManager<ProgramPipeline,
HandleAllocator,
ProgramPipelineManager,
@@ -421,7 +424,7 @@
// static
Framebuffer *FramebufferManager::AllocateNewObject(rx::GLImplFactory *factory,
- GLuint handle,
+ FramebufferID handle,
const Caps &caps)
{
// Make sure the caller isn't using a reserved handle.
@@ -436,12 +439,12 @@
delete framebuffer;
}
-GLuint FramebufferManager::createFramebuffer()
+FramebufferID FramebufferManager::createFramebuffer()
{
return AllocateEmptyObject(&mHandleAllocator, &mObjectMap);
}
-Framebuffer *FramebufferManager::getFramebuffer(GLuint handle) const
+Framebuffer *FramebufferManager::getFramebuffer(FramebufferID handle) const
{
return mObjectMap.query(handle);
}
diff --git a/src/libANGLE/ResourceManager.h b/src/libANGLE/ResourceManager.h
index 8ac1f1f..e0cd7bb 100644
--- a/src/libANGLE/ResourceManager.h
+++ b/src/libANGLE/ResourceManager.h
@@ -276,24 +276,24 @@
};
class FramebufferManager
- : public TypedResourceManager<Framebuffer, HandleAllocator, FramebufferManager>
+ : public TypedResourceManager<Framebuffer, HandleAllocator, FramebufferManager, FramebufferID>
{
public:
- GLuint createFramebuffer();
- Framebuffer *getFramebuffer(GLuint handle) const;
+ FramebufferID createFramebuffer();
+ Framebuffer *getFramebuffer(FramebufferID handle) const;
void setDefaultFramebuffer(Framebuffer *framebuffer);
void invalidateFramebufferCompletenessCache() const;
Framebuffer *checkFramebufferAllocation(rx::GLImplFactory *factory,
const Caps &caps,
- GLuint handle)
+ FramebufferID handle)
{
return checkObjectAllocation<const Caps &>(factory, handle, caps);
}
static Framebuffer *AllocateNewObject(rx::GLImplFactory *factory,
- GLuint handle,
+ FramebufferID handle,
const Caps &caps);
static void DeleteObject(const Context *context, Framebuffer *framebuffer);
diff --git a/src/libANGLE/State.cpp b/src/libANGLE/State.cpp
index ec94269..99b122d 100644
--- a/src/libANGLE/State.cpp
+++ b/src/libANGLE/State.cpp
@@ -1358,7 +1358,7 @@
}
}
-bool State::removeReadFramebufferBinding(GLuint framebuffer)
+bool State::removeReadFramebufferBinding(FramebufferID framebuffer)
{
if (mReadFramebuffer != nullptr && mReadFramebuffer->id() == framebuffer)
{
@@ -1369,7 +1369,7 @@
return false;
}
-bool State::removeDrawFramebufferBinding(GLuint framebuffer)
+bool State::removeDrawFramebufferBinding(FramebufferID framebuffer)
{
if (mReadFramebuffer != nullptr && mDrawFramebuffer->id() == framebuffer)
{
@@ -2075,12 +2075,12 @@
case GL_DRAW_FRAMEBUFFER_BINDING:
static_assert(GL_DRAW_FRAMEBUFFER_BINDING == GL_DRAW_FRAMEBUFFER_BINDING_ANGLE,
"Enum mismatch");
- *params = mDrawFramebuffer->id();
+ *params = mDrawFramebuffer->id().value;
break;
case GL_READ_FRAMEBUFFER_BINDING:
static_assert(GL_READ_FRAMEBUFFER_BINDING == GL_READ_FRAMEBUFFER_BINDING_ANGLE,
"Enum mismatch");
- *params = mReadFramebuffer->id();
+ *params = mReadFramebuffer->id().value;
break;
case GL_RENDERBUFFER_BINDING:
*params = mRenderbuffer.id();
diff --git a/src/libANGLE/State.h b/src/libANGLE/State.h
index b2b21c5..8927f25 100644
--- a/src/libANGLE/State.h
+++ b/src/libANGLE/State.h
@@ -266,8 +266,8 @@
Framebuffer *getReadFramebuffer() const { return mReadFramebuffer; }
Framebuffer *getDrawFramebuffer() const { return mDrawFramebuffer; }
- bool removeReadFramebufferBinding(GLuint framebuffer);
- bool removeDrawFramebufferBinding(GLuint framebuffer);
+ bool removeReadFramebufferBinding(FramebufferID framebuffer);
+ bool removeDrawFramebufferBinding(FramebufferID framebuffer);
// Vertex array object binding manipulation
void setVertexArrayBinding(const Context *context, VertexArray *vertexArray);
diff --git a/src/libANGLE/capture_gles_2_0_autogen.cpp b/src/libANGLE/capture_gles_2_0_autogen.cpp
index 96dc5a6..e43e5aa 100644
--- a/src/libANGLE/capture_gles_2_0_autogen.cpp
+++ b/src/libANGLE/capture_gles_2_0_autogen.cpp
@@ -77,12 +77,12 @@
CallCapture CaptureBindFramebuffer(const Context *context,
bool isCallValid,
GLenum target,
- GLuint framebuffer)
+ FramebufferID framebufferPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
- paramBuffer.addValueParam("framebuffer", ParamType::TGLuint, framebuffer);
+ paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
return CallCapture(gl::EntryPoint::BindFramebuffer, std::move(paramBuffer));
}
@@ -489,17 +489,19 @@
CallCapture CaptureDeleteFramebuffers(const Context *context,
bool isCallValid,
GLsizei n,
- const GLuint *framebuffers)
+ const FramebufferID *framebuffersPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
- ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintConstPointer);
- InitParamValue(ParamType::TGLuintConstPointer, framebuffers, &framebuffersParam.value);
- CaptureDeleteFramebuffers_framebuffers(context, isCallValid, n, framebuffers,
- &framebuffersParam);
- paramBuffer.addParam(std::move(framebuffersParam));
+ ParamCapture framebuffersPackedParam("framebuffersPacked",
+ ParamType::TFramebufferIDConstPointer);
+ InitParamValue(ParamType::TFramebufferIDConstPointer, framebuffersPacked,
+ &framebuffersPackedParam.value);
+ CaptureDeleteFramebuffers_framebuffersPacked(context, isCallValid, n, framebuffersPacked,
+ &framebuffersPackedParam);
+ paramBuffer.addParam(std::move(framebuffersPackedParam));
return CallCapture(gl::EntryPoint::DeleteFramebuffers, std::move(paramBuffer));
}
@@ -760,16 +762,18 @@
CallCapture CaptureGenFramebuffers(const Context *context,
bool isCallValid,
GLsizei n,
- GLuint *framebuffers)
+ FramebufferID *framebuffersPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
- ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintPointer);
- InitParamValue(ParamType::TGLuintPointer, framebuffers, &framebuffersParam.value);
- CaptureGenFramebuffers_framebuffers(context, isCallValid, n, framebuffers, &framebuffersParam);
- paramBuffer.addParam(std::move(framebuffersParam));
+ ParamCapture framebuffersPackedParam("framebuffersPacked", ParamType::TFramebufferIDPointer);
+ InitParamValue(ParamType::TFramebufferIDPointer, framebuffersPacked,
+ &framebuffersPackedParam.value);
+ CaptureGenFramebuffers_framebuffersPacked(context, isCallValid, n, framebuffersPacked,
+ &framebuffersPackedParam);
+ paramBuffer.addParam(std::move(framebuffersPackedParam));
return CallCapture(gl::EntryPoint::GenFramebuffers, std::move(paramBuffer));
}
@@ -1443,12 +1447,12 @@
CallCapture CaptureIsFramebuffer(const Context *context,
bool isCallValid,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLboolean returnValue)
{
ParamBuffer paramBuffer;
- paramBuffer.addValueParam("framebuffer", ParamType::TGLuint, framebuffer);
+ paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
diff --git a/src/libANGLE/capture_gles_2_0_autogen.h b/src/libANGLE/capture_gles_2_0_autogen.h
index 7584f08..b154490 100644
--- a/src/libANGLE/capture_gles_2_0_autogen.h
+++ b/src/libANGLE/capture_gles_2_0_autogen.h
@@ -37,7 +37,7 @@
angle::CallCapture CaptureBindFramebuffer(const Context *context,
bool isCallValid,
GLenum target,
- GLuint framebuffer);
+ FramebufferID framebufferPacked);
angle::CallCapture CaptureBindRenderbuffer(const Context *context,
bool isCallValid,
GLenum target,
@@ -159,7 +159,7 @@
angle::CallCapture CaptureDeleteFramebuffers(const Context *context,
bool isCallValid,
GLsizei n,
- const GLuint *framebuffers);
+ const FramebufferID *framebuffersPacked);
angle::CallCapture CaptureDeleteProgram(const Context *context,
bool isCallValid,
ShaderProgramID programPacked);
@@ -226,7 +226,7 @@
angle::CallCapture CaptureGenFramebuffers(const Context *context,
bool isCallValid,
GLsizei n,
- GLuint *framebuffers);
+ FramebufferID *framebuffersPacked);
angle::CallCapture CaptureGenRenderbuffers(const Context *context,
bool isCallValid,
GLsizei n,
@@ -388,7 +388,7 @@
GLboolean returnValue);
angle::CallCapture CaptureIsFramebuffer(const Context *context,
bool isCallValid,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLboolean returnValue);
angle::CallCapture CaptureIsProgram(const Context *context,
bool isCallValid,
@@ -737,11 +737,11 @@
GLsizei n,
const BufferID *buffersPacked,
angle::ParamCapture *paramCapture);
-void CaptureDeleteFramebuffers_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- const GLuint *framebuffers,
- angle::ParamCapture *paramCapture);
+void CaptureDeleteFramebuffers_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ const FramebufferID *framebuffersPacked,
+ angle::ParamCapture *paramCapture);
void CaptureDeleteRenderbuffers_renderbuffersPacked(const Context *context,
bool isCallValid,
GLsizei n,
@@ -764,11 +764,11 @@
GLsizei n,
BufferID *buffersPacked,
angle::ParamCapture *paramCapture);
-void CaptureGenFramebuffers_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- GLuint *framebuffers,
- angle::ParamCapture *paramCapture);
+void CaptureGenFramebuffers_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ FramebufferID *framebuffersPacked,
+ angle::ParamCapture *paramCapture);
void CaptureGenRenderbuffers_renderbuffersPacked(const Context *context,
bool isCallValid,
GLsizei n,
diff --git a/src/libANGLE/capture_gles_2_0_params.cpp b/src/libANGLE/capture_gles_2_0_params.cpp
index 7815833..14f0405 100644
--- a/src/libANGLE/capture_gles_2_0_params.cpp
+++ b/src/libANGLE/capture_gles_2_0_params.cpp
@@ -103,11 +103,11 @@
UNIMPLEMENTED();
}
-void CaptureDeleteFramebuffers_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- const GLuint *framebuffers,
- ParamCapture *paramCapture)
+void CaptureDeleteFramebuffers_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ const FramebufferID *framebuffers,
+ ParamCapture *paramCapture)
{
CaptureMemory(framebuffers, sizeof(GLuint) * n, paramCapture);
}
@@ -159,11 +159,11 @@
paramCapture->readBufferSizeBytes = sizeof(GLuint) * n;
}
-void CaptureGenFramebuffers_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- GLuint *framebuffers,
- ParamCapture *paramCapture)
+void CaptureGenFramebuffers_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ FramebufferID *framebuffers,
+ ParamCapture *paramCapture)
{
paramCapture->readBufferSizeBytes = sizeof(GLuint) * n;
}
diff --git a/src/libANGLE/capture_gles_ext_autogen.cpp b/src/libANGLE/capture_gles_ext_autogen.cpp
index fcbfbb0..4c2a538 100644
--- a/src/libANGLE/capture_gles_ext_autogen.cpp
+++ b/src/libANGLE/capture_gles_ext_autogen.cpp
@@ -4909,12 +4909,12 @@
CallCapture CaptureBindFramebufferOES(const Context *context,
bool isCallValid,
GLenum target,
- GLuint framebuffer)
+ FramebufferID framebufferPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addEnumParam("target", GLenumGroup::FramebufferTarget, ParamType::TGLenum, target);
- paramBuffer.addValueParam("framebuffer", ParamType::TGLuint, framebuffer);
+ paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
return CallCapture(gl::EntryPoint::BindFramebufferOES, std::move(paramBuffer));
}
@@ -4951,17 +4951,19 @@
CallCapture CaptureDeleteFramebuffersOES(const Context *context,
bool isCallValid,
GLsizei n,
- const GLuint *framebuffers)
+ const FramebufferID *framebuffersPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
- ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintConstPointer);
- InitParamValue(ParamType::TGLuintConstPointer, framebuffers, &framebuffersParam.value);
- CaptureDeleteFramebuffersOES_framebuffers(context, isCallValid, n, framebuffers,
- &framebuffersParam);
- paramBuffer.addParam(std::move(framebuffersParam));
+ ParamCapture framebuffersPackedParam("framebuffersPacked",
+ ParamType::TFramebufferIDConstPointer);
+ InitParamValue(ParamType::TFramebufferIDConstPointer, framebuffersPacked,
+ &framebuffersPackedParam.value);
+ CaptureDeleteFramebuffersOES_framebuffersPacked(context, isCallValid, n, framebuffersPacked,
+ &framebuffersPackedParam);
+ paramBuffer.addParam(std::move(framebuffersPackedParam));
return CallCapture(gl::EntryPoint::DeleteFramebuffersOES, std::move(paramBuffer));
}
@@ -5028,17 +5030,18 @@
CallCapture CaptureGenFramebuffersOES(const Context *context,
bool isCallValid,
GLsizei n,
- GLuint *framebuffers)
+ FramebufferID *framebuffersPacked)
{
ParamBuffer paramBuffer;
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
- ParamCapture framebuffersParam("framebuffers", ParamType::TGLuintPointer);
- InitParamValue(ParamType::TGLuintPointer, framebuffers, &framebuffersParam.value);
- CaptureGenFramebuffersOES_framebuffers(context, isCallValid, n, framebuffers,
- &framebuffersParam);
- paramBuffer.addParam(std::move(framebuffersParam));
+ ParamCapture framebuffersPackedParam("framebuffersPacked", ParamType::TFramebufferIDPointer);
+ InitParamValue(ParamType::TFramebufferIDPointer, framebuffersPacked,
+ &framebuffersPackedParam.value);
+ CaptureGenFramebuffersOES_framebuffersPacked(context, isCallValid, n, framebuffersPacked,
+ &framebuffersPackedParam);
+ paramBuffer.addParam(std::move(framebuffersPackedParam));
return CallCapture(gl::EntryPoint::GenFramebuffersOES, std::move(paramBuffer));
}
@@ -5121,12 +5124,12 @@
CallCapture CaptureIsFramebufferOES(const Context *context,
bool isCallValid,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLboolean returnValue)
{
ParamBuffer paramBuffer;
- paramBuffer.addValueParam("framebuffer", ParamType::TGLuint, framebuffer);
+ paramBuffer.addValueParam("framebufferPacked", ParamType::TFramebufferID, framebufferPacked);
ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
diff --git a/src/libANGLE/capture_gles_ext_autogen.h b/src/libANGLE/capture_gles_ext_autogen.h
index ec0fe98..2134f3e 100644
--- a/src/libANGLE/capture_gles_ext_autogen.h
+++ b/src/libANGLE/capture_gles_ext_autogen.h
@@ -1421,7 +1421,7 @@
angle::CallCapture CaptureBindFramebufferOES(const Context *context,
bool isCallValid,
GLenum target,
- GLuint framebuffer);
+ FramebufferID framebufferPacked);
angle::CallCapture CaptureBindRenderbufferOES(const Context *context,
bool isCallValid,
GLenum target,
@@ -1433,7 +1433,7 @@
angle::CallCapture CaptureDeleteFramebuffersOES(const Context *context,
bool isCallValid,
GLsizei n,
- const GLuint *framebuffers);
+ const FramebufferID *framebuffersPacked);
angle::CallCapture CaptureDeleteRenderbuffersOES(const Context *context,
bool isCallValid,
GLsizei n,
@@ -1454,7 +1454,7 @@
angle::CallCapture CaptureGenFramebuffersOES(const Context *context,
bool isCallValid,
GLsizei n,
- GLuint *framebuffers);
+ FramebufferID *framebuffersPacked);
angle::CallCapture CaptureGenRenderbuffersOES(const Context *context,
bool isCallValid,
GLsizei n,
@@ -1475,7 +1475,7 @@
GLint *params);
angle::CallCapture CaptureIsFramebufferOES(const Context *context,
bool isCallValid,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLboolean returnValue);
angle::CallCapture CaptureIsRenderbufferOES(const Context *context,
bool isCallValid,
@@ -3610,21 +3610,21 @@
bool isCallValid,
const GLfixed *coords,
angle::ParamCapture *paramCapture);
-void CaptureDeleteFramebuffersOES_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- const GLuint *framebuffers,
- angle::ParamCapture *paramCapture);
+void CaptureDeleteFramebuffersOES_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ const FramebufferID *framebuffersPacked,
+ angle::ParamCapture *paramCapture);
void CaptureDeleteRenderbuffersOES_renderbuffersPacked(const Context *context,
bool isCallValid,
GLsizei n,
const RenderbufferID *renderbuffersPacked,
angle::ParamCapture *paramCapture);
-void CaptureGenFramebuffersOES_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- GLuint *framebuffers,
- angle::ParamCapture *paramCapture);
+void CaptureGenFramebuffersOES_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ FramebufferID *framebuffersPacked,
+ angle::ParamCapture *paramCapture);
void CaptureGenRenderbuffersOES_renderbuffersPacked(const Context *context,
bool isCallValid,
GLsizei n,
diff --git a/src/libANGLE/capture_gles_ext_params.cpp b/src/libANGLE/capture_gles_ext_params.cpp
index e89f18e..9e2b17a 100644
--- a/src/libANGLE/capture_gles_ext_params.cpp
+++ b/src/libANGLE/capture_gles_ext_params.cpp
@@ -2763,11 +2763,11 @@
UNIMPLEMENTED();
}
-void CaptureDeleteFramebuffersOES_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- const GLuint *framebuffers,
- ParamCapture *paramCapture)
+void CaptureDeleteFramebuffersOES_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ const FramebufferID *framebuffers,
+ ParamCapture *paramCapture)
{
UNIMPLEMENTED();
}
@@ -2781,11 +2781,11 @@
UNIMPLEMENTED();
}
-void CaptureGenFramebuffersOES_framebuffers(const Context *context,
- bool isCallValid,
- GLsizei n,
- GLuint *framebuffers,
- ParamCapture *paramCapture)
+void CaptureGenFramebuffersOES_framebuffersPacked(const Context *context,
+ bool isCallValid,
+ GLsizei n,
+ FramebufferID *framebuffers,
+ ParamCapture *paramCapture)
{
UNIMPLEMENTED();
}
diff --git a/src/libANGLE/frame_capture_replay_autogen.cpp b/src/libANGLE/frame_capture_replay_autogen.cpp
index 7eb54f3..0738e4e 100644
--- a/src/libANGLE/frame_capture_replay_autogen.cpp
+++ b/src/libANGLE/frame_capture_replay_autogen.cpp
@@ -114,7 +114,8 @@
case gl::EntryPoint::BindFramebuffer:
context->bindFramebuffer(
params.getParam("target", ParamType::TGLenum, 0).value.GLenumVal,
- params.getParam("framebuffer", ParamType::TGLuint, 1).value.GLuintVal);
+ params.getParam("framebufferPacked", ParamType::TFramebufferID, 1)
+ .value.FramebufferIDVal);
break;
case gl::EntryPoint::BindImageTexture:
context->bindImageTexture(
@@ -496,8 +497,8 @@
case gl::EntryPoint::DeleteFramebuffers:
context->deleteFramebuffers(
params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal,
- replayContext->getAsConstPointer<const GLuint *>(
- params.getParam("framebuffers", ParamType::TGLuintConstPointer, 1)));
+ replayContext->getAsConstPointer<const FramebufferID *>(params.getParam(
+ "framebuffersPacked", ParamType::TFramebufferIDConstPointer, 1)));
break;
case gl::EntryPoint::DeleteProgram:
context->deleteProgram(params.getParam("programPacked", ParamType::TShaderProgramID, 0)
@@ -814,9 +815,10 @@
"fencesPacked", ParamType::TFenceNVIDPointer, 1)));
break;
case gl::EntryPoint::GenFramebuffers:
- context->genFramebuffers(params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal,
- replayContext->getReadBufferPointer<GLuint *>(params.getParam(
- "framebuffers", ParamType::TGLuintPointer, 1)));
+ context->genFramebuffers(
+ params.getParam("n", ParamType::TGLsizei, 0).value.GLsizeiVal,
+ replayContext->getReadBufferPointer<FramebufferID *>(
+ params.getParam("framebuffersPacked", ParamType::TFramebufferIDPointer, 1)));
break;
case gl::EntryPoint::GenProgramPipelines:
context->genProgramPipelines(
@@ -1610,7 +1612,8 @@
break;
case gl::EntryPoint::IsFramebuffer:
context->isFramebuffer(
- params.getParam("framebuffer", ParamType::TGLuint, 0).value.GLuintVal);
+ params.getParam("framebufferPacked", ParamType::TFramebufferID, 0)
+ .value.FramebufferIDVal);
break;
case gl::EntryPoint::IsProgram:
context->isProgram(params.getParam("programPacked", ParamType::TShaderProgramID, 0)
diff --git a/src/libANGLE/frame_capture_utils_autogen.cpp b/src/libANGLE/frame_capture_utils_autogen.cpp
index 844d911..c3ba25a 100644
--- a/src/libANGLE/frame_capture_utils_autogen.cpp
+++ b/src/libANGLE/frame_capture_utils_autogen.cpp
@@ -59,6 +59,17 @@
WriteParamValueToStream<ParamType::TFenceNVIDPointer>(os,
paramValue.FenceNVIDPointerVal);
break;
+ case ParamType::TFramebufferID:
+ WriteParamValueToStream<ParamType::TFramebufferID>(os, paramValue.FramebufferIDVal);
+ break;
+ case ParamType::TFramebufferIDConstPointer:
+ WriteParamValueToStream<ParamType::TFramebufferIDConstPointer>(
+ os, paramValue.FramebufferIDConstPointerVal);
+ break;
+ case ParamType::TFramebufferIDPointer:
+ WriteParamValueToStream<ParamType::TFramebufferIDPointer>(
+ os, paramValue.FramebufferIDPointerVal);
+ break;
case ParamType::TGLDEBUGPROC:
WriteParamValueToStream<ParamType::TGLDEBUGPROC>(os, paramValue.GLDEBUGPROCVal);
break;
@@ -414,6 +425,12 @@
return "const GLuint *";
case ParamType::TFenceNVIDPointer:
return "GLuint *";
+ case ParamType::TFramebufferID:
+ return "GLuint";
+ case ParamType::TFramebufferIDConstPointer:
+ return "const GLuint *";
+ case ParamType::TFramebufferIDPointer:
+ return "GLuint *";
case ParamType::TGLDEBUGPROC:
return "GLDEBUGPROC";
case ParamType::TGLDEBUGPROCKHR:
diff --git a/src/libANGLE/frame_capture_utils_autogen.h b/src/libANGLE/frame_capture_utils_autogen.h
index 774ae9b..c894f9d 100644
--- a/src/libANGLE/frame_capture_utils_autogen.h
+++ b/src/libANGLE/frame_capture_utils_autogen.h
@@ -29,6 +29,9 @@
TFenceNVID,
TFenceNVIDConstPointer,
TFenceNVIDPointer,
+ TFramebufferID,
+ TFramebufferIDConstPointer,
+ TFramebufferIDPointer,
TGLDEBUGPROC,
TGLDEBUGPROCKHR,
TGLbitfield,
@@ -138,6 +141,9 @@
gl::FenceNVID FenceNVIDVal;
const gl::FenceNVID *FenceNVIDConstPointerVal;
gl::FenceNVID *FenceNVIDPointerVal;
+ gl::FramebufferID FramebufferIDVal;
+ const gl::FramebufferID *FramebufferIDConstPointerVal;
+ gl::FramebufferID *FramebufferIDPointerVal;
GLDEBUGPROC GLDEBUGPROCVal;
GLDEBUGPROCKHR GLDEBUGPROCKHRVal;
GLbitfield GLbitfieldVal;
@@ -319,6 +325,27 @@
}
template <>
+inline gl::FramebufferID GetParamVal<ParamType::TFramebufferID, gl::FramebufferID>(
+ const ParamValue &value)
+{
+ return value.FramebufferIDVal;
+}
+
+template <>
+inline const gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDConstPointer,
+ const gl::FramebufferID *>(const ParamValue &value)
+{
+ return value.FramebufferIDConstPointerVal;
+}
+
+template <>
+inline gl::FramebufferID *GetParamVal<ParamType::TFramebufferIDPointer, gl::FramebufferID *>(
+ const ParamValue &value)
+{
+ return value.FramebufferIDPointerVal;
+}
+
+template <>
inline GLDEBUGPROC GetParamVal<ParamType::TGLDEBUGPROC, GLDEBUGPROC>(const ParamValue &value)
{
return value.GLDEBUGPROCVal;
@@ -962,6 +989,12 @@
return GetParamVal<ParamType::TFenceNVIDConstPointer, T>(value);
case ParamType::TFenceNVIDPointer:
return GetParamVal<ParamType::TFenceNVIDPointer, T>(value);
+ case ParamType::TFramebufferID:
+ return GetParamVal<ParamType::TFramebufferID, T>(value);
+ case ParamType::TFramebufferIDConstPointer:
+ return GetParamVal<ParamType::TFramebufferIDConstPointer, T>(value);
+ case ParamType::TFramebufferIDPointer:
+ return GetParamVal<ParamType::TFramebufferIDPointer, T>(value);
case ParamType::TGLDEBUGPROC:
return GetParamVal<ParamType::TGLDEBUGPROC, T>(value);
case ParamType::TGLDEBUGPROCKHR:
@@ -1231,6 +1264,26 @@
}
template <>
+inline void SetParamVal<ParamType::TFramebufferID>(gl::FramebufferID valueIn, ParamValue *valueOut)
+{
+ valueOut->FramebufferIDVal = valueIn;
+}
+
+template <>
+inline void SetParamVal<ParamType::TFramebufferIDConstPointer>(const gl::FramebufferID *valueIn,
+ ParamValue *valueOut)
+{
+ valueOut->FramebufferIDConstPointerVal = valueIn;
+}
+
+template <>
+inline void SetParamVal<ParamType::TFramebufferIDPointer>(gl::FramebufferID *valueIn,
+ ParamValue *valueOut)
+{
+ valueOut->FramebufferIDPointerVal = valueIn;
+}
+
+template <>
inline void SetParamVal<ParamType::TGLDEBUGPROC>(GLDEBUGPROC valueIn, ParamValue *valueOut)
{
valueOut->GLDEBUGPROCVal = valueIn;
@@ -1872,6 +1925,15 @@
case ParamType::TFenceNVIDPointer:
SetParamVal<ParamType::TFenceNVIDPointer>(valueIn, valueOut);
break;
+ case ParamType::TFramebufferID:
+ SetParamVal<ParamType::TFramebufferID>(valueIn, valueOut);
+ break;
+ case ParamType::TFramebufferIDConstPointer:
+ SetParamVal<ParamType::TFramebufferIDConstPointer>(valueIn, valueOut);
+ break;
+ case ParamType::TFramebufferIDPointer:
+ SetParamVal<ParamType::TFramebufferIDPointer>(valueIn, valueOut);
+ break;
case ParamType::TGLDEBUGPROC:
SetParamVal<ParamType::TGLDEBUGPROC>(valueIn, valueOut);
break;
diff --git a/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp b/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
index cba10ca..5abeff7 100644
--- a/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/StateManager11.cpp
@@ -1938,7 +1938,7 @@
// Check for zero-sized default framebuffer, which is a special case.
// in this case we do not wish to modify any state and just silently return false.
// this will not report any gl error but will cause the calling method to return.
- if (mFramebuffer11->getState().id() == 0)
+ if (mFramebuffer11->getState().isDefault())
{
RenderTarget11 *firstRT = mFramebuffer11->getFirstRenderTarget();
const gl::Extents &size = firstRT->getExtents();
diff --git a/src/libANGLE/renderer/gl/SurfaceGL.cpp b/src/libANGLE/renderer/gl/SurfaceGL.cpp
index 007cce5..c35897e 100644
--- a/src/libANGLE/renderer/gl/SurfaceGL.cpp
+++ b/src/libANGLE/renderer/gl/SurfaceGL.cpp
@@ -37,7 +37,7 @@
angle::Result SurfaceGL::initializeContents(const gl::Context *context,
const gl::ImageIndex &imageIndex)
{
- FramebufferGL *framebufferGL = GetImplAs<FramebufferGL>(context->getFramebuffer(0));
+ FramebufferGL *framebufferGL = GetImplAs<FramebufferGL>(context->getFramebuffer({0}));
ASSERT(framebufferGL->isDefault());
BlitGL *blitter = GetBlitGL(context);
diff --git a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
index d71f92f..cc4162c 100644
--- a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
+++ b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
@@ -252,7 +252,7 @@
texture.height = height;
}
- FramebufferGL *framebufferGL = GetImplAs<FramebufferGL>(context->getFramebuffer(0));
+ FramebufferGL *framebufferGL = GetImplAs<FramebufferGL>(context->getFramebuffer({0}));
stateManager->bindFramebuffer(GL_FRAMEBUFFER, framebufferGL->getFramebufferID());
functions->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D,
mSwapState.beingRendered->texture, 0);
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index ec0cf54..9ac5959 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -3564,8 +3564,8 @@
}
ASSERT(context->getState().getDrawFramebuffer());
- GLuint frameBufferId = context->getState().getDrawFramebuffer()->id();
- GLuint maxColorAttachment = GL_COLOR_ATTACHMENT0_EXT + context->getCaps().maxColorAttachments;
+ FramebufferID frameBufferId = context->getState().getDrawFramebuffer()->id();
+ GLuint maxColorAttachment = GL_COLOR_ATTACHMENT0_EXT + context->getCaps().maxColorAttachments;
// This should come first before the check for the default frame buffer
// because when we switch to ES3.1+, invalid enums will return INVALID_ENUM
@@ -3592,7 +3592,7 @@
return false;
}
else if (bufs[colorAttachment] != GL_NONE && bufs[colorAttachment] != attachment &&
- frameBufferId != 0)
+ frameBufferId.value != 0)
{
// INVALID_OPERATION-GL is bound to buffer and ith argument
// is not COLOR_ATTACHMENTi or NONE
@@ -3603,7 +3603,7 @@
// INVALID_OPERATION is generated if GL is bound to the default framebuffer
// and n is not 1 or bufs is bound to value other than BACK and NONE
- if (frameBufferId == 0)
+ if (frameBufferId.value == 0)
{
if (n != 1)
{
diff --git a/src/libANGLE/validationES1.cpp b/src/libANGLE/validationES1.cpp
index 6501352..03bca1f 100644
--- a/src/libANGLE/validationES1.cpp
+++ b/src/libANGLE/validationES1.cpp
@@ -1462,13 +1462,13 @@
return true;
}
-bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers)
+bool ValidateGenFramebuffersOES(Context *context, GLsizei n, FramebufferID *framebuffers)
{
UNIMPLEMENTED();
return true;
}
-bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers)
+bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const FramebufferID *framebuffers)
{
UNIMPLEMENTED();
return true;
@@ -1488,7 +1488,7 @@
return true;
}
-bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer)
+bool ValidateBindFramebufferOES(Context *context, GLenum target, FramebufferID framebuffer)
{
UNIMPLEMENTED();
return true;
@@ -1552,7 +1552,7 @@
return true;
}
-bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer)
+bool ValidateIsFramebufferOES(Context *context, FramebufferID framebuffer)
{
UNIMPLEMENTED();
return true;
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index aaaf198..e0fea17 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -2479,7 +2479,7 @@
return true;
case GL_FRAMEBUFFER:
- if (context->getFramebuffer(name) == nullptr)
+ if (context->getFramebuffer({name}) == nullptr)
{
context->validationError(GL_INVALID_VALUE, kInvalidFramebufferName);
return false;
@@ -4972,7 +4972,7 @@
return GetValidProgram(context, program) != nullptr;
}
-bool ValidateBindFramebuffer(Context *context, GLenum target, GLuint framebuffer)
+bool ValidateBindFramebuffer(Context *context, GLenum target, FramebufferID framebuffer)
{
if (!ValidFramebufferTarget(context, target))
{
@@ -5749,7 +5749,7 @@
return true;
}
-bool ValidateIsFramebuffer(Context *context, GLuint framebuffer)
+bool ValidateIsFramebuffer(Context *context, FramebufferID framebuffer)
{
return true;
}
@@ -6263,7 +6263,7 @@
return ValidateGenOrDelete(context, n);
}
-bool ValidateDeleteFramebuffers(Context *context, GLint n, const GLuint *)
+bool ValidateDeleteFramebuffers(Context *context, GLint n, const FramebufferID *framebuffers)
{
return ValidateGenOrDelete(context, n);
}
@@ -6519,7 +6519,7 @@
return ValidateGenOrDelete(context, n);
}
-bool ValidateGenFramebuffers(Context *context, GLint n, GLuint *)
+bool ValidateGenFramebuffers(Context *context, GLint n, FramebufferID *framebuffers)
{
return ValidateGenOrDelete(context, n);
}
diff --git a/src/libANGLE/validationES2_autogen.h b/src/libANGLE/validationES2_autogen.h
index 7896b9a..8c791e2 100644
--- a/src/libANGLE/validationES2_autogen.h
+++ b/src/libANGLE/validationES2_autogen.h
@@ -26,7 +26,7 @@
GLuint index,
const GLchar *name);
bool ValidateBindBuffer(Context *context, BufferBinding targetPacked, BufferID bufferPacked);
-bool ValidateBindFramebuffer(Context *context, GLenum target, GLuint framebuffer);
+bool ValidateBindFramebuffer(Context *context, GLenum target, FramebufferID framebufferPacked);
bool ValidateBindRenderbuffer(Context *context, GLenum target, RenderbufferID renderbufferPacked);
bool ValidateBindTexture(Context *context, TextureType targetPacked, TextureID texturePacked);
bool ValidateBlendColor(Context *context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
@@ -100,7 +100,9 @@
bool ValidateCreateShader(Context *context, ShaderType typePacked);
bool ValidateCullFace(Context *context, CullFaceMode modePacked);
bool ValidateDeleteBuffers(Context *context, GLsizei n, const BufferID *buffersPacked);
-bool ValidateDeleteFramebuffers(Context *context, GLsizei n, const GLuint *framebuffers);
+bool ValidateDeleteFramebuffers(Context *context,
+ GLsizei n,
+ const FramebufferID *framebuffersPacked);
bool ValidateDeleteProgram(Context *context, ShaderProgramID programPacked);
bool ValidateDeleteRenderbuffers(Context *context,
GLsizei n,
@@ -138,7 +140,7 @@
GLint level);
bool ValidateFrontFace(Context *context, GLenum mode);
bool ValidateGenBuffers(Context *context, GLsizei n, BufferID *buffersPacked);
-bool ValidateGenFramebuffers(Context *context, GLsizei n, GLuint *framebuffers);
+bool ValidateGenFramebuffers(Context *context, GLsizei n, FramebufferID *framebuffersPacked);
bool ValidateGenRenderbuffers(Context *context, GLsizei n, RenderbufferID *renderbuffersPacked);
bool ValidateGenTextures(Context *context, GLsizei n, TextureID *texturesPacked);
bool ValidateGenerateMipmap(Context *context, TextureType targetPacked);
@@ -235,7 +237,7 @@
bool ValidateHint(Context *context, GLenum target, GLenum mode);
bool ValidateIsBuffer(Context *context, BufferID bufferPacked);
bool ValidateIsEnabled(Context *context, GLenum cap);
-bool ValidateIsFramebuffer(Context *context, GLuint framebuffer);
+bool ValidateIsFramebuffer(Context *context, FramebufferID framebufferPacked);
bool ValidateIsProgram(Context *context, ShaderProgramID programPacked);
bool ValidateIsRenderbuffer(Context *context, RenderbufferID renderbufferPacked);
bool ValidateIsShader(Context *context, ShaderProgramID shaderPacked);
diff --git a/src/libANGLE/validationES3.cpp b/src/libANGLE/validationES3.cpp
index e9b4d74..a2cb0b6 100644
--- a/src/libANGLE/validationES3.cpp
+++ b/src/libANGLE/validationES3.cpp
@@ -807,7 +807,7 @@
static bool IsValidES3CopyTexImageCombination(const InternalFormat &textureFormatInfo,
const InternalFormat &framebufferFormatInfo,
- GLuint readBufferHandle)
+ FramebufferID readBufferHandle)
{
if (!ValidES3CopyConversion(textureFormatInfo.format, framebufferFormatInfo.format))
{
@@ -873,7 +873,7 @@
// is used if the FRAMEBUFFER_ATTACHMENT_ENCODING is LINEAR and table 3.18 is used if the
// FRAMEBUFFER_ATTACHMENT_ENCODING is SRGB.
const InternalFormat *sourceEffectiveFormat = nullptr;
- if (readBufferHandle != 0)
+ if (readBufferHandle.value != 0)
{
// Not the default framebuffer, therefore the read buffer must be a user-created texture or
// renderbuffer
@@ -971,16 +971,16 @@
}
ASSERT(textureFormat.valid() || !isSubImage);
- const auto &state = context->getState();
- gl::Framebuffer *framebuffer = state.getReadFramebuffer();
- GLuint readFramebufferID = framebuffer->id();
+ const auto &state = context->getState();
+ gl::Framebuffer *framebuffer = state.getReadFramebuffer();
+ FramebufferID readFramebufferID = framebuffer->id();
if (!ValidateFramebufferComplete(context, framebuffer))
{
return false;
}
- if (readFramebufferID != 0 && !ValidateFramebufferNotMultisampled(context, framebuffer))
+ if (!framebuffer->isDefault() && !ValidateFramebufferNotMultisampled(context, framebuffer))
{
return false;
}
diff --git a/src/libANGLE/validationESEXT_autogen.h b/src/libANGLE/validationESEXT_autogen.h
index 49d1d09..b25ff84 100644
--- a/src/libANGLE/validationESEXT_autogen.h
+++ b/src/libANGLE/validationESEXT_autogen.h
@@ -1105,12 +1105,14 @@
bool ValidateDrawTexxvOES(Context *context, const GLfixed *coords);
// GL_OES_framebuffer_object
-bool ValidateBindFramebufferOES(Context *context, GLenum target, GLuint framebuffer);
+bool ValidateBindFramebufferOES(Context *context, GLenum target, FramebufferID framebufferPacked);
bool ValidateBindRenderbufferOES(Context *context,
GLenum target,
RenderbufferID renderbufferPacked);
bool ValidateCheckFramebufferStatusOES(Context *context, GLenum target);
-bool ValidateDeleteFramebuffersOES(Context *context, GLsizei n, const GLuint *framebuffers);
+bool ValidateDeleteFramebuffersOES(Context *context,
+ GLsizei n,
+ const FramebufferID *framebuffersPacked);
bool ValidateDeleteRenderbuffersOES(Context *context,
GLsizei n,
const RenderbufferID *renderbuffersPacked);
@@ -1125,7 +1127,7 @@
TextureTarget textargetPacked,
TextureID texturePacked,
GLint level);
-bool ValidateGenFramebuffersOES(Context *context, GLsizei n, GLuint *framebuffers);
+bool ValidateGenFramebuffersOES(Context *context, GLsizei n, FramebufferID *framebuffersPacked);
bool ValidateGenRenderbuffersOES(Context *context, GLsizei n, RenderbufferID *renderbuffersPacked);
bool ValidateGenerateMipmapOES(Context *context, TextureType targetPacked);
bool ValidateGetFramebufferAttachmentParameterivOES(Context *context,
@@ -1137,7 +1139,7 @@
GLenum target,
GLenum pname,
GLint *params);
-bool ValidateIsFramebufferOES(Context *context, GLuint framebuffer);
+bool ValidateIsFramebufferOES(Context *context, FramebufferID framebufferPacked);
bool ValidateIsRenderbufferOES(Context *context, RenderbufferID renderbufferPacked);
bool ValidateRenderbufferStorageOES(Context *context,
GLenum target,
diff --git a/src/libANGLE/validationGL45.cpp b/src/libANGLE/validationGL45.cpp
index d67e050..6075eaa 100644
--- a/src/libANGLE/validationGL45.cpp
+++ b/src/libANGLE/validationGL45.cpp
@@ -33,7 +33,7 @@
return true;
}
-bool ValidateCheckNamedFramebufferStatus(Context *context, GLuint framebuffer, GLenum target)
+bool ValidateCheckNamedFramebufferStatus(Context *context, FramebufferID framebuffer, GLenum target)
{
return true;
}
@@ -61,7 +61,7 @@
}
bool ValidateClearNamedFramebufferfi(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
GLfloat depth,
@@ -71,7 +71,7 @@
}
bool ValidateClearNamedFramebufferfv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
const GLfloat *value)
@@ -80,7 +80,7 @@
}
bool ValidateClearNamedFramebufferiv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
const GLint *value)
@@ -89,7 +89,7 @@
}
bool ValidateClearNamedFramebufferuiv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum buffer,
GLint drawbuffer,
const GLuint *value)
@@ -320,7 +320,7 @@
}
bool ValidateGetNamedFramebufferAttachmentParameteriv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum attachment,
GLenum pname,
GLint *params)
@@ -329,7 +329,7 @@
}
bool ValidateGetNamedFramebufferParameteriv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum pname,
GLint *param)
{
@@ -648,7 +648,7 @@
}
bool ValidateInvalidateNamedFramebufferData(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLsizei numAttachments,
const GLenum *attachments)
{
@@ -656,7 +656,7 @@
}
bool ValidateInvalidateNamedFramebufferSubData(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLsizei numAttachments,
const GLenum *attachments,
GLint x,
@@ -708,13 +708,13 @@
return true;
}
-bool ValidateNamedFramebufferDrawBuffer(Context *context, GLuint framebuffer, GLenum buf)
+bool ValidateNamedFramebufferDrawBuffer(Context *context, FramebufferID framebuffer, GLenum buf)
{
return true;
}
bool ValidateNamedFramebufferDrawBuffers(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLsizei n,
const GLenum *bufs)
{
@@ -722,20 +722,20 @@
}
bool ValidateNamedFramebufferParameteri(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum pname,
GLint param)
{
return true;
}
-bool ValidateNamedFramebufferReadBuffer(Context *context, GLuint framebuffer, GLenum src)
+bool ValidateNamedFramebufferReadBuffer(Context *context, FramebufferID framebuffer, GLenum src)
{
return true;
}
bool ValidateNamedFramebufferRenderbuffer(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum attachment,
GLenum renderbuffertarget,
RenderbufferID renderbuffer)
@@ -744,7 +744,7 @@
}
bool ValidateNamedFramebufferTexture(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum attachment,
TextureID texture,
GLint level)
@@ -753,7 +753,7 @@
}
bool ValidateNamedFramebufferTextureLayer(Context *context,
- GLuint framebuffer,
+ FramebufferID framebuffer,
GLenum attachment,
TextureID texture,
GLint level,
diff --git a/src/libANGLE/validationGL45_autogen.h b/src/libANGLE/validationGL45_autogen.h
index abbba6f..f58b0ab 100644
--- a/src/libANGLE/validationGL45_autogen.h
+++ b/src/libANGLE/validationGL45_autogen.h
@@ -31,7 +31,9 @@
GLint dstY1,
GLbitfield mask,
GLenum filter);
-bool ValidateCheckNamedFramebufferStatus(Context *context, GLuint framebuffer, GLenum target);
+bool ValidateCheckNamedFramebufferStatus(Context *context,
+ FramebufferID framebufferPacked,
+ GLenum target);
bool ValidateClearNamedBufferData(Context *context,
BufferID bufferPacked,
GLenum internalformat,
@@ -47,23 +49,23 @@
GLenum type,
const void *data);
bool ValidateClearNamedFramebufferfi(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum buffer,
GLint drawbuffer,
GLfloat depth,
GLint stencil);
bool ValidateClearNamedFramebufferfv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum buffer,
GLint drawbuffer,
const GLfloat *value);
bool ValidateClearNamedFramebufferiv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum buffer,
GLint drawbuffer,
const GLint *value);
bool ValidateClearNamedFramebufferuiv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum buffer,
GLint drawbuffer,
const GLuint *value);
@@ -181,12 +183,12 @@
GLsizeiptr size,
void *data);
bool ValidateGetNamedFramebufferAttachmentParameteriv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum attachment,
GLenum pname,
GLint *params);
bool ValidateGetNamedFramebufferParameteriv(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum pname,
GLint *param);
bool ValidateGetNamedRenderbufferParameteriv(Context *context,
@@ -356,11 +358,11 @@
GLsizei bufSize,
GLuint *params);
bool ValidateInvalidateNamedFramebufferData(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLsizei numAttachments,
const GLenum *attachments);
bool ValidateInvalidateNamedFramebufferSubData(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLsizei numAttachments,
const GLenum *attachments,
GLint x,
@@ -388,28 +390,32 @@
GLintptr offset,
GLsizeiptr size,
const void *data);
-bool ValidateNamedFramebufferDrawBuffer(Context *context, GLuint framebuffer, GLenum buf);
+bool ValidateNamedFramebufferDrawBuffer(Context *context,
+ FramebufferID framebufferPacked,
+ GLenum buf);
bool ValidateNamedFramebufferDrawBuffers(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLsizei n,
const GLenum *bufs);
bool ValidateNamedFramebufferParameteri(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum pname,
GLint param);
-bool ValidateNamedFramebufferReadBuffer(Context *context, GLuint framebuffer, GLenum src);
+bool ValidateNamedFramebufferReadBuffer(Context *context,
+ FramebufferID framebufferPacked,
+ GLenum src);
bool ValidateNamedFramebufferRenderbuffer(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum attachment,
GLenum renderbuffertarget,
RenderbufferID renderbufferPacked);
bool ValidateNamedFramebufferTexture(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum attachment,
TextureID texturePacked,
GLint level);
bool ValidateNamedFramebufferTextureLayer(Context *context,
- GLuint framebuffer,
+ FramebufferID framebufferPacked,
GLenum attachment,
TextureID texturePacked,
GLint level,
diff --git a/src/libGL/entry_points_gl_3_0_autogen.cpp b/src/libGL/entry_points_gl_3_0_autogen.cpp
index f8d6333..263ba81 100644
--- a/src/libGL/entry_points_gl_3_0_autogen.cpp
+++ b/src/libGL/entry_points_gl_3_0_autogen.cpp
@@ -145,14 +145,15 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateBindFramebuffer(context, target, framebuffer));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateBindFramebuffer(context, target, framebufferPacked));
if (isCallValid)
{
- context->bindFramebuffer(target, framebuffer);
+ context->bindFramebuffer(target, framebufferPacked);
}
- ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebuffer);
+ ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebufferPacked);
}
}
@@ -393,14 +394,15 @@
if (context)
{
+ const FramebufferID *framebuffersPacked = FromGL<const FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateDeleteFramebuffers(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateDeleteFramebuffers(context, n, framebuffersPacked));
if (isCallValid)
{
- context->deleteFramebuffers(n, framebuffers);
+ context->deleteFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffersPacked);
}
}
@@ -701,14 +703,15 @@
if (context)
{
+ FramebufferID *framebuffersPacked = FromGL<FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffers));
+ (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffersPacked));
if (isCallValid)
{
- context->genFramebuffers(n, framebuffers);
+ context->genFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffersPacked);
}
}
@@ -1100,18 +1103,19 @@
GLboolean returnValue;
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateIsFramebuffer(context, framebuffer));
+ (context->skipValidation() || ValidateIsFramebuffer(context, framebufferPacked));
if (isCallValid)
{
- returnValue = context->isFramebuffer(framebuffer);
+ returnValue = context->isFramebuffer(framebufferPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsFramebuffer, GLboolean>();
}
- ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebuffer, returnValue);
+ ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebufferPacked, returnValue);
}
else
{
diff --git a/src/libGL/entry_points_gl_4_5_autogen.cpp b/src/libGL/entry_points_gl_4_5_autogen.cpp
index a8da3d0..28b651f 100644
--- a/src/libGL/entry_points_gl_4_5_autogen.cpp
+++ b/src/libGL/entry_points_gl_4_5_autogen.cpp
@@ -95,18 +95,19 @@
GLenum returnValue;
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid = (context->skipValidation() ||
- ValidateCheckNamedFramebufferStatus(context, framebuffer, target));
+ bool isCallValid = (context->skipValidation() || ValidateCheckNamedFramebufferStatus(
+ context, framebufferPacked, target));
if (isCallValid)
{
- returnValue = context->checkNamedFramebufferStatus(framebuffer, target);
+ returnValue = context->checkNamedFramebufferStatus(framebufferPacked, target);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
}
- ANGLE_CAPTURE(CheckNamedFramebufferStatus, isCallValid, context, framebuffer, target,
+ ANGLE_CAPTURE(CheckNamedFramebufferStatus, isCallValid, context, framebufferPacked, target,
returnValue);
}
else
@@ -196,15 +197,16 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
- ValidateClearNamedFramebufferfi(context, framebuffer, buffer,
+ ValidateClearNamedFramebufferfi(context, framebufferPacked, buffer,
drawbuffer, depth, stencil));
if (isCallValid)
{
- context->clearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil);
+ context->clearNamedFramebufferfi(framebufferPacked, buffer, drawbuffer, depth, stencil);
}
- ANGLE_CAPTURE(ClearNamedFramebufferfi, isCallValid, context, framebuffer, buffer,
+ ANGLE_CAPTURE(ClearNamedFramebufferfi, isCallValid, context, framebufferPacked, buffer,
drawbuffer, depth, stencil);
}
}
@@ -223,15 +225,16 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() ||
- ValidateClearNamedFramebufferfv(context, framebuffer, buffer, drawbuffer, value));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateClearNamedFramebufferfv(context, framebufferPacked, buffer,
+ drawbuffer, value));
if (isCallValid)
{
- context->clearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value);
+ context->clearNamedFramebufferfv(framebufferPacked, buffer, drawbuffer, value);
}
- ANGLE_CAPTURE(ClearNamedFramebufferfv, isCallValid, context, framebuffer, buffer,
+ ANGLE_CAPTURE(ClearNamedFramebufferfv, isCallValid, context, framebufferPacked, buffer,
drawbuffer, value);
}
}
@@ -250,15 +253,16 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() ||
- ValidateClearNamedFramebufferiv(context, framebuffer, buffer, drawbuffer, value));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateClearNamedFramebufferiv(context, framebufferPacked, buffer,
+ drawbuffer, value));
if (isCallValid)
{
- context->clearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value);
+ context->clearNamedFramebufferiv(framebufferPacked, buffer, drawbuffer, value);
}
- ANGLE_CAPTURE(ClearNamedFramebufferiv, isCallValid, context, framebuffer, buffer,
+ ANGLE_CAPTURE(ClearNamedFramebufferiv, isCallValid, context, framebufferPacked, buffer,
drawbuffer, value);
}
}
@@ -277,15 +281,16 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() ||
- ValidateClearNamedFramebufferuiv(context, framebuffer, buffer, drawbuffer, value));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateClearNamedFramebufferuiv(context, framebufferPacked, buffer,
+ drawbuffer, value));
if (isCallValid)
{
- context->clearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value);
+ context->clearNamedFramebufferuiv(framebufferPacked, buffer, drawbuffer, value);
}
- ANGLE_CAPTURE(ClearNamedFramebufferuiv, isCallValid, context, framebuffer, buffer,
+ ANGLE_CAPTURE(ClearNamedFramebufferuiv, isCallValid, context, framebufferPacked, buffer,
drawbuffer, value);
}
}
@@ -995,17 +1000,18 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateGetNamedFramebufferAttachmentParameteriv(
- context, framebuffer, attachment, pname, params));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateGetNamedFramebufferAttachmentParameteriv(
+ context, framebufferPacked, attachment, pname, params));
if (isCallValid)
{
- context->getNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname,
+ context->getNamedFramebufferAttachmentParameteriv(framebufferPacked, attachment, pname,
params);
}
- ANGLE_CAPTURE(GetNamedFramebufferAttachmentParameteriv, isCallValid, context, framebuffer,
- attachment, pname, params);
+ ANGLE_CAPTURE(GetNamedFramebufferAttachmentParameteriv, isCallValid, context,
+ framebufferPacked, attachment, pname, params);
}
}
@@ -1020,15 +1026,17 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid = (context->skipValidation() || ValidateGetNamedFramebufferParameteriv(
- context, framebuffer, pname, param));
+ bool isCallValid =
+ (context->skipValidation() ||
+ ValidateGetNamedFramebufferParameteriv(context, framebufferPacked, pname, param));
if (isCallValid)
{
- context->getNamedFramebufferParameteriv(framebuffer, pname, param);
+ context->getNamedFramebufferParameteriv(framebufferPacked, pname, param);
}
- ANGLE_CAPTURE(GetNamedFramebufferParameteriv, isCallValid, context, framebuffer, pname,
- param);
+ ANGLE_CAPTURE(GetNamedFramebufferParameteriv, isCallValid, context, framebufferPacked,
+ pname, param);
}
}
@@ -1956,15 +1964,16 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateInvalidateNamedFramebufferData(
- context, framebuffer, numAttachments, attachments));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateInvalidateNamedFramebufferData(context, framebufferPacked,
+ numAttachments, attachments));
if (isCallValid)
{
- context->invalidateNamedFramebufferData(framebuffer, numAttachments, attachments);
+ context->invalidateNamedFramebufferData(framebufferPacked, numAttachments, attachments);
}
- ANGLE_CAPTURE(InvalidateNamedFramebufferData, isCallValid, context, framebuffer,
+ ANGLE_CAPTURE(InvalidateNamedFramebufferData, isCallValid, context, framebufferPacked,
numAttachments, attachments);
}
}
@@ -1986,16 +1995,18 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid = (context->skipValidation() || ValidateInvalidateNamedFramebufferSubData(
- context, framebuffer, numAttachments,
- attachments, x, y, width, height));
+ bool isCallValid =
+ (context->skipValidation() ||
+ ValidateInvalidateNamedFramebufferSubData(context, framebufferPacked, numAttachments,
+ attachments, x, y, width, height));
if (isCallValid)
{
- context->invalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x,
- y, width, height);
+ context->invalidateNamedFramebufferSubData(framebufferPacked, numAttachments,
+ attachments, x, y, width, height);
}
- ANGLE_CAPTURE(InvalidateNamedFramebufferSubData, isCallValid, context, framebuffer,
+ ANGLE_CAPTURE(InvalidateNamedFramebufferSubData, isCallValid, context, framebufferPacked,
numAttachments, attachments, x, y, width, height);
}
}
@@ -2171,14 +2182,15 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
- ValidateNamedFramebufferDrawBuffer(context, framebuffer, buf));
+ ValidateNamedFramebufferDrawBuffer(context, framebufferPacked, buf));
if (isCallValid)
{
- context->namedFramebufferDrawBuffer(framebuffer, buf);
+ context->namedFramebufferDrawBuffer(framebufferPacked, buf);
}
- ANGLE_CAPTURE(NamedFramebufferDrawBuffer, isCallValid, context, framebuffer, buf);
+ ANGLE_CAPTURE(NamedFramebufferDrawBuffer, isCallValid, context, framebufferPacked, buf);
}
}
@@ -2193,14 +2205,16 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid = (context->skipValidation() ||
- ValidateNamedFramebufferDrawBuffers(context, framebuffer, n, bufs));
+ bool isCallValid = (context->skipValidation() || ValidateNamedFramebufferDrawBuffers(
+ context, framebufferPacked, n, bufs));
if (isCallValid)
{
- context->namedFramebufferDrawBuffers(framebuffer, n, bufs);
+ context->namedFramebufferDrawBuffers(framebufferPacked, n, bufs);
}
- ANGLE_CAPTURE(NamedFramebufferDrawBuffers, isCallValid, context, framebuffer, n, bufs);
+ ANGLE_CAPTURE(NamedFramebufferDrawBuffers, isCallValid, context, framebufferPacked, n,
+ bufs);
}
}
@@ -2214,14 +2228,17 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid = (context->skipValidation() ||
- ValidateNamedFramebufferParameteri(context, framebuffer, pname, param));
+ bool isCallValid =
+ (context->skipValidation() ||
+ ValidateNamedFramebufferParameteri(context, framebufferPacked, pname, param));
if (isCallValid)
{
- context->namedFramebufferParameteri(framebuffer, pname, param);
+ context->namedFramebufferParameteri(framebufferPacked, pname, param);
}
- ANGLE_CAPTURE(NamedFramebufferParameteri, isCallValid, context, framebuffer, pname, param);
+ ANGLE_CAPTURE(NamedFramebufferParameteri, isCallValid, context, framebufferPacked, pname,
+ param);
}
}
@@ -2233,14 +2250,15 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
- ValidateNamedFramebufferReadBuffer(context, framebuffer, src));
+ ValidateNamedFramebufferReadBuffer(context, framebufferPacked, src));
if (isCallValid)
{
- context->namedFramebufferReadBuffer(framebuffer, src);
+ context->namedFramebufferReadBuffer(framebufferPacked, src);
}
- ANGLE_CAPTURE(NamedFramebufferReadBuffer, isCallValid, context, framebuffer, src);
+ ANGLE_CAPTURE(NamedFramebufferReadBuffer, isCallValid, context, framebufferPacked, src);
}
}
@@ -2258,19 +2276,20 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
- ValidateNamedFramebufferRenderbuffer(context, framebuffer, attachment,
+ ValidateNamedFramebufferRenderbuffer(context, framebufferPacked, attachment,
renderbuffertarget, renderbufferPacked));
if (isCallValid)
{
- context->namedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget,
+ context->namedFramebufferRenderbuffer(framebufferPacked, attachment, renderbuffertarget,
renderbufferPacked);
}
- ANGLE_CAPTURE(NamedFramebufferRenderbuffer, isCallValid, context, framebuffer, attachment,
- renderbuffertarget, renderbufferPacked);
+ ANGLE_CAPTURE(NamedFramebufferRenderbuffer, isCallValid, context, framebufferPacked,
+ attachment, renderbuffertarget, renderbufferPacked);
}
}
@@ -2288,16 +2307,17 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
TextureID texturePacked = FromGL<TextureID>(texture);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
- ValidateNamedFramebufferTexture(context, framebuffer, attachment,
+ ValidateNamedFramebufferTexture(context, framebufferPacked, attachment,
texturePacked, level));
if (isCallValid)
{
- context->namedFramebufferTexture(framebuffer, attachment, texturePacked, level);
+ context->namedFramebufferTexture(framebufferPacked, attachment, texturePacked, level);
}
- ANGLE_CAPTURE(NamedFramebufferTexture, isCallValid, context, framebuffer, attachment,
+ ANGLE_CAPTURE(NamedFramebufferTexture, isCallValid, context, framebufferPacked, attachment,
texturePacked, level);
}
}
@@ -2317,18 +2337,19 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
TextureID texturePacked = FromGL<TextureID>(texture);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid = (context->skipValidation() ||
- ValidateNamedFramebufferTextureLayer(context, framebuffer, attachment,
- texturePacked, level, layer));
+ bool isCallValid = (context->skipValidation() || ValidateNamedFramebufferTextureLayer(
+ context, framebufferPacked, attachment,
+ texturePacked, level, layer));
if (isCallValid)
{
- context->namedFramebufferTextureLayer(framebuffer, attachment, texturePacked, level,
- layer);
+ context->namedFramebufferTextureLayer(framebufferPacked, attachment, texturePacked,
+ level, layer);
}
- ANGLE_CAPTURE(NamedFramebufferTextureLayer, isCallValid, context, framebuffer, attachment,
- texturePacked, level, layer);
+ ANGLE_CAPTURE(NamedFramebufferTextureLayer, isCallValid, context, framebufferPacked,
+ attachment, texturePacked, level, layer);
}
}
diff --git a/src/libGLESv2/entry_points_gles_2_0_autogen.cpp b/src/libGLESv2/entry_points_gles_2_0_autogen.cpp
index 87a88b4..2c0e9fb 100644
--- a/src/libGLESv2/entry_points_gles_2_0_autogen.cpp
+++ b/src/libGLESv2/entry_points_gles_2_0_autogen.cpp
@@ -111,14 +111,15 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateBindFramebuffer(context, target, framebuffer));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateBindFramebuffer(context, target, framebufferPacked));
if (isCallValid)
{
- context->bindFramebuffer(target, framebuffer);
+ context->bindFramebuffer(target, framebufferPacked);
}
- ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebuffer);
+ ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebufferPacked);
}
}
@@ -706,14 +707,15 @@
if (context)
{
+ const FramebufferID *framebuffersPacked = FromGL<const FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateDeleteFramebuffers(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateDeleteFramebuffers(context, n, framebuffersPacked));
if (isCallValid)
{
- context->deleteFramebuffers(n, framebuffers);
+ context->deleteFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffersPacked);
}
}
@@ -1131,14 +1133,15 @@
if (context)
{
+ FramebufferID *framebuffersPacked = FromGL<FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffers));
+ (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffersPacked));
if (isCallValid)
{
- context->genFramebuffers(n, framebuffers);
+ context->genFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffersPacked);
}
}
@@ -1919,18 +1922,19 @@
GLboolean returnValue;
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateIsFramebuffer(context, framebuffer));
+ (context->skipValidation() || ValidateIsFramebuffer(context, framebufferPacked));
if (isCallValid)
{
- returnValue = context->isFramebuffer(framebuffer);
+ returnValue = context->isFramebuffer(framebufferPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsFramebuffer, GLboolean>();
}
- ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebuffer, returnValue);
+ ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebufferPacked, returnValue);
}
else
{
diff --git a/src/libGLESv2/entry_points_gles_ext_autogen.cpp b/src/libGLESv2/entry_points_gles_ext_autogen.cpp
index e9338c7..ffd39aa 100644
--- a/src/libGLESv2/entry_points_gles_ext_autogen.cpp
+++ b/src/libGLESv2/entry_points_gles_ext_autogen.cpp
@@ -5673,14 +5673,15 @@
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateBindFramebufferOES(context, target, framebuffer));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateBindFramebufferOES(context, target, framebufferPacked));
if (isCallValid)
{
- context->bindFramebuffer(target, framebuffer);
+ context->bindFramebuffer(target, framebufferPacked);
}
- ANGLE_CAPTURE(BindFramebufferOES, isCallValid, context, target, framebuffer);
+ ANGLE_CAPTURE(BindFramebufferOES, isCallValid, context, target, framebufferPacked);
}
}
@@ -5742,14 +5743,15 @@
if (context)
{
+ const FramebufferID *framebuffersPacked = FromGL<const FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateDeleteFramebuffersOES(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateDeleteFramebuffersOES(context, n, framebuffersPacked));
if (isCallValid)
{
- context->deleteFramebuffers(n, framebuffers);
+ context->deleteFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(DeleteFramebuffersOES, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(DeleteFramebuffersOES, isCallValid, context, n, framebuffersPacked);
}
}
@@ -5846,14 +5848,15 @@
if (context)
{
+ FramebufferID *framebuffersPacked = FromGL<FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateGenFramebuffersOES(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateGenFramebuffersOES(context, n, framebuffersPacked));
if (isCallValid)
{
- context->genFramebuffers(n, framebuffers);
+ context->genFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(GenFramebuffersOES, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(GenFramebuffersOES, isCallValid, context, n, framebuffersPacked);
}
}
@@ -5956,18 +5959,19 @@
GLboolean returnValue;
if (context)
{
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateIsFramebufferOES(context, framebuffer));
+ (context->skipValidation() || ValidateIsFramebufferOES(context, framebufferPacked));
if (isCallValid)
{
- returnValue = context->isFramebuffer(framebuffer);
+ returnValue = context->isFramebuffer(framebufferPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsFramebufferOES, GLboolean>();
}
- ANGLE_CAPTURE(IsFramebufferOES, isCallValid, context, framebuffer, returnValue);
+ ANGLE_CAPTURE(IsFramebufferOES, isCallValid, context, framebufferPacked, returnValue);
}
else
{
@@ -7422,14 +7426,15 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateBindFramebuffer(context, target, framebuffer));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateBindFramebuffer(context, target, framebufferPacked));
if (isCallValid)
{
- context->bindFramebuffer(target, framebuffer);
+ context->bindFramebuffer(target, framebufferPacked);
}
- ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebuffer);
+ ANGLE_CAPTURE(BindFramebuffer, isCallValid, context, target, framebufferPacked);
}
}
@@ -7442,14 +7447,15 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateBindFramebufferOES(context, target, framebuffer));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateBindFramebufferOES(context, target, framebufferPacked));
if (isCallValid)
{
- context->bindFramebuffer(target, framebuffer);
+ context->bindFramebuffer(target, framebufferPacked);
}
- ANGLE_CAPTURE(BindFramebufferOES, isCallValid, context, target, framebuffer);
+ ANGLE_CAPTURE(BindFramebufferOES, isCallValid, context, target, framebufferPacked);
}
}
@@ -9201,14 +9207,15 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ const FramebufferID *framebuffersPacked = FromGL<const FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateDeleteFramebuffers(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateDeleteFramebuffers(context, n, framebuffersPacked));
if (isCallValid)
{
- context->deleteFramebuffers(n, framebuffers);
+ context->deleteFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(DeleteFramebuffers, isCallValid, context, n, framebuffersPacked);
}
}
@@ -9224,14 +9231,15 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ const FramebufferID *framebuffersPacked = FromGL<const FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateDeleteFramebuffersOES(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateDeleteFramebuffersOES(context, n, framebuffersPacked));
if (isCallValid)
{
- context->deleteFramebuffers(n, framebuffers);
+ context->deleteFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(DeleteFramebuffersOES, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(DeleteFramebuffersOES, isCallValid, context, n, framebuffersPacked);
}
}
@@ -11133,14 +11141,15 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ FramebufferID *framebuffersPacked = FromGL<FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffers));
+ (context->skipValidation() || ValidateGenFramebuffers(context, n, framebuffersPacked));
if (isCallValid)
{
- context->genFramebuffers(n, framebuffers);
+ context->genFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(GenFramebuffers, isCallValid, context, n, framebuffersPacked);
}
}
@@ -11154,14 +11163,15 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ FramebufferID *framebuffersPacked = FromGL<FramebufferID *>(framebuffers);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
- bool isCallValid =
- (context->skipValidation() || ValidateGenFramebuffersOES(context, n, framebuffers));
+ bool isCallValid = (context->skipValidation() ||
+ ValidateGenFramebuffersOES(context, n, framebuffersPacked));
if (isCallValid)
{
- context->genFramebuffers(n, framebuffers);
+ context->genFramebuffers(n, framebuffersPacked);
}
- ANGLE_CAPTURE(GenFramebuffersOES, isCallValid, context, n, framebuffers);
+ ANGLE_CAPTURE(GenFramebuffersOES, isCallValid, context, n, framebuffersPacked);
}
}
@@ -14593,18 +14603,19 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateIsFramebuffer(context, framebuffer));
+ (context->skipValidation() || ValidateIsFramebuffer(context, framebufferPacked));
if (isCallValid)
{
- returnValue = context->isFramebuffer(framebuffer);
+ returnValue = context->isFramebuffer(framebufferPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsFramebuffer, GLboolean>();
}
- ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebuffer, returnValue);
+ ANGLE_CAPTURE(IsFramebuffer, isCallValid, context, framebufferPacked, returnValue);
}
else
{
@@ -14622,18 +14633,19 @@
if (context)
{
ASSERT(context == GetValidGlobalContext());
+ FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
- (context->skipValidation() || ValidateIsFramebufferOES(context, framebuffer));
+ (context->skipValidation() || ValidateIsFramebufferOES(context, framebufferPacked));
if (isCallValid)
{
- returnValue = context->isFramebuffer(framebuffer);
+ returnValue = context->isFramebuffer(framebufferPacked);
}
else
{
returnValue = GetDefaultReturnValue<EntryPoint::IsFramebufferOES, GLboolean>();
}
- ANGLE_CAPTURE(IsFramebufferOES, isCallValid, context, framebuffer, returnValue);
+ ANGLE_CAPTURE(IsFramebufferOES, isCallValid, context, framebufferPacked, returnValue);
}
else
{