Add new extension KHR__lock_surface3
Add new interfaces for locking and unlocking a surface.

Test: angle_end2end_test --gtest_filter=EGLLockSurface3Test

Bug: angleproject:6062
Change-Id: Ic40708db4db552107025635540a0c62f956d741e
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3161447
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Jeff Vigil 2021-09-21 15:03:15 -07:00 коммит произвёл Angle LUCI CQ
Родитель 5ae7342b76
Коммит d3e6771671
30 изменённых файлов: 415 добавлений и 27 удалений

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

@ -26,7 +26,7 @@
"scripts/gl_angle_ext.xml":
"b39cf42f4ac168d1ae40888e59c51f7b",
"scripts/registry_xml.py":
"0b3ee1f9612a4b127447e0a733cf6491",
"4218ba00e734cfb650444c87f6f54cdd",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libANGLE/gen_extensions.py":

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

@ -12,25 +12,25 @@
"scripts/gl_angle_ext.xml":
"b39cf42f4ac168d1ae40888e59c51f7b",
"scripts/registry_xml.py":
"0b3ee1f9612a4b127447e0a733cf6491",
"4218ba00e734cfb650444c87f6f54cdd",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libEGL/egl_loader_autogen.cpp":
"3740eb7bd4928f17c4239ab294930469",
"9fdb7a4ec1a7ef0c9095c4ace04f5dd3",
"src/libEGL/egl_loader_autogen.h":
"9cbf4d491497058a32642865eb032276",
"95fec68e648bf57d49bbc0baae4fb595",
"src/tests/restricted_traces/trace_egl_loader_autogen.cpp":
"ab1ce9e72e1e248b13302349f2228a89",
"eae47fdee8cafa4d689ab422aaa01caa",
"src/tests/restricted_traces/trace_egl_loader_autogen.h":
"30b75afa44eb620baaf98c0fb1641634",
"fa654815a86f7865f100a3162d724b03",
"src/tests/restricted_traces/trace_gles_loader_autogen.cpp":
"f8e48ed9778ce1c68b1688251a0963ba",
"src/tests/restricted_traces/trace_gles_loader_autogen.h":
"14ca43d981f4d59f8457224bbee9ee33",
"util/egl_loader_autogen.cpp":
"ad2bc908fbd69d8a1406320a4f5142c8",
"1fdac89cd57d3ebd2ea9385a73b75d2d",
"util/egl_loader_autogen.h":
"dd280caf858b39f1ef0c89d55bdcc559",
"4697b5d70251442224704128e7ac2f0b",
"util/gles_loader_autogen.cpp":
"e1f56b51493be277116c4099ee2ee23d",
"util/gles_loader_autogen.h":

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

@ -16,13 +16,13 @@
"scripts/gl_angle_ext.xml":
"b39cf42f4ac168d1ae40888e59c51f7b",
"scripts/registry_xml.py":
"0b3ee1f9612a4b127447e0a733cf6491",
"4218ba00e734cfb650444c87f6f54cdd",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/common/entry_points_enum_autogen.cpp":
"27f3d578b169ebbcc712db24a8f60f7d",
"77ff99a611b4300c99aca1899dbfe85e",
"src/common/entry_points_enum_autogen.h":
"065eb85f320236ef14392d9f7ebf8d38",
"ff97848274d3df82fcbd85b7e38e1980",
"src/libANGLE/Context_gl_1_autogen.h":
"115d224fd28b0bc2b2800354bb57fcf3",
"src/libANGLE/Context_gl_2_autogen.h":
@ -70,13 +70,13 @@
"src/libANGLE/capture/frame_capture_replay_autogen.cpp":
"35a7d96b9718ce40285eea0f6355caa3",
"src/libANGLE/capture/frame_capture_utils_autogen.cpp":
"1f6acde257210668956a1b277567440b",
"96307bd69a648f1b023956c0008623c5",
"src/libANGLE/capture/frame_capture_utils_autogen.h":
"b4950440946481455bd7862af34171a4",
"f0a083054b56d2c9674722b84fd2d48b",
"src/libANGLE/validationCL_autogen.h":
"0022d0cdb6a9e2ef4a59b71164f62333",
"src/libANGLE/validationEGL_autogen.h":
"3927fa260ad183fd9193d65b3f8d82c5",
"eceb4d31165029f90eba3ab059fed2d2",
"src/libANGLE/validationES1_autogen.h":
"99af5e328690ae78d7724a80e94cfac5",
"src/libANGLE/validationES2_autogen.h":
@ -98,9 +98,9 @@
"src/libANGLE/validationGL4_autogen.h":
"0bcfc7d8a8facf729322623884861833",
"src/libEGL/libEGL_autogen.cpp":
"7a1e13d8394f75591947f5ec23a17b66",
"4be6aa51e24637bafe4df66e74f0d431",
"src/libEGL/libEGL_autogen.def":
"3f504d6280dc1d847bc2dedc51fa2640",
"2ab72f5c0cdf51ce84385f5c439b42e9",
"src/libGL/entry_points_gl_1_autogen.cpp":
"8148ccb597c5c77db7d5e532c7152243",
"src/libGL/entry_points_gl_1_autogen.h":
@ -124,7 +124,7 @@
"src/libGLESv2/cl_stubs_autogen.h":
"6d880c6b65284192b5842f0e42ad2741",
"src/libGLESv2/egl_ext_stubs_autogen.h":
"2ef3b8d087f2a97f7270b96077c93856",
"b2f236e03cfadbf8c9db972254384fa6",
"src/libGLESv2/egl_get_labeled_object_data.json":
"2f4148b2ddf34e62670e32c5e6da4937",
"src/libGLESv2/egl_stubs_autogen.h":
@ -138,9 +138,9 @@
"src/libGLESv2/entry_points_egl_autogen.h":
"3bc7a8df9deadd7cfd615d0cfad0c6a8",
"src/libGLESv2/entry_points_egl_ext_autogen.cpp":
"5386f7567505e1eceb3b82440d22508b",
"5536fcdb5b6c483ae8252167bbc74413",
"src/libGLESv2/entry_points_egl_ext_autogen.h":
"5ae83ea21ee98991b68847f66793553f",
"f35bee0b9849fa2f7adb14b476d01506",
"src/libGLESv2/entry_points_gles_1_0_autogen.cpp":
"4cb9f5d56c003d1627365cfa34470edc",
"src/libGLESv2/entry_points_gles_1_0_autogen.h":
@ -168,11 +168,11 @@
"src/libGLESv2/libGLESv2_autogen.cpp":
"ec8af97079faaccbaf7980d8c4a5b9fb",
"src/libGLESv2/libGLESv2_autogen.def":
"f379900c61e3eab00caf22455afa555b",
"b34ecc099ddb87e3beeb20cc8e47bf22",
"src/libGLESv2/libGLESv2_no_capture_autogen.def":
"9556485e5b5fe4a8c1aab7d62e5f817a",
"c682af3a3d334085cc4cb49881b18336",
"src/libGLESv2/libGLESv2_with_capture_autogen.def":
"076ef0dcd7bd6d864094bff1ee4ded28",
"c08977a11db6f5e265ea850bca2d968a",
"src/libOpenCL/libOpenCL_autogen.cpp":
"10849978c910dc1af5dd4f0c815d1581"
}

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

@ -6,7 +6,7 @@
"scripts/gl_angle_ext.xml":
"b39cf42f4ac168d1ae40888e59c51f7b",
"scripts/registry_xml.py":
"0b3ee1f9612a4b127447e0a733cf6491",
"4218ba00e734cfb650444c87f6f54cdd",
"src/libANGLE/capture/gl_enum_utils_autogen.cpp":
"2ea097051161668c1cef088043707735",
"src/libANGLE/capture/gl_enum_utils_autogen.h":

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

@ -12,7 +12,7 @@
"scripts/gl_angle_ext.xml":
"b39cf42f4ac168d1ae40888e59c51f7b",
"scripts/registry_xml.py":
"0b3ee1f9612a4b127447e0a733cf6491",
"4218ba00e734cfb650444c87f6f54cdd",
"scripts/wgl.xml":
"c36001431919e1c435f1215a85f7e1db",
"src/libGL/proc_table_wgl_autogen.cpp":
@ -20,7 +20,7 @@
"src/libGLESv2/proc_table_cl_autogen.cpp":
"ed003b0f041aaaa35b67d3fe07e61f91",
"src/libGLESv2/proc_table_egl_autogen.cpp":
"5e758196d579d4d17418a5664c12a408",
"daec75173d41d1cfb372add310c9cc43",
"src/libOpenCL/libOpenCL_autogen.map":
"bc5f5cf48227149ed321258a16eff1d7"
}

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

@ -311,6 +311,7 @@ supported_egl_extensions = [
"EGL_KHR_fence_sync",
"EGL_KHR_gl_colorspace",
"EGL_KHR_image",
"EGL_KHR_lock_surface3",
"EGL_KHR_mutable_render_buffer",
"EGL_KHR_no_config_context",
"EGL_KHR_reusable_sync",

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

@ -358,6 +358,8 @@ const char *GetEntryPointName(EntryPoint ep)
return "eglInitialize";
case EntryPoint::EGLLabelObjectKHR:
return "eglLabelObjectKHR";
case EntryPoint::EGLLockSurfaceKHR:
return "eglLockSurfaceKHR";
case EntryPoint::EGLMakeCurrent:
return "eglMakeCurrent";
case EntryPoint::EGLPostSubBufferNV:
@ -396,6 +398,8 @@ const char *GetEntryPointName(EntryPoint ep)
return "eglQueryStringiANGLE";
case EntryPoint::EGLQuerySurface:
return "eglQuerySurface";
case EntryPoint::EGLQuerySurface64KHR:
return "eglQuerySurface64KHR";
case EntryPoint::EGLQuerySurfacePointerANGLE:
return "eglQuerySurfacePointerANGLE";
case EntryPoint::EGLReacquireHighPowerGPUANGLE:
@ -436,6 +440,8 @@ const char *GetEntryPointName(EntryPoint ep)
return "eglSwapInterval";
case EntryPoint::EGLTerminate:
return "eglTerminate";
case EntryPoint::EGLUnlockSurfaceKHR:
return "eglUnlockSurfaceKHR";
case EntryPoint::EGLWaitClient:
return "eglWaitClient";
case EntryPoint::EGLWaitGL:

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

@ -185,6 +185,7 @@ enum class EntryPoint
EGLHandleGPUSwitchANGLE,
EGLInitialize,
EGLLabelObjectKHR,
EGLLockSurfaceKHR,
EGLMakeCurrent,
EGLPostSubBufferNV,
EGLPresentationTimeANDROID,
@ -204,6 +205,7 @@ enum class EntryPoint
EGLQueryString,
EGLQueryStringiANGLE,
EGLQuerySurface,
EGLQuerySurface64KHR,
EGLQuerySurfacePointerANGLE,
EGLReacquireHighPowerGPUANGLE,
EGLReleaseDeviceANGLE,
@ -224,6 +226,7 @@ enum class EntryPoint
EGLSwapBuffersWithFrameTokenANGLE,
EGLSwapInterval,
EGLTerminate,
EGLUnlockSurfaceKHR,
EGLWaitClient,
EGLWaitGL,
EGLWaitNative,

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

@ -1291,6 +1291,7 @@ std::vector<std::string> DisplayExtensions::getStrings() const
InsertExtensionString("EGL_EXT_protected_content", protectedContentEXT, &extensionStrings);
InsertExtensionString("EGL_ANGLE_create_surface_swap_interval", createSurfaceSwapIntervalANGLE, &extensionStrings);
InsertExtensionString("EGL_ANGLE_context_virtualization", contextVirtualizationANGLE, &extensionStrings);
InsertExtensionString("EGL_KHR_lock_surface3", lockSurface3KHR, &extensionStrings);
// clang-format on
return extensionStrings;

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

@ -636,6 +636,9 @@ struct DisplayExtensions
// EGL_ANGLE_context_virtualization
bool contextVirtualizationANGLE = false;
// EGL_KHR_lock_surface3
bool lockSurface3KHR = false;
};
struct DeviceExtensions

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

@ -62,6 +62,9 @@ void WriteParamCaptureReplay(std::ostream &os, const CallCapture &call, const Pa
case ParamType::TEGLAttrib:
WriteParamValueReplay<ParamType::TEGLAttrib>(os, call, param.value.EGLAttribVal);
break;
case ParamType::TEGLAttribKHR:
WriteParamValueReplay<ParamType::TEGLAttribKHR>(os, call, param.value.EGLAttribKHRVal);
break;
case ParamType::TEGLClientBuffer:
WriteParamValueReplay<ParamType::TEGLClientBuffer>(os, call,
param.value.EGLClientBufferVal);
@ -607,6 +610,8 @@ const char *ParamTypeToString(ParamType paramType)
return "GLenum";
case ParamType::TEGLAttrib:
return "GLenum";
case ParamType::TEGLAttribKHR:
return "GLenum";
case ParamType::TEGLClientBuffer:
return "GLenum";
case ParamType::TEGLConfig:

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

@ -29,6 +29,7 @@ enum class ParamType
TCullFaceMode,
TDrawElementsType,
TEGLAttrib,
TEGLAttribKHR,
TEGLClientBuffer,
TEGLConfig,
TEGLContext,
@ -171,7 +172,7 @@ enum class ParamType
TvoidPointerPointer,
};
constexpr uint32_t kParamTypeCount = 152;
constexpr uint32_t kParamTypeCount = 153;
union ParamValue
{
@ -187,6 +188,7 @@ union ParamValue
gl::CullFaceMode CullFaceModeVal;
gl::DrawElementsType DrawElementsTypeVal;
EGLAttrib EGLAttribVal;
EGLAttribKHR EGLAttribKHRVal;
EGLClientBuffer EGLClientBufferVal;
EGLConfig EGLConfigVal;
EGLContext EGLContextVal;
@ -414,6 +416,12 @@ inline EGLAttrib GetParamVal<ParamType::TEGLAttrib, EGLAttrib>(const ParamValue
return value.EGLAttribVal;
}
template <>
inline EGLAttribKHR GetParamVal<ParamType::TEGLAttribKHR, EGLAttribKHR>(const ParamValue &value)
{
return value.EGLAttribKHRVal;
}
template <>
inline EGLClientBuffer GetParamVal<ParamType::TEGLClientBuffer, EGLClientBuffer>(
const ParamValue &value)
@ -1370,6 +1378,8 @@ T AccessParamValue(ParamType paramType, const ParamValue &value)
return GetParamVal<ParamType::TDrawElementsType, T>(value);
case ParamType::TEGLAttrib:
return GetParamVal<ParamType::TEGLAttrib, T>(value);
case ParamType::TEGLAttribKHR:
return GetParamVal<ParamType::TEGLAttribKHR, T>(value);
case ParamType::TEGLClientBuffer:
return GetParamVal<ParamType::TEGLClientBuffer, T>(value);
case ParamType::TEGLConfig:
@ -1733,6 +1743,12 @@ inline void SetParamVal<ParamType::TEGLAttrib>(EGLAttrib valueIn, ParamValue *va
valueOut->EGLAttribVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TEGLAttribKHR>(EGLAttribKHR valueIn, ParamValue *valueOut)
{
valueOut->EGLAttribKHRVal = valueIn;
}
template <>
inline void SetParamVal<ParamType::TEGLClientBuffer>(EGLClientBuffer valueIn, ParamValue *valueOut)
{
@ -2680,6 +2696,9 @@ void InitParamValue(ParamType paramType, T valueIn, ParamValue *valueOut)
case ParamType::TEGLAttrib:
SetParamVal<ParamType::TEGLAttrib>(valueIn, valueOut);
break;
case ParamType::TEGLAttribKHR:
SetParamVal<ParamType::TEGLAttribKHR>(valueIn, valueOut);
break;
case ParamType::TEGLClientBuffer:
SetParamVal<ParamType::TEGLClientBuffer>(valueIn, valueOut);
break;

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

@ -258,6 +258,14 @@ bool ValidateConfigAttribute(const ValidationContext *val,
}
break;
case EGL_MATCH_FORMAT_KHR:
if (!display->getExtensions().lockSurface3KHR)
{
val->setError(EGL_BAD_ATTRIBUTE, "EGL_KHR_lock_surface3 is not enabled.");
return false;
}
break;
default:
val->setError(EGL_BAD_ATTRIBUTE, "Unknown attribute: 0x%04" PRIxPTR "X", attribute);
return false;
@ -365,6 +373,22 @@ bool ValidateConfigAttributeValue(const ValidationContext *val,
}
break;
case EGL_MATCH_FORMAT_KHR:
switch (value)
{
case EGL_FORMAT_RGB_565_KHR:
case EGL_FORMAT_RGBA_8888_KHR:
case EGL_FORMAT_RGB_565_EXACT_KHR:
case EGL_FORMAT_RGBA_8888_EXACT_KHR:
break;
default:
val->setError(EGL_BAD_ATTRIBUTE,
"EGL_KHR_lock_surface3 invalid attribute: 0x%X",
static_cast<uint32_t>(value));
return false;
}
break;
default:
break;
}
@ -5167,6 +5191,21 @@ bool ValidateQuerySurface(const ValidationContext *val,
}
break;
case EGL_BITMAP_PITCH_KHR:
case EGL_BITMAP_ORIGIN_KHR:
case EGL_BITMAP_PIXEL_RED_OFFSET_KHR:
case EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR:
case EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR:
case EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR:
case EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR:
case EGL_BITMAP_PIXEL_SIZE_KHR:
if (!display->getExtensions().lockSurface3KHR)
{
val->setError(EGL_BAD_ATTRIBUTE, "EGL_KHR_lock_surface3 is not supported.");
return false;
}
break;
default:
val->setError(EGL_BAD_ATTRIBUTE, "Invalid surface attribute: 0x%04X", attribute);
return false;
@ -5983,4 +6022,104 @@ bool ValidateCreatePlatformWindowSurface(const ValidationContext *val,
attrib_listPacked);
}
bool ValidateLockSurfaceKHR(const ValidationContext *val,
const egl::Display *dpy,
const Surface *surface,
const EGLint *attrib_list)
{
ANGLE_VALIDATION_TRY(ValidateDisplay(val, dpy));
ANGLE_VALIDATION_TRY(ValidateSurface(val, dpy, surface));
if (!dpy->getExtensions().lockSurface3KHR)
{
val->setError(EGL_BAD_ACCESS);
return false;
}
while (attrib_list != nullptr && attrib_list[0] != EGL_NONE)
{
EGLint attribute = *attrib_list++;
EGLint value = *attrib_list++;
switch (attribute)
{
case EGL_MAP_PRESERVE_PIXELS_KHR:
if (!((value == EGL_FALSE) || (value == EGL_TRUE)))
{
val->setError(EGL_BAD_ATTRIBUTE, "Invalid EGL_MAP_PRESERVE_PIXELS_KHR value");
return false;
}
break;
case EGL_LOCK_USAGE_HINT_KHR:
if ((value & (EGL_READ_SURFACE_BIT_KHR | EGL_WRITE_SURFACE_BIT_KHR)) != value)
{
val->setError(EGL_BAD_ATTRIBUTE, "Invalid EGL_LOCK_USAGE_HINT_KHR value");
return false;
}
break;
default:
val->setError(EGL_BAD_ATTRIBUTE, "Invalid query surface64 attribute");
return false;
}
}
return true;
}
bool ValidateQuerySurface64KHR(const ValidationContext *val,
const egl::Display *dpy,
const Surface *surface,
EGLint attribute,
const EGLAttribKHR *value)
{
ANGLE_VALIDATION_TRY(ValidateDisplay(val, dpy));
ANGLE_VALIDATION_TRY(ValidateSurface(val, dpy, surface));
if (!dpy->getExtensions().lockSurface3KHR)
{
val->setError(EGL_BAD_ACCESS);
return false;
}
switch (attribute)
{
case EGL_BITMAP_PITCH_KHR:
case EGL_BITMAP_ORIGIN_KHR:
case EGL_BITMAP_PIXEL_RED_OFFSET_KHR:
case EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR:
case EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR:
case EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR:
case EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR:
case EGL_BITMAP_PIXEL_SIZE_KHR:
case EGL_BITMAP_POINTER_KHR:
break;
default:
val->setError(EGL_BAD_ATTRIBUTE, "Invalid eglQuerySurface64 attribute");
return false;
}
if (value == nullptr)
{
val->setError(EGL_BAD_PARAMETER, "value is NULL.");
return false;
}
return true;
}
bool ValidateUnlockSurfaceKHR(const ValidationContext *val,
const egl::Display *dpy,
const Surface *surface)
{
ANGLE_VALIDATION_TRY(ValidateDisplay(val, dpy));
ANGLE_VALIDATION_TRY(ValidateSurface(val, dpy, surface));
if (!dpy->getExtensions().lockSurface3KHR)
{
val->setError(EGL_BAD_ACCESS);
return false;
}
return true;
}
} // namespace egl

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

@ -382,6 +382,20 @@ bool ValidateDestroyImageKHR(const ValidationContext *val,
const egl::Display *dpyPacked,
const Image *imagePacked);
// EGL_KHR_lock_surface3
bool ValidateLockSurfaceKHR(const ValidationContext *val,
const egl::Display *dpyPacked,
const Surface *surfacePacked,
const EGLint *attrib_list);
bool ValidateQuerySurface64KHR(const ValidationContext *val,
const egl::Display *dpyPacked,
const Surface *surfacePacked,
EGLint attribute,
const EGLAttribKHR *value);
bool ValidateUnlockSurfaceKHR(const ValidationContext *val,
const egl::Display *dpyPacked,
const Surface *surfacePacked);
// EGL_KHR_reusable_sync
bool ValidateSignalSyncKHR(const ValidationContext *val,
const egl::Display *dpyPacked,

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

@ -96,6 +96,9 @@ PFNEGLDESTROYSYNCKHRPROC l_EGL_DestroySyncKHR;
PFNEGLGETSYNCATTRIBKHRPROC l_EGL_GetSyncAttribKHR;
PFNEGLCREATEIMAGEKHRPROC l_EGL_CreateImageKHR;
PFNEGLDESTROYIMAGEKHRPROC l_EGL_DestroyImageKHR;
PFNEGLLOCKSURFACEKHRPROC l_EGL_LockSurfaceKHR;
PFNEGLQUERYSURFACE64KHRPROC l_EGL_QuerySurface64KHR;
PFNEGLUNLOCKSURFACEKHRPROC l_EGL_UnlockSurfaceKHR;
PFNEGLSIGNALSYNCKHRPROC l_EGL_SignalSyncKHR;
PFNEGLCREATESTREAMKHRPROC l_EGL_CreateStreamKHR;
PFNEGLDESTROYSTREAMKHRPROC l_EGL_DestroyStreamKHR;
@ -263,6 +266,12 @@ void LoadEGL_EGL(LoadProc loadProc)
reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(loadProc("EGL_CreateImageKHR"));
l_EGL_DestroyImageKHR =
reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(loadProc("EGL_DestroyImageKHR"));
l_EGL_LockSurfaceKHR =
reinterpret_cast<PFNEGLLOCKSURFACEKHRPROC>(loadProc("EGL_LockSurfaceKHR"));
l_EGL_QuerySurface64KHR =
reinterpret_cast<PFNEGLQUERYSURFACE64KHRPROC>(loadProc("EGL_QuerySurface64KHR"));
l_EGL_UnlockSurfaceKHR =
reinterpret_cast<PFNEGLUNLOCKSURFACEKHRPROC>(loadProc("EGL_UnlockSurfaceKHR"));
l_EGL_SignalSyncKHR = reinterpret_cast<PFNEGLSIGNALSYNCKHRPROC>(loadProc("EGL_SignalSyncKHR"));
l_EGL_CreateStreamKHR =
reinterpret_cast<PFNEGLCREATESTREAMKHRPROC>(loadProc("EGL_CreateStreamKHR"));

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

@ -101,6 +101,9 @@
#define EGL_GetSyncAttribKHR l_EGL_GetSyncAttribKHR
#define EGL_CreateImageKHR l_EGL_CreateImageKHR
#define EGL_DestroyImageKHR l_EGL_DestroyImageKHR
#define EGL_LockSurfaceKHR l_EGL_LockSurfaceKHR
#define EGL_QuerySurface64KHR l_EGL_QuerySurface64KHR
#define EGL_UnlockSurfaceKHR l_EGL_UnlockSurfaceKHR
#define EGL_SignalSyncKHR l_EGL_SignalSyncKHR
#define EGL_CreateStreamKHR l_EGL_CreateStreamKHR
#define EGL_DestroyStreamKHR l_EGL_DestroyStreamKHR
@ -207,6 +210,9 @@ ANGLE_NO_EXPORT extern PFNEGLDESTROYSYNCKHRPROC l_EGL_DestroySyncKHR;
ANGLE_NO_EXPORT extern PFNEGLGETSYNCATTRIBKHRPROC l_EGL_GetSyncAttribKHR;
ANGLE_NO_EXPORT extern PFNEGLCREATEIMAGEKHRPROC l_EGL_CreateImageKHR;
ANGLE_NO_EXPORT extern PFNEGLDESTROYIMAGEKHRPROC l_EGL_DestroyImageKHR;
ANGLE_NO_EXPORT extern PFNEGLLOCKSURFACEKHRPROC l_EGL_LockSurfaceKHR;
ANGLE_NO_EXPORT extern PFNEGLQUERYSURFACE64KHRPROC l_EGL_QuerySurface64KHR;
ANGLE_NO_EXPORT extern PFNEGLUNLOCKSURFACEKHRPROC l_EGL_UnlockSurfaceKHR;
ANGLE_NO_EXPORT extern PFNEGLSIGNALSYNCKHRPROC l_EGL_SignalSyncKHR;
ANGLE_NO_EXPORT extern PFNEGLCREATESTREAMKHRPROC l_EGL_CreateStreamKHR;
ANGLE_NO_EXPORT extern PFNEGLDESTROYSTREAMKHRPROC l_EGL_DestroyStreamKHR;

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

@ -728,6 +728,30 @@ EGLBoolean EGLAPIENTRY eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
return EGL_DestroyImageKHR(dpy, image);
}
// EGL_KHR_lock_surface3
EGLBoolean EGLAPIENTRY eglLockSurfaceKHR(EGLDisplay dpy,
EGLSurface surface,
const EGLint *attrib_list)
{
EnsureEGLLoaded();
return EGL_LockSurfaceKHR(dpy, surface, attrib_list);
}
EGLBoolean EGLAPIENTRY eglQuerySurface64KHR(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
EGLAttribKHR *value)
{
EnsureEGLLoaded();
return EGL_QuerySurface64KHR(dpy, surface, attribute, value);
}
EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
{
EnsureEGLLoaded();
return EGL_UnlockSurfaceKHR(dpy, surface);
}
// EGL_KHR_reusable_sync
EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
{

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

@ -143,6 +143,11 @@ EXPORTS
eglCreateImageKHR
eglDestroyImageKHR
; EGL_KHR_lock_surface3
eglLockSurfaceKHR
eglQuerySurface64KHR
eglUnlockSurfaceKHR
; EGL_KHR_reusable_sync
eglSignalSyncKHR

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

@ -793,4 +793,30 @@ EGLBoolean QueryDisplayAttribANGLE(Thread *thread,
thread->setSuccess();
return EGL_TRUE;
}
EGLBoolean LockSurfaceKHR(Thread *thread,
egl::Display *display,
Surface *surface,
const EGLint *attrib_list)
{
thread->setSuccess();
return EGL_TRUE;
}
EGLBoolean UnlockSurfaceKHR(Thread *thread, egl::Display *display, Surface *surface)
{
thread->setSuccess();
return EGL_TRUE;
}
EGLBoolean QuerySurface64KHR(Thread *thread,
egl::Display *display,
Surface *surface,
EGLint attribute,
EGLAttribKHR *value)
{
thread->setSuccess();
return EGL_TRUE;
}
} // namespace egl

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

@ -84,6 +84,10 @@ EGLint LabelObjectKHR(Thread *thread,
ObjectType objectTypePacked,
EGLObjectKHR object,
EGLLabelKHR label);
EGLBoolean LockSurfaceKHR(Thread *thread,
egl::Display *dpyPacked,
Surface *surfacePacked,
const EGLint *attrib_list);
EGLBoolean PostSubBufferNV(Thread *thread,
egl::Display *dpyPacked,
Surface *surfacePacked,
@ -140,6 +144,11 @@ EGLBoolean QueryStreamu64KHR(Thread *thread,
Stream *streamPacked,
EGLenum attribute,
EGLuint64KHR *value);
EGLBoolean QuerySurface64KHR(Thread *thread,
egl::Display *dpyPacked,
Surface *surfacePacked,
EGLint attribute,
EGLAttribKHR *value);
EGLBoolean QuerySurfacePointerANGLE(Thread *thread,
egl::Display *dpyPacked,
Surface *surfacePacked,
@ -169,6 +178,7 @@ EGLBoolean SwapBuffersWithDamageKHR(Thread *thread,
Surface *surfacePacked,
const EGLint *rects,
EGLint n_rects);
EGLBoolean UnlockSurfaceKHR(Thread *thread, egl::Display *dpyPacked, Surface *surfacePacked);
EGLint WaitSyncKHR(Thread *thread, egl::Display *dpyPacked, Sync *syncPacked, EGLint flags);
EGLDeviceEXT CreateDeviceANGLE(Thread *thread,
EGLint device_type,

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

@ -854,6 +854,67 @@ EGLBoolean EGLAPIENTRY EGL_DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image)
return DestroyImageKHR(thread, dpyPacked, imagePacked);
}
// EGL_KHR_lock_surface3
EGLBoolean EGLAPIENTRY EGL_LockSurfaceKHR(EGLDisplay dpy,
EGLSurface surface,
const EGLint *attrib_list)
{
ANGLE_SCOPED_GLOBAL_LOCK();
EGL_EVENT(LockSurfaceKHR,
"dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR
"",
(uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)attrib_list);
Thread *thread = egl::GetCurrentThread();
egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
Surface *surfacePacked = PackParam<Surface *>(surface);
ANGLE_EGL_VALIDATE(thread, LockSurfaceKHR, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,
surfacePacked, attrib_list);
return LockSurfaceKHR(thread, dpyPacked, surfacePacked, attrib_list);
}
EGLBoolean EGLAPIENTRY EGL_QuerySurface64KHR(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
EGLAttribKHR *value)
{
ANGLE_SCOPED_GLOBAL_LOCK();
EGL_EVENT(QuerySurface64KHR,
"dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR
", attribute = %d, value = 0x%016" PRIxPTR "",
(uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value);
Thread *thread = egl::GetCurrentThread();
egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
Surface *surfacePacked = PackParam<Surface *>(surface);
ANGLE_EGL_VALIDATE(thread, QuerySurface64KHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
dpyPacked, surfacePacked, attribute, value);
return QuerySurface64KHR(thread, dpyPacked, surfacePacked, attribute, value);
}
EGLBoolean EGLAPIENTRY EGL_UnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
{
ANGLE_SCOPED_GLOBAL_LOCK();
EGL_EVENT(UnlockSurfaceKHR, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "",
(uintptr_t)dpy, (uintptr_t)surface);
Thread *thread = egl::GetCurrentThread();
egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);
Surface *surfacePacked = PackParam<Surface *>(surface);
ANGLE_EGL_VALIDATE(thread, UnlockSurfaceKHR, GetDisplayIfValid(dpyPacked), EGLBoolean,
dpyPacked, surfacePacked);
return UnlockSurfaceKHR(thread, dpyPacked, surfacePacked);
}
// EGL_KHR_reusable_sync
EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode)
{

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

@ -184,6 +184,16 @@ ANGLE_EXPORT EGLImageKHR EGLAPIENTRY EGL_CreateImageKHR(EGLDisplay dpy,
const EGLint *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_DestroyImageKHR(EGLDisplay dpy, EGLImageKHR image);
// EGL_KHR_lock_surface3
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_LockSurfaceKHR(EGLDisplay dpy,
EGLSurface surface,
const EGLint *attrib_list);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_QuerySurface64KHR(EGLDisplay dpy,
EGLSurface surface,
EGLint attribute,
EGLAttribKHR *value);
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_UnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface);
// EGL_KHR_reusable_sync
ANGLE_EXPORT EGLBoolean EGLAPIENTRY EGL_SignalSyncKHR(EGLDisplay dpy,
EGLSyncKHR sync,

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

@ -1254,6 +1254,11 @@ EXPORTS
EGL_CreateImageKHR
EGL_DestroyImageKHR
; EGL_KHR_lock_surface3
EGL_LockSurfaceKHR
EGL_QuerySurface64KHR
EGL_UnlockSurfaceKHR
; EGL_KHR_reusable_sync
EGL_SignalSyncKHR

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

@ -1254,6 +1254,11 @@ EXPORTS
EGL_CreateImageKHR
EGL_DestroyImageKHR
; EGL_KHR_lock_surface3
EGL_LockSurfaceKHR
EGL_QuerySurface64KHR
EGL_UnlockSurfaceKHR
; EGL_KHR_reusable_sync
EGL_SignalSyncKHR

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

@ -1254,6 +1254,11 @@ EXPORTS
EGL_CreateImageKHR
EGL_DestroyImageKHR
; EGL_KHR_lock_surface3
EGL_LockSurfaceKHR
EGL_QuerySurface64KHR
EGL_UnlockSurfaceKHR
; EGL_KHR_reusable_sync
EGL_SignalSyncKHR

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

@ -84,6 +84,7 @@ const ProcEntry g_procTable[] = {
{"eglHandleGPUSwitchANGLE", P(EGL_HandleGPUSwitchANGLE)},
{"eglInitialize", P(EGL_Initialize)},
{"eglLabelObjectKHR", P(EGL_LabelObjectKHR)},
{"eglLockSurfaceKHR", P(EGL_LockSurfaceKHR)},
{"eglMakeCurrent", P(EGL_MakeCurrent)},
{"eglPostSubBufferNV", P(EGL_PostSubBufferNV)},
{"eglPresentationTimeANDROID", P(EGL_PresentationTimeANDROID)},
@ -103,6 +104,7 @@ const ProcEntry g_procTable[] = {
{"eglQueryString", P(EGL_QueryString)},
{"eglQueryStringiANGLE", P(EGL_QueryStringiANGLE)},
{"eglQuerySurface", P(EGL_QuerySurface)},
{"eglQuerySurface64KHR", P(EGL_QuerySurface64KHR)},
{"eglQuerySurfacePointerANGLE", P(EGL_QuerySurfacePointerANGLE)},
{"eglReacquireHighPowerGPUANGLE", P(EGL_ReacquireHighPowerGPUANGLE)},
{"eglReleaseDeviceANGLE", P(EGL_ReleaseDeviceANGLE)},
@ -124,6 +126,7 @@ const ProcEntry g_procTable[] = {
{"eglSwapBuffersWithFrameTokenANGLE", P(EGL_SwapBuffersWithFrameTokenANGLE)},
{"eglSwapInterval", P(EGL_SwapInterval)},
{"eglTerminate", P(EGL_Terminate)},
{"eglUnlockSurfaceKHR", P(EGL_UnlockSurfaceKHR)},
{"eglWaitClient", P(EGL_WaitClient)},
{"eglWaitGL", P(EGL_WaitGL)},
{"eglWaitNative", P(EGL_WaitNative)},
@ -919,5 +922,5 @@ const ProcEntry g_procTable[] = {
{"glWaitSync", P(GL_WaitSync)},
{"glWeightPointerOES", P(GL_WeightPointerOES)}};
const size_t g_numProcs = 886;
const size_t g_numProcs = 889;
} // namespace egl

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

@ -104,6 +104,9 @@ ANGLE_TRACE_LOADER_EXPORT PFNEGLDESTROYSYNCKHRPROC t_eglDestroySyncKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLGETSYNCATTRIBKHRPROC t_eglGetSyncAttribKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLCREATEIMAGEKHRPROC t_eglCreateImageKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLDESTROYIMAGEKHRPROC t_eglDestroyImageKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLLOCKSURFACEKHRPROC t_eglLockSurfaceKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLQUERYSURFACE64KHRPROC t_eglQuerySurface64KHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLUNLOCKSURFACEKHRPROC t_eglUnlockSurfaceKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLSIGNALSYNCKHRPROC t_eglSignalSyncKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLCREATESTREAMKHRPROC t_eglCreateStreamKHR;
ANGLE_TRACE_LOADER_EXPORT PFNEGLDESTROYSTREAMKHRPROC t_eglDestroyStreamKHR;
@ -266,6 +269,11 @@ void LoadEGL(LoadProc loadProc)
t_eglCreateImageKHR = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(loadProc("eglCreateImageKHR"));
t_eglDestroyImageKHR =
reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(loadProc("eglDestroyImageKHR"));
t_eglLockSurfaceKHR = reinterpret_cast<PFNEGLLOCKSURFACEKHRPROC>(loadProc("eglLockSurfaceKHR"));
t_eglQuerySurface64KHR =
reinterpret_cast<PFNEGLQUERYSURFACE64KHRPROC>(loadProc("eglQuerySurface64KHR"));
t_eglUnlockSurfaceKHR =
reinterpret_cast<PFNEGLUNLOCKSURFACEKHRPROC>(loadProc("eglUnlockSurfaceKHR"));
t_eglSignalSyncKHR = reinterpret_cast<PFNEGLSIGNALSYNCKHRPROC>(loadProc("eglSignalSyncKHR"));
t_eglCreateStreamKHR =
reinterpret_cast<PFNEGLCREATESTREAMKHRPROC>(loadProc("eglCreateStreamKHR"));

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

@ -102,6 +102,9 @@
#define eglGetSyncAttribKHR t_eglGetSyncAttribKHR
#define eglCreateImageKHR t_eglCreateImageKHR
#define eglDestroyImageKHR t_eglDestroyImageKHR
#define eglLockSurfaceKHR t_eglLockSurfaceKHR
#define eglQuerySurface64KHR t_eglQuerySurface64KHR
#define eglUnlockSurfaceKHR t_eglUnlockSurfaceKHR
#define eglSignalSyncKHR t_eglSignalSyncKHR
#define eglCreateStreamKHR t_eglCreateStreamKHR
#define eglDestroyStreamKHR t_eglDestroyStreamKHR
@ -215,6 +218,9 @@ ANGLE_TRACE_LOADER_EXPORT extern PFNEGLDESTROYSYNCKHRPROC t_eglDestroySyncKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLGETSYNCATTRIBKHRPROC t_eglGetSyncAttribKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLCREATEIMAGEKHRPROC t_eglCreateImageKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLDESTROYIMAGEKHRPROC t_eglDestroyImageKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLLOCKSURFACEKHRPROC t_eglLockSurfaceKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLQUERYSURFACE64KHRPROC t_eglQuerySurface64KHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLUNLOCKSURFACEKHRPROC t_eglUnlockSurfaceKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLSIGNALSYNCKHRPROC t_eglSignalSyncKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLCREATESTREAMKHRPROC t_eglCreateStreamKHR;
ANGLE_TRACE_LOADER_EXPORT extern PFNEGLDESTROYSTREAMKHRPROC t_eglDestroyStreamKHR;

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

@ -99,6 +99,9 @@ ANGLE_UTIL_EXPORT PFNEGLDESTROYSYNCKHRPROC l_eglDestroySyncKHR;
ANGLE_UTIL_EXPORT PFNEGLGETSYNCATTRIBKHRPROC l_eglGetSyncAttribKHR;
ANGLE_UTIL_EXPORT PFNEGLCREATEIMAGEKHRPROC l_eglCreateImageKHR;
ANGLE_UTIL_EXPORT PFNEGLDESTROYIMAGEKHRPROC l_eglDestroyImageKHR;
ANGLE_UTIL_EXPORT PFNEGLLOCKSURFACEKHRPROC l_eglLockSurfaceKHR;
ANGLE_UTIL_EXPORT PFNEGLQUERYSURFACE64KHRPROC l_eglQuerySurface64KHR;
ANGLE_UTIL_EXPORT PFNEGLUNLOCKSURFACEKHRPROC l_eglUnlockSurfaceKHR;
ANGLE_UTIL_EXPORT PFNEGLSIGNALSYNCKHRPROC l_eglSignalSyncKHR;
ANGLE_UTIL_EXPORT PFNEGLCREATESTREAMKHRPROC l_eglCreateStreamKHR;
ANGLE_UTIL_EXPORT PFNEGLDESTROYSTREAMKHRPROC l_eglDestroyStreamKHR;
@ -261,6 +264,11 @@ void LoadEGL(LoadProc loadProc)
l_eglCreateImageKHR = reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(loadProc("eglCreateImageKHR"));
l_eglDestroyImageKHR =
reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(loadProc("eglDestroyImageKHR"));
l_eglLockSurfaceKHR = reinterpret_cast<PFNEGLLOCKSURFACEKHRPROC>(loadProc("eglLockSurfaceKHR"));
l_eglQuerySurface64KHR =
reinterpret_cast<PFNEGLQUERYSURFACE64KHRPROC>(loadProc("eglQuerySurface64KHR"));
l_eglUnlockSurfaceKHR =
reinterpret_cast<PFNEGLUNLOCKSURFACEKHRPROC>(loadProc("eglUnlockSurfaceKHR"));
l_eglSignalSyncKHR = reinterpret_cast<PFNEGLSIGNALSYNCKHRPROC>(loadProc("eglSignalSyncKHR"));
l_eglCreateStreamKHR =
reinterpret_cast<PFNEGLCREATESTREAMKHRPROC>(loadProc("eglCreateStreamKHR"));

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

@ -102,6 +102,9 @@
#define eglGetSyncAttribKHR l_eglGetSyncAttribKHR
#define eglCreateImageKHR l_eglCreateImageKHR
#define eglDestroyImageKHR l_eglDestroyImageKHR
#define eglLockSurfaceKHR l_eglLockSurfaceKHR
#define eglQuerySurface64KHR l_eglQuerySurface64KHR
#define eglUnlockSurfaceKHR l_eglUnlockSurfaceKHR
#define eglSignalSyncKHR l_eglSignalSyncKHR
#define eglCreateStreamKHR l_eglCreateStreamKHR
#define eglDestroyStreamKHR l_eglDestroyStreamKHR
@ -208,6 +211,9 @@ ANGLE_UTIL_EXPORT extern PFNEGLDESTROYSYNCKHRPROC l_eglDestroySyncKHR;
ANGLE_UTIL_EXPORT extern PFNEGLGETSYNCATTRIBKHRPROC l_eglGetSyncAttribKHR;
ANGLE_UTIL_EXPORT extern PFNEGLCREATEIMAGEKHRPROC l_eglCreateImageKHR;
ANGLE_UTIL_EXPORT extern PFNEGLDESTROYIMAGEKHRPROC l_eglDestroyImageKHR;
ANGLE_UTIL_EXPORT extern PFNEGLLOCKSURFACEKHRPROC l_eglLockSurfaceKHR;
ANGLE_UTIL_EXPORT extern PFNEGLQUERYSURFACE64KHRPROC l_eglQuerySurface64KHR;
ANGLE_UTIL_EXPORT extern PFNEGLUNLOCKSURFACEKHRPROC l_eglUnlockSurfaceKHR;
ANGLE_UTIL_EXPORT extern PFNEGLSIGNALSYNCKHRPROC l_eglSignalSyncKHR;
ANGLE_UTIL_EXPORT extern PFNEGLCREATESTREAMKHRPROC l_eglCreateStreamKHR;
ANGLE_UTIL_EXPORT extern PFNEGLDESTROYSTREAMKHRPROC l_eglDestroyStreamKHR;