15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci QCOM_shader_framebuffer_fetch_noncoherent 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_QCOM_shader_framebuffer_fetch_noncoherent 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Jeff Leger, Qualcomm (jleger@qti.qualcomm.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciStatus 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Complete 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciVersion 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Last Modified Date: April 21, 2017 205bd8deadSopenharmony_ci Author Revision: 2 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciNumber 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci OpenGL ES Extension #277 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ciDependencies 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci OpenGL ES 2.0 is required. 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci Requires one of more of the following OpenGL ES extensions: 315bd8deadSopenharmony_ci EXT_shader_framebuffer_fetch 325bd8deadSopenharmony_ci ARM_shader_framebuffer_fetch_depth_stencil 335bd8deadSopenharmony_ci ARM_shader_framebuffer_fetch 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciOverview 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci Existing extensions such as EXT_shader_framebuffer_fetch and 385bd8deadSopenharmony_ci ARM_shader_framebuffer_fetch_depth_stencil allow fragment 395bd8deadSopenharmony_ci shaders to read existing framebuffer color or depth/stencil data as input. 405bd8deadSopenharmony_ci This extension adds support for reading those same inputs with 415bd8deadSopenharmony_ci relaxed coherency requirements. This mode can avoid expensive 425bd8deadSopenharmony_ci per-primitive flushes of the pixel pipeline and may offer performance 435bd8deadSopenharmony_ci improvements in some implementations. 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci When the relaxed coherency mode is enabled, reads of the framebuffer data 465bd8deadSopenharmony_ci by the fragment shader will guarantee defined results only if each sample 475bd8deadSopenharmony_ci is touched no more than once in any single rendering pass. The command 485bd8deadSopenharmony_ci FramebufferFetchBarrierQCOM() is provided to indicate a boundary between 495bd8deadSopenharmony_ci passes. 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ciNew Procedures and Functions 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci void FramebufferFetchBarrierQCOM(void); 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ciNew Tokens 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by 585bd8deadSopenharmony_ci the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev 595bd8deadSopenharmony_ci and GetInteger64v: 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci FRAMEBUFFER_FETCH_NONCOHERENT_QCOM 0x96A2 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ciNew Builtin Variables 645bd8deadSopenharmony_ci none 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciChanges to the OpenGL ES 2.0 Specification, Chapter 3 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci Append the following new sub-section at the end of section 3.8.2, Shader 695bd8deadSopenharmony_ci Execution, page 197: 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci Framebuffer Fetch Coherency 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci Rendering is typically done coherently and in primitive order. When an 745bd8deadSopenharmony_ci individual sample is covered by multiple primitives, rendering for that 755bd8deadSopenharmony_ci sample is performed sequentially in the order in which the primitives were 765bd8deadSopenharmony_ci submitted. When a Fragment shader reads framebuffer data (using 775bd8deadSopenharmony_ci glLastFragData, gl_LastFragDepthARM, or an inout variable) the value will 785bd8deadSopenharmony_ci always return the last fragment value written to the frame buffer. This 795bd8deadSopenharmony_ci coherent behavior is enabled by default, but an optional non-coherent 805bd8deadSopenharmony_ci behavior can be enabled or disabled by calling Enable or Disable with the 815bd8deadSopenharmony_ci symbolic constant FRAMEBUFFER_FETCH_NONCOHERENT_QCOM. If the non-coherent 825bd8deadSopenharmony_ci behavior is enabled, applications should split their rendering into a collection 835bd8deadSopenharmony_ci of passes, none of which touch an individual sample in the framebuffer more than 845bd8deadSopenharmony_ci once. When non-coherent behavior is enabled, the results of framebuffer reads 855bd8deadSopenharmony_ci are undefined if the sample being read has been touched previously in the same 865bd8deadSopenharmony_ci pass. The command 875bd8deadSopenharmony_ci 885bd8deadSopenharmony_ci void FramebufferFetchBarrierQCOM(void); 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci specifies a boundary between passes. Any command that causes the value of a 915bd8deadSopenharmony_ci sample to be modified using the framebuffer is considered to touch the sample, 925bd8deadSopenharmony_ci including clears, blended or unblended primitives, and BlitFramebuffer copies. 935bd8deadSopenharmony_ci Calling Disable with the symbolic constant FRAMEBUFFER_FETCH_NONCOHERENT_QCOM 945bd8deadSopenharmony_ci implicilty ends the current pass. 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciNew State 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci Get Value Type Get Command Minimum Value Description Section 1005bd8deadSopenharmony_ci --------- ---- ----------- ------------- -------------- ------- 1015bd8deadSopenharmony_ci FRAMEBUFFER_FETCH_NONCOHERENT_QCOM B GetBooleanv - enables relaxed 1025bd8deadSopenharmony_ci coherency for reads 1035bd8deadSopenharmony_ci of framebuffer. 1045bd8deadSopenharmony_ci 1055bd8deadSopenharmony_ciRevision History 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci Version 1, 2017/01/06 - Initial draft. 1085bd8deadSopenharmony_ci Version 2, 2017/04/21 - Extended to include depth/stencil reads. 109