15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci EXT_framebuffer_blit_layers 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_EXT_framebuffer_blit_layers 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContacts 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Simon Zeni, Status Holdings Ltd. <simon@zeni.ca> 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Simon Zeni 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciStatus 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Draft 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciVersion 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Version 0.1, 2022/09/16 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciNumber 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci OpenGL Extension #558 285bd8deadSopenharmony_ci OpenGL ES Extension #341 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciDependencies 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci OpenGL 3.0, OpenGL ES 3.0, or GL_EXT_framebuffer_blit required 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci This extension is written against the OpenGL 4.6 Core and OpenGL ES 3.2 355bd8deadSopenharmony_ci specifications. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciOverview 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci This extensions defines the behaviour for copying data from one layered 405bd8deadSopenharmony_ci framebuffer to another layered framebuffer. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciNew Procedures and Functions 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci void BlitFramebufferLayersEXT(int srcX0, int srcY0, int srcX1, int srcY1, 455bd8deadSopenharmony_ci int dstX0, int dstY0, int dstX1, int dstY1, 465bd8deadSopenharmony_ci bitfield mask, enum filter); 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci void BlitFramebufferLayerEXT(int srcX0, int srcY0, int srcX1, int srcY1, 495bd8deadSopenharmony_ci int srcLayer, int dstX0, int dstY0, int dstX1, 505bd8deadSopenharmony_ci int dstY1, int dstLayer, bitfield mask, 515bd8deadSopenharmony_ci enum filter); 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ciNew Tokens 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci None 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciAdditions to Chapter 16 of the OpenGL ES 3.2 specification (Reading and 585bd8deadSopenharmony_ciCopying Pixels) and Chaper 18 of the OpenGL 4.6 Core specification (Reading 595bd8deadSopenharmony_ciand Copying Pixels) 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci Append the following to the section 16.2.1 (Blitting Pixel Rectangles) of 625bd8deadSopenharmony_ci the OpenGL ES 3.2 specification, and to the section 18.3.1 (Blitting Pixel 635bd8deadSopenharmony_ci Rectangles) of the OpenGL 4.6 core specification. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci The command 665bd8deadSopenharmony_ci 675bd8deadSopenharmony_ci void BlitFramebufferLayersEXT(int srcX0, int srcY0, int srcX1, 685bd8deadSopenharmony_ci int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, 695bd8deadSopenharmony_ci bitfield mask, enum filter); 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci extends the behaviour of the command BlitFramebuffer to all the layers of 725bd8deadSopenharmony_ci the textures bound to the read framebuffer and the draw framebuffer. 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci Calling BlitFramebufferLayersEXT will result in an INVALID_OPERATION if 755bd8deadSopenharmony_ci the read and the draw framebuffers don't have the same number of layers. 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci The command 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci void BlitFramebufferLayerEXT(int srcX0, int srcY0, int srcX1, int srcY1, 805bd8deadSopenharmony_ci int srcLayer, int dstX0, int dstY0, int dstX1, int dstY1, 815bd8deadSopenharmony_ci int dstLayer, bitfield mask, enum filter); 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci extends the behaviour of the command BlitFramebuffer to a specified layer 845bd8deadSopenharmony_ci of the texture bound to the read framebuffer, and a specified layer of the 855bd8deadSopenharmony_ci draw framebuffer. 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci Calling BlitFramebufferLayerEXT will result in an INVALID_VALUE if 885bd8deadSopenharmony_ci srcLayer or dstLayer is negative, larger than the value of 895bd8deadSopenharmony_ci MAX_ARRAY_TEXTURE_LAYERS minus one, or larger than the number of layers in 905bd8deadSopenharmony_ci the attached texture. 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ciIssues 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci 1) How does the extension deal with GL_OVR_multiview generating the error 955bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION if the read framebuffer has more than one 965bd8deadSopenharmony_ci layer when using the BlitFramebuffer command. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci GL_OVR_multiview defines a two dimensional array texture with multiple 995bd8deadSopenharmony_ci layers as multiview. If the extension GL_OVR_multiview is enabled, and 1005bd8deadSopenharmony_ci a multiview texture is bound to the read framebuffer, the error 1015bd8deadSopenharmony_ci INVALID_FRAMEBUFFER_OPERATION is generated as expected. For any other 1025bd8deadSopenharmony_ci kind of textures, the commands BlitFramebufferLayerEXT and 1035bd8deadSopenharmony_ci BlitFramebufferLayersEXT proceed as expected. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ciRevision History 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci Version 0.2, 2022-09-30 (Simon Zeni) 1085bd8deadSopenharmony_ci - Conflict with GL_OVR_multiview 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci Version 0.1, 2022-09-16 (Simon Zeni) 1115bd8deadSopenharmony_ci - Initial draft 112