зеркало из https://github.com/AvaloniaUI/angle.git
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: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
a3c7c2ff6a
Коммит
9deb3bfaa1
|
@ -4,7 +4,7 @@
|
|||
"scripts/egl_angle_ext.xml":
|
||||
"fc2e249239fb1365f6d145cdf1a3cfcf",
|
||||
"scripts/entry_point_packed_gl_enums.json":
|
||||
"8451cf7defe0d98dac54fcbf37614e73",
|
||||
"2a487e33d95a56c409b1b9828fa0540e",
|
||||
"scripts/generate_entry_points.py":
|
||||
"00dc8410ad87e122314ac58579445188",
|
||||
"scripts/gl.xml":
|
||||
|
@ -62,7 +62,7 @@
|
|||
"src/libANGLE/Context_gles_3_1_autogen.h":
|
||||
"8aef8ceb87eed9cc7e9586f6c98796e3",
|
||||
"src/libANGLE/Context_gles_ext_autogen.h":
|
||||
"c7176e590dfc07ec670f2cb678154789",
|
||||
"593b3d3d806e2e5a3d695c9753f22aa7",
|
||||
"src/libANGLE/capture_gles_1_0_autogen.cpp":
|
||||
"f4e1335bebff584d2ac5198571b19972",
|
||||
"src/libANGLE/capture_gles_1_0_autogen.h":
|
||||
|
@ -80,9 +80,9 @@
|
|||
"src/libANGLE/capture_gles_3_1_autogen.h":
|
||||
"389c0212c9d2da8bdc159aecee243551",
|
||||
"src/libANGLE/capture_gles_ext_autogen.cpp":
|
||||
"efca1e085a34165f2ac13107d6778436",
|
||||
"43ac9f3e72fb3192a8ed6d2e429684ab",
|
||||
"src/libANGLE/capture_gles_ext_autogen.h":
|
||||
"7b955199f769acdbb9a37b4e2d22487e",
|
||||
"b615990d9059baff07d96ce39c2ca486",
|
||||
"src/libANGLE/entry_points_enum_autogen.cpp":
|
||||
"97b5fe98b95b4ae36c68f723e64f993a",
|
||||
"src/libANGLE/entry_points_enum_autogen.h":
|
||||
|
@ -90,9 +90,9 @@
|
|||
"src/libANGLE/frame_capture_replay_autogen.cpp":
|
||||
"00efb888e3ceff27fab7e9e85a497041",
|
||||
"src/libANGLE/frame_capture_utils_autogen.cpp":
|
||||
"0542fbffae8f723d49f5014ff2b12e49",
|
||||
"a10fb5ea447d2a82d84407a78ac46274",
|
||||
"src/libANGLE/frame_capture_utils_autogen.h":
|
||||
"594024324a582c72a4ba6f82ac4b8966",
|
||||
"5b19dd9bd714fb6dbcd5ac4ca4bf2bc5",
|
||||
"src/libANGLE/validationES1_autogen.h":
|
||||
"8d3131d2bf2e6f521f46b44e64a6bff9",
|
||||
"src/libANGLE/validationES2_autogen.h":
|
||||
|
@ -102,7 +102,7 @@
|
|||
"src/libANGLE/validationES3_autogen.h":
|
||||
"c3142a7eb36b6f4f132e7a1f66e15459",
|
||||
"src/libANGLE/validationESEXT_autogen.h":
|
||||
"63effdeb898b95959057c2e9c084cb28",
|
||||
"b4e3538e7d8d4e7e9ca3cf23aea96293",
|
||||
"src/libANGLE/validationGL11_autogen.h":
|
||||
"c5ac1ca523a39df2621d11e92c9c821a",
|
||||
"src/libANGLE/validationGL12_autogen.h":
|
||||
|
@ -238,7 +238,7 @@
|
|||
"src/libGLESv2/entry_points_gles_3_1_autogen.h":
|
||||
"043d09a964c740067bf4279e0b544aed",
|
||||
"src/libGLESv2/entry_points_gles_ext_autogen.cpp":
|
||||
"9f98d7515bb0794c89e4f8f3bef07942",
|
||||
"68680cde7f8d4602adfdb0d0cf62cd01",
|
||||
"src/libGLESv2/entry_points_gles_ext_autogen.h":
|
||||
"fea36fa137e55dd2f244dbb49d31cc41",
|
||||
"src/libGLESv2/libGLESv2_autogen.cpp":
|
||||
|
|
|
@ -68,7 +68,8 @@
|
|||
"usage": "BufferUsage"
|
||||
},
|
||||
"glBufferStorageMem": {
|
||||
"target": "TextureType"
|
||||
"target": "TextureType",
|
||||
"memory": "MemoryObjectID"
|
||||
},
|
||||
"glBufferSubData": {
|
||||
"target": "BufferBinding"
|
||||
|
@ -463,6 +464,7 @@
|
|||
"texture": "TextureID"
|
||||
},
|
||||
"glImportMemoryFd": {
|
||||
"memory": "MemoryObjectID",
|
||||
"handleType": "HandleType"
|
||||
},
|
||||
"glImportSemaphoreFd": {
|
||||
|
@ -750,16 +752,20 @@
|
|||
"target": "TextureType"
|
||||
},
|
||||
"glTexStorageMem2D": {
|
||||
"target": "TextureType"
|
||||
"target": "TextureType",
|
||||
"memory": "MemoryObjectID"
|
||||
},
|
||||
"glTexStorageMem2DMultisample": {
|
||||
"target": "TextureType"
|
||||
"target": "TextureType",
|
||||
"memory": "MemoryObjectID"
|
||||
},
|
||||
"glTexStorageMem3D": {
|
||||
"target": "TextureType"
|
||||
"target": "TextureType",
|
||||
"memory": "MemoryObjectID"
|
||||
},
|
||||
"glTexStorageMem3DMultisample": {
|
||||
"target": "TextureType"
|
||||
"target": "TextureType",
|
||||
"memory": "MemoryObjectID"
|
||||
},
|
||||
"glTexSubImage2D": {
|
||||
"target": "TextureTarget"
|
||||
|
@ -1529,5 +1535,20 @@
|
|||
},
|
||||
"glGetSemaphoreParameterui64v": {
|
||||
"semaphore": "SemaphoreID"
|
||||
},
|
||||
"glIsMemoryObject": {
|
||||
"memoryObject": "MemoryObjectID"
|
||||
},
|
||||
"glDeleteMemoryObjects": {
|
||||
"memoryObjects": "const MemoryObjectID *"
|
||||
},
|
||||
"glCreateMemoryObjects": {
|
||||
"memoryObjects": "MemoryObjectID *"
|
||||
},
|
||||
"glMemoryObjectParameteriv": {
|
||||
"memoryObject": "MemoryObjectID"
|
||||
},
|
||||
"glGetMemoryObjectParameteriv": {
|
||||
"memoryObject": "MemoryObjectID"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -396,6 +396,11 @@ struct SemaphoreID
|
|||
GLuint value;
|
||||
};
|
||||
|
||||
struct MemoryObjectID
|
||||
{
|
||||
GLuint value;
|
||||
};
|
||||
|
||||
struct RenderbufferID
|
||||
{
|
||||
GLuint value;
|
||||
|
|
|
@ -745,7 +745,7 @@ GLuint Context::createShaderProgramv(ShaderType type, GLsizei count, const GLcha
|
|||
return 0u;
|
||||
}
|
||||
|
||||
GLuint Context::createMemoryObject()
|
||||
MemoryObjectID Context::createMemoryObject()
|
||||
{
|
||||
return mState.mMemoryObjectManager->createMemoryObject(mImplementation.get());
|
||||
}
|
||||
|
@ -815,7 +815,7 @@ void Context::deleteProgramPipeline(ProgramPipelineID pipeline)
|
|||
mState.mProgramPipelineManager->deleteObject(this, pipeline);
|
||||
}
|
||||
|
||||
void Context::deleteMemoryObject(GLuint memoryObject)
|
||||
void Context::deleteMemoryObject(MemoryObjectID memoryObject)
|
||||
{
|
||||
mState.mMemoryObjectManager->deleteMemoryObject(this, memoryObject);
|
||||
}
|
||||
|
@ -6127,7 +6127,7 @@ void Context::getProgramPipelineiv(ProgramPipelineID pipeline, GLenum pname, GLi
|
|||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
MemoryObject *Context::getMemoryObject(GLuint handle) const
|
||||
MemoryObject *Context::getMemoryObject(MemoryObjectID handle) const
|
||||
{
|
||||
return mState.mMemoryObjectManager->getMemoryObject(handle);
|
||||
}
|
||||
|
@ -7619,7 +7619,7 @@ GLboolean Context::testFenceNV(FenceNVID fence)
|
|||
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++)
|
||||
{
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -7637,7 +7637,7 @@ GLboolean Context::isMemoryObject(GLuint 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++)
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
void Context::getMemoryObjectParameteriv(GLuint memoryObject, GLenum pname, GLint *params)
|
||||
void Context::getMemoryObjectParameteriv(MemoryObjectID memoryObject, GLenum pname, GLint *params)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
@ -7660,7 +7662,7 @@ void Context::texStorageMem2D(TextureType target,
|
|||
GLenum internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
MemoryObject *memoryObject = getMemoryObject(memory);
|
||||
|
@ -7677,7 +7679,7 @@ void Context::texStorageMem2DMultisample(TextureType target,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
|
@ -7689,7 +7691,7 @@ void Context::texStorageMem3D(TextureType target,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
|
@ -7702,18 +7704,21 @@ void Context::texStorageMem3DMultisample(TextureType target,
|
|||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
void Context::bufferStorageMem(TextureType target, GLsizeiptr size, GLuint memory, GLuint64 offset)
|
||||
void Context::bufferStorageMem(TextureType target,
|
||||
GLsizeiptr size,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
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);
|
||||
ASSERT(memoryObject != nullptr);
|
||||
|
|
|
@ -355,14 +355,14 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
|
|||
TextureID createTexture();
|
||||
RenderbufferID createRenderbuffer();
|
||||
ProgramPipelineID createProgramPipeline();
|
||||
GLuint createMemoryObject();
|
||||
MemoryObjectID createMemoryObject();
|
||||
SemaphoreID createSemaphore();
|
||||
|
||||
void deleteBuffer(BufferID buffer);
|
||||
void deleteTexture(TextureID texture);
|
||||
void deleteRenderbuffer(RenderbufferID renderbuffer);
|
||||
void deleteProgramPipeline(ProgramPipelineID pipeline);
|
||||
void deleteMemoryObject(GLuint memoryObject);
|
||||
void deleteMemoryObject(MemoryObjectID memoryObject);
|
||||
void deleteSemaphore(SemaphoreID semaphore);
|
||||
|
||||
// CHROMIUM_path_rendering
|
||||
|
@ -387,7 +387,7 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
|
|||
Query *getQuery(QueryID handle) const;
|
||||
TransformFeedback *getTransformFeedback(GLuint handle) const;
|
||||
ProgramPipeline *getProgramPipeline(ProgramPipelineID handle) const;
|
||||
MemoryObject *getMemoryObject(GLuint handle) const;
|
||||
MemoryObject *getMemoryObject(MemoryObjectID handle) const;
|
||||
Semaphore *getSemaphore(SemaphoreID handle) const;
|
||||
|
||||
Texture *getTextureByType(TextureType type) const;
|
||||
|
|
|
@ -329,29 +329,34 @@
|
|||
/* GL_EXT_instanced_arrays */ \
|
||||
/* GL_EXT_map_buffer_range */ \
|
||||
/* GL_EXT_memory_object */ \
|
||||
void bufferStorageMem(TextureType targetPacked, GLsizeiptr size, GLuint memory, \
|
||||
void bufferStorageMem(TextureType targetPacked, GLsizeiptr size, MemoryObjectID memoryPacked, \
|
||||
GLuint64 offset); \
|
||||
void createMemoryObjects(GLsizei n, GLuint *memoryObjects); \
|
||||
void deleteMemoryObjects(GLsizei n, const GLuint *memoryObjects); \
|
||||
void getMemoryObjectParameteriv(GLuint memoryObject, GLenum pname, GLint *params); \
|
||||
void createMemoryObjects(GLsizei n, MemoryObjectID *memoryObjectsPacked); \
|
||||
void deleteMemoryObjects(GLsizei n, const MemoryObjectID *memoryObjectsPacked); \
|
||||
void getMemoryObjectParameteriv(MemoryObjectID memoryObjectPacked, GLenum pname, \
|
||||
GLint *params); \
|
||||
void getUnsignedBytev(GLenum pname, GLubyte *data); \
|
||||
void getUnsignedBytei_v(GLenum target, GLuint index, GLubyte *data); \
|
||||
GLboolean isMemoryObject(GLuint memoryObject); \
|
||||
void memoryObjectParameteriv(GLuint memoryObject, GLenum pname, const GLint *params); \
|
||||
GLboolean isMemoryObject(MemoryObjectID memoryObjectPacked); \
|
||||
void memoryObjectParameteriv(MemoryObjectID memoryObjectPacked, GLenum pname, \
|
||||
const GLint *params); \
|
||||
void texStorageMem2D(TextureType targetPacked, GLsizei levels, GLenum internalFormat, \
|
||||
GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); \
|
||||
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, \
|
||||
GLsizei width, GLsizei height, MemoryObjectID memoryPacked, \
|
||||
GLuint64 offset); \
|
||||
void texStorageMem2DMultisample(TextureType targetPacked, GLsizei samples, \
|
||||
GLenum internalFormat, GLsizei width, GLsizei height, \
|
||||
GLboolean fixedSampleLocations, MemoryObjectID memoryPacked, \
|
||||
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, GLuint memory, \
|
||||
GLuint64 offset); \
|
||||
GLsizei depth, GLboolean fixedSampleLocations, \
|
||||
MemoryObjectID memoryPacked, GLuint64 offset); \
|
||||
/* 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_robustness */ \
|
||||
GLenum getGraphicsResetStatus(); \
|
||||
|
|
|
@ -881,6 +881,12 @@ void WriteParamValueToStream<ParamType::TSemaphoreID>(std::ostream &os, gl::Sema
|
|||
os << value.value;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -276,6 +276,10 @@ void WriteParamValueToStream<ParamType::TShaderProgramID>(std::ostream &os,
|
|||
template <>
|
||||
void WriteParamValueToStream<ParamType::TSemaphoreID>(std::ostream &os, gl::SemaphoreID value);
|
||||
|
||||
template <>
|
||||
void WriteParamValueToStream<ParamType::TMemoryObjectID>(std::ostream &os,
|
||||
gl::MemoryObjectID value);
|
||||
|
||||
template <>
|
||||
void WriteParamValueToStream<ParamType::TRenderbufferID>(std::ostream &os,
|
||||
gl::RenderbufferID value);
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
namespace gl
|
||||
{
|
||||
|
||||
MemoryObject::MemoryObject(rx::GLImplFactory *factory, GLuint id)
|
||||
: RefCountObject(id), mImplementation(factory->createMemoryObject())
|
||||
MemoryObject::MemoryObject(rx::GLImplFactory *factory, MemoryObjectID id)
|
||||
: RefCountObject(id.value), mImplementation(factory->createMemoryObject())
|
||||
{}
|
||||
|
||||
MemoryObject::~MemoryObject() {}
|
||||
|
|
|
@ -27,7 +27,7 @@ class Context;
|
|||
class MemoryObject final : public RefCountObject
|
||||
{
|
||||
public:
|
||||
MemoryObject(rx::GLImplFactory *factory, GLuint id);
|
||||
MemoryObject(rx::GLImplFactory *factory, MemoryObjectID id);
|
||||
~MemoryObject() override;
|
||||
|
||||
void onDestroy(const Context *context) override;
|
||||
|
|
|
@ -506,21 +506,21 @@ void MemoryObjectManager::reset(const Context *context)
|
|||
{
|
||||
while (!mMemoryObjects.empty())
|
||||
{
|
||||
deleteMemoryObject(context, mMemoryObjects.begin()->first);
|
||||
deleteMemoryObject(context, {mMemoryObjects.begin()->first});
|
||||
}
|
||||
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->addRef();
|
||||
mMemoryObjects.assign(handle, memoryObject);
|
||||
return handle;
|
||||
}
|
||||
|
||||
void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint handle)
|
||||
void MemoryObjectManager::deleteMemoryObject(const Context *context, MemoryObjectID handle)
|
||||
{
|
||||
MemoryObject *memoryObject = nullptr;
|
||||
if (!mMemoryObjects.erase(handle, &memoryObject))
|
||||
|
@ -529,7 +529,7 @@ void MemoryObjectManager::deleteMemoryObject(const Context *context, GLuint hand
|
|||
}
|
||||
|
||||
// Requires an explicit this-> because of C++ template rules.
|
||||
this->mHandleAllocator.release(handle);
|
||||
this->mHandleAllocator.release(handle.value);
|
||||
|
||||
if (memoryObject)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -328,9 +328,9 @@ class MemoryObjectManager : public ResourceManagerBase<HandleAllocator>
|
|||
public:
|
||||
MemoryObjectManager();
|
||||
|
||||
GLuint createMemoryObject(rx::GLImplFactory *factory);
|
||||
void deleteMemoryObject(const Context *context, GLuint handle);
|
||||
MemoryObject *getMemoryObject(GLuint handle) const;
|
||||
MemoryObjectID createMemoryObject(rx::GLImplFactory *factory);
|
||||
void deleteMemoryObject(const Context *context, MemoryObjectID handle);
|
||||
MemoryObject *getMemoryObject(MemoryObjectID handle) const;
|
||||
|
||||
protected:
|
||||
~MemoryObjectManager() override;
|
||||
|
@ -338,7 +338,7 @@ class MemoryObjectManager : public ResourceManagerBase<HandleAllocator>
|
|||
private:
|
||||
void reset(const Context *context) override;
|
||||
|
||||
ResourceMap<MemoryObject> mMemoryObjects;
|
||||
ResourceMap<MemoryObject, MemoryObjectID> mMemoryObjects;
|
||||
};
|
||||
|
||||
class SemaphoreManager : public ResourceManagerBase<HandleAllocator>
|
||||
|
|
|
@ -3756,14 +3756,14 @@ CallCapture CaptureBufferStorageMemEXT(const Context *context,
|
|||
bool isCallValid,
|
||||
TextureType targetPacked,
|
||||
GLsizeiptr size,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("targetPacked", ParamType::TTextureType, targetPacked);
|
||||
paramBuffer.addValueParam("size", ParamType::TGLsizeiptr, size);
|
||||
paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
|
||||
paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
|
||||
paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
|
||||
|
||||
return CallCapture(gl::EntryPoint::BufferStorageMemEXT, std::move(paramBuffer));
|
||||
|
@ -3772,17 +3772,18 @@ CallCapture CaptureBufferStorageMemEXT(const Context *context,
|
|||
CallCapture CaptureCreateMemoryObjectsEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
GLuint *memoryObjects)
|
||||
MemoryObjectID *memoryObjectsPacked)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
|
||||
|
||||
ParamCapture memoryObjectsParam("memoryObjects", ParamType::TGLuintPointer);
|
||||
InitParamValue(ParamType::TGLuintPointer, memoryObjects, &memoryObjectsParam.value);
|
||||
CaptureCreateMemoryObjectsEXT_memoryObjects(context, isCallValid, n, memoryObjects,
|
||||
&memoryObjectsParam);
|
||||
paramBuffer.addParam(std::move(memoryObjectsParam));
|
||||
ParamCapture memoryObjectsPackedParam("memoryObjectsPacked", ParamType::TMemoryObjectIDPointer);
|
||||
InitParamValue(ParamType::TMemoryObjectIDPointer, memoryObjectsPacked,
|
||||
&memoryObjectsPackedParam.value);
|
||||
CaptureCreateMemoryObjectsEXT_memoryObjectsPacked(context, isCallValid, n, memoryObjectsPacked,
|
||||
&memoryObjectsPackedParam);
|
||||
paramBuffer.addParam(std::move(memoryObjectsPackedParam));
|
||||
|
||||
return CallCapture(gl::EntryPoint::CreateMemoryObjectsEXT, std::move(paramBuffer));
|
||||
}
|
||||
|
@ -3790,37 +3791,39 @@ CallCapture CaptureCreateMemoryObjectsEXT(const Context *context,
|
|||
CallCapture CaptureDeleteMemoryObjectsEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
const GLuint *memoryObjects)
|
||||
const MemoryObjectID *memoryObjectsPacked)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("n", ParamType::TGLsizei, n);
|
||||
|
||||
ParamCapture memoryObjectsParam("memoryObjects", ParamType::TGLuintConstPointer);
|
||||
InitParamValue(ParamType::TGLuintConstPointer, memoryObjects, &memoryObjectsParam.value);
|
||||
CaptureDeleteMemoryObjectsEXT_memoryObjects(context, isCallValid, n, memoryObjects,
|
||||
&memoryObjectsParam);
|
||||
paramBuffer.addParam(std::move(memoryObjectsParam));
|
||||
ParamCapture memoryObjectsPackedParam("memoryObjectsPacked",
|
||||
ParamType::TMemoryObjectIDConstPointer);
|
||||
InitParamValue(ParamType::TMemoryObjectIDConstPointer, memoryObjectsPacked,
|
||||
&memoryObjectsPackedParam.value);
|
||||
CaptureDeleteMemoryObjectsEXT_memoryObjectsPacked(context, isCallValid, n, memoryObjectsPacked,
|
||||
&memoryObjectsPackedParam);
|
||||
paramBuffer.addParam(std::move(memoryObjectsPackedParam));
|
||||
|
||||
return CallCapture(gl::EntryPoint::DeleteMemoryObjectsEXT, std::move(paramBuffer));
|
||||
}
|
||||
|
||||
CallCapture CaptureGetMemoryObjectParameterivEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
GLint *params)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("memoryObject", ParamType::TGLuint, memoryObject);
|
||||
paramBuffer.addValueParam("memoryObjectPacked", ParamType::TMemoryObjectID, memoryObjectPacked);
|
||||
paramBuffer.addEnumParam("pname", GLenumGroup::MemoryObjectParameterName, ParamType::TGLenum,
|
||||
pname);
|
||||
|
||||
ParamCapture paramsParam("params", ParamType::TGLintPointer);
|
||||
InitParamValue(ParamType::TGLintPointer, params, ¶msParam.value);
|
||||
CaptureGetMemoryObjectParameterivEXT_params(context, isCallValid, memoryObject, pname, params,
|
||||
¶msParam);
|
||||
CaptureGetMemoryObjectParameterivEXT_params(context, isCallValid, memoryObjectPacked, pname,
|
||||
params, ¶msParam);
|
||||
paramBuffer.addParam(std::move(paramsParam));
|
||||
|
||||
return CallCapture(gl::EntryPoint::GetMemoryObjectParameterivEXT, std::move(paramBuffer));
|
||||
|
@ -3864,12 +3867,12 @@ CallCapture CaptureGetUnsignedBytei_vEXT(const Context *context,
|
|||
|
||||
CallCapture CaptureIsMemoryObjectEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLboolean returnValue)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("memoryObject", ParamType::TGLuint, memoryObject);
|
||||
paramBuffer.addValueParam("memoryObjectPacked", ParamType::TMemoryObjectID, memoryObjectPacked);
|
||||
|
||||
ParamCapture returnValueCapture("returnValue", ParamType::TGLboolean);
|
||||
InitParamValue(ParamType::TGLboolean, returnValue, &returnValueCapture.value);
|
||||
|
@ -3880,20 +3883,20 @@ CallCapture CaptureIsMemoryObjectEXT(const Context *context,
|
|||
|
||||
CallCapture CaptureMemoryObjectParameterivEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
const GLint *params)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("memoryObject", ParamType::TGLuint, memoryObject);
|
||||
paramBuffer.addValueParam("memoryObjectPacked", ParamType::TMemoryObjectID, memoryObjectPacked);
|
||||
paramBuffer.addEnumParam("pname", GLenumGroup::MemoryObjectParameterName, ParamType::TGLenum,
|
||||
pname);
|
||||
|
||||
ParamCapture paramsParam("params", ParamType::TGLintConstPointer);
|
||||
InitParamValue(ParamType::TGLintConstPointer, params, ¶msParam.value);
|
||||
CaptureMemoryObjectParameterivEXT_params(context, isCallValid, memoryObject, pname, params,
|
||||
¶msParam);
|
||||
CaptureMemoryObjectParameterivEXT_params(context, isCallValid, memoryObjectPacked, pname,
|
||||
params, ¶msParam);
|
||||
paramBuffer.addParam(std::move(paramsParam));
|
||||
|
||||
return CallCapture(gl::EntryPoint::MemoryObjectParameterivEXT, std::move(paramBuffer));
|
||||
|
@ -3906,7 +3909,7 @@ CallCapture CaptureTexStorageMem2DEXT(const Context *context,
|
|||
GLenum internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
@ -3917,7 +3920,7 @@ CallCapture CaptureTexStorageMem2DEXT(const Context *context,
|
|||
internalFormat);
|
||||
paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
|
||||
paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
|
||||
paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
|
||||
paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
|
||||
paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
|
||||
|
||||
return CallCapture(gl::EntryPoint::TexStorageMem2DEXT, std::move(paramBuffer));
|
||||
|
@ -3931,7 +3934,7 @@ CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
@ -3943,7 +3946,7 @@ CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context,
|
|||
paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
|
||||
paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
|
||||
paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
|
||||
paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
|
||||
paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
|
||||
paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
|
||||
|
||||
return CallCapture(gl::EntryPoint::TexStorageMem2DMultisampleEXT, std::move(paramBuffer));
|
||||
|
@ -3957,7 +3960,7 @@ CallCapture CaptureTexStorageMem3DEXT(const Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
@ -3969,7 +3972,7 @@ CallCapture CaptureTexStorageMem3DEXT(const Context *context,
|
|||
paramBuffer.addValueParam("width", ParamType::TGLsizei, width);
|
||||
paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
|
||||
paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
|
||||
paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
|
||||
paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
|
||||
paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
|
||||
|
||||
return CallCapture(gl::EntryPoint::TexStorageMem3DEXT, std::move(paramBuffer));
|
||||
|
@ -3984,7 +3987,7 @@ CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
|
|||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
@ -3997,7 +4000,7 @@ CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
|
|||
paramBuffer.addValueParam("height", ParamType::TGLsizei, height);
|
||||
paramBuffer.addValueParam("depth", ParamType::TGLsizei, depth);
|
||||
paramBuffer.addValueParam("fixedSampleLocations", ParamType::TGLboolean, fixedSampleLocations);
|
||||
paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
|
||||
paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
|
||||
paramBuffer.addValueParam("offset", ParamType::TGLuint64, offset);
|
||||
|
||||
return CallCapture(gl::EntryPoint::TexStorageMem3DMultisampleEXT, std::move(paramBuffer));
|
||||
|
@ -4005,14 +4008,14 @@ CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
|
|||
|
||||
CallCapture CaptureImportMemoryFdEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 size,
|
||||
HandleType handleTypePacked,
|
||||
GLint fd)
|
||||
{
|
||||
ParamBuffer paramBuffer;
|
||||
|
||||
paramBuffer.addValueParam("memory", ParamType::TGLuint, memory);
|
||||
paramBuffer.addValueParam("memoryPacked", ParamType::TMemoryObjectID, memoryPacked);
|
||||
paramBuffer.addValueParam("size", ParamType::TGLuint64, size);
|
||||
paramBuffer.addValueParam("handleTypePacked", ParamType::THandleType, handleTypePacked);
|
||||
paramBuffer.addValueParam("fd", ParamType::TGLint, fd);
|
||||
|
|
|
@ -1081,19 +1081,19 @@ angle::CallCapture CaptureBufferStorageMemEXT(const Context *context,
|
|||
bool isCallValid,
|
||||
TextureType targetPacked,
|
||||
GLsizeiptr size,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
angle::CallCapture CaptureCreateMemoryObjectsEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
GLuint *memoryObjects);
|
||||
MemoryObjectID *memoryObjectsPacked);
|
||||
angle::CallCapture CaptureDeleteMemoryObjectsEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
const GLuint *memoryObjects);
|
||||
const MemoryObjectID *memoryObjectsPacked);
|
||||
angle::CallCapture CaptureGetMemoryObjectParameterivEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
GLint *params);
|
||||
angle::CallCapture CaptureGetUnsignedBytevEXT(const Context *context,
|
||||
|
@ -1107,11 +1107,11 @@ angle::CallCapture CaptureGetUnsignedBytei_vEXT(const Context *context,
|
|||
GLubyte *data);
|
||||
angle::CallCapture CaptureIsMemoryObjectEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLboolean returnValue);
|
||||
angle::CallCapture CaptureMemoryObjectParameterivEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
const GLint *params);
|
||||
angle::CallCapture CaptureTexStorageMem2DEXT(const Context *context,
|
||||
|
@ -1121,7 +1121,7 @@ angle::CallCapture CaptureTexStorageMem2DEXT(const Context *context,
|
|||
GLenum internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
angle::CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
|
@ -1131,7 +1131,7 @@ angle::CallCapture CaptureTexStorageMem2DMultisampleEXT(const Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
angle::CallCapture CaptureTexStorageMem3DEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
|
@ -1141,7 +1141,7 @@ angle::CallCapture CaptureTexStorageMem3DEXT(const Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
angle::CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
|
@ -1152,13 +1152,13 @@ angle::CallCapture CaptureTexStorageMem3DMultisampleEXT(const Context *context,
|
|||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
|
||||
// GL_EXT_memory_object_fd
|
||||
angle::CallCapture CaptureImportMemoryFdEXT(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 size,
|
||||
HandleType handleTypePacked,
|
||||
GLint fd);
|
||||
|
@ -3287,19 +3287,19 @@ void CaptureDrawElementsInstancedEXT_indices(const Context *context,
|
|||
const void *indices,
|
||||
GLsizei primcount,
|
||||
angle::ParamCapture *paramCapture);
|
||||
void CaptureCreateMemoryObjectsEXT_memoryObjects(const Context *context,
|
||||
void CaptureCreateMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
GLuint *memoryObjects,
|
||||
MemoryObjectID *memoryObjectsPacked,
|
||||
angle::ParamCapture *paramCapture);
|
||||
void CaptureDeleteMemoryObjectsEXT_memoryObjects(const Context *context,
|
||||
void CaptureDeleteMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
const GLuint *memoryObjects,
|
||||
const MemoryObjectID *memoryObjectsPacked,
|
||||
angle::ParamCapture *paramCapture);
|
||||
void CaptureGetMemoryObjectParameterivEXT_params(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
GLint *params,
|
||||
angle::ParamCapture *paramCapture);
|
||||
|
@ -3316,7 +3316,7 @@ void CaptureGetUnsignedBytei_vEXT_data(const Context *context,
|
|||
angle::ParamCapture *paramCapture);
|
||||
void CaptureMemoryObjectParameterivEXT_params(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
const GLint *params,
|
||||
angle::ParamCapture *paramCapture);
|
||||
|
|
|
@ -2260,19 +2260,19 @@ void CaptureDrawElementsInstancedEXT_indices(const Context *context,
|
|||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
void CaptureCreateMemoryObjectsEXT_memoryObjects(const Context *context,
|
||||
void CaptureCreateMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
GLuint *memoryObjects,
|
||||
MemoryObjectID *memoryObjects,
|
||||
ParamCapture *paramCapture)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
void CaptureDeleteMemoryObjectsEXT_memoryObjects(const Context *context,
|
||||
void CaptureDeleteMemoryObjectsEXT_memoryObjectsPacked(const Context *context,
|
||||
bool isCallValid,
|
||||
GLsizei n,
|
||||
const GLuint *memoryObjects,
|
||||
const MemoryObjectID *memoryObjects,
|
||||
ParamCapture *paramCapture)
|
||||
{
|
||||
UNIMPLEMENTED();
|
||||
|
@ -2280,7 +2280,7 @@ void CaptureDeleteMemoryObjectsEXT_memoryObjects(const Context *context,
|
|||
|
||||
void CaptureGetMemoryObjectParameterivEXT_params(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObject,
|
||||
GLenum pname,
|
||||
GLint *params,
|
||||
ParamCapture *paramCapture)
|
||||
|
@ -2309,7 +2309,7 @@ void CaptureGetUnsignedBytei_vEXT_data(const Context *context,
|
|||
|
||||
void CaptureMemoryObjectParameterivEXT_params(const Context *context,
|
||||
bool isCallValid,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObject,
|
||||
GLenum pname,
|
||||
const GLint *params,
|
||||
ParamCapture *paramCapture)
|
||||
|
|
|
@ -270,6 +270,17 @@ void WriteParamTypeToStream(std::ostream &os, ParamType paramType, const ParamVa
|
|||
case ParamType::TMatrixType:
|
||||
WriteParamValueToStream<ParamType::TMatrixType>(os, paramValue.MatrixTypeVal);
|
||||
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:
|
||||
WriteParamValueToStream<ParamType::TPathID>(os, paramValue.PathIDVal);
|
||||
break;
|
||||
|
@ -560,6 +571,12 @@ const char *ParamTypeToString(ParamType paramType)
|
|||
return "GLenum";
|
||||
case ParamType::TMatrixType:
|
||||
return "GLenum";
|
||||
case ParamType::TMemoryObjectID:
|
||||
return "GLuint";
|
||||
case ParamType::TMemoryObjectIDConstPointer:
|
||||
return "const GLuint *";
|
||||
case ParamType::TMemoryObjectIDPointer:
|
||||
return "GLuint *";
|
||||
case ParamType::TPathID:
|
||||
return "GLuint";
|
||||
case ParamType::TPointParameter:
|
||||
|
|
|
@ -91,6 +91,9 @@ enum class ParamType
|
|||
TLogicalOperation,
|
||||
TMaterialParameter,
|
||||
TMatrixType,
|
||||
TMemoryObjectID,
|
||||
TMemoryObjectIDConstPointer,
|
||||
TMemoryObjectIDPointer,
|
||||
TPathID,
|
||||
TPointParameter,
|
||||
TPrimitiveMode,
|
||||
|
@ -206,6 +209,9 @@ union ParamValue
|
|||
gl::LogicalOperation LogicalOperationVal;
|
||||
gl::MaterialParameter MaterialParameterVal;
|
||||
gl::MatrixType MatrixTypeVal;
|
||||
gl::MemoryObjectID MemoryObjectIDVal;
|
||||
const gl::MemoryObjectID *MemoryObjectIDConstPointerVal;
|
||||
gl::MemoryObjectID *MemoryObjectIDPointerVal;
|
||||
gl::PathID PathIDVal;
|
||||
gl::PointParameter PointParameterVal;
|
||||
gl::PrimitiveMode PrimitiveModeVal;
|
||||
|
@ -729,6 +735,27 @@ inline gl::MatrixType GetParamVal<ParamType::TMatrixType, gl::MatrixType>(const
|
|||
return value.MatrixTypeVal;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -1140,6 +1167,12 @@ T AccessParamValue(ParamType paramType, const ParamValue &value)
|
|||
return GetParamVal<ParamType::TMaterialParameter, T>(value);
|
||||
case ParamType::TMatrixType:
|
||||
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:
|
||||
return GetParamVal<ParamType::TPathID, T>(value);
|
||||
case ParamType::TPointParameter:
|
||||
|
@ -1687,6 +1720,27 @@ inline void SetParamVal<ParamType::TMatrixType>(gl::MatrixType valueIn, ParamVal
|
|||
valueOut->MatrixTypeVal = valueIn;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -2164,6 +2218,15 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
|
|||
case ParamType::TMatrixType:
|
||||
SetParamVal<ParamType::TMatrixType>(valueIn, valueOut);
|
||||
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:
|
||||
SetParamVal<ParamType::TPathID>(valueIn, valueOut);
|
||||
break;
|
||||
|
|
|
@ -3230,7 +3230,7 @@ bool ValidateMapBufferRangeEXT(Context *context,
|
|||
bool ValidateBufferStorageMemEXT(Context *context,
|
||||
TextureType target,
|
||||
GLsizeiptr size,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
|
@ -3243,7 +3243,7 @@ bool ValidateBufferStorageMemEXT(Context *context,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryObjects)
|
||||
bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, MemoryObjectID *memoryObjects)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
{
|
||||
|
@ -3254,7 +3254,9 @@ bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryO
|
|||
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)
|
||||
{
|
||||
|
@ -3266,7 +3268,7 @@ bool ValidateDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *m
|
|||
}
|
||||
|
||||
bool ValidateGetMemoryObjectParameterivEXT(Context *context,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObject,
|
||||
GLenum pname,
|
||||
GLint *params)
|
||||
{
|
||||
|
@ -3304,7 +3306,7 @@ bool ValidateGetUnsignedBytei_vEXT(Context *context, GLenum target, GLuint index
|
|||
return false;
|
||||
}
|
||||
|
||||
bool ValidateIsMemoryObjectEXT(Context *context, GLuint memoryObject)
|
||||
bool ValidateIsMemoryObjectEXT(Context *context, MemoryObjectID memoryObject)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
{
|
||||
|
@ -3316,7 +3318,7 @@ bool ValidateIsMemoryObjectEXT(Context *context, GLuint memoryObject)
|
|||
}
|
||||
|
||||
bool ValidateMemoryObjectParameterivEXT(Context *context,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObject,
|
||||
GLenum pname,
|
||||
const GLint *params)
|
||||
{
|
||||
|
@ -3336,7 +3338,7 @@ bool ValidateTexStorageMem2DEXT(Context *context,
|
|||
GLenum internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
|
@ -3363,7 +3365,7 @@ bool ValidateTexStorageMem3DEXT(Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
|
@ -3377,7 +3379,7 @@ bool ValidateTexStorageMem3DEXT(Context *context,
|
|||
}
|
||||
|
||||
bool ValidateImportMemoryFdEXT(Context *context,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 size,
|
||||
HandleType handleType,
|
||||
GLint fd)
|
||||
|
|
|
@ -949,7 +949,7 @@ bool ValidateTexStorageMem2DMultisampleEXT(Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
|
@ -1898,7 +1898,7 @@ bool ValidateTexStorageMem3DMultisampleEXT(Context *context,
|
|||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memory,
|
||||
GLuint64 offset)
|
||||
{
|
||||
if (!context->getExtensions().memoryObject)
|
||||
|
|
|
@ -868,19 +868,23 @@ bool ValidateMapBufferRangeEXT(Context *context,
|
|||
bool ValidateBufferStorageMemEXT(Context *context,
|
||||
TextureType targetPacked,
|
||||
GLsizeiptr size,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
bool ValidateCreateMemoryObjectsEXT(Context *context, GLsizei n, GLuint *memoryObjects);
|
||||
bool ValidateDeleteMemoryObjectsEXT(Context *context, GLsizei n, const GLuint *memoryObjects);
|
||||
bool ValidateCreateMemoryObjectsEXT(Context *context,
|
||||
GLsizei n,
|
||||
MemoryObjectID *memoryObjectsPacked);
|
||||
bool ValidateDeleteMemoryObjectsEXT(Context *context,
|
||||
GLsizei n,
|
||||
const MemoryObjectID *memoryObjectsPacked);
|
||||
bool ValidateGetMemoryObjectParameterivEXT(Context *context,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
GLint *params);
|
||||
bool ValidateGetUnsignedBytevEXT(Context *context, GLenum pname, 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,
|
||||
GLuint memoryObject,
|
||||
MemoryObjectID memoryObjectPacked,
|
||||
GLenum pname,
|
||||
const GLint *params);
|
||||
bool ValidateTexStorageMem2DEXT(Context *context,
|
||||
|
@ -889,7 +893,7 @@ bool ValidateTexStorageMem2DEXT(Context *context,
|
|||
GLenum internalFormat,
|
||||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
bool ValidateTexStorageMem2DMultisampleEXT(Context *context,
|
||||
TextureType targetPacked,
|
||||
|
@ -898,7 +902,7 @@ bool ValidateTexStorageMem2DMultisampleEXT(Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
bool ValidateTexStorageMem3DEXT(Context *context,
|
||||
TextureType targetPacked,
|
||||
|
@ -907,7 +911,7 @@ bool ValidateTexStorageMem3DEXT(Context *context,
|
|||
GLsizei width,
|
||||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
bool ValidateTexStorageMem3DMultisampleEXT(Context *context,
|
||||
TextureType targetPacked,
|
||||
|
@ -917,12 +921,12 @@ bool ValidateTexStorageMem3DMultisampleEXT(Context *context,
|
|||
GLsizei height,
|
||||
GLsizei depth,
|
||||
GLboolean fixedSampleLocations,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 offset);
|
||||
|
||||
// GL_EXT_memory_object_fd
|
||||
bool ValidateImportMemoryFdEXT(Context *context,
|
||||
GLuint memory,
|
||||
MemoryObjectID memoryPacked,
|
||||
GLuint64 size,
|
||||
HandleType handleTypePacked,
|
||||
GLint fd);
|
||||
|
|
|
@ -4255,15 +4255,16 @@ void GL_APIENTRY BufferStorageMemEXT(GLenum target, GLsizeiptr size, GLuint memo
|
|||
if (context)
|
||||
{
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateBufferStorageMemEXT(context, targetPacked, size, memory, offset));
|
||||
ValidateBufferStorageMemEXT(context, targetPacked, size, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->bufferStorageMem(targetPacked, size, memory, offset);
|
||||
context->bufferStorageMem(targetPacked, size, memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(BufferStorageMemEXT, isCallValid, context, targetPacked, size, memory,
|
||||
ANGLE_CAPTURE(BufferStorageMemEXT, isCallValid, context, targetPacked, size, memoryPacked,
|
||||
offset);
|
||||
}
|
||||
}
|
||||
|
@ -4277,14 +4278,15 @@ void GL_APIENTRY CreateMemoryObjectsEXT(GLsizei n, GLuint *memoryObjects)
|
|||
|
||||
if (context)
|
||||
{
|
||||
MemoryObjectID *memoryObjectsPacked = FromGL<MemoryObjectID *>(memoryObjects);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateCreateMemoryObjectsEXT(context, n, memoryObjects));
|
||||
ValidateCreateMemoryObjectsEXT(context, n, memoryObjectsPacked));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->createMemoryObjects(n, memoryObjects);
|
||||
context->createMemoryObjects(n, memoryObjectsPacked);
|
||||
}
|
||||
ANGLE_CAPTURE(CreateMemoryObjectsEXT, isCallValid, context, n, memoryObjects);
|
||||
ANGLE_CAPTURE(CreateMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4297,14 +4299,15 @@ void GL_APIENTRY DeleteMemoryObjectsEXT(GLsizei n, const GLuint *memoryObjects)
|
|||
|
||||
if (context)
|
||||
{
|
||||
const MemoryObjectID *memoryObjectsPacked = FromGL<const MemoryObjectID *>(memoryObjects);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateDeleteMemoryObjectsEXT(context, n, memoryObjects));
|
||||
ValidateDeleteMemoryObjectsEXT(context, n, memoryObjectsPacked));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->deleteMemoryObjects(n, memoryObjects);
|
||||
context->deleteMemoryObjects(n, memoryObjectsPacked);
|
||||
}
|
||||
ANGLE_CAPTURE(DeleteMemoryObjectsEXT, isCallValid, context, n, memoryObjects);
|
||||
ANGLE_CAPTURE(DeleteMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4320,15 +4323,17 @@ void GL_APIENTRY GetMemoryObjectParameterivEXT(GLuint memoryObject, GLenum pname
|
|||
|
||||
if (context)
|
||||
{
|
||||
MemoryObjectID memoryObjectPacked = FromGL<MemoryObjectID>(memoryObject);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() || ValidateGetMemoryObjectParameterivEXT(
|
||||
context, memoryObject, pname, params));
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateGetMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->getMemoryObjectParameteriv(memoryObject, pname, params);
|
||||
context->getMemoryObjectParameteriv(memoryObjectPacked, pname, params);
|
||||
}
|
||||
ANGLE_CAPTURE(GetMemoryObjectParameterivEXT, isCallValid, context, memoryObject, pname,
|
||||
params);
|
||||
ANGLE_CAPTURE(GetMemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked,
|
||||
pname, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4381,18 +4386,19 @@ GLboolean GL_APIENTRY IsMemoryObjectEXT(GLuint memoryObject)
|
|||
GLboolean returnValue;
|
||||
if (context)
|
||||
{
|
||||
MemoryObjectID memoryObjectPacked = FromGL<MemoryObjectID>(memoryObject);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() || ValidateIsMemoryObjectEXT(context, memoryObject));
|
||||
(context->skipValidation() || ValidateIsMemoryObjectEXT(context, memoryObjectPacked));
|
||||
if (isCallValid)
|
||||
{
|
||||
returnValue = context->isMemoryObject(memoryObject);
|
||||
returnValue = context->isMemoryObject(memoryObjectPacked);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = GetDefaultReturnValue<EntryPoint::IsMemoryObjectEXT, GLboolean>();
|
||||
}
|
||||
ANGLE_CAPTURE(IsMemoryObjectEXT, isCallValid, context, memoryObject, returnValue);
|
||||
ANGLE_CAPTURE(IsMemoryObjectEXT, isCallValid, context, memoryObjectPacked, returnValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4412,14 +4418,16 @@ void GL_APIENTRY MemoryObjectParameterivEXT(GLuint memoryObject, GLenum pname, c
|
|||
|
||||
if (context)
|
||||
{
|
||||
MemoryObjectID memoryObjectPacked = FromGL<MemoryObjectID>(memoryObject);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() || ValidateMemoryObjectParameterivEXT(
|
||||
context, memoryObject, pname, params));
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->memoryObjectParameteriv(memoryObject, pname, params);
|
||||
context->memoryObjectParameteriv(memoryObjectPacked, pname, params);
|
||||
}
|
||||
ANGLE_CAPTURE(MemoryObjectParameterivEXT, isCallValid, context, memoryObject, pname,
|
||||
ANGLE_CAPTURE(MemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked, pname,
|
||||
params);
|
||||
}
|
||||
}
|
||||
|
@ -4443,18 +4451,19 @@ void GL_APIENTRY TexStorageMem2DEXT(GLenum target,
|
|||
if (context)
|
||||
{
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateTexStorageMem2DEXT(context, targetPacked, levels, internalFormat, width,
|
||||
height, memory, offset));
|
||||
height, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem2D(targetPacked, levels, internalFormat, width, height, memory,
|
||||
offset);
|
||||
context->texStorageMem2D(targetPacked, levels, internalFormat, width, height,
|
||||
memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem2DEXT, isCallValid, context, targetPacked, levels,
|
||||
internalFormat, width, height, memory, offset);
|
||||
internalFormat, width, height, memoryPacked, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4479,18 +4488,19 @@ void GL_APIENTRY TexStorageMem2DMultisampleEXT(GLenum target,
|
|||
if (context)
|
||||
{
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() || ValidateTexStorageMem2DMultisampleEXT(
|
||||
context, targetPacked, samples, internalFormat, width,
|
||||
height, fixedSampleLocations, memory, offset));
|
||||
height, fixedSampleLocations, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem2DMultisample(targetPacked, samples, internalFormat, width,
|
||||
height, fixedSampleLocations, memory, offset);
|
||||
height, fixedSampleLocations, memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem2DMultisampleEXT, isCallValid, context, targetPacked, samples,
|
||||
internalFormat, width, height, fixedSampleLocations, memory, offset);
|
||||
internalFormat, width, height, fixedSampleLocations, memoryPacked, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4515,18 +4525,19 @@ void GL_APIENTRY TexStorageMem3DEXT(GLenum target,
|
|||
if (context)
|
||||
{
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateTexStorageMem3DEXT(context, targetPacked, levels, internalFormat, width,
|
||||
height, depth, memory, offset));
|
||||
height, depth, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem3D(targetPacked, levels, internalFormat, width, height, depth,
|
||||
memory, offset);
|
||||
memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem3DEXT, isCallValid, context, targetPacked, levels,
|
||||
internalFormat, width, height, depth, memory, offset);
|
||||
internalFormat, width, height, depth, memoryPacked, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4552,19 +4563,21 @@ void GL_APIENTRY TexStorageMem3DMultisampleEXT(GLenum target,
|
|||
if (context)
|
||||
{
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() || ValidateTexStorageMem3DMultisampleEXT(
|
||||
context, targetPacked, samples, internalFormat, width,
|
||||
height, depth, fixedSampleLocations, memory, offset));
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateTexStorageMem3DMultisampleEXT(
|
||||
context, targetPacked, samples, internalFormat, width, height,
|
||||
depth, fixedSampleLocations, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem3DMultisample(targetPacked, samples, internalFormat, width,
|
||||
height, depth, fixedSampleLocations, memory,
|
||||
height, depth, fixedSampleLocations, memoryPacked,
|
||||
offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem3DMultisampleEXT, isCallValid, context, targetPacked, samples,
|
||||
internalFormat, width, height, depth, fixedSampleLocations, memory, offset);
|
||||
internalFormat, width, height, depth, fixedSampleLocations, memoryPacked,
|
||||
offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4580,15 +4593,18 @@ void GL_APIENTRY ImportMemoryFdEXT(GLuint memory, GLuint64 size, GLenum handleTy
|
|||
|
||||
if (context)
|
||||
{
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
HandleType handleTypePacked = FromGL<HandleType>(handleType);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateImportMemoryFdEXT(context, memory, size, handleTypePacked, fd));
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateImportMemoryFdEXT(context, memoryPacked, size, handleTypePacked, fd));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->importMemoryFd(memory, size, handleTypePacked, fd);
|
||||
context->importMemoryFd(memoryPacked, size, handleTypePacked, fd);
|
||||
}
|
||||
ANGLE_CAPTURE(ImportMemoryFdEXT, isCallValid, context, memory, size, handleTypePacked, fd);
|
||||
ANGLE_CAPTURE(ImportMemoryFdEXT, isCallValid, context, memoryPacked, size, handleTypePacked,
|
||||
fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7939,15 +7955,16 @@ void GL_APIENTRY BufferStorageMemEXTContextANGLE(GLeglContext ctx,
|
|||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateBufferStorageMemEXT(context, targetPacked, size, memory, offset));
|
||||
ValidateBufferStorageMemEXT(context, targetPacked, size, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->bufferStorageMem(targetPacked, size, memory, offset);
|
||||
context->bufferStorageMem(targetPacked, size, memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(BufferStorageMemEXT, isCallValid, context, targetPacked, size, memory,
|
||||
ANGLE_CAPTURE(BufferStorageMemEXT, isCallValid, context, targetPacked, size, memoryPacked,
|
||||
offset);
|
||||
}
|
||||
}
|
||||
|
@ -8929,14 +8946,15 @@ void GL_APIENTRY CreateMemoryObjectsEXTContextANGLE(GLeglContext ctx,
|
|||
if (context)
|
||||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
MemoryObjectID *memoryObjectsPacked = FromGL<MemoryObjectID *>(memoryObjects);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateCreateMemoryObjectsEXT(context, n, memoryObjects));
|
||||
ValidateCreateMemoryObjectsEXT(context, n, memoryObjectsPacked));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->createMemoryObjects(n, memoryObjects);
|
||||
context->createMemoryObjects(n, memoryObjectsPacked);
|
||||
}
|
||||
ANGLE_CAPTURE(CreateMemoryObjectsEXT, isCallValid, context, n, memoryObjects);
|
||||
ANGLE_CAPTURE(CreateMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9268,14 +9286,15 @@ void GL_APIENTRY DeleteMemoryObjectsEXTContextANGLE(GLeglContext ctx,
|
|||
if (context)
|
||||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
const MemoryObjectID *memoryObjectsPacked = FromGL<const MemoryObjectID *>(memoryObjects);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateDeleteMemoryObjectsEXT(context, n, memoryObjects));
|
||||
ValidateDeleteMemoryObjectsEXT(context, n, memoryObjectsPacked));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->deleteMemoryObjects(n, memoryObjects);
|
||||
context->deleteMemoryObjects(n, memoryObjectsPacked);
|
||||
}
|
||||
ANGLE_CAPTURE(DeleteMemoryObjectsEXT, isCallValid, context, n, memoryObjects);
|
||||
ANGLE_CAPTURE(DeleteMemoryObjectsEXT, isCallValid, context, n, memoryObjectsPacked);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12444,15 +12463,17 @@ void GL_APIENTRY GetMemoryObjectParameterivEXTContextANGLE(GLeglContext ctx,
|
|||
if (context)
|
||||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
MemoryObjectID memoryObjectPacked = FromGL<MemoryObjectID>(memoryObject);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() || ValidateGetMemoryObjectParameterivEXT(
|
||||
context, memoryObject, pname, params));
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateGetMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->getMemoryObjectParameteriv(memoryObject, pname, params);
|
||||
context->getMemoryObjectParameteriv(memoryObjectPacked, pname, params);
|
||||
}
|
||||
ANGLE_CAPTURE(GetMemoryObjectParameterivEXT, isCallValid, context, memoryObject, pname,
|
||||
params);
|
||||
ANGLE_CAPTURE(GetMemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked,
|
||||
pname, params);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14401,15 +14422,18 @@ void GL_APIENTRY ImportMemoryFdEXTContextANGLE(GLeglContext ctx,
|
|||
if (context)
|
||||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
HandleType handleTypePacked = FromGL<HandleType>(handleType);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateImportMemoryFdEXT(context, memory, size, handleTypePacked, fd));
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateImportMemoryFdEXT(context, memoryPacked, size, handleTypePacked, fd));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->importMemoryFd(memory, size, handleTypePacked, fd);
|
||||
context->importMemoryFd(memoryPacked, size, handleTypePacked, fd);
|
||||
}
|
||||
ANGLE_CAPTURE(ImportMemoryFdEXT, isCallValid, context, memory, size, handleTypePacked, fd);
|
||||
ANGLE_CAPTURE(ImportMemoryFdEXT, isCallValid, context, memoryPacked, size, handleTypePacked,
|
||||
fd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14684,18 +14708,19 @@ GLboolean GL_APIENTRY IsMemoryObjectEXTContextANGLE(GLeglContext ctx, GLuint mem
|
|||
if (context)
|
||||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
MemoryObjectID memoryObjectPacked = FromGL<MemoryObjectID>(memoryObject);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() || ValidateIsMemoryObjectEXT(context, memoryObject));
|
||||
(context->skipValidation() || ValidateIsMemoryObjectEXT(context, memoryObjectPacked));
|
||||
if (isCallValid)
|
||||
{
|
||||
returnValue = context->isMemoryObject(memoryObject);
|
||||
returnValue = context->isMemoryObject(memoryObjectPacked);
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue = GetDefaultReturnValue<EntryPoint::IsMemoryObjectEXT, GLboolean>();
|
||||
}
|
||||
ANGLE_CAPTURE(IsMemoryObjectEXT, isCallValid, context, memoryObject, returnValue);
|
||||
ANGLE_CAPTURE(IsMemoryObjectEXT, isCallValid, context, memoryObjectPacked, returnValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -15777,14 +15802,16 @@ void GL_APIENTRY MemoryObjectParameterivEXTContextANGLE(GLeglContext ctx,
|
|||
if (context)
|
||||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
MemoryObjectID memoryObjectPacked = FromGL<MemoryObjectID>(memoryObject);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid = (context->skipValidation() || ValidateMemoryObjectParameterivEXT(
|
||||
context, memoryObject, pname, params));
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateMemoryObjectParameterivEXT(context, memoryObjectPacked, pname, params));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->memoryObjectParameteriv(memoryObject, pname, params);
|
||||
context->memoryObjectParameteriv(memoryObjectPacked, pname, params);
|
||||
}
|
||||
ANGLE_CAPTURE(MemoryObjectParameterivEXT, isCallValid, context, memoryObject, pname,
|
||||
ANGLE_CAPTURE(MemoryObjectParameterivEXT, isCallValid, context, memoryObjectPacked, pname,
|
||||
params);
|
||||
}
|
||||
}
|
||||
|
@ -19288,18 +19315,19 @@ void GL_APIENTRY TexStorageMem2DEXTContextANGLE(GLeglContext ctx,
|
|||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateTexStorageMem2DEXT(context, targetPacked, levels, internalFormat, width,
|
||||
height, memory, offset));
|
||||
height, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem2D(targetPacked, levels, internalFormat, width, height, memory,
|
||||
offset);
|
||||
context->texStorageMem2D(targetPacked, levels, internalFormat, width, height,
|
||||
memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem2DEXT, isCallValid, context, targetPacked, levels,
|
||||
internalFormat, width, height, memory, offset);
|
||||
internalFormat, width, height, memoryPacked, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19326,18 +19354,19 @@ void GL_APIENTRY TexStorageMem2DMultisampleEXTContextANGLE(GLeglContext ctx,
|
|||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() || ValidateTexStorageMem2DMultisampleEXT(
|
||||
context, targetPacked, samples, internalFormat, width,
|
||||
height, fixedSampleLocations, memory, offset));
|
||||
height, fixedSampleLocations, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem2DMultisample(targetPacked, samples, internalFormat, width,
|
||||
height, fixedSampleLocations, memory, offset);
|
||||
height, fixedSampleLocations, memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem2DMultisampleEXT, isCallValid, context, targetPacked, samples,
|
||||
internalFormat, width, height, fixedSampleLocations, memory, offset);
|
||||
internalFormat, width, height, fixedSampleLocations, memoryPacked, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19364,18 +19393,19 @@ void GL_APIENTRY TexStorageMem3DEXTContextANGLE(GLeglContext ctx,
|
|||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() ||
|
||||
ValidateTexStorageMem3DEXT(context, targetPacked, levels, internalFormat, width,
|
||||
height, depth, memory, offset));
|
||||
height, depth, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem3D(targetPacked, levels, internalFormat, width, height, depth,
|
||||
memory, offset);
|
||||
memoryPacked, offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem3DEXT, isCallValid, context, targetPacked, levels,
|
||||
internalFormat, width, height, depth, memory, offset);
|
||||
internalFormat, width, height, depth, memoryPacked, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19403,19 +19433,21 @@ void GL_APIENTRY TexStorageMem3DMultisampleEXTContextANGLE(GLeglContext ctx,
|
|||
{
|
||||
ASSERT(context == GetValidGlobalContext());
|
||||
TextureType targetPacked = FromGL<TextureType>(target);
|
||||
MemoryObjectID memoryPacked = FromGL<MemoryObjectID>(memory);
|
||||
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
|
||||
bool isCallValid =
|
||||
(context->skipValidation() || ValidateTexStorageMem3DMultisampleEXT(
|
||||
context, targetPacked, samples, internalFormat, width,
|
||||
height, depth, fixedSampleLocations, memory, offset));
|
||||
bool isCallValid = (context->skipValidation() ||
|
||||
ValidateTexStorageMem3DMultisampleEXT(
|
||||
context, targetPacked, samples, internalFormat, width, height,
|
||||
depth, fixedSampleLocations, memoryPacked, offset));
|
||||
if (isCallValid)
|
||||
{
|
||||
context->texStorageMem3DMultisample(targetPacked, samples, internalFormat, width,
|
||||
height, depth, fixedSampleLocations, memory,
|
||||
height, depth, fixedSampleLocations, memoryPacked,
|
||||
offset);
|
||||
}
|
||||
ANGLE_CAPTURE(TexStorageMem3DMultisampleEXT, isCallValid, context, targetPacked, samples,
|
||||
internalFormat, width, height, depth, fixedSampleLocations, memory, offset);
|
||||
internalFormat, width, height, depth, fixedSampleLocations, memoryPacked,
|
||||
offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче