102f4aeb0Sopenharmony_ciName 202f4aeb0Sopenharmony_ci 302f4aeb0Sopenharmony_ci NV_stream_remote 402f4aeb0Sopenharmony_ci NV_stream_cross_object 502f4aeb0Sopenharmony_ci NV_stream_cross_display 602f4aeb0Sopenharmony_ci NV_stream_cross_process 702f4aeb0Sopenharmony_ci NV_stream_cross_partition 802f4aeb0Sopenharmony_ci NV_stream_cross_system 902f4aeb0Sopenharmony_ci 1002f4aeb0Sopenharmony_ciName Strings 1102f4aeb0Sopenharmony_ci 1202f4aeb0Sopenharmony_ci EGL_NV_stream_remote 1302f4aeb0Sopenharmony_ci 1402f4aeb0Sopenharmony_ciContributors 1502f4aeb0Sopenharmony_ci 1602f4aeb0Sopenharmony_ci Daniel Kartch 1702f4aeb0Sopenharmony_ci Bogdan Naodovic 1802f4aeb0Sopenharmony_ci James Jones 1902f4aeb0Sopenharmony_ci Zander Clucas 2002f4aeb0Sopenharmony_ci 2102f4aeb0Sopenharmony_ciContacts 2202f4aeb0Sopenharmony_ci 2302f4aeb0Sopenharmony_ci Daniel Kartch, NVIDIA (dkartch 'at' nvidia.com) 2402f4aeb0Sopenharmony_ci 2502f4aeb0Sopenharmony_ciStatus 2602f4aeb0Sopenharmony_ci 2702f4aeb0Sopenharmony_ci Draft 2802f4aeb0Sopenharmony_ci 2902f4aeb0Sopenharmony_ciVersion 3002f4aeb0Sopenharmony_ci 3102f4aeb0Sopenharmony_ci Version 4 - June 01, 2016 3202f4aeb0Sopenharmony_ci 3302f4aeb0Sopenharmony_ciNumber 3402f4aeb0Sopenharmony_ci 3502f4aeb0Sopenharmony_ci EGL Extension #114 3602f4aeb0Sopenharmony_ci 3702f4aeb0Sopenharmony_ciExtension Type 3802f4aeb0Sopenharmony_ci 3902f4aeb0Sopenharmony_ci EGL display extension 4002f4aeb0Sopenharmony_ci 4102f4aeb0Sopenharmony_ciDependencies 4202f4aeb0Sopenharmony_ci 4302f4aeb0Sopenharmony_ci Requires EGL_KHR_stream 4402f4aeb0Sopenharmony_ci 4502f4aeb0Sopenharmony_ci Interacts with EGL_KHR_stream_cross_process_fd 4602f4aeb0Sopenharmony_ci 4702f4aeb0Sopenharmony_ci All EGL_NV_stream_cross_* extensions require EGL_NV_stream_remote, 4802f4aeb0Sopenharmony_ci but are independent of each other. 4902f4aeb0Sopenharmony_ci 5002f4aeb0Sopenharmony_ciOverview 5102f4aeb0Sopenharmony_ci 5202f4aeb0Sopenharmony_ci This extension provides a generic framework for establishing stream 5302f4aeb0Sopenharmony_ci connections when the producer and consumer endpoints are not 5402f4aeb0Sopenharmony_ci associated with the same EGLStream object. The cross-process streams 5502f4aeb0Sopenharmony_ci allowed by the EGL_KHR_stream_cross_process_fd extension are one 5602f4aeb0Sopenharmony_ci example of such a connection. Other potential examples include 5702f4aeb0Sopenharmony_ci streams between objects associated with different EGLDisplays in a 5802f4aeb0Sopenharmony_ci single process, streams between processes residing in separate 5902f4aeb0Sopenharmony_ci virtual machine partitions on a single system, or streams between 6002f4aeb0Sopenharmony_ci entirely separate systems connected via the internet. 6102f4aeb0Sopenharmony_ci 6202f4aeb0Sopenharmony_ci The approach used by EGL_KHR_stream_cross_process_fd has several 6302f4aeb0Sopenharmony_ci drawbacks: 6402f4aeb0Sopenharmony_ci - It creates a new pair of stream creation and query functions 6502f4aeb0Sopenharmony_ci which are specific to both the type of stream and the method 6602f4aeb0Sopenharmony_ci used for communicating the stream's identity. Extending this 6702f4aeb0Sopenharmony_ci methodology would require new pairs of functions for every new 6802f4aeb0Sopenharmony_ci type of stream connection. 6902f4aeb0Sopenharmony_ci - It allows creation of the connected stream objects without any 7002f4aeb0Sopenharmony_ci indication of which side will be the consumer and which will be 7102f4aeb0Sopenharmony_ci the producer. It even allows, although this was probably not 7202f4aeb0Sopenharmony_ci intended, a cross-process stream to be established, but have 7302f4aeb0Sopenharmony_ci both producer and consumer exist in the same process, with the 7402f4aeb0Sopenharmony_ci other process acting as a voyeur that can observe state and 7502f4aeb0Sopenharmony_ci perhaps modify attributes, but not operate on frames. 7602f4aeb0Sopenharmony_ci - The use of file descriptors generated by EGL in one process 7702f4aeb0Sopenharmony_ci and accessed by EGL in another to establish communication has 7802f4aeb0Sopenharmony_ci potential security flaws, and may not be available at all on 7902f4aeb0Sopenharmony_ci some real-time operating systems. 8002f4aeb0Sopenharmony_ci 8102f4aeb0Sopenharmony_ci Rather than implement new connection types using this model, we 8202f4aeb0Sopenharmony_ci propose a more generic approach that does not require a 8302f4aeb0Sopenharmony_ci proliferation of new interfaces and avoids any ambiguities in how 8402f4aeb0Sopenharmony_ci the stream will be used. These extensions can coexist with 8502f4aeb0Sopenharmony_ci EGL_KHR_stream_cross_process_fd, but allow for more control of 8602f4aeb0Sopenharmony_ci stream communication by the applications. 8702f4aeb0Sopenharmony_ci 8802f4aeb0Sopenharmony_ci These extensions provide the framework with which arbitrary stream 8902f4aeb0Sopenharmony_ci object pairs can be established, but by themselves are insufficient 9002f4aeb0Sopenharmony_ci to create such pairs. In addition, a separate extension must be 9102f4aeb0Sopenharmony_ci used to determine the protocol by which the two objects will 9202f4aeb0Sopenharmony_ci communicate. See for example the EGL_NV_stream_socket extension. 9302f4aeb0Sopenharmony_ci 9402f4aeb0Sopenharmony_ci Several optional types of separate stream objects are defined, 9502f4aeb0Sopenharmony_ci with successive levels of remoteness. It should be assumed that 9602f4aeb0Sopenharmony_ci a more remote type will be less efficient in transfering images, 9702f4aeb0Sopenharmony_ci and therefore applications should choose the least remote type 9802f4aeb0Sopenharmony_ci available that is compatible with their use cases. 9902f4aeb0Sopenharmony_ci 10002f4aeb0Sopenharmony_ciNew Types 10102f4aeb0Sopenharmony_ci 10202f4aeb0Sopenharmony_ci None 10302f4aeb0Sopenharmony_ci 10402f4aeb0Sopenharmony_ciNew Functions 10502f4aeb0Sopenharmony_ci 10602f4aeb0Sopenharmony_ci None 10702f4aeb0Sopenharmony_ci 10802f4aeb0Sopenharmony_ciNew Tokens 10902f4aeb0Sopenharmony_ci 11002f4aeb0Sopenharmony_ci Returned by eglQueryStreamKHR and eglQueryStreamAttribKHR when 11102f4aeb0Sopenharmony_ci attribute is EGL_STREAM_STATE_KHR: 11202f4aeb0Sopenharmony_ci 11302f4aeb0Sopenharmony_ci EGL_STREAM_STATE_INITIALIZING_NV 0x3240 11402f4aeb0Sopenharmony_ci 11502f4aeb0Sopenharmony_ci Accepted as attribute names in eglCreateStreamKHR, 11602f4aeb0Sopenharmony_ci eglCreateStreamAttribKHR, eglQueryStreamKHR, and 11702f4aeb0Sopenharmony_ci eglQueryStreamAttribKHR: 11802f4aeb0Sopenharmony_ci 11902f4aeb0Sopenharmony_ci EGL_STREAM_TYPE_NV 0x3241 12002f4aeb0Sopenharmony_ci EGL_STREAM_PROTOCOL_NV 0x3242 12102f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV 0x3243 12202f4aeb0Sopenharmony_ci 12302f4aeb0Sopenharmony_ci Accepted by eglCreateStreamKHR and eglCreateStreamAttribKHR, and 12402f4aeb0Sopenharmony_ci returned by eglQueryStreamKHR and eglQueryStreamAttribKHR, as value 12502f4aeb0Sopenharmony_ci when attribute is EGL_STREAM_TYPE_NV, EGL_STREAM_PROTOCOL_NV or 12602f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV: 12702f4aeb0Sopenharmony_ci 12802f4aeb0Sopenharmony_ci EGL_STREAM_LOCAL_NV 0x3244 12902f4aeb0Sopenharmony_ci 13002f4aeb0Sopenharmony_ci When EGL_NV_stream_cross_object is present, accepted by 13102f4aeb0Sopenharmony_ci eglCreateStreamKHR and eglCreateStreamAttribKHR and returned by 13202f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglQueryStreamAttribKHR as value for 13302f4aeb0Sopenharmony_ci attribute EGL_STREAM_TYPE_NV: 13402f4aeb0Sopenharmony_ci 13502f4aeb0Sopenharmony_ci EGL_STREAM_CROSS_OBJECT_NV 0x334D 13602f4aeb0Sopenharmony_ci 13702f4aeb0Sopenharmony_ci When EGL_NV_stream_cross_display is present, accepted by 13802f4aeb0Sopenharmony_ci eglCreateStreamKHR and eglCreateStreamAttribKHR and returned by 13902f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglQueryStreamAttribKHR as value for 14002f4aeb0Sopenharmony_ci attribute EGL_STREAM_TYPE_NV: 14102f4aeb0Sopenharmony_ci 14202f4aeb0Sopenharmony_ci EGL_STREAM_CROSS_DISPLAY_NV 0x334E 14302f4aeb0Sopenharmony_ci 14402f4aeb0Sopenharmony_ci When EGL_NV_stream_cross_process is present, accepted as 14502f4aeb0Sopenharmony_ci value for attribute EGL_STREAM_TYPE_NV by eglCreateStreamKHR 14602f4aeb0Sopenharmony_ci and eglCreateStreamAttribKHR. When either 14702f4aeb0Sopenharmony_ci EGL_NV_stream_cross_process or EGL_KHR_stream_cross_process_fd 14802f4aeb0Sopenharmony_ci is present, returned by eglQueryStreamKHR and 14902f4aeb0Sopenharmony_ci eglQueryStreamAttribKHR for attribute EGL_STREAM_TYPE_NV: 15002f4aeb0Sopenharmony_ci 15102f4aeb0Sopenharmony_ci EGL_STREAM_CROSS_PROCESS_NV 0x3245 15202f4aeb0Sopenharmony_ci 15302f4aeb0Sopenharmony_ci When EGL_NV_stream_cross_partition is present, accepted by 15402f4aeb0Sopenharmony_ci eglCreateStreamKHR and eglCreateStreamAttribKHR and returned by 15502f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglQueryStreamAttribKHR as value for 15602f4aeb0Sopenharmony_ci attribute EGL_STREAM_TYPE_NV: 15702f4aeb0Sopenharmony_ci 15802f4aeb0Sopenharmony_ci EGL_STREAM_CROSS_PARTITION_NV 0x323F 15902f4aeb0Sopenharmony_ci 16002f4aeb0Sopenharmony_ci When EGL_NV_stream_cross_system is present, accepted by 16102f4aeb0Sopenharmony_ci eglCreateStreamKHR and eglCreateStreamAttribKHR and returned by 16202f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglQueryStreamAttribKHR as value for 16302f4aeb0Sopenharmony_ci attribute EGL_STREAM_TYPE_NV: 16402f4aeb0Sopenharmony_ci 16502f4aeb0Sopenharmony_ci EGL_STREAM_CROSS_SYSTEM_NV 0x334F 16602f4aeb0Sopenharmony_ci 16702f4aeb0Sopenharmony_ci If EGL_KHR_stream_cross_process_fd is present, returned by 16802f4aeb0Sopenharmony_ci eglQueryStreamKHR and eglQueryStreamAttribKHR when attribute is 16902f4aeb0Sopenharmony_ci EGL_STREAM_PROTOCOL_NV: 17002f4aeb0Sopenharmony_ci 17102f4aeb0Sopenharmony_ci EGL_STREAM_PROTOCOL_FD_NV 0x3246 17202f4aeb0Sopenharmony_ci 17302f4aeb0Sopenharmony_ci Accepted by eglCreateStreamKHR and eglCreateStreamAttribKHR, and 17402f4aeb0Sopenharmony_ci returned by eglQueryStreamKHR and eglQueryStreamAttribKHR when 17502f4aeb0Sopenharmony_ci attribute is EGL_STREAM_ENDPOINT_NV: 17602f4aeb0Sopenharmony_ci 17702f4aeb0Sopenharmony_ci EGL_STREAM_PRODUCER_NV 0x3247 17802f4aeb0Sopenharmony_ci EGL_STREAM_CONSUMER_NV 0x3248 17902f4aeb0Sopenharmony_ci 18002f4aeb0Sopenharmony_ciAdd to "Glossary" of EGL_KHR_stream: 18102f4aeb0Sopenharmony_ci 18202f4aeb0Sopenharmony_ci Local stream 18302f4aeb0Sopenharmony_ci A stream implemented with both consumer and producer attached to a 18402f4aeb0Sopenharmony_ci single EGLStream object. 18502f4aeb0Sopenharmony_ci 18602f4aeb0Sopenharmony_ci Remote stream 18702f4aeb0Sopenharmony_ci A stream implemented with two EGLStream objects that communicate 18802f4aeb0Sopenharmony_ci with each other, with the consumer attached to one object and the 18902f4aeb0Sopenharmony_ci producer attached to the other. 19002f4aeb0Sopenharmony_ci 19102f4aeb0Sopenharmony_ciAdd to section "3.10.1 Creating an EGLStream" in EGL_KHR_stream: 19202f4aeb0Sopenharmony_ci 19302f4aeb0Sopenharmony_ci If a remote EGLStream is created, as described in section "3.10.5.x 19402f4aeb0Sopenharmony_ci Remote streams", and is paired with an EGLStream object which has 19502f4aeb0Sopenharmony_ci conflicting values for some attributes, creation will succeed, but 19602f4aeb0Sopenharmony_ci the stream will enter state EGL_STREAM_STATE_DISCONNECTED_KHR once 19702f4aeb0Sopenharmony_ci communication is established. 19802f4aeb0Sopenharmony_ci 19902f4aeb0Sopenharmony_ciAdd to list of failures in section "3.10.1 Creating an EGLStream" in 20002f4aeb0Sopenharmony_ciEGL_KHR stream: 20102f4aeb0Sopenharmony_ci 20202f4aeb0Sopenharmony_ci - EGL_BAD_MATCH is generated if the value of any one of the 20302f4aeb0Sopenharmony_ci EGL_STREAM_TYPE_NV, EGL_STREAM_PROTOCOL_NV, or 20402f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV attributes is EGL_STREAM_LOCAL_NV and 20502f4aeb0Sopenharmony_ci any other of these attributes is neither EGL_STREAM_LOCAL_NV 20602f4aeb0Sopenharmony_ci nor EGL_DONT_CARE. 20702f4aeb0Sopenharmony_ci 20802f4aeb0Sopenharmony_ciAdd to section "3.10.2 Connecting an EGLStream to a consumer" in 20902f4aeb0Sopenharmony_ciEGL_KHR_stream: 21002f4aeb0Sopenharmony_ci 21102f4aeb0Sopenharmony_ci Any function which connects a consumer to an EGLStream will fail and 21202f4aeb0Sopenharmony_ci generate an EGL_BAD_ACCESS error if the value of the EGLStream's 21302f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV attribute is EGL_STREAM_PRODUCER_NV. 21402f4aeb0Sopenharmony_ci 21502f4aeb0Sopenharmony_ciAdd to section "3.10.3 Connecting an EGLStream to a producer" in 21602f4aeb0Sopenharmony_ciEGL_KHR_stream: 21702f4aeb0Sopenharmony_ci 21802f4aeb0Sopenharmony_ci Any function which connects a producer to an EGLStream will fail and 21902f4aeb0Sopenharmony_ci generate an EGL_BAD_ACCESS error if the value of the EGLStream's 22002f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV attribute is EGL_STREAM_CONSUMER_NV. 22102f4aeb0Sopenharmony_ci 22202f4aeb0Sopenharmony_ciAdd to "Table 3.10.4.4 EGLStream Attributes" in EGL_KHR_stream: 22302f4aeb0Sopenharmony_ci 22402f4aeb0Sopenharmony_ci Attribute Read/Write Type Section 22502f4aeb0Sopenharmony_ci -------------------------- ---------- ------ ---------- 22602f4aeb0Sopenharmony_ci EGL_STREAM_TYPE_NV io EGLint 3.10.4.x 22702f4aeb0Sopenharmony_ci EGL_STREAM_PROTOCOL_NV io EGLint 3.10.4.x+1 22802f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV io EGLint 3.10.4.x+2 22902f4aeb0Sopenharmony_ci 23002f4aeb0Sopenharmony_ciAdd to beginning of state list in section "3.10.4.3 EGL_STREAM_STATE_KHR 23102f4aeb0Sopenharmony_ciAttribute" in EGL_KHR_stream: 23202f4aeb0Sopenharmony_ci 23302f4aeb0Sopenharmony_ci - EGL_STREAM_STATE_INITIALIZING_NV - The EGLStream object 23402f4aeb0Sopenharmony_ci represents one endpoint of a remote stream and has not yet 23502f4aeb0Sopenharmony_ci established communication with the opposite endpoint. 23602f4aeb0Sopenharmony_ci 23702f4aeb0Sopenharmony_ciReplace the first entry in the state transition table in section 23802f4aeb0Sopenharmony_ci"3.10.4.3 EGL_STREAM_STATE_KHR Attribute" in EGL_KHR_stream: 23902f4aeb0Sopenharmony_ci 24002f4aeb0Sopenharmony_ci -> EGL_STREAM_STATE_INITIALIZING_NV 24102f4aeb0Sopenharmony_ci A new remote EGLStream is created in this state. 24202f4aeb0Sopenharmony_ci 24302f4aeb0Sopenharmony_ci EGL_STREAM_STATE_INITIALIZING_NV -> 24402f4aeb0Sopenharmony_ci EGL_STREAM_STATE_CREATED_KHR 24502f4aeb0Sopenharmony_ci Occurs when a remote EGLStream object establishes communication with 24602f4aeb0Sopenharmony_ci the opposite endpoint. 24702f4aeb0Sopenharmony_ci 24802f4aeb0Sopenharmony_ci -> EGL_STREAM_STATE_CREATED_KHR 24902f4aeb0Sopenharmony_ci A new local EGLStream or EGLStream of undetermined type is created 25002f4aeb0Sopenharmony_ci in this state. 25102f4aeb0Sopenharmony_ci 25202f4aeb0Sopenharmony_ciAdd new subsections to the end of section "3.10.4 EGLStream Attributes" 25302f4aeb0Sopenharmony_ciin EGL_KHR_stream: 25402f4aeb0Sopenharmony_ci 25502f4aeb0Sopenharmony_ci 3.10.4.x EGL_STREAM_TYPE_NV Attribute 25602f4aeb0Sopenharmony_ci 25702f4aeb0Sopenharmony_ci The EGL_STREAM_TYPE_NV attribute may be set when the stream 25802f4aeb0Sopenharmony_ci is created, and indicates the type of connection between the 25902f4aeb0Sopenharmony_ci EGLStream objects to which the consumer and producer are attached. 26002f4aeb0Sopenharmony_ci Legal values are EGL_DONT_CARE and EGL_STREAM_LOCAL_NV. The 26102f4aeb0Sopenharmony_ci default value is EGL_DONT_CARE. 26202f4aeb0Sopenharmony_ci 26302f4aeb0Sopenharmony_ci A value of EGL_STREAM_LOCAL_NV indicates that this is a local 26402f4aeb0Sopenharmony_ci stream with both consumer and producer connected to a single 26502f4aeb0Sopenharmony_ci EGLStream object. 26602f4aeb0Sopenharmony_ci 26702f4aeb0Sopenharmony_ci If EGL_DONT_CARE is initially specified, the value of the attribute 26802f4aeb0Sopenharmony_ci will automatically be changed to the appropriate value once both 26902f4aeb0Sopenharmony_ci consumer and producer are attached, depending on the functions used. 27002f4aeb0Sopenharmony_ci 27102f4aeb0Sopenharmony_ci Other possible values for EGL_STREAM_TYPE_NV may be defined by 27202f4aeb0Sopenharmony_ci additional extensions to indicate a remote stream. Where used, 27302f4aeb0Sopenharmony_ci the EGL_STREAM_PROTOCOL_NV attribute must also be set to a 27402f4aeb0Sopenharmony_ci communication protocol compatible with the stream type. 27502f4aeb0Sopenharmony_ci 27602f4aeb0Sopenharmony_ci 3.10.4.x+1 EGL_STREAM_PROTOCOL_NV Attribute 27702f4aeb0Sopenharmony_ci 27802f4aeb0Sopenharmony_ci The EGL_STREAM_PROTOCOL_NV attribute may be set when the stream is 27902f4aeb0Sopenharmony_ci created, and indicates the manner in which communication is 28002f4aeb0Sopenharmony_ci established between the EGLStream objects to which the consumer 28102f4aeb0Sopenharmony_ci and producer are attached. Legal values are EGL_DONT_CARE and 28202f4aeb0Sopenharmony_ci EGL_STREAM_LOCAL_NV. The default value is EGL_DONT_CARE. 28302f4aeb0Sopenharmony_ci 28402f4aeb0Sopenharmony_ci A value of EGL_STREAM_LOCAL_NV indicates that this is a local 28502f4aeb0Sopenharmony_ci stream with both consumer and producer connected to a single 28602f4aeb0Sopenharmony_ci EGLStream object, so no communication protocol is required. 28702f4aeb0Sopenharmony_ci 28802f4aeb0Sopenharmony_ci If EGL_DONT_CARE is initially specified, the value of the attribute 28902f4aeb0Sopenharmony_ci will automatically be changed to the appropriate value once both 29002f4aeb0Sopenharmony_ci consumer and producer are attached, depending on the functions used. 29102f4aeb0Sopenharmony_ci 29202f4aeb0Sopenharmony_ci Other possible values for EGL_STREAM_PROTOCOL_NV may be defined by 29302f4aeb0Sopenharmony_ci additional extensions to indicate the communication protocol to be 29402f4aeb0Sopenharmony_ci used for a remote stream. Not all communication protocols are 29502f4aeb0Sopenharmony_ci compatible with all stream types, and vice versa. If incompatible 29602f4aeb0Sopenharmony_ci types and protocols are specified, an EGL_BAD_MATCH error will be 29702f4aeb0Sopenharmony_ci generated. 29802f4aeb0Sopenharmony_ci 29902f4aeb0Sopenharmony_ci 3.10.4.x+2 EGL_STREAM_ENDPOINT_NV Attribute 30002f4aeb0Sopenharmony_ci 30102f4aeb0Sopenharmony_ci The EGL_STREAM_ENDPOINT_NV attribute may be set when the stream is 30202f4aeb0Sopenharmony_ci created, and indicates the endpoints which will be attached to the 30302f4aeb0Sopenharmony_ci EGLStream object. Legal values are EGL_DONT_CARE, 30402f4aeb0Sopenharmony_ci EGL_STREAM_LOCAL_NV, EGL_STREAM_CONSUMER_NV, and 30502f4aeb0Sopenharmony_ci EGL_STREAM_PRODUCER_NV. The default value is EGL_DONT_CARE. 30602f4aeb0Sopenharmony_ci 30702f4aeb0Sopenharmony_ci A value of EGL_STREAM_LOCAL_NV indicates that this is a local 30802f4aeb0Sopenharmony_ci stream with both consumer and producer connected to a single 30902f4aeb0Sopenharmony_ci EGLStream object. 31002f4aeb0Sopenharmony_ci 31102f4aeb0Sopenharmony_ci A value of EGL_STREAM_CONSUMER_NV indicates that the EGLStream 31202f4aeb0Sopenharmony_ci object represents the consumer side of a remote stream. 31302f4aeb0Sopenharmony_ci 31402f4aeb0Sopenharmony_ci A value of EGL_STREAM_PRODUCER_NV indicates that the EGLStream 31502f4aeb0Sopenharmony_ci object represents the producer side of a remote stream. 31602f4aeb0Sopenharmony_ci 31702f4aeb0Sopenharmony_ci If EGL_DONT_CARE is initially specified, the value of the attribute 31802f4aeb0Sopenharmony_ci will automatically be changed to the appropriate value once both 31902f4aeb0Sopenharmony_ci consumer and producer are attached, depending on the functions used. 32002f4aeb0Sopenharmony_ci 32102f4aeb0Sopenharmony_ciIf EGL_NV_stream_cross_object is present, in section 3.10.4.x above, 32202f4aeb0Sopenharmony_ciadd EGL_STREAM_CROSS_OBJECT_NV to the list of legal values, and insert 32302f4aeb0Sopenharmony_ci 32402f4aeb0Sopenharmony_ci A value of EGL_STREAM_CROSS_OBJECT_NV indicates that the stream 32502f4aeb0Sopenharmony_ci object represents one endpoint of a remote stream whose other 32602f4aeb0Sopenharmony_ci endpoint is obtained from the same EGLDisplay. 32702f4aeb0Sopenharmony_ci 32802f4aeb0Sopenharmony_ciIf EGL_NV_stream_cross_display is present, in section 3.10.4.x above, 32902f4aeb0Sopenharmony_ciadd EGL_STREAM_CROSS_DISPLAY_NV to the list of legal values, and insert 33002f4aeb0Sopenharmony_ci 33102f4aeb0Sopenharmony_ci A value of EGL_STREAM_CROSS_DISPLAY_NV indicates that the stream 33202f4aeb0Sopenharmony_ci object represents one endpoint of a remote stream whose other 33302f4aeb0Sopenharmony_ci endpoint may be obtained from a different EGLDisplay in the same 33402f4aeb0Sopenharmony_ci process. 33502f4aeb0Sopenharmony_ci 33602f4aeb0Sopenharmony_ciIf EGL_NV_stream_cross_process or EGL_NV_stream_cross_process_fd is 33702f4aeb0Sopenharmony_cipresent, in section "3.10.4.x" above, add EGL_STREAM_CROSS_PROCESS_NV 33802f4aeb0Sopenharmony_cito the list of legal values, and insert 33902f4aeb0Sopenharmony_ci 34002f4aeb0Sopenharmony_ci A value of EGL_STREAM_CROSS_PROCESS_NV indicates that the stream 34102f4aeb0Sopenharmony_ci object represents one endpoint of a remote stream whose other 34202f4aeb0Sopenharmony_ci endpoint may reside in a separate process. 34302f4aeb0Sopenharmony_ci 34402f4aeb0Sopenharmony_ciIf EGL_NV_stream_cross_partition is present, in section 3.10.4.x 34502f4aeb0Sopenharmony_ciabove, add EGL_STREAM_CROSS_PARTITION_NV to the list of legal values, 34602f4aeb0Sopenharmony_ciand insert 34702f4aeb0Sopenharmony_ci 34802f4aeb0Sopenharmony_ci A value of EGL_STREAM_CROSS_PARTITION_NV indicates that the stream 34902f4aeb0Sopenharmony_ci object represents one endpoint of a remote stream whose other 35002f4aeb0Sopenharmony_ci endpoint may reside in a separate virtual machine partition on 35102f4aeb0Sopenharmony_ci the same system. The partitions are not required to be using the 35202f4aeb0Sopenharmony_ci same operating systems, but must support compatible communication 35302f4aeb0Sopenharmony_ci protocols. 35402f4aeb0Sopenharmony_ci 35502f4aeb0Sopenharmony_ciIf EGL_NV_stream_cross_system is present, in section 3.10.4.x above, 35602f4aeb0Sopenharmony_ciadd EGL_STREAM_CROSS_SYSTEM_NV to the list of legal values, and insert 35702f4aeb0Sopenharmony_ci 35802f4aeb0Sopenharmony_ci A value of EGL_STREAM_CROSS_SYSTEM_NV indicates that the stream 35902f4aeb0Sopenharmony_ci object represents one endpoint of a remote stream whose other 36002f4aeb0Sopenharmony_ci endpoint may reside on an independent hardware system with no 36102f4aeb0Sopenharmony_ci directly sharable memory resources. 36202f4aeb0Sopenharmony_ci 36302f4aeb0Sopenharmony_ciIf EGL_KHR_stream_cross_process_fd is present, in section 3.10.4.x+1 36402f4aeb0Sopenharmony_ciabove, add EGL_STREAM_PROTOCOL_FD_NV to the list of legal values, and 36502f4aeb0Sopenharmony_ciinsert 36602f4aeb0Sopenharmony_ci 36702f4aeb0Sopenharmony_ci A value of EGL_STREAM_PROTOCOL_FD_NV indicates that the stream is 36802f4aeb0Sopenharmony_ci a remote stream whose communication is established using a file 36902f4aeb0Sopenharmony_ci descriptor. The details of what this file descriptor represents 37002f4aeb0Sopenharmony_ci are implementation dependent. If the EGL_STREAM_PROTOCOL_NV 37102f4aeb0Sopenharmony_ci attribute is initialized with this value, the EGL_STREAM_TYPE_NV 37202f4aeb0Sopenharmony_ci attribute must specify a value of EGL_STREAM_CROSS_PROCESS_NV or 37302f4aeb0Sopenharmony_ci an EGL_BAD_MATCH failure is generated. 37402f4aeb0Sopenharmony_ci 37502f4aeb0Sopenharmony_ci If an initial value of EGL_DONT_CARE is specified and a file 37602f4aeb0Sopenharmony_ci descriptor is subsequently obtained with 37702f4aeb0Sopenharmony_ci eglGetStreamFileDescriptorKHR, the value will be automatically 37802f4aeb0Sopenharmony_ci changed to EGL_STREAM_PROTOCOL_FD_NV. 37902f4aeb0Sopenharmony_ci 38002f4aeb0Sopenharmony_ciAdd a new subsection to the end of "3.10.5 EGLStream operation": 38102f4aeb0Sopenharmony_ci 38202f4aeb0Sopenharmony_ci 3.10.5.x Remote streams 38302f4aeb0Sopenharmony_ci 38402f4aeb0Sopenharmony_ci An EGLStream object may be created as the endpoint of a remote 38502f4aeb0Sopenharmony_ci stream by specifying EGL_STREAM_PRODUCER_NV or 38602f4aeb0Sopenharmony_ci EGL_STREAM_CONSUMER_NV as the value for its EGL_STREAM_ENDPOINT_NV 38702f4aeb0Sopenharmony_ci attribute. Valid and compatible EGL_STREAM_TYPE_NV and 38802f4aeb0Sopenharmony_ci EGL_STREAM_PROTOCOL_NV values other than EGL_DONT_CARE or 38902f4aeb0Sopenharmony_ci EGL_STREAM_LOCAL_NV must also be specified. 39002f4aeb0Sopenharmony_ci 39102f4aeb0Sopenharmony_ci If a value for EGL_STREAM_ENDPOINT_NV is not specified, the stream 39202f4aeb0Sopenharmony_ci is assumed to be local, but other extensions (see for example 39302f4aeb0Sopenharmony_ci EGL_KHR_stream_cross_process_fd) may allow it to be converted to a 39402f4aeb0Sopenharmony_ci remote stream before the producer has been attached. 39502f4aeb0Sopenharmony_ci 39602f4aeb0Sopenharmony_ci When an EGLStream object is created as remote, any unspecified 39702f4aeb0Sopenharmony_ci attribute will be initially set to a value of EGL_DONT_CARE. Pairs 39802f4aeb0Sopenharmony_ci of EGLStream objects representing opposite endpoints of a stream are 39902f4aeb0Sopenharmony_ci not required to specify the same attribute lists, but their 40002f4aeb0Sopenharmony_ci attributes must be compatible. When communication is established 40102f4aeb0Sopenharmony_ci between the endpoints, they will exchange attribute settings: 40202f4aeb0Sopenharmony_ci - If both endpoints have a value of EGL_DONT_CARE for an 40302f4aeb0Sopenharmony_ci attribute, the default value will be assigned. 40402f4aeb0Sopenharmony_ci - If one endpoint has a value of EGL_DONT_CARE for an attribute, 40502f4aeb0Sopenharmony_ci it will be set to the other endpoint's value. 40602f4aeb0Sopenharmony_ci - If neither endpoint has a value of EGL_DONT_CARE for an 40702f4aeb0Sopenharmony_ci attribute, their values must agree. In most cases, this means 40802f4aeb0Sopenharmony_ci the values must be identical, but this may not be true for all 40902f4aeb0Sopenharmony_ci attributes. In particular, one endpoint must specify an 41002f4aeb0Sopenharmony_ci EGL_STREAM_ENDPOINT_NV value of EGL_STREAM_CONSUMER_NV, and 41102f4aeb0Sopenharmony_ci the other must specify a value of EGL_STREAM_PRODUCER_NV. 41202f4aeb0Sopenharmony_ci If the values for any attribute are not compatible, the stream will 41302f4aeb0Sopenharmony_ci transition to the EGL_STREAM_STATE_DISCONNECTED_KHR state. 41402f4aeb0Sopenharmony_ci 41502f4aeb0Sopenharmony_ci Additionally, if the two EGLStream objects representing a remote 41602f4aeb0Sopenharmony_ci stream are created for EGLDisplays which cannot share resources, 41702f4aeb0Sopenharmony_ci the stream will transition to the EGL_STREAM_STATE_DISCONNECTED_KHR 41802f4aeb0Sopenharmony_ci state. 41902f4aeb0Sopenharmony_ci 42002f4aeb0Sopenharmony_ci When using remote streams, there may be latency in communicating 42102f4aeb0Sopenharmony_ci state changes between the EGLStream objects representing the two 42202f4aeb0Sopenharmony_ci endpoints. For instance, when a new frame is inserted into the 42302f4aeb0Sopenharmony_ci stream by the producer, the consumer endpoint may not immediately 42402f4aeb0Sopenharmony_ci transition to EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR. Similarly, 42502f4aeb0Sopenharmony_ci when a frame is acquired by the consumer, the producer endpoint may 42602f4aeb0Sopenharmony_ci not immediately transition to 42702f4aeb0Sopenharmony_ci EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR. Applications should rely 42802f4aeb0Sopenharmony_ci only on the state of the endpoint on which they are operating to 42902f4aeb0Sopenharmony_ci determine the expected results of that operation. 43002f4aeb0Sopenharmony_ci 43102f4aeb0Sopenharmony_ciIn section "3.10.1.1 Duplicating an EGLStream from a file descriptor" of 43202f4aeb0Sopenharmony_cithe EGL_KHR_stream_cross_process_fd extension, add to the failure list 43302f4aeb0Sopenharmony_cifor eglGetStreamFileDescriptor 43402f4aeb0Sopenharmony_ci 43502f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if the EGL_STREAM_TYPE_NV 43602f4aeb0Sopenharmony_ci attribute of <stream> is anything other than EGL_DONT_CARE or 43702f4aeb0Sopenharmony_ci EGL_STREAM_CROSS_PROCESS_NV. 43802f4aeb0Sopenharmony_ci 43902f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if the EGL_STREAM_PROTOCOL_NV 44002f4aeb0Sopenharmony_ci attribute of <stream> is anything other than EGL_DONT_CARE or 44102f4aeb0Sopenharmony_ci EGL_STREAM_PROTOCOL_FD_NV. 44202f4aeb0Sopenharmony_ci 44302f4aeb0Sopenharmony_ci - EGL_BAD_ACCESS is generated if the EGL_STREAM_ENDPOINT_NV 44402f4aeb0Sopenharmony_ci attribute of <stream> is EGL_STREAM_LOCAL_NV. 44502f4aeb0Sopenharmony_ci 44602f4aeb0Sopenharmony_ciIssues 44702f4aeb0Sopenharmony_ci 44802f4aeb0Sopenharmony_ci None 44902f4aeb0Sopenharmony_ci 45002f4aeb0Sopenharmony_ciRevision History 45102f4aeb0Sopenharmony_ci 45202f4aeb0Sopenharmony_ci #4 (June 01, 2016) 45302f4aeb0Sopenharmony_ci - Removed sync object definition. It will be provided by a 45402f4aeb0Sopenharmony_ci separate extension. 45502f4aeb0Sopenharmony_ci - Folded in cross-partition extension. 45602f4aeb0Sopenharmony_ci - Added types for cross-object, cross-display, and 45702f4aeb0Sopenharmony_ci cross-system streams. 45802f4aeb0Sopenharmony_ci - General cleanup in preparation for publication. 45902f4aeb0Sopenharmony_ci 46002f4aeb0Sopenharmony_ci #3 (September 16, 2015) Zander Clucas 46102f4aeb0Sopenharmony_ci - Removed dependence of the CROSS_PROCESS type on the 46202f4aeb0Sopenharmony_ci EGL_NV_cross_process_fd extension 46302f4aeb0Sopenharmony_ci - Added CROSS_PROCESS to the list of STREAM_TYPE legal values 46402f4aeb0Sopenharmony_ci - Added CROSS_PROCESS requirement for cross_process_fd protocol 46502f4aeb0Sopenharmony_ci 46602f4aeb0Sopenharmony_ci #2 (December 11, 2014) Daniel Kartch 46702f4aeb0Sopenharmony_ci - Rewrote as NV draft for earlier release. 46802f4aeb0Sopenharmony_ci - Added section for creation of sync object. 46902f4aeb0Sopenharmony_ci - Reserved enum values. 47002f4aeb0Sopenharmony_ci 47102f4aeb0Sopenharmony_ci #1 (October 10, 2014) Daniel Kartch 47202f4aeb0Sopenharmony_ci - Initial EXT draft 473