зеркало из https://github.com/AvaloniaUI/angle.git
Use AttributeMap in eglLockSurfaceKHR's validation
Bug: angleproject:6062 Change-Id: I0eea431313700b11184265a9ff895417ce4b1d4d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3295164 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: (use @chromium please) Shahbaz Youssefi <syoussefi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Родитель
ff89ba1b25
Коммит
41a8981e81
|
@ -6,7 +6,7 @@
|
|||
"scripts/egl_angle_ext.xml":
|
||||
"5bcc01462b355d933cf3ada15198fb68",
|
||||
"scripts/entry_point_packed_egl_enums.json":
|
||||
"0175304f39aec0f1816760c6460b6d62",
|
||||
"a72ae855c6b403912103b519139951a1",
|
||||
"scripts/entry_point_packed_gl_enums.json":
|
||||
"e651b622b5ab1241ab7bc273d0114e19",
|
||||
"scripts/generate_entry_points.py":
|
||||
|
@ -76,7 +76,7 @@
|
|||
"src/libANGLE/validationCL_autogen.h":
|
||||
"0022d0cdb6a9e2ef4a59b71164f62333",
|
||||
"src/libANGLE/validationEGL_autogen.h":
|
||||
"eceb4d31165029f90eba3ab059fed2d2",
|
||||
"d124b733d9d8ed36793814388cdfe3a0",
|
||||
"src/libANGLE/validationES1_autogen.h":
|
||||
"99af5e328690ae78d7724a80e94cfac5",
|
||||
"src/libANGLE/validationES2_autogen.h":
|
||||
|
@ -124,7 +124,7 @@
|
|||
"src/libGLESv2/cl_stubs_autogen.h":
|
||||
"6d880c6b65284192b5842f0e42ad2741",
|
||||
"src/libGLESv2/egl_ext_stubs_autogen.h":
|
||||
"b2f236e03cfadbf8c9db972254384fa6",
|
||||
"4c91468de10d8efcfdc9039de647e9e4",
|
||||
"src/libGLESv2/egl_get_labeled_object_data.json":
|
||||
"2f4148b2ddf34e62670e32c5e6da4937",
|
||||
"src/libGLESv2/egl_stubs_autogen.h":
|
||||
|
@ -138,7 +138,7 @@
|
|||
"src/libGLESv2/entry_points_egl_autogen.h":
|
||||
"3bc7a8df9deadd7cfd615d0cfad0c6a8",
|
||||
"src/libGLESv2/entry_points_egl_ext_autogen.cpp":
|
||||
"5536fcdb5b6c483ae8252167bbc74413",
|
||||
"d8e045b0bf4c1f96ba341d547ad66fef",
|
||||
"src/libGLESv2/entry_points_egl_ext_autogen.h":
|
||||
"f35bee0b9849fa2f7adb14b476d01506",
|
||||
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
|
||||
|
|
|
@ -63,10 +63,13 @@
|
|||
"eglLabelObject": {
|
||||
"objectType": "ObjectType"
|
||||
},
|
||||
"eglLockSurface": {
|
||||
"attrib_list": "const AttributeMap &"
|
||||
},
|
||||
"eglStreamConsumerGLTextureExternalAttribsNV": {
|
||||
"attrib_list": "const AttributeMap &"
|
||||
},
|
||||
"eglStreamPostD3DTexture": {
|
||||
"attrib_list": "const AttributeMap &"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6213,7 +6213,7 @@ bool ValidateCreatePlatformWindowSurface(const ValidationContext *val,
|
|||
bool ValidateLockSurfaceKHR(const ValidationContext *val,
|
||||
const egl::Display *dpy,
|
||||
const Surface *surface,
|
||||
const EGLint *attrib_list)
|
||||
const AttributeMap &attributes)
|
||||
{
|
||||
ANGLE_VALIDATION_TRY(ValidateDisplay(val, dpy));
|
||||
ANGLE_VALIDATION_TRY(ValidateSurface(val, dpy, surface));
|
||||
|
@ -6249,10 +6249,13 @@ bool ValidateLockSurfaceKHR(const ValidationContext *val,
|
|||
return false;
|
||||
}
|
||||
|
||||
while (attrib_list != nullptr && attrib_list[0] != EGL_NONE)
|
||||
attributes.initializeWithoutValidation();
|
||||
|
||||
for (const auto &attributeIter : attributes)
|
||||
{
|
||||
EGLint attribute = *attrib_list++;
|
||||
EGLint value = *attrib_list++;
|
||||
EGLAttrib attribute = attributeIter.first;
|
||||
EGLAttrib value = attributeIter.second;
|
||||
|
||||
switch (attribute)
|
||||
{
|
||||
case EGL_MAP_PRESERVE_PIXELS_KHR:
|
||||
|
|
|
@ -386,7 +386,7 @@ bool ValidateDestroyImageKHR(const ValidationContext *val,
|
|||
bool ValidateLockSurfaceKHR(const ValidationContext *val,
|
||||
const egl::Display *dpyPacked,
|
||||
const Surface *surfacePacked,
|
||||
const EGLint *attrib_list);
|
||||
const AttributeMap &attrib_listPacked);
|
||||
bool ValidateQuerySurface64KHR(const ValidationContext *val,
|
||||
const egl::Display *dpyPacked,
|
||||
const Surface *surfacePacked,
|
||||
|
|
|
@ -797,16 +797,12 @@ EGLBoolean QueryDisplayAttribANGLE(Thread *thread,
|
|||
EGLBoolean LockSurfaceKHR(Thread *thread,
|
||||
egl::Display *display,
|
||||
Surface *surface,
|
||||
const EGLint *attrib_list)
|
||||
const AttributeMap &attributes)
|
||||
{
|
||||
ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglLockSurfaceKHR",
|
||||
GetDisplayIfValid(display), EGL_FALSE);
|
||||
|
||||
const AttributeMap &attributes = PackParam<const AttributeMap &>(attrib_list);
|
||||
|
||||
ANGLE_EGL_TRY_RETURN(thread, surface->lockSurfaceKHR(display, attributes), "eglLockSurfaceKHR",
|
||||
GetSurfaceIfValid(display, surface), EGL_FALSE);
|
||||
|
||||
thread->setSuccess();
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
@ -815,10 +811,8 @@ EGLBoolean UnlockSurfaceKHR(Thread *thread, egl::Display *display, Surface *surf
|
|||
{
|
||||
ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglUnlockSurfaceKHR",
|
||||
GetDisplayIfValid(display), EGL_FALSE);
|
||||
|
||||
ANGLE_EGL_TRY_RETURN(thread, surface->unlockSurfaceKHR(display), "eglQuerySurface64KHR",
|
||||
GetSurfaceIfValid(display, surface), EGL_FALSE);
|
||||
|
||||
thread->setSuccess();
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
@ -831,13 +825,10 @@ EGLBoolean QuerySurface64KHR(Thread *thread,
|
|||
{
|
||||
ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglQuerySurface64KHR",
|
||||
GetDisplayIfValid(display), EGL_FALSE);
|
||||
|
||||
ANGLE_EGL_TRY_RETURN(
|
||||
thread, QuerySurfaceAttrib64KHR(display, thread->getContext(), surface, attribute, value),
|
||||
"eglQuerySurface64KHR", GetSurfaceIfValid(display, surface), EGL_FALSE);
|
||||
|
||||
thread->setSuccess();
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
} // namespace egl
|
||||
|
|
|
@ -87,7 +87,7 @@ EGLint LabelObjectKHR(Thread *thread,
|
|||
EGLBoolean LockSurfaceKHR(Thread *thread,
|
||||
egl::Display *dpyPacked,
|
||||
Surface *surfacePacked,
|
||||
const EGLint *attrib_list);
|
||||
const AttributeMap &attrib_listPacked);
|
||||
EGLBoolean PostSubBufferNV(Thread *thread,
|
||||
egl::Display *dpyPacked,
|
||||
Surface *surfacePacked,
|
||||
|
|
|
@ -867,13 +867,14 @@ EGLBoolean EGLAPIENTRY EGL_LockSurfaceKHR(EGLDisplay dpy,
|
|||
|
||||
Thread *thread = egl::GetCurrentThread();
|
||||
|
||||
egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
|
||||
Surface *surfacePacked = PackParam<Surface *>(surface);
|
||||
egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
|
||||
Surface *surfacePacked = PackParam<Surface *>(surface);
|
||||
const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);
|
||||
|
||||
ANGLE_EGL_VALIDATE(thread, LockSurfaceKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
|
||||
surfacePacked, attrib_list);
|
||||
surfacePacked, attrib_listPacked);
|
||||
|
||||
return LockSurfaceKHR(thread, dpyPacked, surfacePacked, attrib_list);
|
||||
return LockSurfaceKHR(thread, dpyPacked, surfacePacked, attrib_listPacked);
|
||||
}
|
||||
|
||||
EGLBoolean EGLAPIENTRY EGL_QuerySurface64KHR(EGLDisplay dpy,
|
||||
|
|
Загрузка…
Ссылка в новой задаче