OpenCL™规范 5.5.15.1. 同步访问与EGL或OpenGL共享的内存对象

5.5.15.1. Synchronizing Access to Memory Objects Shared With EGL or OpenGL
5.5.15.1. 同步访问与EGL或OpenGL共享的内存对象

When sharing objects such as EGL images (if the cl_khr_egl_image extension is supported) or OpenGL buffers, textures, and renderbuffers (if the cl_khr_gl_sharing extension is supported), in order to ensure data integrity, the application is responsible for synchronizing access to shared memory objects through the other API with which such objects are shared.

​当共享诸如EGL图像(如果支持cl_khr_egl_image扩展)或OpenGL缓冲区、纹理和渲染缓冲区(如果支持cl_khr_gl_sharing扩展)之类的对象时,为了确保数据的完整性,应用程序负责通过与共享这些对象的其他API同步对共享内存对象的访问。

Failure to provide such synchronization may result in race conditions and other undefined behavior including non-portability between implementations.

未能提供这种同步可能导致竞争条件和其他未定义的行为,包括实现之间的不可移植性。

Prior to acquiring objects shared with the other API, the application must ensure that any pending operations in that API which accesses the objects specified in mem_objects have completed.

在获取与其他API共享的对象之前,应用程序必须确保访问mem_objects中指定的对象的API中的任何挂起操作都已完成。

Depending on the application and the implementation, there are two extensions which may be used to synchronize with other APIs:

根据应用程序和实现的不同,有两个扩展可以用于与其他API同步:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值