15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_shader_group_vote 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_shader_group_vote 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Pat Brown, NVIDIA Corporation (pbrown 'at' nvidia.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci John Kessenich 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciNotice 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Copyright (c) 2013 The Khronos Group Inc. Copyright terms at 205bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciSpecification Update Policy 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 255bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 265bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 275bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 285bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 295bd8deadSopenharmony_ci described in more detail at 305bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciStatus 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Complete. Approved by the ARB on June 3, 2013. 355bd8deadSopenharmony_ci Ratified by the Khronos Board of Promoters on July 19, 2013. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciVersion 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci Last Modified Date: December 10, 2018 405bd8deadSopenharmony_ci Revision: 7 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciNumber 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci ARB Extension #157 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciDependencies 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci This extension is written against the OpenGL 4.3 (Compatibility Profile) 495bd8deadSopenharmony_ci Specification, dated August 6, 2012. 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci This extension is written against the OpenGL Shading Language 525bd8deadSopenharmony_ci Specification, Version 4.30, Revision 7, dated September 24, 2012. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci OpenGL 4.3 or ARB_compute_shader is required. 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci This extension interacts with NV_gpu_shader5. 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ciOverview 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci This extension provides new built-in functions to compute the composite of 615bd8deadSopenharmony_ci a set of boolean conditions across a group of shader invocations. These 625bd8deadSopenharmony_ci composite results may be used to execute shaders more efficiently on a 635bd8deadSopenharmony_ci single-instruction multiple-data (SIMD) processor. The set of shader 645bd8deadSopenharmony_ci invocations across which boolean conditions are evaluated is 655bd8deadSopenharmony_ci implementation-dependent, and this extension provides no guarantee over 665bd8deadSopenharmony_ci how individual shader invocations are assigned to such sets. In 675bd8deadSopenharmony_ci particular, the set of shader invocations has no necessary relationship 685bd8deadSopenharmony_ci with the compute shader workgroup -- a pair of shader invocations 695bd8deadSopenharmony_ci in a single compute shader workgroup may end up in different sets used by 705bd8deadSopenharmony_ci these built-ins. 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ci Compute shaders operate on an explicitly specified group of threads (a 735bd8deadSopenharmony_ci workgroup), but many implementations of OpenGL 4.3 will even group 745bd8deadSopenharmony_ci non-compute shader invocations and execute them in a SIMD fashion. When 755bd8deadSopenharmony_ci executing code like 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci if (condition) { 785bd8deadSopenharmony_ci result = do_fast_path(); 795bd8deadSopenharmony_ci } else { 805bd8deadSopenharmony_ci result = do_general_path(); 815bd8deadSopenharmony_ci } 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci where <condition> diverges between invocations, a SIMD implementation 845bd8deadSopenharmony_ci might first call do_fast_path() for the invocations where <condition> is 855bd8deadSopenharmony_ci true and leave the other invocations dormant. Once do_fast_path() 865bd8deadSopenharmony_ci returns, it might call do_general_path() for invocations where <condition> 875bd8deadSopenharmony_ci is false and leave the other invocations dormant. In this case, the 885bd8deadSopenharmony_ci shader executes *both* the fast and the general path and might be better 895bd8deadSopenharmony_ci off just using the general path for all invocations. 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci This extension provides the ability to avoid divergent execution by 925bd8deadSopenharmony_ci evaluting a condition across an entire SIMD invocation group using code 935bd8deadSopenharmony_ci like: 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci if (allInvocationsARB(condition)) { 965bd8deadSopenharmony_ci result = do_fast_path(); 975bd8deadSopenharmony_ci } else { 985bd8deadSopenharmony_ci result = do_general_path(); 995bd8deadSopenharmony_ci } 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci The built-in function allInvocationsARB() will return the same value for 1025bd8deadSopenharmony_ci all invocations in the group, so the group will either execute 1035bd8deadSopenharmony_ci do_fast_path() or do_general_path(), but never both. For example, shader 1045bd8deadSopenharmony_ci code might want to evaluate a complex function iteratively by starting 1055bd8deadSopenharmony_ci with an approximation of the result and then refining the approximation. 1065bd8deadSopenharmony_ci Some input values may require a small number of iterations to generate an 1075bd8deadSopenharmony_ci accurate result (do_fast_path) while others require a larger number 1085bd8deadSopenharmony_ci (do_general_path). In another example, shader code might want to evaluate 1095bd8deadSopenharmony_ci a complex function (do_general_path) that can be greatly simplified when 1105bd8deadSopenharmony_ci assuming a specific value for one of its inputs (do_fast_path). 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ciNew Procedures and Functions 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci None. 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ciNew Tokens 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci None. 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ciModifications to the OpenGL 4.3 (Compatibility Profile) Specification 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci None. 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ciModifications to the OpenGL Shading Language Specification, Version 4.30 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci Including the following line in a shader can be used to control the 1275bd8deadSopenharmony_ci language features described in this extension: 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci #extension GL_ARB_shader_group_vote : <behavior> 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci where <behavior> is as specified in section 3.3. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci New preprocessor #defines are added to the OpenGL Shading Language: 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci #define GL_ARB_shader_group_vote 1 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci Modify Chapter 8, Built-in Functions, p. 129 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci (insert a new section at the end of the chapter) 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci Section 8.18, Shader Invocation Group Functions 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci Implementations of the OpenGL Shading Language may optionally group 1455bd8deadSopenharmony_ci multiple shader invocations for a single shader stage into a single SIMD 1465bd8deadSopenharmony_ci invocation group, where invocations are assigned to groups in an 1475bd8deadSopenharmony_ci undefined, implementation-dependent manner. Shader algorithms on such 1485bd8deadSopenharmony_ci implementations may benefit from being able to evaluate a composite of 1495bd8deadSopenharmony_ci boolean values over all active invocations in a group. 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci Syntax: 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci bool anyInvocationARB(bool value); 1545bd8deadSopenharmony_ci bool allInvocationsARB(bool value); 1555bd8deadSopenharmony_ci bool allInvocationsEqualARB(bool value); 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci The function anyInvocationARB() returns true if and only if <value> is 1585bd8deadSopenharmony_ci true for at least one active invocation in the group. 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci The function allInvocationsARB() returns true if and only if <value> is 1615bd8deadSopenharmony_ci true for all active invocations in the group. 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci The function allInvocationsEqualARB() returns true if <value> is the same 1645bd8deadSopenharmony_ci for all active invocations in the group. 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci For all of these functions, the same value is returned to all active 1675bd8deadSopenharmony_ci invocations in the group. 1685bd8deadSopenharmony_ci 1695bd8deadSopenharmony_ci These functions may be called in conditionally executed code. In groups 1705bd8deadSopenharmony_ci where some invocations do not execute the function call, the value 1715bd8deadSopenharmony_ci returned by the function is not affected by any invocation not calling the 1725bd8deadSopenharmony_ci function, even when <value> is well-defined for that invocation. 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci Since these functions depend on the values of <value> in an undefined 1755bd8deadSopenharmony_ci group of invocations, the value returned by these functions is largely 1765bd8deadSopenharmony_ci undefined. However, anyInvocationARB() is guaranteed to return true if 1775bd8deadSopenharmony_ci <value> is true, and allInvocationsARB() is guaranteed to return false if 1785bd8deadSopenharmony_ci <value> is false. 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci Since implementations are not required to combine invocations into groups, 1815bd8deadSopenharmony_ci simply returning <value> for anyInvocationARB() and allInvocationsARB() 1825bd8deadSopenharmony_ci and returning true for allInvocationsEqualARB() is a legal implementation 1835bd8deadSopenharmony_ci of these functions. 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci For fragment shaders, invocations in a SIMD invocation group may include 1865bd8deadSopenharmony_ci invocations corresponding to pixels that are covered by a primitive being 1875bd8deadSopenharmony_ci rasterized, as well as invocations corresponding to neighboring pixels not 1885bd8deadSopenharmony_ci covered by the primitive. The invocations for these neighboring "helper" 1895bd8deadSopenharmony_ci pixels may be created so that differencing can be used to evaluate 1905bd8deadSopenharmony_ci derivative functions like dFdx() and dFdx() (section 8.13) and implicit 1915bd8deadSopenharmony_ci derivatives used by texture() and related functions (section 8.9.2). The 1925bd8deadSopenharmony_ci value of <value> for such "helper" pixels may affect the value returned by 1935bd8deadSopenharmony_ci anyInvocationARB(), allInvocationsARB(), and allInvocationsEqualARB(). 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ciAdditions to the AGL/EGL/GLX/WGL Specifications 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci None 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ciGLX Protocol 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci TBD 2025bd8deadSopenharmony_ci 2035bd8deadSopenharmony_ciDependencies on NV_gpu_shader5 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci The built-in functions defined by this extension provide the same 2065bd8deadSopenharmony_ci functionality as the anyThreadNV(), allThreadsNV(), allThreadsEqualNV() 2075bd8deadSopenharmony_ci functions in NV_gpu_shader5 and are implemented identically. 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ciErrors 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci None. 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ciNew State 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci None. 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ciNew Implementation Dependent State 2185bd8deadSopenharmony_ci 2195bd8deadSopenharmony_ci None. 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ciIssues 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci (1) Should we provide built-ins exposing a fixed implementation-dependent 2245bd8deadSopenharmony_ci SIMD workgroup size and/or the "location" of a single invocation 2255bd8deadSopenharmony_ci within a fixed-size SIMD workgroup? 2265bd8deadSopenharmony_ci 2275bd8deadSopenharmony_ci RESOLVED: Not in this extension. 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci (2) Should we provide mechanisms for sharing arbitrary data values across 2305bd8deadSopenharmony_ci SIMD workgroups? 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci RESOLVED: Not in this extension. 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ci For compute shaders, shared memory may already be used to share values 2355bd8deadSopenharmony_ci across invocations in a single workgroup. 2365bd8deadSopenharmony_ci 2375bd8deadSopenharmony_ci (3) Is this capability supported for all shader types or just compute 2385bd8deadSopenharmony_ci shaders? 2395bd8deadSopenharmony_ci 2405bd8deadSopenharmony_ci RESOLVED: All shader types. 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ci (4) For compute shaders, is there any relationship between the 2435bd8deadSopenharmony_ci workgroup and the SIMD invocation group across which conditions are 2445bd8deadSopenharmony_ci evaluated? 2455bd8deadSopenharmony_ci 2465bd8deadSopenharmony_ci RESOLVED: No. 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci (5) Is there any necessary relationship between SIMD workgroups in this 2495bd8deadSopenharmony_ci extension and the workgroups for compute shaders? 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci RESOLVED: No. It is expected that the SIMD workgroups in this 2525bd8deadSopenharmony_ci extension are relatively small compared to a maximum-sized compute 2535bd8deadSopenharmony_ci workgroup. On current NVIDIA GPUs, the SIMD workgroup size will be 32; 2545bd8deadSopenharmony_ci however, maximum workgroup size (MAX_COMPUTE_WORK_GROUP_INVOCATIONS) 2555bd8deadSopenharmony_ci for OpenGL 4.3 compute shaders is 1024. 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci Perhaps there might be some small value in guaranteeing that a SIMD 2585bd8deadSopenharmony_ci workgroup doesn't span compute workgroups. However, it's not clear 2595bd8deadSopenharmony_ci that there is any specific value in doing so, and having such a 2605bd8deadSopenharmony_ci restriction could limit parallelism for very small compute workgroups 2615bd8deadSopenharmony_ci (where one might be able to fit multiple workgroups in a single SIMD 2625bd8deadSopenharmony_ci workgroup). 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci (6) How do the built-in functions work when called in conditionally 2655bd8deadSopenharmony_ci executed code? 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci RESOLVED: When these functions are called inside flow control, the 2685bd8deadSopenharmony_ci value for invocations not executing the function call have no effect on 2695bd8deadSopenharmony_ci the result. For example, consider this code: 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ci bool result = false; 2725bd8deadSopenharmony_ci bool condition1, condition2; 2735bd8deadSopenharmony_ci if (condition1) { 2745bd8deadSopenharmony_ci result = allInvocationsARB(condition2); 2755bd8deadSopenharmony_ci } 2765bd8deadSopenharmony_ci 2775bd8deadSopenharmony_ci For all invocations where <condition1> is false, the value of <result> 2785bd8deadSopenharmony_ci will be false because allInvocationsARB() is not called. For the other 2795bd8deadSopenharmony_ci invocations, the value of <result> will be true if and only if 2805bd8deadSopenharmony_ci <condition2> is true for all invocations where <condition1> is also 2815bd8deadSopenharmony_ci true. In this similar code: 2825bd8deadSopenharmony_ci 2835bd8deadSopenharmony_ci if (condition1) { 2845bd8deadSopenharmony_ci result = allInvocationsARB(condition1); 2855bd8deadSopenharmony_ci } 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci allInvocationsARB() will always return true, since it will only be 2885bd8deadSopenharmony_ci called by invocations where <condition1> is true. 2895bd8deadSopenharmony_ci 2905bd8deadSopenharmony_ci (7) What should an implementation do if it groups invocations into SIMD 2915bd8deadSopenharmony_ci execution groups differently for different shader types? 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci RESOLVED: As specified, there is no requirement of a specific SIMD 2945bd8deadSopenharmony_ci group size. Additionally, there is no implementation-dependent constant 2955bd8deadSopenharmony_ci requiring applications to expose a single SIMD group size. 2965bd8deadSopenharmony_ci 2975bd8deadSopenharmony_ci If an implementation has different SIMD group sizes for different 2985bd8deadSopenharmony_ci shaders, its implementation of the built-in functions could reflect such 2995bd8deadSopenharmony_ci differences. Additionally, if an implementation doesn't even support 3005bd8deadSopenharmony_ci SIMD execution for some shader types, it could simply treat each 3015bd8deadSopenharmony_ci invocation as its own group. 3025bd8deadSopenharmony_ci 3035bd8deadSopenharmony_ci (8) Should we provide any query by which an application can discover the 3045bd8deadSopenharmony_ci SIMD execution group size for a particular implementation? Or for a 3055bd8deadSopenharmony_ci particular shader type, if any implementation might behave like the 3065bd8deadSopenharmony_ci hypothetical one in issue (7)? 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci RESOLVED: No. Given the limited functionality provided by this 3095bd8deadSopenharmony_ci extension, it's not clear that there's anything useful applications 3105bd8deadSopenharmony_ci could do with this information. 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci (9) Fragment shaders have built-in functions -- dFdx(), dFdy(), and 3135bd8deadSopenharmony_ci texture() -- that need to compute derivatives of their inputs in 3145bd8deadSopenharmony_ci screen space. These derivatives may be approximated by computing the 3155bd8deadSopenharmony_ci difference between the value of an input at the pixel in question and 3165bd8deadSopenharmony_ci a neighboring pixel. For small or slivery triangles, a pixel may not 3175bd8deadSopenharmony_ci actually have a neighboring pixel covered by the primitive. In order 3185bd8deadSopenharmony_ci to allow for such differencing, implementations may need to create 3195bd8deadSopenharmony_ci fragment shader invocations for uncovered neighboring pixels -- called 3205bd8deadSopenharmony_ci "helper pixels". How do such fragment shader invocations affect the 3215bd8deadSopenharmony_ci results of invocation group built-ins? 3225bd8deadSopenharmony_ci 3235bd8deadSopenharmony_ci RESOLVED: We specify that the results of the built-in functions can be 3245bd8deadSopenharmony_ci affected by the inputs evaluated for "helper" pixels found in a SIMD 3255bd8deadSopenharmony_ci execution group. If a condition is true for all "real" fragment shader 3265bd8deadSopenharmony_ci invocations but false for some "helper" invocation, it's possible that 3275bd8deadSopenharmony_ci allInvocationsARB() will return false. 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci (10) For certain shading language operations indexing into arrays of 3305bd8deadSopenharmony_ci resources (samplers, images, atomic counters, uniform blocks, and 3315bd8deadSopenharmony_ci shader storage blocks), indices must be dynamically uniform to have 3325bd8deadSopenharmony_ci defined results. Are the values returned by these new built-in 3335bd8deadSopenharmony_ci functions considered dynamically uniform? 3345bd8deadSopenharmony_ci 3355bd8deadSopenharmony_ci RESOLVED: No. 3365bd8deadSopenharmony_ci 3375bd8deadSopenharmony_ci As defined, the values returned by these built-in functions should be 3385bd8deadSopenharmony_ci the same for all invocations in the SIMD execution group that call them. 3395bd8deadSopenharmony_ci However, for the purposes of some of these operations requiring dynamic 3405bd8deadSopenharmony_ci uniformity, some implementations may require identical values over a 3415bd8deadSopenharmony_ci group of invocations larger than a single SIMD execution group. Since 3425bd8deadSopenharmony_ci these built-ins produce results that are only identical within a single 3435bd8deadSopenharmony_ci group, they can't qualify as "dynamically uniform". 3445bd8deadSopenharmony_ci 3455bd8deadSopenharmony_ci In this code: 3465bd8deadSopenharmony_ci 3475bd8deadSopenharmony_ci uniform sampler2D samplers[2]; 3485bd8deadSopenharmony_ci bool condition = non_uniform_condition(); 3495bd8deadSopenharmony_ci vec4 texel = texture(samplers[condition ? 1 : 0], ...); 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci the sampler accessed is *not* dynamically uniform. However, in this 3525bd8deadSopenharmony_ci code: 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci bool condition = allInvocationsARB(non_uniform_condition()); 3555bd8deadSopenharmony_ci vec4 texel = texture(samplers[condition ? 1 : 0], ...); 3565bd8deadSopenharmony_ci 3575bd8deadSopenharmony_ci the value of <condition> will be the same for all invocations in the 3585bd8deadSopenharmony_ci SIMD execution group, so the indexed used to access <samplers> will also 3595bd8deadSopenharmony_ci be the same. However, if dynamic uniformity requires two SIMD execution 3605bd8deadSopenharmony_ci groups to have the same value, this wouldn't qualify because a second 3615bd8deadSopenharmony_ci group could have a different value for <condition>. 3625bd8deadSopenharmony_ci 3635bd8deadSopenharmony_ci (11) Should we provide allInvocationsEqual() that could determine if the 3645bd8deadSopenharmony_ci value of an integer/floating-point/vector variable is the same for 3655bd8deadSopenharmony_ci all invocations in a SIMD execution group? 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci RESOLVED: Not in this extension. 3685bd8deadSopenharmony_ci 3695bd8deadSopenharmony_ci (12) Does the use of built-in functions such as allInvocationsARB() have 3705bd8deadSopenharmony_ci invariance issues? 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci RESOLVED: Yes. The assignment of invocations to SIMD execution groups 3735bd8deadSopenharmony_ci is implementation-dependent, and there is no guarantee that the 3745bd8deadSopenharmony_ci assignment will be identical when rendering the exact same primitives in 3755bd8deadSopenharmony_ci a different viewport, or even when rendering the same primitives in the 3765bd8deadSopenharmony_ci same locations in different frames. Since the assignment of invocations 3775bd8deadSopenharmony_ci to groups may vary from frame to frame, the value returned by 3785bd8deadSopenharmony_ci allInvocationsARB() may also vary from frame to frame. 3795bd8deadSopenharmony_ci 3805bd8deadSopenharmony_ci If the computations performed when allInvocationsARB() returns true 3815bd8deadSopenharmony_ci produce results nearly identical to those performed when it returns 3825bd8deadSopenharmony_ci false, the invariance may result in images that are identical except for 3835bd8deadSopenharmony_ci least significant bits. If the computations are not identical, more 3845bd8deadSopenharmony_ci severe flickering could occur. 3855bd8deadSopenharmony_ci 3865bd8deadSopenharmony_ci (13) How should we name this extension? 3875bd8deadSopenharmony_ci 3885bd8deadSopenharmony_ci RESOLVED: We originally called it ARB_shader_group_operations, we 3895bd8deadSopenharmony_ci considered a number of other options in addition to evaluating a boolean 3905bd8deadSopenharmony_ci predicate across a SIMD execution group. But the final extension is 3915bd8deadSopenharmony_ci limited to this specific operation, so a more specific name seems 3925bd8deadSopenharmony_ci appropriate. We are using the term "vote", as it (like real voting) 3935bd8deadSopenharmony_ci involves collecting "choices" of multiple entities to generate a single 3945bd8deadSopenharmony_ci result and then returning the result of that collective choice. 3955bd8deadSopenharmony_ci 3965bd8deadSopenharmony_ciRevision History 3975bd8deadSopenharmony_ci 3985bd8deadSopenharmony_ci Revision 7, December 10, 2018 (Jon Leech) 3995bd8deadSopenharmony_ci - Use 'workgroup' consistently throughout (Bug 11723, internal API 4005bd8deadSopenharmony_ci issue 87). 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci Revision 6, May 30, 2013 4035bd8deadSopenharmony_ci - Mark issue (13) as resolved. 4045bd8deadSopenharmony_ci 4055bd8deadSopenharmony_ci Revision 5, May 7, 2013 4065bd8deadSopenharmony_ci - Extend the introduction to include an example of the use of the new 4075bd8deadSopenharmony_ci built-in functions. 4085bd8deadSopenharmony_ci - Add explicit language indicating that these functions return the same 4095bd8deadSopenharmony_ci value for all invocations in a SIMD execution group. 4105bd8deadSopenharmony_ci 4115bd8deadSopenharmony_ci Revision 4, May 3, 2013 4125bd8deadSopenharmony_ci - Add some more concrete examples to the introduction illustrating why 4135bd8deadSopenharmony_ci these functions may be useful. 4145bd8deadSopenharmony_ci - Rename the extension to ARB_shader_group_vote. 4155bd8deadSopenharmony_ci - Add spec language indicating that fragment shader "helper" pixels 4165bd8deadSopenharmony_ci may affect the results of these "vote" functions. 4175bd8deadSopenharmony_ci - Mark various issues as resolved per working group discussions. 4185bd8deadSopenharmony_ci - Add issues (11), (12), and (13). 4195bd8deadSopenharmony_ci 4205bd8deadSopenharmony_ci Revision 3, April 19, 2013 4215bd8deadSopenharmony_ci - Add #extension infrastructure for this feature, since it will begin as 4225bd8deadSopenharmony_ci an ARB extension. Add "ARB" suffixes on the names of the built-in 4235bd8deadSopenharmony_ci functions. 4245bd8deadSopenharmony_ci - Add discussion on issue (7) and new issues (8) through (10). 4255bd8deadSopenharmony_ci 4265bd8deadSopenharmony_ci Revision 2, March 28, 2013 4275bd8deadSopenharmony_ci - Checkpoint updating some issues for spec review (not done yet). 4285bd8deadSopenharmony_ci 4295bd8deadSopenharmony_ci Revision 1, January 20, 2013 4305bd8deadSopenharmony_ci - Initial revision. 431