Path: blob/main_old/src/libGLESv2/entry_points_egl_autogen.cpp
1693 views
// GENERATED FILE - DO NOT EDIT.1// Generated by generate_entry_points.py using data from egl.xml.2//3// Copyright 2020 The ANGLE Project Authors. All rights reserved.4// Use of this source code is governed by a BSD-style license that can be5// found in the LICENSE file.6//7// entry_points_egl_autogen.cpp:8// Defines the EGL entry points.910#include "libGLESv2/entry_points_egl_autogen.h"1112#include "libANGLE/entry_points_utils.h"13#include "libANGLE/validationEGL_autogen.h"14#include "libGLESv2/egl_stubs_autogen.h"15#include "libGLESv2/global_state.h"1617using namespace egl;1819extern "C" {2021// EGL 1.022EGLBoolean EGLAPIENTRY EGL_ChooseConfig(EGLDisplay dpy,23const EGLint *attrib_list,24EGLConfig *configs,25EGLint config_size,26EGLint *num_config)27{28ANGLE_SCOPED_GLOBAL_LOCK();29EGL_EVENT(ChooseConfig,30"dpy = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR ", configs = 0x%016" PRIxPTR31", config_size = %d, num_config = 0x%016" PRIxPTR "",32(uintptr_t)dpy, (uintptr_t)attrib_list, (uintptr_t)configs, config_size,33(uintptr_t)num_config);3435Thread *thread = egl::GetCurrentThread();3637egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);38const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);3940ANGLE_EGL_VALIDATE(thread, ChooseConfig, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,41attrib_listPacked, configs, config_size, num_config);4243return ChooseConfig(thread, dpyPacked, attrib_listPacked, configs, config_size, num_config);44}4546EGLBoolean EGLAPIENTRY EGL_CopyBuffers(EGLDisplay dpy,47EGLSurface surface,48EGLNativePixmapType target)49{50ANGLE_SCOPED_GLOBAL_LOCK();51EGL_EVENT(CopyBuffers,52"dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", target = 0x%016" PRIxPTR "",53(uintptr_t)dpy, (uintptr_t)surface, (uintptr_t)target);5455Thread *thread = egl::GetCurrentThread();5657egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);58Surface *surfacePacked = PackParam<Surface *>(surface);5960ANGLE_EGL_VALIDATE(thread, CopyBuffers, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,61surfacePacked, target);6263return CopyBuffers(thread, dpyPacked, surfacePacked, target);64}6566EGLContext EGLAPIENTRY EGL_CreateContext(EGLDisplay dpy,67EGLConfig config,68EGLContext share_context,69const EGLint *attrib_list)70{71ANGLE_SCOPED_GLOBAL_LOCK();72EGL_EVENT(CreateContext,73"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", share_context = 0x%016" PRIxPTR74", attrib_list = 0x%016" PRIxPTR "",75(uintptr_t)dpy, (uintptr_t)config, (uintptr_t)share_context, (uintptr_t)attrib_list);7677Thread *thread = egl::GetCurrentThread();7879egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);80Config *configPacked = PackParam<Config *>(config);81gl::Context *share_contextPacked = PackParam<gl::Context *>(share_context);82const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);8384ANGLE_EGL_VALIDATE(thread, CreateContext, GetDisplayIfValid(dpyPacked), EGLContext, dpyPacked,85configPacked, share_contextPacked, attrib_listPacked);8687return CreateContext(thread, dpyPacked, configPacked, share_contextPacked, attrib_listPacked);88}8990EGLSurface EGLAPIENTRY EGL_CreatePbufferSurface(EGLDisplay dpy,91EGLConfig config,92const EGLint *attrib_list)93{94ANGLE_SCOPED_GLOBAL_LOCK();95EGL_EVENT(CreatePbufferSurface,96"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR97"",98(uintptr_t)dpy, (uintptr_t)config, (uintptr_t)attrib_list);99100Thread *thread = egl::GetCurrentThread();101102egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);103Config *configPacked = PackParam<Config *>(config);104const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);105106ANGLE_EGL_VALIDATE(thread, CreatePbufferSurface, GetDisplayIfValid(dpyPacked), EGLSurface,107dpyPacked, configPacked, attrib_listPacked);108109return CreatePbufferSurface(thread, dpyPacked, configPacked, attrib_listPacked);110}111112EGLSurface EGLAPIENTRY EGL_CreatePixmapSurface(EGLDisplay dpy,113EGLConfig config,114EGLNativePixmapType pixmap,115const EGLint *attrib_list)116{117ANGLE_SCOPED_GLOBAL_LOCK();118EGL_EVENT(CreatePixmapSurface,119"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", pixmap = 0x%016" PRIxPTR120", attrib_list = 0x%016" PRIxPTR "",121(uintptr_t)dpy, (uintptr_t)config, (uintptr_t)pixmap, (uintptr_t)attrib_list);122123Thread *thread = egl::GetCurrentThread();124125egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);126Config *configPacked = PackParam<Config *>(config);127const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);128129ANGLE_EGL_VALIDATE(thread, CreatePixmapSurface, GetDisplayIfValid(dpyPacked), EGLSurface,130dpyPacked, configPacked, pixmap, attrib_listPacked);131132return CreatePixmapSurface(thread, dpyPacked, configPacked, pixmap, attrib_listPacked);133}134135EGLSurface EGLAPIENTRY EGL_CreateWindowSurface(EGLDisplay dpy,136EGLConfig config,137EGLNativeWindowType win,138const EGLint *attrib_list)139{140ANGLE_SCOPED_GLOBAL_LOCK();141EGL_EVENT(CreateWindowSurface,142"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", win = 0x%016" PRIxPTR143", attrib_list = 0x%016" PRIxPTR "",144(uintptr_t)dpy, (uintptr_t)config, (uintptr_t)win, (uintptr_t)attrib_list);145146Thread *thread = egl::GetCurrentThread();147148egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);149Config *configPacked = PackParam<Config *>(config);150const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);151152ANGLE_EGL_VALIDATE(thread, CreateWindowSurface, GetDisplayIfValid(dpyPacked), EGLSurface,153dpyPacked, configPacked, win, attrib_listPacked);154155return CreateWindowSurface(thread, dpyPacked, configPacked, win, attrib_listPacked);156}157158EGLBoolean EGLAPIENTRY EGL_DestroyContext(EGLDisplay dpy, EGLContext ctx)159{160ANGLE_SCOPED_GLOBAL_LOCK();161EGL_EVENT(DestroyContext, "dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR "", (uintptr_t)dpy,162(uintptr_t)ctx);163164Thread *thread = egl::GetCurrentThread();165166egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);167gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);168169ANGLE_EGL_VALIDATE(thread, DestroyContext, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,170ctxPacked);171172return DestroyContext(thread, dpyPacked, ctxPacked);173}174175EGLBoolean EGLAPIENTRY EGL_DestroySurface(EGLDisplay dpy, EGLSurface surface)176{177ANGLE_SCOPED_GLOBAL_LOCK();178EGL_EVENT(DestroySurface, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "",179(uintptr_t)dpy, (uintptr_t)surface);180181Thread *thread = egl::GetCurrentThread();182183egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);184Surface *surfacePacked = PackParam<Surface *>(surface);185186ANGLE_EGL_VALIDATE(thread, DestroySurface, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,187surfacePacked);188189return DestroySurface(thread, dpyPacked, surfacePacked);190}191192EGLBoolean EGLAPIENTRY EGL_GetConfigAttrib(EGLDisplay dpy,193EGLConfig config,194EGLint attribute,195EGLint *value)196{197ANGLE_SCOPED_GLOBAL_LOCK();198EGL_EVENT(GetConfigAttrib,199"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR200", attribute = %d, value = 0x%016" PRIxPTR "",201(uintptr_t)dpy, (uintptr_t)config, attribute, (uintptr_t)value);202203Thread *thread = egl::GetCurrentThread();204205egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);206Config *configPacked = PackParam<Config *>(config);207208ANGLE_EGL_VALIDATE(thread, GetConfigAttrib, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,209configPacked, attribute, value);210211return GetConfigAttrib(thread, dpyPacked, configPacked, attribute, value);212}213214EGLBoolean EGLAPIENTRY EGL_GetConfigs(EGLDisplay dpy,215EGLConfig *configs,216EGLint config_size,217EGLint *num_config)218{219ANGLE_SCOPED_GLOBAL_LOCK();220EGL_EVENT(GetConfigs,221"dpy = 0x%016" PRIxPTR ", configs = 0x%016" PRIxPTR222", config_size = %d, num_config = 0x%016" PRIxPTR "",223(uintptr_t)dpy, (uintptr_t)configs, config_size, (uintptr_t)num_config);224225Thread *thread = egl::GetCurrentThread();226227egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);228229ANGLE_EGL_VALIDATE(thread, GetConfigs, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,230configs, config_size, num_config);231232return GetConfigs(thread, dpyPacked, configs, config_size, num_config);233}234235EGLDisplay EGLAPIENTRY EGL_GetCurrentDisplay()236{237ANGLE_SCOPED_GLOBAL_LOCK();238EGL_EVENT(GetCurrentDisplay, "");239240Thread *thread = egl::GetCurrentThread();241242ANGLE_EGL_VALIDATE(thread, GetCurrentDisplay, nullptr, EGLDisplay);243244return GetCurrentDisplay(thread);245}246247EGLSurface EGLAPIENTRY EGL_GetCurrentSurface(EGLint readdraw)248{249ANGLE_SCOPED_GLOBAL_LOCK();250EGL_EVENT(GetCurrentSurface, "readdraw = %d", readdraw);251252Thread *thread = egl::GetCurrentThread();253254ANGLE_EGL_VALIDATE(thread, GetCurrentSurface, nullptr, EGLSurface, readdraw);255256return GetCurrentSurface(thread, readdraw);257}258259EGLDisplay EGLAPIENTRY EGL_GetDisplay(EGLNativeDisplayType display_id)260{261ANGLE_SCOPED_GLOBAL_LOCK();262EGL_EVENT(GetDisplay, "display_id = 0x%016" PRIxPTR "", (uintptr_t)display_id);263264Thread *thread = egl::GetCurrentThread();265266ANGLE_EGL_VALIDATE(thread, GetDisplay, nullptr, EGLDisplay, display_id);267268return GetDisplay(thread, display_id);269}270271EGLint EGLAPIENTRY EGL_GetError()272{273ANGLE_SCOPED_GLOBAL_LOCK();274EGL_EVENT(GetError, "");275276Thread *thread = egl::GetCurrentThread();277278ANGLE_EGL_VALIDATE(thread, GetError, nullptr, EGLint);279280return GetError(thread);281}282283__eglMustCastToProperFunctionPointerType EGLAPIENTRY EGL_GetProcAddress(const char *procname)284{285ANGLE_SCOPED_GLOBAL_LOCK();286EGL_EVENT(GetProcAddress, "procname = 0x%016" PRIxPTR "", (uintptr_t)procname);287288Thread *thread = egl::GetCurrentThread();289290ANGLE_EGL_VALIDATE(thread, GetProcAddress, nullptr, __eglMustCastToProperFunctionPointerType,291procname);292293return GetProcAddress(thread, procname);294}295296EGLBoolean EGLAPIENTRY EGL_Initialize(EGLDisplay dpy, EGLint *major, EGLint *minor)297{298ANGLE_SCOPED_GLOBAL_LOCK();299EGL_EVENT(Initialize,300"dpy = 0x%016" PRIxPTR ", major = 0x%016" PRIxPTR ", minor = 0x%016" PRIxPTR "",301(uintptr_t)dpy, (uintptr_t)major, (uintptr_t)minor);302303Thread *thread = egl::GetCurrentThread();304305egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);306307ANGLE_EGL_VALIDATE(thread, Initialize, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,308major, minor);309310return Initialize(thread, dpyPacked, major, minor);311}312313EGLBoolean EGLAPIENTRY EGL_MakeCurrent(EGLDisplay dpy,314EGLSurface draw,315EGLSurface read,316EGLContext ctx)317{318ANGLE_SCOPED_GLOBAL_LOCK();319EGL_EVENT(MakeCurrent,320"dpy = 0x%016" PRIxPTR ", draw = 0x%016" PRIxPTR ", read = 0x%016" PRIxPTR321", ctx = 0x%016" PRIxPTR "",322(uintptr_t)dpy, (uintptr_t)draw, (uintptr_t)read, (uintptr_t)ctx);323324Thread *thread = egl::GetCurrentThread();325326egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);327Surface *drawPacked = PackParam<Surface *>(draw);328Surface *readPacked = PackParam<Surface *>(read);329gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);330331ANGLE_EGL_VALIDATE(thread, MakeCurrent, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,332drawPacked, readPacked, ctxPacked);333334return MakeCurrent(thread, dpyPacked, drawPacked, readPacked, ctxPacked);335}336337EGLBoolean EGLAPIENTRY EGL_QueryContext(EGLDisplay dpy,338EGLContext ctx,339EGLint attribute,340EGLint *value)341{342ANGLE_SCOPED_GLOBAL_LOCK();343EGL_EVENT(QueryContext,344"dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR345", attribute = %d, value = 0x%016" PRIxPTR "",346(uintptr_t)dpy, (uintptr_t)ctx, attribute, (uintptr_t)value);347348Thread *thread = egl::GetCurrentThread();349350egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);351gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);352353ANGLE_EGL_VALIDATE(thread, QueryContext, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,354ctxPacked, attribute, value);355356return QueryContext(thread, dpyPacked, ctxPacked, attribute, value);357}358359const char *EGLAPIENTRY EGL_QueryString(EGLDisplay dpy, EGLint name)360{361ANGLE_SCOPED_GLOBAL_LOCK();362EGL_EVENT(QueryString, "dpy = 0x%016" PRIxPTR ", name = %d", (uintptr_t)dpy, name);363364Thread *thread = egl::GetCurrentThread();365366egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);367368ANGLE_EGL_VALIDATE(thread, QueryString, GetDisplayIfValid(dpyPacked), const char *, dpyPacked,369name);370371return QueryString(thread, dpyPacked, name);372}373374EGLBoolean EGLAPIENTRY EGL_QuerySurface(EGLDisplay dpy,375EGLSurface surface,376EGLint attribute,377EGLint *value)378{379ANGLE_SCOPED_GLOBAL_LOCK();380EGL_EVENT(QuerySurface,381"dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR382", attribute = %d, value = 0x%016" PRIxPTR "",383(uintptr_t)dpy, (uintptr_t)surface, attribute, (uintptr_t)value);384385Thread *thread = egl::GetCurrentThread();386387egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);388Surface *surfacePacked = PackParam<Surface *>(surface);389390ANGLE_EGL_VALIDATE(thread, QuerySurface, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,391surfacePacked, attribute, value);392393return QuerySurface(thread, dpyPacked, surfacePacked, attribute, value);394}395396EGLBoolean EGLAPIENTRY EGL_SwapBuffers(EGLDisplay dpy, EGLSurface surface)397{398ANGLE_SCOPED_GLOBAL_LOCK();399EGL_EVENT(SwapBuffers, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR "", (uintptr_t)dpy,400(uintptr_t)surface);401402Thread *thread = egl::GetCurrentThread();403404egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);405Surface *surfacePacked = PackParam<Surface *>(surface);406407ANGLE_EGL_VALIDATE(thread, SwapBuffers, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,408surfacePacked);409410return SwapBuffers(thread, dpyPacked, surfacePacked);411}412413EGLBoolean EGLAPIENTRY EGL_Terminate(EGLDisplay dpy)414{415ANGLE_SCOPED_GLOBAL_LOCK();416EGL_EVENT(Terminate, "dpy = 0x%016" PRIxPTR "", (uintptr_t)dpy);417418Thread *thread = egl::GetCurrentThread();419420egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);421422ANGLE_EGL_VALIDATE(thread, Terminate, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked);423424return Terminate(thread, dpyPacked);425}426427EGLBoolean EGLAPIENTRY EGL_WaitGL()428{429ANGLE_SCOPED_GLOBAL_LOCK();430EGL_EVENT(WaitGL, "");431432Thread *thread = egl::GetCurrentThread();433434ANGLE_EGL_VALIDATE(thread, WaitGL, nullptr, EGLBoolean);435436return WaitGL(thread);437}438439EGLBoolean EGLAPIENTRY EGL_WaitNative(EGLint engine)440{441ANGLE_SCOPED_GLOBAL_LOCK();442EGL_EVENT(WaitNative, "engine = %d", engine);443444Thread *thread = egl::GetCurrentThread();445446ANGLE_EGL_VALIDATE(thread, WaitNative, nullptr, EGLBoolean, engine);447448return WaitNative(thread, engine);449}450451// EGL 1.1452EGLBoolean EGLAPIENTRY EGL_BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)453{454ANGLE_SCOPED_GLOBAL_LOCK();455EGL_EVENT(BindTexImage, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", buffer = %d",456(uintptr_t)dpy, (uintptr_t)surface, buffer);457458Thread *thread = egl::GetCurrentThread();459460egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);461Surface *surfacePacked = PackParam<Surface *>(surface);462463ANGLE_EGL_VALIDATE(thread, BindTexImage, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,464surfacePacked, buffer);465466return BindTexImage(thread, dpyPacked, surfacePacked, buffer);467}468469EGLBoolean EGLAPIENTRY EGL_ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer)470{471ANGLE_SCOPED_GLOBAL_LOCK();472EGL_EVENT(ReleaseTexImage, "dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", buffer = %d",473(uintptr_t)dpy, (uintptr_t)surface, buffer);474475Thread *thread = egl::GetCurrentThread();476477egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);478Surface *surfacePacked = PackParam<Surface *>(surface);479480ANGLE_EGL_VALIDATE(thread, ReleaseTexImage, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,481surfacePacked, buffer);482483return ReleaseTexImage(thread, dpyPacked, surfacePacked, buffer);484}485486EGLBoolean EGLAPIENTRY EGL_SurfaceAttrib(EGLDisplay dpy,487EGLSurface surface,488EGLint attribute,489EGLint value)490{491ANGLE_SCOPED_GLOBAL_LOCK();492EGL_EVENT(SurfaceAttrib,493"dpy = 0x%016" PRIxPTR ", surface = 0x%016" PRIxPTR ", attribute = %d, value = %d",494(uintptr_t)dpy, (uintptr_t)surface, attribute, value);495496Thread *thread = egl::GetCurrentThread();497498egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);499Surface *surfacePacked = PackParam<Surface *>(surface);500501ANGLE_EGL_VALIDATE(thread, SurfaceAttrib, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,502surfacePacked, attribute, value);503504return SurfaceAttrib(thread, dpyPacked, surfacePacked, attribute, value);505}506507EGLBoolean EGLAPIENTRY EGL_SwapInterval(EGLDisplay dpy, EGLint interval)508{509ANGLE_SCOPED_GLOBAL_LOCK();510EGL_EVENT(SwapInterval, "dpy = 0x%016" PRIxPTR ", interval = %d", (uintptr_t)dpy, interval);511512Thread *thread = egl::GetCurrentThread();513514egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);515516ANGLE_EGL_VALIDATE(thread, SwapInterval, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,517interval);518519return SwapInterval(thread, dpyPacked, interval);520}521522// EGL 1.2523EGLBoolean EGLAPIENTRY EGL_BindAPI(EGLenum api)524{525ANGLE_SCOPED_GLOBAL_LOCK();526EGL_EVENT(BindAPI, "api = 0x%X", api);527528Thread *thread = egl::GetCurrentThread();529530ANGLE_EGL_VALIDATE(thread, BindAPI, nullptr, EGLBoolean, api);531532return BindAPI(thread, api);533}534535EGLSurface EGLAPIENTRY EGL_CreatePbufferFromClientBuffer(EGLDisplay dpy,536EGLenum buftype,537EGLClientBuffer buffer,538EGLConfig config,539const EGLint *attrib_list)540{541ANGLE_SCOPED_GLOBAL_LOCK();542EGL_EVENT(CreatePbufferFromClientBuffer,543"dpy = 0x%016" PRIxPTR ", buftype = 0x%X, buffer = 0x%016" PRIxPTR544", config = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "",545(uintptr_t)dpy, buftype, (uintptr_t)buffer, (uintptr_t)config,546(uintptr_t)attrib_list);547548Thread *thread = egl::GetCurrentThread();549550egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);551Config *configPacked = PackParam<Config *>(config);552const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);553554ANGLE_EGL_VALIDATE(thread, CreatePbufferFromClientBuffer, GetDisplayIfValid(dpyPacked),555EGLSurface, dpyPacked, buftype, buffer, configPacked, attrib_listPacked);556557return CreatePbufferFromClientBuffer(thread, dpyPacked, buftype, buffer, configPacked,558attrib_listPacked);559}560561EGLenum EGLAPIENTRY EGL_QueryAPI()562{563ANGLE_SCOPED_GLOBAL_LOCK();564EGL_EVENT(QueryAPI, "");565566Thread *thread = egl::GetCurrentThread();567568ANGLE_EGL_VALIDATE(thread, QueryAPI, nullptr, EGLenum);569570return QueryAPI(thread);571}572573EGLBoolean EGLAPIENTRY EGL_ReleaseThread()574{575ANGLE_SCOPED_GLOBAL_LOCK();576EGL_EVENT(ReleaseThread, "");577578Thread *thread = egl::GetCurrentThread();579580ANGLE_EGL_VALIDATE(thread, ReleaseThread, nullptr, EGLBoolean);581582return ReleaseThread(thread);583}584585EGLBoolean EGLAPIENTRY EGL_WaitClient()586{587ANGLE_SCOPED_GLOBAL_LOCK();588EGL_EVENT(WaitClient, "");589590Thread *thread = egl::GetCurrentThread();591592ANGLE_EGL_VALIDATE(thread, WaitClient, nullptr, EGLBoolean);593594return WaitClient(thread);595}596597// EGL 1.4598EGLContext EGLAPIENTRY EGL_GetCurrentContext()599{600ANGLE_SCOPED_GLOBAL_LOCK();601EGL_EVENT(GetCurrentContext, "");602603Thread *thread = egl::GetCurrentThread();604605ANGLE_EGL_VALIDATE(thread, GetCurrentContext, nullptr, EGLContext);606607return GetCurrentContext(thread);608}609610// EGL 1.5611EGLint EGLAPIENTRY EGL_ClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout)612{613ANGLE_SCOPED_GLOBAL_LOCK();614EGL_EVENT(ClientWaitSync,615"dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d, timeout = %llu",616(uintptr_t)dpy, (uintptr_t)sync, flags, static_cast<unsigned long long>(timeout));617618Thread *thread = egl::GetCurrentThread();619620egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);621Sync *syncPacked = PackParam<Sync *>(sync);622623ANGLE_EGL_VALIDATE(thread, ClientWaitSync, GetDisplayIfValid(dpyPacked), EGLint, dpyPacked,624syncPacked, flags, timeout);625626return ClientWaitSync(thread, dpyPacked, syncPacked, flags, timeout);627}628629EGLImage EGLAPIENTRY EGL_CreateImage(EGLDisplay dpy,630EGLContext ctx,631EGLenum target,632EGLClientBuffer buffer,633const EGLAttrib *attrib_list)634{635ANGLE_SCOPED_GLOBAL_LOCK();636EGL_EVENT(CreateImage,637"dpy = 0x%016" PRIxPTR ", ctx = 0x%016" PRIxPTR638", target = 0x%X, buffer = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR "",639(uintptr_t)dpy, (uintptr_t)ctx, target, (uintptr_t)buffer, (uintptr_t)attrib_list);640641Thread *thread = egl::GetCurrentThread();642643egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);644gl::Context *ctxPacked = PackParam<gl::Context *>(ctx);645const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);646647ANGLE_EGL_VALIDATE(thread, CreateImage, GetDisplayIfValid(dpyPacked), EGLImage, dpyPacked,648ctxPacked, target, buffer, attrib_listPacked);649650return CreateImage(thread, dpyPacked, ctxPacked, target, buffer, attrib_listPacked);651}652653EGLSurface EGLAPIENTRY EGL_CreatePlatformPixmapSurface(EGLDisplay dpy,654EGLConfig config,655void *native_pixmap,656const EGLAttrib *attrib_list)657{658ANGLE_SCOPED_GLOBAL_LOCK();659EGL_EVENT(CreatePlatformPixmapSurface,660"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", native_pixmap = 0x%016" PRIxPTR661", attrib_list = 0x%016" PRIxPTR "",662(uintptr_t)dpy, (uintptr_t)config, (uintptr_t)native_pixmap, (uintptr_t)attrib_list);663664Thread *thread = egl::GetCurrentThread();665666egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);667Config *configPacked = PackParam<Config *>(config);668const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);669670ANGLE_EGL_VALIDATE(thread, CreatePlatformPixmapSurface, GetDisplayIfValid(dpyPacked),671EGLSurface, dpyPacked, configPacked, native_pixmap, attrib_listPacked);672673return CreatePlatformPixmapSurface(thread, dpyPacked, configPacked, native_pixmap,674attrib_listPacked);675}676677EGLSurface EGLAPIENTRY EGL_CreatePlatformWindowSurface(EGLDisplay dpy,678EGLConfig config,679void *native_window,680const EGLAttrib *attrib_list)681{682ANGLE_SCOPED_GLOBAL_LOCK();683EGL_EVENT(CreatePlatformWindowSurface,684"dpy = 0x%016" PRIxPTR ", config = 0x%016" PRIxPTR ", native_window = 0x%016" PRIxPTR685", attrib_list = 0x%016" PRIxPTR "",686(uintptr_t)dpy, (uintptr_t)config, (uintptr_t)native_window, (uintptr_t)attrib_list);687688Thread *thread = egl::GetCurrentThread();689690egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);691Config *configPacked = PackParam<Config *>(config);692const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);693694ANGLE_EGL_VALIDATE(thread, CreatePlatformWindowSurface, GetDisplayIfValid(dpyPacked),695EGLSurface, dpyPacked, configPacked, native_window, attrib_listPacked);696697return CreatePlatformWindowSurface(thread, dpyPacked, configPacked, native_window,698attrib_listPacked);699}700701EGLSync EGLAPIENTRY EGL_CreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list)702{703ANGLE_SCOPED_GLOBAL_LOCK();704EGL_EVENT(CreateSync, "dpy = 0x%016" PRIxPTR ", type = 0x%X, attrib_list = 0x%016" PRIxPTR "",705(uintptr_t)dpy, type, (uintptr_t)attrib_list);706707Thread *thread = egl::GetCurrentThread();708709egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);710const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);711712ANGLE_EGL_VALIDATE(thread, CreateSync, GetDisplayIfValid(dpyPacked), EGLSync, dpyPacked, type,713attrib_listPacked);714715return CreateSync(thread, dpyPacked, type, attrib_listPacked);716}717718EGLBoolean EGLAPIENTRY EGL_DestroyImage(EGLDisplay dpy, EGLImage image)719{720ANGLE_SCOPED_GLOBAL_LOCK();721EGL_EVENT(DestroyImage, "dpy = 0x%016" PRIxPTR ", image = 0x%016" PRIxPTR "", (uintptr_t)dpy,722(uintptr_t)image);723724Thread *thread = egl::GetCurrentThread();725726egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);727Image *imagePacked = PackParam<Image *>(image);728729ANGLE_EGL_VALIDATE(thread, DestroyImage, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,730imagePacked);731732return DestroyImage(thread, dpyPacked, imagePacked);733}734735EGLBoolean EGLAPIENTRY EGL_DestroySync(EGLDisplay dpy, EGLSync sync)736{737ANGLE_SCOPED_GLOBAL_LOCK();738EGL_EVENT(DestroySync, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR "", (uintptr_t)dpy,739(uintptr_t)sync);740741Thread *thread = egl::GetCurrentThread();742743egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);744Sync *syncPacked = PackParam<Sync *>(sync);745746ANGLE_EGL_VALIDATE(thread, DestroySync, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,747syncPacked);748749return DestroySync(thread, dpyPacked, syncPacked);750}751752EGLDisplay EGLAPIENTRY EGL_GetPlatformDisplay(EGLenum platform,753void *native_display,754const EGLAttrib *attrib_list)755{756ANGLE_SCOPED_GLOBAL_LOCK();757EGL_EVENT(GetPlatformDisplay,758"platform = 0x%X, native_display = 0x%016" PRIxPTR ", attrib_list = 0x%016" PRIxPTR759"",760platform, (uintptr_t)native_display, (uintptr_t)attrib_list);761762Thread *thread = egl::GetCurrentThread();763764const AttributeMap &attrib_listPacked = PackParam<const AttributeMap &>(attrib_list);765766ANGLE_EGL_VALIDATE(thread, GetPlatformDisplay, nullptr, EGLDisplay, platform, native_display,767attrib_listPacked);768769return GetPlatformDisplay(thread, platform, native_display, attrib_listPacked);770}771772EGLBoolean EGLAPIENTRY EGL_GetSyncAttrib(EGLDisplay dpy,773EGLSync sync,774EGLint attribute,775EGLAttrib *value)776{777ANGLE_SCOPED_GLOBAL_LOCK();778EGL_EVENT(GetSyncAttrib,779"dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR780", attribute = %d, value = 0x%016" PRIxPTR "",781(uintptr_t)dpy, (uintptr_t)sync, attribute, (uintptr_t)value);782783Thread *thread = egl::GetCurrentThread();784785egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);786Sync *syncPacked = PackParam<Sync *>(sync);787788ANGLE_EGL_VALIDATE(thread, GetSyncAttrib, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,789syncPacked, attribute, value);790791return GetSyncAttrib(thread, dpyPacked, syncPacked, attribute, value);792}793794EGLBoolean EGLAPIENTRY EGL_WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags)795{796ANGLE_SCOPED_GLOBAL_LOCK();797EGL_EVENT(WaitSync, "dpy = 0x%016" PRIxPTR ", sync = 0x%016" PRIxPTR ", flags = %d",798(uintptr_t)dpy, (uintptr_t)sync, flags);799800Thread *thread = egl::GetCurrentThread();801802egl::Display *dpyPacked = PackParam<egl::Display *>(dpy);803Sync *syncPacked = PackParam<Sync *>(sync);804805ANGLE_EGL_VALIDATE(thread, WaitSync, GetDisplayIfValid(dpyPacked), EGLBoolean, dpyPacked,806syncPacked, flags);807808return WaitSync(thread, dpyPacked, syncPacked, flags);809}810811} // extern "C"812813814