Commit 9deb3bfa by Jiacheng Lu Committed by Commit Bot

Use MemoryObjectID in place of GLuint handle

Bug: angleproject:3804 Change-Id: I7ca86089fe1e72c136c0fc1947ad43cecee122eb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769544 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent a3c7c2ff
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"scripts/egl_angle_ext.xml": "scripts/egl_angle_ext.xml":
"fc2e249239fb1365f6d145cdf1a3cfcf", "fc2e249239fb1365f6d145cdf1a3cfcf",
"scripts/entry_point_packed_gl_enums.json": "scripts/entry_point_packed_gl_enums.json":
"8451cf7defe0d98dac54fcbf37614e73", "2a487e33d95a56c409b1b9828fa0540e",
"scripts/generate_entry_points.py": "scripts/generate_entry_points.py":
"00dc8410ad87e122314ac58579445188", "00dc8410ad87e122314ac58579445188",
"scripts/gl.xml": "scripts/gl.xml":
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
"src/libANGLE/Context_gles_3_1_autogen.h": "src/libANGLE/Context_gles_3_1_autogen.h":
"8aef8ceb87eed9cc7e9586f6c98796e3", "8aef8ceb87eed9cc7e9586f6c98796e3",
"src/libANGLE/Context_gles_ext_autogen.h": "src/libANGLE/Context_gles_ext_autogen.h":
"c7176e590dfc07ec670f2cb678154789", "593b3d3d806e2e5a3d695c9753f22aa7",
"src/libANGLE/capture_gles_1_0_autogen.cpp": "src/libANGLE/capture_gles_1_0_autogen.cpp":
"f4e1335bebff584d2ac5198571b19972", "f4e1335bebff584d2ac5198571b19972",
"src/libANGLE/capture_gles_1_0_autogen.h": "src/libANGLE/capture_gles_1_0_autogen.h":
...@@ -80,9 +80,9 @@ ...@@ -80,9 +80,9 @@
"src/libANGLE/capture_gles_3_1_autogen.h": "src/libANGLE/capture_gles_3_1_autogen.h":
"389c0212c9d2da8bdc159aecee243551", "389c0212c9d2da8bdc159aecee243551",
"src/libANGLE/capture_gles_ext_autogen.cpp": "src/libANGLE/capture_gles_ext_autogen.cpp":
"efca1e085a34165f2ac13107d6778436", "43ac9f3e72fb3192a8ed6d2e429684ab",
"src/libANGLE/capture_gles_ext_autogen.h": "src/libANGLE/capture_gles_ext_autogen.h":
"7b955199f769acdbb9a37b4e2d22487e", "b615990d9059baff07d96ce39c2ca486",
"src/libANGLE/entry_points_enum_autogen.cpp": "src/libANGLE/entry_points_enum_autogen.cpp":
"97b5fe98b95b4ae36c68f723e64f993a", "97b5fe98b95b4ae36c68f723e64f993a",
"src/libANGLE/entry_points_enum_autogen.h": "src/libANGLE/entry_points_enum_autogen.h":
...@@ -90,9 +90,9 @@ ...@@ -90,9 +90,9 @@
"src/libANGLE/frame_capture_replay_autogen.cpp": "src/libANGLE/frame_capture_replay_autogen.cpp":
"00efb888e3ceff27fab7e9e85a497041", "00efb888e3ceff27fab7e9e85a497041",
"src/libANGLE/frame_capture_utils_autogen.cpp": "src/libANGLE/frame_capture_utils_autogen.cpp":
"0542fbffae8f723d49f5014ff2b12e49", "a10fb5ea447d2a82d84407a78ac46274",
"src/libANGLE/frame_capture_utils_autogen.h": "src/libANGLE/frame_capture_utils_autogen.h":
"594024324a582c72a4ba6f82ac4b8966", "5b19dd9bd714fb6dbcd5ac4ca4bf2bc5",
"src/libANGLE/validationES1_autogen.h": "src/libANGLE/validationES1_autogen.h":
"8d3131d2bf2e6f521f46b44e64a6bff9", "8d3131d2bf2e6f521f46b44e64a6bff9",
"src/libANGLE/validationES2_autogen.h": "src/libANGLE/validationES2_autogen.h":
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
"src/libANGLE/validationES3_autogen.h": "src/libANGLE/validationES3_autogen.h":
"c3142a7eb36b6f4f132e7a1f66e15459", "c3142a7eb36b6f4f132e7a1f66e15459",
"src/libANGLE/validationESEXT_autogen.h": "src/libANGLE/validationESEXT_autogen.h":
"63effdeb898b95959057c2e9c084cb28", "b4e3538e7d8d4e7e9ca3cf23aea96293",
"src/libANGLE/validationGL11_autogen.h": "src/libANGLE/validationGL11_autogen.h":
"c5ac1ca523a39df2621d11e92c9c821a", "c5ac1ca523a39df2621d11e92c9c821a",
"src/libANGLE/validationGL12_autogen.h": "src/libANGLE/validationGL12_autogen.h":
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
"src/libGLESv2/entry_points_gles_3_1_autogen.h": "src/libGLESv2/entry_points_gles_3_1_autogen.h":
"043d09a964c740067bf4279e0b544aed", "043d09a964c740067bf4279e0b544aed",
"src/libGLESv2/entry_points_gles_ext_autogen.cpp": "src/libGLESv2/entry_points_gles_ext_autogen.cpp":
"9f98d7515bb0794c89e4f8f3bef07942", "68680cde7f8d4602adfdb0d0cf62cd01",
"src/libGLESv2/entry_points_gles_ext_autogen.h": "src/libGLESv2/entry_points_gles_ext_autogen.h":
"fea36fa137e55dd2f244dbb49d31cc41", "fea36fa137e55dd2f244dbb49d31cc41",
"src/libGLESv2/libGLESv2_autogen.cpp": "src/libGLESv2/libGLESv2_autogen.cpp":
......
...@@ -68,7 +68,8 @@ ...@@ -68,7 +68,8 @@
"usage": "BufferUsage" "usage": "BufferUsage"
}, },
"glBufferStorageMem": { "glBufferStorageMem": {
"target": "TextureType" "target": "TextureType",
"memory": "MemoryObjectID"
}, },
"glBufferSubData": { "glBufferSubData": {
"target": "BufferBinding" "target": "BufferBinding"
...@@ -463,6 +464,7 @@ ...@@ -463,6 +464,7 @@
"texture": "TextureID" "texture": "TextureID"
}, },
"glImportMemoryFd": { "glImportMemoryFd": {
"memory": "MemoryObjectID",
"handleType": "HandleType" "handleType": "HandleType"
}, },
"glImportSemaphoreFd": { "glImportSemaphoreFd": {
...@@ -750,16 +752,20 @@ ...@@ -750,16 +752,20 @@
"target": "TextureType" "target": "TextureType"
}, },
"glTexStorageMem2D": { "glTexStorageMem2D": {
"target": "TextureType" "target": "TextureType",
"memory": "MemoryObjectID"
}, },
"glTexStorageMem2DMultisample": { "glTexStorageMem2DMultisample": {
"target": "TextureType" "target": "TextureType",
"memory": "MemoryObjectID"
}, },
"glTexStorageMem3D": { "glTexStorageMem3D": {
"target": "TextureType" "target": "TextureType",
"memory": "MemoryObjectID"
}, },
"glTexStorageMem3DMultisample": { "glTexStorageMem3DMultisample": {
"target": "TextureType" "target": "TextureType",
"memory": "MemoryObjectID"
}, },
"glTexSubImage2D": { "glTexSubImage2D": {
"target": "TextureTarget" "target": "TextureTarget"
...@@ -1529,5 +1535,20 @@ ...@@ -1529,5 +1535,20 @@
}, },
"glGetSemaphoreParameterui64v": { "glGetSemaphoreParameterui64v": {
"semaphore": "SemaphoreID" "semaphore": "SemaphoreID"
},
"glIsMemoryObject": {
"memoryObject": "MemoryObjectID"
},
"glDeleteMemoryObjects": {
"memoryObjects": "const MemoryObjectID *"
},
"glCreateMemoryObjects": {
"memoryObjects": "MemoryObjectID *"
},
"glMemoryObjectParameteriv": {
"memoryObject": "MemoryObjectID"
},
"glGetMemoryObjectParameteriv": {
"memoryObject": "MemoryObjectID"
} }
} }
...@@ -396,6 +396,11 @@ struct SemaphoreID ...@@ -396,6 +396,11 @@ struct SemaphoreID
GLuint value; GLuint value;
}; };
struct MemoryObjectID
{
GLuint value;
};
struct RenderbufferID struct RenderbufferID
{ {
GLuint value; GLuint value;
......
...@@ -745,7 +745,7 @@ GLuint Context::createShaderProgramv(ShaderType type, GLsizei count, const GLcha ...@@ -745,7 +745,7 @@ GLuint Context::createShaderProgramv(ShaderType type, GLsizei count, const GLcha
return 0u; return 0u;
} }
GLuint Context::createMemoryObject() MemoryObjectID Context::createMemoryObject()
{ {
return mState.mMemoryObjectManager->createMemoryObject(mImplementation.get()); return mState.mMemoryObjectManager->createMemoryObject(mImplementation.get());
} }
...@@ -815,7 +815,7 @@ void Context::deleteProgramPipeline(ProgramPipelineID pipeline) ...@@ -815,7 +815,7 @@ void Context::deleteProgramPipeline(ProgramPipelineID pipeline)
mState.mProgramPipelineManager->deleteObject(this, pipeline); mState.mProgramPipelineManager->deleteObject(this, pipeline);
} }
void Context::deleteMemoryObject(GLuint memoryObject) void Context::deleteMemoryObject(MemoryObjectID memoryObject)
{ {
mState.mMemoryObjectManager->deleteMemoryObject(this, memoryObject); mState.mMemoryObjectManager->deleteMemoryObject(this, memoryObject);
} }
...@@ -6127,7 +6127,7 @@ void Context::getProgramPipelineiv(ProgramPipelineID pipeline, GLenum pname, GLi ...@@ -6127,7 +6127,7 @@ void Context::getProgramPipelineiv(ProgramPipelineID pipeline, GLenum pname, GLi
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
MemoryObject *Context::getMemoryObject(GLuint handle) const MemoryObject *Context::getMemoryObject(MemoryObjectID handle) const
{ {
return mState.mMemoryObjectManager->getMemoryObject(handle); return mState.mMemoryObjectManager->getMemoryObject(handle);
} }
...@@ -7619,7 +7619,7 @@ GLboolean Context::testFenceNV(FenceNVID fence) ...@@ -7619,7 +7619,7 @@ GLboolean Context::testFenceNV(FenceNVID fence)
return result; return result;
} }
void Context::deleteMemoryObjects(GLsizei n, const GLuint *memoryObjects) void Context::deleteMemoryObjects(GLsizei n, const MemoryObjectID *memoryObjects)
{ {
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
{ {
...@@ -7627,9 +7627,9 @@ void Context::deleteMemoryObjects(GLsizei n, const GLuint *memoryObjects) ...@@ -7627,9 +7627,9 @@ void Context::deleteMemoryObjects(GLsizei n, const GLuint *memoryObjects)
} }
} }
GLboolean Context::isMemoryObject(GLuint memoryObject) GLboolean Context::isMemoryObject(MemoryObjectID memoryObject)
{ {
if (memoryObject == 0) if (memoryObject.value == 0)
{ {
return GL_FALSE; return GL_FALSE;
} }
...@@ -7637,7 +7637,7 @@ GLboolean Context::isMemoryObject(GLuint memoryObject) ...@@ -7637,7 +7637,7 @@ GLboolean Context::isMemoryObject(GLuint memoryObject)
return ConvertToGLBoolean(getMemoryObject(memoryObject)); return ConvertToGLBoolean(getMemoryObject(memoryObject));
} }
void Context::createMemoryObjects(GLsizei n, GLuint *memoryObjects) void Context::createMemoryObjects(GLsizei n, MemoryObjectID *memoryObjects)
{ {
for (int i = 0; i < n; i++) for (int i = 0; i < n; i++)
{ {
...@@ -7645,12 +7645,14 @@ void Context::createMemoryObjects(GLsizei n, GLuint *memoryObjects) ...@@ -7645,12 +7645,14 @@ void Context::createMemoryObjects(GLsizei n, GLuint *memoryObjects)
} }
} }
void Context::memoryObjectParameteriv(GLuint memoryObject, GLenum pname, const GLint *params) void Context::memoryObjectParameteriv(MemoryObjectID memoryObject,
GLenum pname,
const GLint *params)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void Context::getMemoryObjectParameteriv(GLuint memoryObject, GLenum pname, GLint *params) void Context::getMemoryObjectParameteriv(MemoryObjectID memoryObject, GLenum pname, GLint *params)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
...@@ -7660,7 +7662,7 @@ void Context::texStorageMem2D(TextureType target, ...@@ -7660,7 +7662,7 @@ void Context::texStorageMem2D(TextureType target,
GLenum internalFormat, GLenum internalFormat,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
MemoryObject *memoryObject = getMemoryObject(memory); MemoryObject *memoryObject = getMemoryObject(memory);
...@@ -7677,7 +7679,7 @@ void Context::texStorageMem2DMultisample(TextureType target, ...@@ -7677,7 +7679,7 @@ void Context::texStorageMem2DMultisample(TextureType target,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
...@@ -7689,7 +7691,7 @@ void Context::texStorageMem3D(TextureType target, ...@@ -7689,7 +7691,7 @@ void Context::texStorageMem3D(TextureType target,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
...@@ -7702,18 +7704,21 @@ void Context::texStorageMem3DMultisample(TextureType target, ...@@ -7702,18 +7704,21 @@ void Context::texStorageMem3DMultisample(TextureType target,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void Context::bufferStorageMem(TextureType target, GLsizeiptr size, GLuint memory, GLuint64 offset) void Context::bufferStorageMem(TextureType target,
GLsizeiptr size,
MemoryObjectID memory,
GLuint64 offset)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void Context::importMemoryFd(GLuint memory, GLuint64 size, HandleType handleType, GLint fd) void Context::importMemoryFd(MemoryObjectID memory, GLuint64 size, HandleType handleType, GLint fd)
{ {
MemoryObject *memoryObject = getMemoryObject(memory); MemoryObject *memoryObject = getMemoryObject(memory);
ASSERT(memoryObject != nullptr); ASSERT(memoryObject != nullptr);
......
...@@ -355,14 +355,14 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl ...@@ -355,14 +355,14 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
TextureID createTexture(); TextureID createTexture();
RenderbufferID createRenderbuffer(); RenderbufferID createRenderbuffer();
ProgramPipelineID createProgramPipeline(); ProgramPipelineID createProgramPipeline();
GLuint createMemoryObject(); MemoryObjectID createMemoryObject();
SemaphoreID createSemaphore(); SemaphoreID createSemaphore();
void deleteBuffer(BufferID buffer); void deleteBuffer(BufferID buffer);
void deleteTexture(TextureID texture); void deleteTexture(TextureID texture);
void deleteRenderbuffer(RenderbufferID renderbuffer); void deleteRenderbuffer(RenderbufferID renderbuffer);
void deleteProgramPipeline(ProgramPipelineID pipeline); void deleteProgramPipeline(ProgramPipelineID pipeline);
void deleteMemoryObject(GLuint memoryObject); void deleteMemoryObject(MemoryObjectID memoryObject);
void deleteSemaphore(SemaphoreID semaphore); void deleteSemaphore(SemaphoreID semaphore);
// CHROMIUM_path_rendering // CHROMIUM_path_rendering
...@@ -387,7 +387,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl ...@@ -387,7 +387,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
Query *getQuery(QueryID handle) const; Query *getQuery(QueryID handle) const;
TransformFeedback *getTransformFeedback(GLuint handle) const; TransformFeedback *getTransformFeedback(GLuint handle) const;
ProgramPipeline *getProgramPipeline(ProgramPipelineID handle) const; ProgramPipeline *getProgramPipeline(ProgramPipelineID handle) const;
MemoryObject *getMemoryObject(GLuint handle) const; MemoryObject *getMemoryObject(MemoryObjectID handle) const;
Semaphore *getSemaphore(SemaphoreID handle) const; Semaphore *getSemaphore(SemaphoreID handle) const;
Texture *getTextureByType(TextureType type) const; Texture *getTextureByType(TextureType type) const;
......
...@@ -329,29 +329,34 @@ ...@@ -329,29 +329,34 @@
/* GL_EXT_instanced_arrays */ \ /* GL_EXT_instanced_arrays */ \
/* GL_EXT_map_buffer_range */ \ /* GL_EXT_map_buffer_range */ \
/* GL_EXT_memory_object */ \ /* GL_EXT_memory_object */ \
void bufferStorageMem(TextureType targetPacked, GLsizeiptr size, GLuint memory, \ void bufferStorageMem(TextureType targetPacked, GLsizeiptr size, MemoryObjectID memoryPacked, \
GLuint64 offset); \ GLuint64 offset); \
void createMemoryObjects(GLsizei n, GLuint *memoryObjects); \ void createMemoryObjects(GLsizei n, MemoryObjectID *memoryObjectsPacked); \
void deleteMemoryObjects(GLsizei n, const GLuint *memoryObjects); \ void deleteMemoryObjects(GLsizei n, const MemoryObjectID *memoryObjectsPacked); \
void getMemoryObjectParameteriv(GLuint memoryObject, GLenum pname, GLint *params); \ void getMemoryObjectParameteriv(MemoryObjectID memoryObjectPacked, GLenum pname, \
GLint *params); \
void getUnsignedBytev(GLenum pname, GLubyte *data); \ void getUnsignedBytev(GLenum pname, GLubyte *data); \
void getUnsignedBytei_v(GLenum target, GLuint index, GLubyte *data); \ void getUnsignedBytei_v(GLenum target, GLuint index, GLubyte *data); \
GLboolean isMemoryObject(GLuint memoryObject); \ GLboolean isMemoryObject(MemoryObjectID memoryObjectPacked); \
void memoryObjectParameteriv(GLuint memoryObject, GLenum pname, const GLint *params); \ void memoryObjectParameteriv(MemoryObjectID memoryObjectPacked, GLenum pname, \
const GLint *params); \
void texStorageMem2D(TextureType targetPacked, GLsizei levels, GLenum internalFormat, \ void texStorageMem2D(TextureType targetPacked, GLsizei levels, GLenum internalFormat, \
GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); \ GLsizei width, GLsizei height, MemoryObjectID memoryPacked, \
void texStorageMem2DMultisample( \
TextureType targetPacked, GLsizei samples, GLenum internalFormat, GLsizei width, \
GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); \
void texStorageMem3D(TextureType targetPacked, GLsizei levels, GLenum internalFormat, \
GLsizei width, GLsizei height, GLsizei depth, GLuint memory, \
GLuint64 offset); \ GLuint64 offset); \
void texStorageMem3DMultisample(TextureType targetPacked, GLsizei samples, \ void texStorageMem2DMultisample(TextureType targetPacked, GLsizei samples, \
GLenum internalFormat, GLsizei width, GLsizei height, \ GLenum internalFormat, GLsizei width, GLsizei height, \
GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, \ GLboolean fixedSampleLocations, MemoryObjectID memoryPacked, \
GLuint64 offset); \ GLuint64 offset); \
void texStorageMem3D(TextureType targetPacked, GLsizei levels, GLenum internalFormat, \
GLsizei width, GLsizei height, GLsizei depth, \
MemoryObjectID memoryPacked, GLuint64 offset); \
void texStorageMem3DMultisample(TextureType targetPacked, GLsizei samples, \
GLenum internalFormat, GLsizei width, GLsizei height, \
GLsizei depth, GLboolean fixedSampleLocations, \
MemoryObjectID memoryPacked, GLuint64 offset); \
/* GL_EXT_memory_object_fd */ \ /* GL_EXT_memory_object_fd */ \
void importMemoryFd(GLuint memory, GLuint64 size, HandleType handleTypePacked, GLint fd); \ void importMemoryFd(MemoryObjectID memoryPacked, GLuint64 size, HandleType handleTypePacked, \
GLint fd); \
/* GL_EXT_occlusion_query_boolean */ \ /* GL_EXT_occlusion_query_boolean */ \
/* GL_EXT_robustness */ \ /* GL_EXT_robustness */ \
GLenum getGraphicsResetStatus(); \ GLenum getGraphicsResetStatus(); \
......
...@@ -882,6 +882,12 @@ void WriteParamValueToStream<ParamType::TSemaphoreID>(std::ostream &os, gl::Sema ...@@ -882,6 +882,12 @@ void WriteParamValueToStream<ParamType::TSemaphoreID>(std::ostream &os, gl::Sema
} }
template <> template <>
void WriteParamValueToStream<ParamType::TMemoryObjectID>(std::ostream &os, gl::MemoryObjectID value)
{
os << value.value;
}
template <>
void WriteParamValueToStream<ParamType::TRenderbufferID>(std::ostream &os, gl::RenderbufferID value) void WriteParamValueToStream<ParamType::TRenderbufferID>(std::ostream &os, gl::RenderbufferID value)
{ {
os << "gRenderbufferMap[" << value.value << "]"; os << "gRenderbufferMap[" << value.value << "]";
......
...@@ -277,6 +277,10 @@ template <> ...@@ -277,6 +277,10 @@ template <>
void WriteParamValueToStream<ParamType::TSemaphoreID>(std::ostream &os, gl::SemaphoreID value); void WriteParamValueToStream<ParamType::TSemaphoreID>(std::ostream &os, gl::SemaphoreID value);
template <> template <>
void WriteParamValueToStream<ParamType::TMemoryObjectID>(std::ostream &os,
gl::MemoryObjectID value);
template <>
void WriteParamValueToStream<ParamType::TRenderbufferID>(std::ostream &os, void WriteParamValueToStream<ParamType::TRenderbufferID>(std::ostream &os,
gl::RenderbufferID value); gl::RenderbufferID value);
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
namespace gl namespace gl
{ {
MemoryObject::MemoryObject(rx::GLImplFactory *factory, GLuint id) MemoryObject::MemoryObject(rx::GLImplFactory *factory, MemoryObjectID id)
: RefCountObject(id), mImplementation(factory->createMemoryObject()) : RefCountObject(id.value), mImplementation(factory->createMemoryObject())
{} {}
MemoryObject::~MemoryObject() {} MemoryObject::~MemoryObject() {}
......
...@@ -27,7 +27,7 @@ class Context; ...@@ -27,7 +27,7 @@ class Context;
class MemoryObject final : public RefCountObject class MemoryObject final : public RefCountObject
{ {
public: public:
MemoryObject(rx::GLImplFactory *factory, GLuint id); MemoryObject(rx::GLImplFactory *factory, MemoryObjectID id);
~MemoryObject() override; ~MemoryObject() override;
void onDestroy(const Context *context) override; void onDestroy(const Context *context) override;
......
...@@ -506,21 +506,21 @@ void MemoryObjectManager::reset(const Context *context) ...@@ -506,21 +506,21 @@ void MemoryObjectManager::reset(const Context *context)
{ {
while (!mMemoryObjects.empty()) while (!mMemoryObjects.empty())
{ {
deleteMemoryObject(context, mMemoryObjects.begin()->first); deleteMemoryObject(context, {mMemoryObjects.begin()->first});
} }
mMemoryObjects.clear(); mMemoryObjects.clear();
} }
GLuint MemoryObjectManager::createMemoryObject(rx::GLImplFactory *factory) MemoryObjectID MemoryObjectManager::createMemoryObject(rx::GLImplFactory *factory)
{ {
GLuint handle = mHandleAllocator.allocate(); MemoryObjectID handle = MemoryObjectID{mHandleAllocator.allocate()};
MemoryObject *memoryObject = new MemoryObject(factory, handle); MemoryObject *memoryObject = new MemoryObject(factory, handle);
memoryObject->addRef(); memoryObject->addRef();
mMemoryObjects.assign(handle, memoryObject); mMemoryObjects.assign(handle, memoryObject);
return handle; return handle;
} }
void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint handle) void MemoryObjectManager::deleteMemoryObject(const Context *context, MemoryObjectID handle)
{ {
MemoryObject *memoryObject = nullptr; MemoryObject *memoryObject = nullptr;
if (!mMemoryObjects.erase(handle, &memoryObject)) if (!mMemoryObjects.erase(handle, &memoryObject))
...@@ -529,7 +529,7 @@ void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint hand ...@@ -529,7 +529,7 @@ void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint hand
} }
// Requires an explicit this-> because of C++ template rules. // Requires an explicit this-> because of C++ template rules.
this->mHandleAllocator.release(handle); this->mHandleAllocator.release(handle.value);
if (memoryObject) if (memoryObject)
{ {
...@@ -537,7 +537,7 @@ void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint hand ...@@ -537,7 +537,7 @@ void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint hand
} }
} }
MemoryObject *MemoryObjectManager::getMemoryObject(GLuint handle) const MemoryObject *MemoryObjectManager::getMemoryObject(MemoryObjectID handle) const
{ {
return mMemoryObjects.query(handle); return mMemoryObjects.query(handle);
} }
......
...@@ -328,9 +328,9 @@ class MemoryObjectManager : public ResourceManagerBase<HandleAllocator> ...@@ -328,9 +328,9 @@ class MemoryObjectManager : public ResourceManagerBase<HandleAllocator>
public: public:
MemoryObjectManager(); MemoryObjectManager();
GLuint createMemoryObject(rx::GLImplFactory *factory); MemoryObjectID createMemoryObject(rx::GLImplFactory *factory);
void deleteMemoryObject(const Context *context, GLuint handle); void deleteMemoryObject(const Context *context, MemoryObjectID handle);
MemoryObject *getMemoryObject(GLuint handle) const; MemoryObject *getMemoryObject(MemoryObjectID handle) const;
protected: protected:
~MemoryObjectManager() override; ~MemoryObjectManager() override;
...@@ -338,7 +338,7 @@ class MemoryObjectManager : public ResourceManagerBase<HandleAllocator> ...@@ -338,7 +338,7 @@ class MemoryObjectManager : public ResourceManagerBase<HandleAllocator>
private: private:
void reset(const Context *context) override; void reset(const Context *context) override;
ResourceMap<MemoryObject> mMemoryObjects; ResourceMap<MemoryObject, MemoryObjectID> mMemoryObjects;
}; };
class SemaphoreManager : public ResourceManagerBase<HandleAllocator> class SemaphoreManager : public ResourceManagerBase<HandleAllocator>
......
...@@ -1081,19 +1081,19 @@ angle::CallCapture CaptureBufferStorageMemEXT(const Context *context, ...@@ -1081,19 +1081,19 @@ angle::CallCapture CaptureBufferStorageMemEXT(const Context *context,
bool isCallValid, bool isCallValid,
TextureType targetPacked, TextureType targetPacked,
GLsizeiptr size, GLsizeiptr size,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
angle::CallCapture CaptureCreateMemoryObjectsEXT(const Context *context, angle::CallCapture CaptureCreateMemoryObjectsEXT(const Context *context,
bool isCallValid, bool isCallValid,
GLsizei n, GLsizei n,
GLuint *memoryObjects); MemoryObjectID *memoryObjectsPacked);
angle::CallCapture CaptureDeleteMemoryObjectsEXT(const Context *context, angle::CallCapture CaptureDeleteMemoryObjectsEXT(const Context *context,
bool isCallValid, bool isCallValid,
GLsizei n, GLsizei n,
const GLuint *memoryObjects); const MemoryObjectID *memoryObjectsPacked);
angle::CallCapture CaptureGetMemoryObjectParameterivEXT(const Context *context, angle::CallCapture CaptureGetMemoryObjectParameterivEXT(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLenum pname, GLenum pname,
GLint *params); GLint *params);
angle::CallCapture CaptureGetUnsignedBytevEXT(const Context *context, angle::CallCapture CaptureGetUnsignedBytevEXT(const Context *context,
...@@ -1107,11 +1107,11 @@ angle::CallCapture CaptureGetUnsignedBytei_vEXT(const Context *context, ...@@ -1107,11 +1107,11 @@ angle::CallCapture CaptureGetUnsignedBytei_vEXT(const Context *context,
GLubyte *data); GLubyte *data);
angle::CallCapture CaptureIsMemoryObjectEXT(const Context *context, angle::CallCapture CaptureIsMemoryObjectEXT(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLboolean returnValue); GLboolean returnValue);
angle::CallCapture CaptureMemoryObjectParameterivEXT(const Context *context, angle::CallCapture CaptureMemoryObjectParameterivEXT(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLenum pname, GLenum pname,
const GLint *params); const GLint *params);
angle::CallCapture CaptureTexStorageMem2DEXT(const Context *context, angle::CallCapture CaptureTexStorageMem2DEXT(const Context *context,
...@@ -1121,7 +1121,7 @@ angle::CallCapture CaptureTexStorageMem2DEXT(const Context *context, ...@@ -1121,7 +1121,7 @@ angle::CallCapture CaptureTexStorageMem2DEXT(const Context *context,
GLenum internalFormat, GLenum internalFormat,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
angle::CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context, angle::CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context,
bool isCallValid, bool isCallValid,
...@@ -1131,7 +1131,7 @@ angle::CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context, ...@@ -1131,7 +1131,7 @@ angle::CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
angle::CallCapture CaptureTexStorageMem3DEXT(const Context *context, angle::CallCapture CaptureTexStorageMem3DEXT(const Context *context,
bool isCallValid, bool isCallValid,
...@@ -1141,7 +1141,7 @@ angle::CallCapture CaptureTexStorageMem3DEXT(const Context *context, ...@@ -1141,7 +1141,7 @@ angle::CallCapture CaptureTexStorageMem3DEXT(const Context *context,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
angle::CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context, angle::CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
bool isCallValid, bool isCallValid,
...@@ -1152,13 +1152,13 @@ angle::CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context, ...@@ -1152,13 +1152,13 @@ angle::CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
// GL_EXT_memory_object_fd // GL_EXT_memory_object_fd
angle::CallCapture CaptureImportMemoryFdEXT(const Context *context, angle::CallCapture CaptureImportMemoryFdEXT(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 size, GLuint64 size,
HandleType handleTypePacked, HandleType handleTypePacked,
GLint fd); GLint fd);
...@@ -3287,19 +3287,19 @@ void CaptureDrawElementsInstancedEXT_indices(const Context *context, ...@@ -3287,19 +3287,19 @@ void CaptureDrawElementsInstancedEXT_indices(const Context *context,
const void *indices, const void *indices,
GLsizei primcount, GLsizei primcount,
angle::ParamCapture *paramCapture); angle::ParamCapture *paramCapture);
void CaptureCreateMemoryObjectsEXT_memoryObjects(const Context *context, void CaptureCreateMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
bool isCallValid, bool isCallValid,
GLsizei n, GLsizei n,
GLuint *memoryObjects, MemoryObjectID *memoryObjectsPacked,
angle::ParamCapture *paramCapture); angle::ParamCapture *paramCapture);
void CaptureDeleteMemoryObjectsEXT_memoryObjects(const Context *context, void CaptureDeleteMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
bool isCallValid, bool isCallValid,
GLsizei n, GLsizei n,
const GLuint *memoryObjects, const MemoryObjectID *memoryObjectsPacked,
angle::ParamCapture *paramCapture); angle::ParamCapture *paramCapture);
void CaptureGetMemoryObjectParameterivEXT_params(const Context *context, void CaptureGetMemoryObjectParameterivEXT_params(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLenum pname, GLenum pname,
GLint *params, GLint *params,
angle::ParamCapture *paramCapture); angle::ParamCapture *paramCapture);
...@@ -3316,7 +3316,7 @@ void CaptureGetUnsignedBytei_vEXT_data(const Context *context, ...@@ -3316,7 +3316,7 @@ void CaptureGetUnsignedBytei_vEXT_data(const Context *context,
angle::ParamCapture *paramCapture); angle::ParamCapture *paramCapture);
void CaptureMemoryObjectParameterivEXT_params(const Context *context, void CaptureMemoryObjectParameterivEXT_params(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLenum pname, GLenum pname,
const GLint *params, const GLint *params,
angle::ParamCapture *paramCapture); angle::ParamCapture *paramCapture);
......
...@@ -2260,27 +2260,27 @@ void CaptureDrawElementsInstancedEXT_indices(const Context *context, ...@@ -2260,27 +2260,27 @@ void CaptureDrawElementsInstancedEXT_indices(const Context *context,
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void CaptureCreateMemoryObjectsEXT_memoryObjects(const Context *context, void CaptureCreateMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
bool isCallValid, bool isCallValid,
GLsizei n, GLsizei n,
GLuint *memoryObjects, MemoryObjectID *memoryObjects,
ParamCapture *paramCapture) ParamCapture *paramCapture)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void CaptureDeleteMemoryObjectsEXT_memoryObjects(const Context *context, void CaptureDeleteMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
bool isCallValid, bool isCallValid,
GLsizei n, GLsizei n,
const GLuint *memoryObjects, const MemoryObjectID *memoryObjects,
ParamCapture *paramCapture) ParamCapture *paramCapture)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void CaptureGetMemoryObjectParameterivEXT_params(const Context *context, void CaptureGetMemoryObjectParameterivEXT_params(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObject,
GLenum pname, GLenum pname,
GLint *params, GLint *params,
ParamCapture *paramCapture) ParamCapture *paramCapture)
...@@ -2309,7 +2309,7 @@ void CaptureGetUnsignedBytei_vEXT_data(const Context *context, ...@@ -2309,7 +2309,7 @@ void CaptureGetUnsignedBytei_vEXT_data(const Context *context,
void CaptureMemoryObjectParameterivEXT_params(const Context *context, void CaptureMemoryObjectParameterivEXT_params(const Context *context,
bool isCallValid, bool isCallValid,
GLuint memoryObject, MemoryObjectID memoryObject,
GLenum pname, GLenum pname,
const GLint *params, const GLint *params,
ParamCapture *paramCapture) ParamCapture *paramCapture)
......
...@@ -270,6 +270,17 @@ void WriteParamTypeToStream(std::ostream &os, ParamType paramType, const ParamVa ...@@ -270,6 +270,17 @@ void WriteParamTypeToStream(std::ostream &os, ParamType paramType, const ParamVa
case ParamType::TMatrixType: case ParamType::TMatrixType:
WriteParamValueToStream<ParamType::TMatrixType>(os, paramValue.MatrixTypeVal); WriteParamValueToStream<ParamType::TMatrixType>(os, paramValue.MatrixTypeVal);
break; break;
case ParamType::TMemoryObjectID:
WriteParamValueToStream<ParamType::TMemoryObjectID>(os, paramValue.MemoryObjectIDVal);
break;
case ParamType::TMemoryObjectIDConstPointer:
WriteParamValueToStream<ParamType::TMemoryObjectIDConstPointer>(
os, paramValue.MemoryObjectIDConstPointerVal);
break;
case ParamType::TMemoryObjectIDPointer:
WriteParamValueToStream<ParamType::TMemoryObjectIDPointer>(
os, paramValue.MemoryObjectIDPointerVal);
break;
case ParamType::TPathID: case ParamType::TPathID:
WriteParamValueToStream<ParamType::TPathID>(os, paramValue.PathIDVal); WriteParamValueToStream<ParamType::TPathID>(os, paramValue.PathIDVal);
break; break;
...@@ -560,6 +571,12 @@ const char *ParamTypeToString(ParamType paramType) ...@@ -560,6 +571,12 @@ const char *ParamTypeToString(ParamType paramType)
return "GLenum"; return "GLenum";
case ParamType::TMatrixType: case ParamType::TMatrixType:
return "GLenum"; return "GLenum";
case ParamType::TMemoryObjectID:
return "GLuint";
case ParamType::TMemoryObjectIDConstPointer:
return "const GLuint *";
case ParamType::TMemoryObjectIDPointer:
return "GLuint *";
case ParamType::TPathID: case ParamType::TPathID:
return "GLuint"; return "GLuint";
case ParamType::TPointParameter: case ParamType::TPointParameter:
......
...@@ -91,6 +91,9 @@ enum class ParamType ...@@ -91,6 +91,9 @@ enum class ParamType
TLogicalOperation, TLogicalOperation,
TMaterialParameter, TMaterialParameter,
TMatrixType, TMatrixType,
TMemoryObjectID,
TMemoryObjectIDConstPointer,
TMemoryObjectIDPointer,
TPathID, TPathID,
TPointParameter, TPointParameter,
TPrimitiveMode, TPrimitiveMode,
...@@ -206,6 +209,9 @@ union ParamValue ...@@ -206,6 +209,9 @@ union ParamValue
gl::LogicalOperation LogicalOperationVal; gl::LogicalOperation LogicalOperationVal;
gl::MaterialParameter MaterialParameterVal; gl::MaterialParameter MaterialParameterVal;
gl::MatrixType MatrixTypeVal; gl::MatrixType MatrixTypeVal;
gl::MemoryObjectID MemoryObjectIDVal;
const gl::MemoryObjectID *MemoryObjectIDConstPointerVal;
gl::MemoryObjectID *MemoryObjectIDPointerVal;
gl::PathID PathIDVal; gl::PathID PathIDVal;
gl::PointParameter PointParameterVal; gl::PointParameter PointParameterVal;
gl::PrimitiveMode PrimitiveModeVal; gl::PrimitiveMode PrimitiveModeVal;
...@@ -730,6 +736,27 @@ inline gl::MatrixType GetParamVal<ParamType::TMatrixType, gl::MatrixType>(const ...@@ -730,6 +736,27 @@ inline gl::MatrixType GetParamVal<ParamType::TMatrixType, gl::MatrixType>(const
} }
template <> template <>
inline gl::MemoryObjectID GetParamVal<ParamType::TMemoryObjectID, gl::MemoryObjectID>(
const ParamValue &value)
{
return value.MemoryObjectIDVal;
}
template <>
inline const gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDConstPointer,
const gl::MemoryObjectID *>(const ParamValue &value)
{
return value.MemoryObjectIDConstPointerVal;
}
template <>
inline gl::MemoryObjectID *GetParamVal<ParamType::TMemoryObjectIDPointer, gl::MemoryObjectID *>(
const ParamValue &value)
{
return value.MemoryObjectIDPointerVal;
}
template <>
inline gl::PathID GetParamVal<ParamType::TPathID, gl::PathID>(const ParamValue &value) inline gl::PathID GetParamVal<ParamType::TPathID, gl::PathID>(const ParamValue &value)
{ {
return value.PathIDVal; return value.PathIDVal;
...@@ -1140,6 +1167,12 @@ T AccessParamValue(ParamType paramType, const ParamValue &value) ...@@ -1140,6 +1167,12 @@ T AccessParamValue(ParamType paramType, const ParamValue &value)
return GetParamVal<ParamType::TMaterialParameter, T>(value); return GetParamVal<ParamType::TMaterialParameter, T>(value);
case ParamType::TMatrixType: case ParamType::TMatrixType:
return GetParamVal<ParamType::TMatrixType, T>(value); return GetParamVal<ParamType::TMatrixType, T>(value);
case ParamType::TMemoryObjectID:
return GetParamVal<ParamType::TMemoryObjectID, T>(value);
case ParamType::TMemoryObjectIDConstPointer:
return GetParamVal<ParamType::TMemoryObjectIDConstPointer, T>(value);
case ParamType::TMemoryObjectIDPointer:
return GetParamVal<ParamType::TMemoryObjectIDPointer, T>(value);
case ParamType::TPathID: case ParamType::TPathID:
return GetParamVal<ParamType::TPathID, T>(value); return GetParamVal<ParamType::TPathID, T>(value);
case ParamType::TPointParameter: case ParamType::TPointParameter:
...@@ -1688,6 +1721,27 @@ inline void SetParamVal<ParamType::TMatrixType>(gl::MatrixType valueIn, ParamVal ...@@ -1688,6 +1721,27 @@ inline void SetParamVal<ParamType::TMatrixType>(gl::MatrixType valueIn, ParamVal
} }
template <> template <>
inline void SetParamVal<ParamType::TMemoryObjectID>(gl::MemoryObjectID valueIn,
ParamValue *valueOut)
{
valueOut->MemoryObjectIDVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TMemoryObjectIDConstPointer>(const gl::MemoryObjectID *valueIn,
ParamValue *valueOut)
{
valueOut->MemoryObjectIDConstPointerVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TMemoryObjectIDPointer>(gl::MemoryObjectID *valueIn,
ParamValue *valueOut)
{
valueOut->MemoryObjectIDPointerVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TPathID>(gl::PathID valueIn, ParamValue *valueOut) inline void SetParamVal<ParamType::TPathID>(gl::PathID valueIn, ParamValue *valueOut)
{ {
valueOut->PathIDVal = valueIn; valueOut->PathIDVal = valueIn;
...@@ -2164,6 +2218,15 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut) ...@@ -2164,6 +2218,15 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
case ParamType::TMatrixType: case ParamType::TMatrixType:
SetParamVal<ParamType::TMatrixType>(valueIn, valueOut); SetParamVal<ParamType::TMatrixType>(valueIn, valueOut);
break; break;
case ParamType::TMemoryObjectID:
SetParamVal<ParamType::TMemoryObjectID>(valueIn, valueOut);
break;
case ParamType::TMemoryObjectIDConstPointer:
SetParamVal<ParamType::TMemoryObjectIDConstPointer>(valueIn, valueOut);
break;
case ParamType::TMemoryObjectIDPointer:
SetParamVal<ParamType::TMemoryObjectIDPointer>(valueIn, valueOut);
break;
case ParamType::TPathID: case ParamType::TPathID:
SetParamVal<ParamType::TPathID>(valueIn, valueOut); SetParamVal<ParamType::TPathID>(valueIn, valueOut);
break; break;
......
...@@ -3230,7 +3230,7 @@ bool ValidateMapBufferRangeEXT(Context *context, ...@@ -3230,7 +3230,7 @@ bool ValidateMapBufferRangeEXT(Context *context,
bool ValidateBufferStorageMemEXT(Context *context, bool ValidateBufferStorageMemEXT(Context *context,
TextureType target, TextureType target,
GLsizeiptr size, GLsizeiptr size,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
...@@ -3243,7 +3243,7 @@ bool ValidateBufferStorageMemEXT(Context *context, ...@@ -3243,7 +3243,7 @@ bool ValidateBufferStorageMemEXT(Context *context,
return false; return false;
} }
bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryObjects) bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, MemoryObjectID *memoryObjects)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
{ {
...@@ -3254,7 +3254,9 @@ bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryO ...@@ -3254,7 +3254,9 @@ bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryO
return ValidateGenOrDelete(context, n); return ValidateGenOrDelete(context, n);
} }
bool ValidateDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *memoryObjects) bool ValidateDeleteMemoryObjectsEXT(Context *context,
GLsizei n,
const MemoryObjectID *memoryObjects)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
{ {
...@@ -3266,7 +3268,7 @@ bool ValidateDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *m ...@@ -3266,7 +3268,7 @@ bool ValidateDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *m
} }
bool ValidateGetMemoryObjectParameterivEXT(Context *context, bool ValidateGetMemoryObjectParameterivEXT(Context *context,
GLuint memoryObject, MemoryObjectID memoryObject,
GLenum pname, GLenum pname,
GLint *params) GLint *params)
{ {
...@@ -3304,7 +3306,7 @@ bool ValidateGetUnsignedBytei_vEXT(Context *context, GLenum target, GLuint index ...@@ -3304,7 +3306,7 @@ bool ValidateGetUnsignedBytei_vEXT(Context *context, GLenum target, GLuint index
return false; return false;
} }
bool ValidateIsMemoryObjectEXT(Context *context, GLuint memoryObject) bool ValidateIsMemoryObjectEXT(Context *context, MemoryObjectID memoryObject)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
{ {
...@@ -3316,7 +3318,7 @@ bool ValidateIsMemoryObjectEXT(Context *context, GLuint memoryObject) ...@@ -3316,7 +3318,7 @@ bool ValidateIsMemoryObjectEXT(Context *context, GLuint memoryObject)
} }
bool ValidateMemoryObjectParameterivEXT(Context *context, bool ValidateMemoryObjectParameterivEXT(Context *context,
GLuint memoryObject, MemoryObjectID memoryObject,
GLenum pname, GLenum pname,
const GLint *params) const GLint *params)
{ {
...@@ -3336,7 +3338,7 @@ bool ValidateTexStorageMem2DEXT(Context *context, ...@@ -3336,7 +3338,7 @@ bool ValidateTexStorageMem2DEXT(Context *context,
GLenum internalFormat, GLenum internalFormat,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
...@@ -3363,7 +3365,7 @@ bool ValidateTexStorageMem3DEXT(Context *context, ...@@ -3363,7 +3365,7 @@ bool ValidateTexStorageMem3DEXT(Context *context,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
...@@ -3377,7 +3379,7 @@ bool ValidateTexStorageMem3DEXT(Context *context, ...@@ -3377,7 +3379,7 @@ bool ValidateTexStorageMem3DEXT(Context *context,
} }
bool ValidateImportMemoryFdEXT(Context *context, bool ValidateImportMemoryFdEXT(Context *context,
GLuint memory, MemoryObjectID memory,
GLuint64 size, GLuint64 size,
HandleType handleType, HandleType handleType,
GLint fd) GLint fd)
......
...@@ -949,7 +949,7 @@ bool ValidateTexStorageMem2DMultisampleEXT(Context *context, ...@@ -949,7 +949,7 @@ bool ValidateTexStorageMem2DMultisampleEXT(Context *context,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
...@@ -1898,7 +1898,7 @@ bool ValidateTexStorageMem3DMultisampleEXT(Context *context, ...@@ -1898,7 +1898,7 @@ bool ValidateTexStorageMem3DMultisampleEXT(Context *context,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memory,
GLuint64 offset) GLuint64 offset)
{ {
if (!context->getExtensions().memoryObject) if (!context->getExtensions().memoryObject)
......
...@@ -868,19 +868,23 @@ bool ValidateMapBufferRangeEXT(Context *context, ...@@ -868,19 +868,23 @@ bool ValidateMapBufferRangeEXT(Context *context,
bool ValidateBufferStorageMemEXT(Context *context, bool ValidateBufferStorageMemEXT(Context *context,
TextureType targetPacked, TextureType targetPacked,
GLsizeiptr size, GLsizeiptr size,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryObjects); bool ValidateCreateMemoryObjectsEXT(Context *context,
bool ValidateDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *memoryObjects); GLsizei n,
MemoryObjectID *memoryObjectsPacked);
bool ValidateDeleteMemoryObjectsEXT(Context *context,
GLsizei n,
const MemoryObjectID *memoryObjectsPacked);
bool ValidateGetMemoryObjectParameterivEXT(Context *context, bool ValidateGetMemoryObjectParameterivEXT(Context *context,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLenum pname, GLenum pname,
GLint *params); GLint *params);
bool ValidateGetUnsignedBytevEXT(Context *context, GLenum pname, GLubyte *data); bool ValidateGetUnsignedBytevEXT(Context *context, GLenum pname, GLubyte *data);
bool ValidateGetUnsignedBytei_vEXT(Context *context, GLenum target, GLuint index, GLubyte *data); bool ValidateGetUnsignedBytei_vEXT(Context *context, GLenum target, GLuint index, GLubyte *data);
bool ValidateIsMemoryObjectEXT(Context *context, GLuint memoryObject); bool ValidateIsMemoryObjectEXT(Context *context, MemoryObjectID memoryObjectPacked);
bool ValidateMemoryObjectParameterivEXT(Context *context, bool ValidateMemoryObjectParameterivEXT(Context *context,
GLuint memoryObject, MemoryObjectID memoryObjectPacked,
GLenum pname, GLenum pname,
const GLint *params); const GLint *params);
bool ValidateTexStorageMem2DEXT(Context *context, bool ValidateTexStorageMem2DEXT(Context *context,
...@@ -889,7 +893,7 @@ bool ValidateTexStorageMem2DEXT(Context *context, ...@@ -889,7 +893,7 @@ bool ValidateTexStorageMem2DEXT(Context *context,
GLenum internalFormat, GLenum internalFormat,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
bool ValidateTexStorageMem2DMultisampleEXT(Context *context, bool ValidateTexStorageMem2DMultisampleEXT(Context *context,
TextureType targetPacked, TextureType targetPacked,
...@@ -898,7 +902,7 @@ bool ValidateTexStorageMem2DMultisampleEXT(Context *context, ...@@ -898,7 +902,7 @@ bool ValidateTexStorageMem2DMultisampleEXT(Context *context,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
bool ValidateTexStorageMem3DEXT(Context *context, bool ValidateTexStorageMem3DEXT(Context *context,
TextureType targetPacked, TextureType targetPacked,
...@@ -907,7 +911,7 @@ bool ValidateTexStorageMem3DEXT(Context *context, ...@@ -907,7 +911,7 @@ bool ValidateTexStorageMem3DEXT(Context *context,
GLsizei width, GLsizei width,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
bool ValidateTexStorageMem3DMultisampleEXT(Context *context, bool ValidateTexStorageMem3DMultisampleEXT(Context *context,
TextureType targetPacked, TextureType targetPacked,
...@@ -917,12 +921,12 @@ bool ValidateTexStorageMem3DMultisampleEXT(Context *context, ...@@ -917,12 +921,12 @@ bool ValidateTexStorageMem3DMultisampleEXT(Context *context,
GLsizei height, GLsizei height,
GLsizei depth, GLsizei depth,
GLboolean fixedSampleLocations, GLboolean fixedSampleLocations,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 offset); GLuint64 offset);
// GL_EXT_memory_object_fd // GL_EXT_memory_object_fd
bool ValidateImportMemoryFdEXT(Context *context, bool ValidateImportMemoryFdEXT(Context *context,
GLuint memory, MemoryObjectID memoryPacked,
GLuint64 size, GLuint64 size,
HandleType handleTypePacked, HandleType handleTypePacked,
GLint fd); GLint fd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment