15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_gpu_shader_int64 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_gpu_shader_int64 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Daniel Rakos, AMD (daniel.rakos 'at' amd.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Daniel Rakos, AMD 165bd8deadSopenharmony_ci Graham Sellers, AMD 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciNotice 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Copyright (c) 2015 The Khronos Group Inc. Copyright terms at 215bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciSpecification Update Policy 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 265bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 275bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 285bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 295bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 305bd8deadSopenharmony_ci described in more detail at 315bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ciStatus 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ci Complete. Approved by the ARB on June 26, 2015. 365bd8deadSopenharmony_ci Ratified by the Khronos Board of Promoters on August 7, 2015. 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ciVersion 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci Last Modified Date: 02/03/2015 415bd8deadSopenharmony_ci Author Revision: 1 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ciNumber 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ci ARB Extension #178 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciDependencies 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci This extension is written against the OpenGL 4.5 (Core Profile) 505bd8deadSopenharmony_ci Specification. 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci This extension is written against version 4.50 of the OpenGL Shading 535bd8deadSopenharmony_ci Language Specification. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci OpenGL 4.0 and GLSL 4.00 are required. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci This extension interacts with AMD_gpu_shader_int64. 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci This extension interacts with NV_gpu_shader5. 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ci This extension interacts with NV_shader_buffer_load. 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci This extension interacts with NV_vertex_attrib_integer_64bit. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciOverview 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci The extension introduces the following features for all shader types: 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci * support for 64-bit scalar and vector integer data types, including 715bd8deadSopenharmony_ci uniform API, uniform buffer object, transform feedback, and shader 725bd8deadSopenharmony_ci input and output support; 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci * new built-in functions to pack and unpack 64-bit integer types into a 755bd8deadSopenharmony_ci two-component 32-bit integer vector; 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci * new built-in functions to convert double-precision floating-point 785bd8deadSopenharmony_ci values to or from their 64-bit integer bit encodings; 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci * vector relational functions supporting comparisons of vectors of 815bd8deadSopenharmony_ci 64-bit integer types; and 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci * common functions abs, sign, min, max, clamp, and mix supporting 845bd8deadSopenharmony_ci arguments of 64-bit integer types. 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ciNew Procedures and Functions 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci void Uniform1i64ARB(int location, int64 x); 905bd8deadSopenharmony_ci void Uniform2i64ARB(int location, int64 x, int64 y); 915bd8deadSopenharmony_ci void Uniform3i64ARB(int location, int64 x, int64 y, int64 z); 925bd8deadSopenharmony_ci void Uniform4i64ARB(int location, int64 x, int64 y, int64 z, int64 w); 935bd8deadSopenharmony_ci void Uniform1i64vARB(int location, sizei count, const int64 *value); 945bd8deadSopenharmony_ci void Uniform2i64vARB(int location, sizei count, const int64 *value); 955bd8deadSopenharmony_ci void Uniform3i64vARB(int location, sizei count, const int64 *value); 965bd8deadSopenharmony_ci void Uniform4i64vARB(int location, sizei count, const int64 *value); 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci void Uniform1ui64ARB(int location, uint64 x); 995bd8deadSopenharmony_ci void Uniform2ui64ARB(int location, uint64 x, uint64 y); 1005bd8deadSopenharmony_ci void Uniform3ui64ARB(int location, uint64 x, uint64 y, uint64 z); 1015bd8deadSopenharmony_ci void Uniform4ui64ARB(int location, uint64 x, uint64 y, uint64 z, uint64 w); 1025bd8deadSopenharmony_ci void Uniform1ui64vARB(int location, sizei count, const uint64 *value); 1035bd8deadSopenharmony_ci void Uniform2ui64vARB(int location, sizei count, const uint64 *value); 1045bd8deadSopenharmony_ci void Uniform3ui64vARB(int location, sizei count, const uint64 *value); 1055bd8deadSopenharmony_ci void Uniform4ui64vARB(int location, sizei count, const uint64 *value); 1065bd8deadSopenharmony_ci 1075bd8deadSopenharmony_ci void GetUniformi64vARB(uint program, int location, int64 *params); 1085bd8deadSopenharmony_ci void GetUniformui64vARB(uint program, int location, uint64 *params); 1095bd8deadSopenharmony_ci void GetnUniformi64vARB(uint program, int location, sizei bufSize, 1105bd8deadSopenharmony_ci int64 *params); 1115bd8deadSopenharmony_ci void GetnUniformui64vARB(uint program, int location, sizei bufSize, 1125bd8deadSopenharmony_ci uint64 *params); 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci void ProgramUniform1i64ARB(uint program, int location, int64 x); 1155bd8deadSopenharmony_ci void ProgramUniform2i64ARB(uint program, int location, int64 x, int64 y); 1165bd8deadSopenharmony_ci void ProgramUniform3i64ARB(uint program, int location, int64 x, int64 y, 1175bd8deadSopenharmony_ci int64 z); 1185bd8deadSopenharmony_ci void ProgramUniform4i64ARB(uint program, int location, int64 x, int64 y, 1195bd8deadSopenharmony_ci int64 z, int64 w); 1205bd8deadSopenharmony_ci void ProgramUniform1i64vARB(uint program, int location, sizei count, 1215bd8deadSopenharmony_ci const int64 *value); 1225bd8deadSopenharmony_ci void ProgramUniform2i64vARB(uint program, int location, sizei count, 1235bd8deadSopenharmony_ci const int64 *value); 1245bd8deadSopenharmony_ci void ProgramUniform3i64vARB(uint program, int location, sizei count, 1255bd8deadSopenharmony_ci const int64 *value); 1265bd8deadSopenharmony_ci void ProgramUniform4i64vARB(uint program, int location, sizei count, 1275bd8deadSopenharmony_ci const int64 *value); 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ci void ProgramUniform1ui64ARB(uint program, int location, uint64 x); 1305bd8deadSopenharmony_ci void ProgramUniform2ui64ARB(uint program, int location, uint64 x, uint64 y); 1315bd8deadSopenharmony_ci void ProgramUniform3ui64ARB(uint program, int location, uint64 x, uint64 y, 1325bd8deadSopenharmony_ci uint64 z); 1335bd8deadSopenharmony_ci void ProgramUniform4ui64ARB(uint program, int location, uint64 x, uint64 y, 1345bd8deadSopenharmony_ci uint64 z, uint64 w); 1355bd8deadSopenharmony_ci void ProgramUniform1ui64vARB(uint program, int location, sizei count, 1365bd8deadSopenharmony_ci const uint64 *value); 1375bd8deadSopenharmony_ci void ProgramUniform2ui64vARB(uint program, int location, sizei count, 1385bd8deadSopenharmony_ci const uint64 *value); 1395bd8deadSopenharmony_ci void ProgramUniform3ui64vARB(uint program, int location, sizei count, 1405bd8deadSopenharmony_ci const uint64 *value); 1415bd8deadSopenharmony_ci void ProgramUniform4ui64vARB(uint program, int location, sizei count, 1425bd8deadSopenharmony_ci const uint64 *value); 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ciNew Tokens 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and 1485bd8deadSopenharmony_ci GetTransformFeedbackVarying: 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci INT64_ARB 0x140E 1515bd8deadSopenharmony_ci UNSIGNED_INT64_ARB 0x140F 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ci INT64_VEC2_ARB 0x8FE9 1545bd8deadSopenharmony_ci INT64_VEC3_ARB 0x8FEA 1555bd8deadSopenharmony_ci INT64_VEC4_ARB 0x8FEB 1565bd8deadSopenharmony_ci UNSIGNED_INT64_VEC2_ARB 0x8FF5 1575bd8deadSopenharmony_ci UNSIGNED_INT64_VEC3_ARB 0x8FF6 1585bd8deadSopenharmony_ci UNSIGNED_INT64_VEC4_ARB 0x8FF7 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ciAdditions to Chapter 7 of the OpenGL 4.5 (Core Profile) Specification 1625bd8deadSopenharmony_ci(Program Objects) 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci Modify Section 7.3.1, Program Interfaces 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci (add to Table 7.3, OpenGL Shading Language type tokens, p. 112) 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci +----------------------------+--------------+--------+--------+--------+ 1695bd8deadSopenharmony_ci | Type Name Token | Keyword | Attrib | Xfb | Buffer | 1705bd8deadSopenharmony_ci +----------------------------+--------------+--------+--------+--------+ 1715bd8deadSopenharmony_ci | INT64_ARB | int64_t | * | * | * | 1725bd8deadSopenharmony_ci | INT64_VEC2_ARB | i64vec2 | * | * | * | 1735bd8deadSopenharmony_ci | INT64_VEC3_ARB | i64vec3 | * | * | * | 1745bd8deadSopenharmony_ci | INT64_VEC4_ARB | i64vec4 | * | * | * | 1755bd8deadSopenharmony_ci | UNSIGNED_INT64_ARB | uint64_t | * | * | * | 1765bd8deadSopenharmony_ci | UNSIGNED_INT64_VEC2_ARB | u64vec2 | * | * | * | 1775bd8deadSopenharmony_ci | UNSIGNED_INT64_VEC3_ARB | u64vec3 | * | * | * | 1785bd8deadSopenharmony_ci | UNSIGNED_INT64_VEC4_ARB | u64vec4 | * | * | * | 1795bd8deadSopenharmony_ci +----------------------------+--------------+--------+--------+--------+ 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci Modify Section 7.6, Uniform Variables 1825bd8deadSopenharmony_ci 1835bd8deadSopenharmony_ci (modify second paragraph on p. 125) 1845bd8deadSopenharmony_ci 1855bd8deadSopenharmony_ci Scalar, vector, and matrix uniforms with double-precision components, 1865bd8deadSopenharmony_ci and scalar and vector uniforms with 64-bit integer components will consume 1875bd8deadSopenharmony_ci no more than twice the number of components of equivalent uniforms with 1885bd8deadSopenharmony_ci single-precision components. 1895bd8deadSopenharmony_ci 1905bd8deadSopenharmony_ci 1915bd8deadSopenharmony_ci Modify Section 7.6.1, Loading Uniform Variables 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci (add to the list of commands in first paragraph on p. 132) 1945bd8deadSopenharmony_ci 1955bd8deadSopenharmony_ci void Uniform{1,2,3,4}{i64,ui64}ARB(int location, T value); 1965bd8deadSopenharmony_ci void Uniform{1,2,3,4}{i64,ui64}vARB(int location, const T *value); 1975bd8deadSopenharmony_ci 1985bd8deadSopenharmony_ci (insert after sixth paragraph on p. 132) 1995bd8deadSopenharmony_ci 2005bd8deadSopenharmony_ci The Uniform*i64{v}ARB and Uniform*ui{v}ARB commands will load count sets 2015bd8deadSopenharmony_ci of one to four 64-bit signed or unsigned integer values into a uniform 2025bd8deadSopenharmony_ci location defined as a 64-bit signed or unsigned integer scalar or vector 2035bd8deadSopenharmony_ci types. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci (add to the list of commands in first paragraph on p. 134) 2065bd8deadSopenharmony_ci 2075bd8deadSopenharmony_ci void ProgramUniform{1,2,3,4}{i64,ui64}ARB(uint program, int location, 2085bd8deadSopenharmony_ci T value); 2095bd8deadSopenharmony_ci void ProgramUniform{1,2,3,4}{i64,ui64}vARB(uint program, int location, 2105bd8deadSopenharmony_ci const T *value); 2115bd8deadSopenharmony_ci 2125bd8deadSopenharmony_ci 2135bd8deadSopenharmony_ci Modify Section 7.6.2.1, Uniform Buffer Object Storage 2145bd8deadSopenharmony_ci 2155bd8deadSopenharmony_ci (modify the first two bullets of the first paragraph on p. 136) 2165bd8deadSopenharmony_ci 2175bd8deadSopenharmony_ci * Members of type bool int, uint, float, double, int64_t, and uint64_t 2185bd8deadSopenharmony_ci are respectively extracted from a buffer object by reading a single 2195bd8deadSopenharmony_ci uint, int, uint, float, double, int64_t, or uint64_t value at the 2205bd8deadSopenharmony_ci specified offset. 2215bd8deadSopenharmony_ci 2225bd8deadSopenharmony_ci * Vectors with N elements with basic data types of bool, int, uint, 2235bd8deadSopenharmony_ci float, double, int64_t, or uint64_t are extracted as N values in 2245bd8deadSopenharmony_ci consecutive memory locations beginning at the specified offset, with 2255bd8deadSopenharmony_ci components stored in order with the first (X) component at the 2265bd8deadSopenharmony_ci lowest offset. The GL data type used for component extraction is 2275bd8deadSopenharmony_ci derived according to the rules for scalar members above. 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci Modify Section 7.13, Shader, Program, and Program Pipeline Queries 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci (add to the list of commands in last paragraph on p. 162) 2335bd8deadSopenharmony_ci 2345bd8deadSopenharmony_ci void GetUniformi64vARB(uint program, int location, int64 *params); 2355bd8deadSopenharmony_ci void GetUniformui64vARB(uint program, int location, uint64 *params); 2365bd8deadSopenharmony_ci void GetnUniformi64vARB(uint program, int location, sizei bufSize, 2375bd8deadSopenharmony_ci int64 *params); 2385bd8deadSopenharmony_ci void GetnUniformui64vARB(uint program, int location, sizei bufSize, 2395bd8deadSopenharmony_ci uint64 *params); 2405bd8deadSopenharmony_ci 2415bd8deadSopenharmony_ci 2425bd8deadSopenharmony_ciAdditions to Chapter 11 of the OpenGL 4.5 (Core Profile) Specification 2435bd8deadSopenharmony_ci(Programmable Vertex Processing) 2445bd8deadSopenharmony_ci 2455bd8deadSopenharmony_ci Modify Section 11.1.1, Vertex Attributes 2465bd8deadSopenharmony_ci 2475bd8deadSopenharmony_ci (modify third sentence of second paragraph on p. 368) 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci ... hardware resources. For the purposes of this test, attribute variables 2505bd8deadSopenharmony_ci of the type dvec3, dvec4, dmat2x3, dmat2x3, dmat3, dmat3x4, dmat4x3, 2515bd8deadSopenharmony_ci dmat4, i64vec3, i64vec4, u64vec3, and u64vec4 may count as consuming twice 2525bd8deadSopenharmony_ci as many attributes as equivalent single-precision types. While these types 2535bd8deadSopenharmony_ci use the same number of generic attributes as their single-precision 2545bd8deadSopenharmony_ci vectors of internal storage for each three- or four-component 2555bd8deadSopenharmony_ci double-precision or 64-bit integer vector. 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci 2585bd8deadSopenharmony_ci Modify Section 11.1.2.1, Output Variables 2595bd8deadSopenharmony_ci 2605bd8deadSopenharmony_ci (modify last sentence of fourth paragraph on p. 369) 2615bd8deadSopenharmony_ci 2625bd8deadSopenharmony_ci ... multiple components. Each component of variables declared as double- 2635bd8deadSopenharmony_ci precision floating point scalars, vectors, or matrices, or declared as 2645bd8deadSopenharmony_ci 64-bit integer scalars or vectors may be counted as consuming two 2655bd8deadSopenharmony_ci components. 2665bd8deadSopenharmony_ci 2675bd8deadSopenharmony_ci (modify third bullet of the first paragraph on p. 373) 2685bd8deadSopenharmony_ci 2695bd8deadSopenharmony_ci * any variable containing double-precision floating-point or 64-bit 2705bd8deadSopenharmony_ci integer components 2715bd8deadSopenharmony_ci 2725bd8deadSopenharmony_ci - has an xfb_offset layout qualifier that is not a multiple of eight; 2735bd8deadSopenharmony_ci or 2745bd8deadSopenharmony_ci - is associated with a binding point with an xfb_stride layout 2755bd8deadSopenharmony_ci qualifier that is not a multiple of eight; 2765bd8deadSopenharmony_ci 2775bd8deadSopenharmony_ci (modify second paragraph on p. 373) 2785bd8deadSopenharmony_ci 2795bd8deadSopenharmony_ci For transform feedback purposes, each component of outputs declared as 2805bd8deadSopenharmony_ci double-precision floating-point scalars, vectors, or matrices, or 64-bit 2815bd8deadSopenharmony_ci integer scalars or vectors are considered to consume eight basic machine 2825bd8deadSopenharmony_ci units, and each component of any other type is considered to consume four 2835bd8deadSopenharmony_ci basic machine units. 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci 2865bd8deadSopenharmony_ciModifications to the OpenGL Shading Language Specification, Version 4.50 2875bd8deadSopenharmony_ci 2885bd8deadSopenharmony_ci Including the following line in a shader can be used to control the 2895bd8deadSopenharmony_ci language features described in this extension: 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci #extension GL_ARB_gpu_shader_int64 : <behavior> 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ci where <behavior> is as specified in section 3.3. 2945bd8deadSopenharmony_ci 2955bd8deadSopenharmony_ci New preprocessor #defines are added to the OpenGL Shading Language: 2965bd8deadSopenharmony_ci 2975bd8deadSopenharmony_ci #define GL_ARB_gpu_shader_int64 1 2985bd8deadSopenharmony_ci 2995bd8deadSopenharmony_ci 3005bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL Shading Language Specification (Basics) 3015bd8deadSopenharmony_ci 3025bd8deadSopenharmony_ci Modify Section 3.6, Keywords 3035bd8deadSopenharmony_ci 3045bd8deadSopenharmony_ci (add the following to the list of reserved keywords at p. 17) 3055bd8deadSopenharmony_ci 3065bd8deadSopenharmony_ci int64_t i64vec2 i64vec3 i64vec4 uint64_t u64vec2 u64vec3 u64vec4 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci 3095bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL Shading Language Specification 3105bd8deadSopenharmony_ci(Variables and Types) 3115bd8deadSopenharmony_ci 3125bd8deadSopenharmony_ci Modify Section 4.1, Basic Types 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ci (add to the basic "Transparent Types" table, p. 21) 3155bd8deadSopenharmony_ci 3165bd8deadSopenharmony_ci +-----------+------------------------------------------------------------+ 3175bd8deadSopenharmony_ci | Type | Meaning | 3185bd8deadSopenharmony_ci +-----------+------------------------------------------------------------+ 3195bd8deadSopenharmony_ci | int64_t | a 64-bit signed integer | 3205bd8deadSopenharmony_ci | uint64_t | a 64-bit unsigned integer | 3215bd8deadSopenharmony_ci | i64vec2 | a two-component 64-bit signed integer vector | 3225bd8deadSopenharmony_ci | i64vec3 | a three-component 64-bit signed integer vector | 3235bd8deadSopenharmony_ci | i64vec4 | a four-component 64-bit signed integer vector | 3245bd8deadSopenharmony_ci | u64vec2 | a two-component 64-bit unsigned integer vector | 3255bd8deadSopenharmony_ci | u64vec3 | a three-component 64-bit unsigned integer vector | 3265bd8deadSopenharmony_ci | u64vec4 | a four-component 64-bit unsigned integer vector | 3275bd8deadSopenharmony_ci +-----------+------------------------------------------------------------+ 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci 3305bd8deadSopenharmony_ci Modify Section 4.1.3, Integers 3315bd8deadSopenharmony_ci 3325bd8deadSopenharmony_ci (replace first paragraph of the section, p. 25) 3335bd8deadSopenharmony_ci 3345bd8deadSopenharmony_ci Signed and unsigned integer variables are fully supported. In this 3355bd8deadSopenharmony_ci document, the term integer is meant to generally include both signed and 3365bd8deadSopenharmony_ci unsigned integers, including both 32-bit and 64-bit integers. Unsigned 3375bd8deadSopenharmony_ci integers of type uint, uvec2, uvec3, and uvec4 have exactly 32 bits of 3385bd8deadSopenharmony_ci precision, while unsigned integers of type uint64_t, u64vec2, u64vec3, and 3395bd8deadSopenharmony_ci u64vec4 have exactly 64 bits of precision. Signed integers of type int, 3405bd8deadSopenharmony_ci ivec2, ivec3, and ivec4 have exactly 32 bits of precision, while signed 3415bd8deadSopenharmony_ci integers of type int64_t, i64vec2, i64vec3, and i64vec4 have exactly 3425bd8deadSopenharmony_ci 64 bits of precision. Addition, subtraction, and shift operations 3435bd8deadSopenharmony_ci resulting in overflow or underflow will not cause any exceptions, nor 3445bd8deadSopenharmony_ci will they saturate, rather they will "wrap" to yield the low-order bits 3455bd8deadSopenharmony_ci of the result. Divison and multiplication operations resulting in overflow 3465bd8deadSopenharmony_ci or underflow will not cause any exception but will result in an undefined 3475bd8deadSopenharmony_ci value. 3485bd8deadSopenharmony_ci 3495bd8deadSopenharmony_ci (add after the first paragraph of the section, p. 25) 3505bd8deadSopenharmony_ci 3515bd8deadSopenharmony_ci Variables with the types "int64_t" and "uint64_t" represent signed and 3525bd8deadSopenharmony_ci unsigned integer values, respectively, with exactly 64 bits of precision. 3535bd8deadSopenharmony_ci 3545bd8deadSopenharmony_ci (modify grammar rule for "integer-suffix", p. 26) 3555bd8deadSopenharmony_ci 3565bd8deadSopenharmony_ci integer-suffix: one of 3575bd8deadSopenharmony_ci u U l L ul UL 3585bd8deadSopenharmony_ci 3595bd8deadSopenharmony_ci (modify first sentence of second paragraph on p. 26) 3605bd8deadSopenharmony_ci 3615bd8deadSopenharmony_ci No white space is allowed between the digits of an integer constant, 3625bd8deadSopenharmony_ci including after the leading 0 or after the leading 0x or 0X of a constant, 3635bd8deadSopenharmony_ci or before the suffix u, U, l, L, ul, or UL. 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ci (modify third sentence of second paragraph on p. 26) 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci When the suffix u or U is present, the literal has type uint. When the 3685bd8deadSopenharmony_ci suffix l or L is present, the literal has type int64_t. When the suffix 3695bd8deadSopenharmony_ci ul or UL is present, the literal has type uint64_t. Otherwise, the type is 3705bd8deadSopenharmony_ci int. 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci 3735bd8deadSopenharmony_ci Modify Section 4.1.10, Implicit Conversions 3745bd8deadSopenharmony_ci 3755bd8deadSopenharmony_ci (modify table of implicit conversions on p. 35) 3765bd8deadSopenharmony_ci 3775bd8deadSopenharmony_ci +----------------------+-------------------------------------------------+ 3785bd8deadSopenharmony_ci | Type of expression | Can be implicitly converted to | 3795bd8deadSopenharmony_ci +----------------------+-------------------------------------------------+ 3805bd8deadSopenharmony_ci | int | uint, int64_t, uint64_t, float, double | 3815bd8deadSopenharmony_ci | uint | uint64_t, float, double | 3825bd8deadSopenharmony_ci | int64_t | uint64_t, double | 3835bd8deadSopenharmony_ci | uint64_t | double | 3845bd8deadSopenharmony_ci | ivec2 | uvec2, i64vec2, u64vec2, vec2, dvec2 | 3855bd8deadSopenharmony_ci | ivec3 | uvec3, i64vec3, u64vec3, vec3, dvec3 | 3865bd8deadSopenharmony_ci | ivec4 | uvec4, i64vec4, u64vec4, vec4, dvec4 | 3875bd8deadSopenharmony_ci | uvec2 | u64vec2, vec2, dvec2 | 3885bd8deadSopenharmony_ci | uvec3 | u64vec3, vec3, dvec3 | 3895bd8deadSopenharmony_ci | uvec4 | u64vec4, vec4, dvec4 | 3905bd8deadSopenharmony_ci | i64vec2 | u64vec2, dvec2 | 3915bd8deadSopenharmony_ci | i64vec3 | u64vec3, dvec3 | 3925bd8deadSopenharmony_ci | i64vec4 | u64vec4, dvec4 | 3935bd8deadSopenharmony_ci | u64vec2 | dvec2 | 3945bd8deadSopenharmony_ci | u64vec3 | dvec3 | 3955bd8deadSopenharmony_ci | u64vec4 | dvec4 | 3965bd8deadSopenharmony_ci +----------------------+-------------------------------------------------+ 3975bd8deadSopenharmony_ci 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci Modify Section 4.3.6, Output Variables 4005bd8deadSopenharmony_ci 4015bd8deadSopenharmony_ci (add new bullet to the list in the second paragraph on p. 49) 4025bd8deadSopenharmony_ci 4035bd8deadSopenharmony_ci * A 64-bit integer scalar or vector (int64_t, uint64_t, i64vec2, i64vec3, 4045bd8deadSopenharmony_ci i64vec4, u64vec2, u64vec3, u64vec4) 4055bd8deadSopenharmony_ci 4065bd8deadSopenharmony_ci 4075bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL Shading Language Specification 4085bd8deadSopenharmony_ci(Operators and Expressions) 4095bd8deadSopenharmony_ci 4105bd8deadSopenharmony_ci Modify Section 5.4.1, Conversion and Scalar Constructors 4115bd8deadSopenharmony_ci 4125bd8deadSopenharmony_ci (add to the constructor propotype list on p. 95) 4135bd8deadSopenharmony_ci 4145bd8deadSopenharmony_ci int(int64_t) // converts a 64-bit signed integer to a 32-bit signed integer 4155bd8deadSopenharmony_ci int(uint64_t) // converts a 64-bit unsigned integer to a 32-bit signed integer 4165bd8deadSopenharmony_ci uint(int64_t) // converts a 64-bit signed integer to a 32-bit unsigned integer 4175bd8deadSopenharmony_ci uint(uint64_t) // converts a 64-bit unsigned integer to a 32-bit unsigned integer 4185bd8deadSopenharmony_ci bool(int64_t) // converts a 64-bit signed integer to a Boolean 4195bd8deadSopenharmony_ci bool(uint64_t) // converts a 64-bit unsigned integer to a Boolean 4205bd8deadSopenharmony_ci float(int64_t) // converts a 64-bit signed integer to a float 4215bd8deadSopenharmony_ci float(uint64_t) // converts a 64-bit unsigned integer to a float 4225bd8deadSopenharmony_ci double(int64_t) // converts a 64-bit signed integer to a double 4235bd8deadSopenharmony_ci double(uint64_t) // converts a 64-bit unsigned integer to a double 4245bd8deadSopenharmony_ci int64_t(int) // converts a 32-bit signed integer to a 64-bit signed integer 4255bd8deadSopenharmony_ci int64_t(uint) // converts a 32-bit unsigned integer to a 64-bit signed integer 4265bd8deadSopenharmony_ci int64_t(bool) // converts a Boolean to a 64-bit signed integer 4275bd8deadSopenharmony_ci int64_t(float) // converts a float to a 64-bit signed integer 4285bd8deadSopenharmony_ci int64_t(double) // converts a double to a 64-bit signed integer 4295bd8deadSopenharmony_ci uint64_t(int) // converts a 32-bit signed integer to a 64-bit unsigned integer 4305bd8deadSopenharmony_ci uint64_t(uint) // converts a 32-bit unsigned integer to a 64-bit unsigned integer 4315bd8deadSopenharmony_ci uint64_t(bool) // converts a Boolean to a 64-bit unsigned integer 4325bd8deadSopenharmony_ci uint64_t(float) // converts a float to a 64-bit unsigned integer 4335bd8deadSopenharmony_ci uint64_t(double) // converts a double to a 64-bit unsigned integer 4345bd8deadSopenharmony_ci 4355bd8deadSopenharmony_ci (modify second sentence of first paragraph on p. 96) 4365bd8deadSopenharmony_ci 4375bd8deadSopenharmony_ci ... is dropped. It is undefined to convert a negative floating-point value 4385bd8deadSopenharmony_ci to an uint or uint64_t. 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ci (replace third paragraph on p. 96) 4415bd8deadSopenharmony_ci 4425bd8deadSopenharmony_ci The constructors int(uint) and int64_t(uint64_t) preserve the bit pattern 4435bd8deadSopenharmony_ci in the argument, which will change the argument's value if its sign bit is 4445bd8deadSopenharmony_ci set. The constructor uint(int) and uint64_t(int64_t) preserve the bit 4455bd8deadSopenharmony_ci pattern in the argument, which will change its value if it is negative. 4465bd8deadSopenharmony_ci 4475bd8deadSopenharmony_ci 4485bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL Shading Language Specification 4495bd8deadSopenharmony_ci(Statements and Structure) 4505bd8deadSopenharmony_ci 4515bd8deadSopenharmony_ci Modify Section 6.1, Function Defintions 4525bd8deadSopenharmony_ci 4535bd8deadSopenharmony_ci (replace second rule in third paragraph on p. 111) 4545bd8deadSopenharmony_ci 4555bd8deadSopenharmony_ci 2. A match involving a conversion from a signed integer, unsigned 4565bd8deadSopenharmony_ci integer, or floating-point type to a similar type having a larger 4575bd8deadSopenharmony_ci number of bits is better than a match involving any other implicit 4585bd8deadSopenharmony_ci conversion. 4595bd8deadSopenharmony_ci 4605bd8deadSopenharmony_ci 4615bd8deadSopenharmony_ciAdditions to Chapter 8 of the OpenGL Shading Language Specification 4625bd8deadSopenharmony_ci(Built-in Functions) 4635bd8deadSopenharmony_ci 4645bd8deadSopenharmony_ci (insert after third sentence of last paragraph on p. 138) 4655bd8deadSopenharmony_ci 4665bd8deadSopenharmony_ci ... genUType is used as the argument. Where the input arguments (and 4675bd8deadSopenharmony_ci corresponding output) can be int64_t, i64vec2, i64vec3, i64vec4, 4685bd8deadSopenharmony_ci genI64Type is used as the argument. Where the input arguments (and 4695bd8deadSopenharmony_ci corresponding output) can be uint64_t, u64vec2, u64vec3, u64vec4, 4705bd8deadSopenharmony_ci genU64Type is used as the argument. 4715bd8deadSopenharmony_ci 4725bd8deadSopenharmony_ci 4735bd8deadSopenharmony_ci Modify Section 8.3, Common Functions 4745bd8deadSopenharmony_ci 4755bd8deadSopenharmony_ci (add to the table of common functions on p. 142) 4765bd8deadSopenharmony_ci 4775bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 4785bd8deadSopenharmony_ci | Syntax | Desciption | 4795bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 4805bd8deadSopenharmony_ci | genI64Type abs(genI64Type x) | Returns x if x >= 0; otherwise it returns -x. | 4815bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 4825bd8deadSopenharmony_ci | genI64Type sign(genI64Type x) | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0. | 4835bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 4845bd8deadSopenharmony_ci | genI64Type min(genI64Type x, | Returns y if y < x; otherwise it returns x. | 4855bd8deadSopenharmony_ci | genI64Type y) | | 4865bd8deadSopenharmony_ci | genI64Type min(genI64Type x, | | 4875bd8deadSopenharmony_ci | int64_t y) | | 4885bd8deadSopenharmony_ci | genU64Type min(genU64Type x, | | 4895bd8deadSopenharmony_ci | genU64Type y) | | 4905bd8deadSopenharmony_ci | genU64Type min(genU64Type x, | | 4915bd8deadSopenharmony_ci | uint64_t y) | | 4925bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 4935bd8deadSopenharmony_ci | genI64Type max(genI64Type x, | Returns y if x < y; otherwise it returns x. | 4945bd8deadSopenharmony_ci | genI64Type y) | | 4955bd8deadSopenharmony_ci | genI64Type max(genI64Type x, | | 4965bd8deadSopenharmony_ci | int64_t y) | | 4975bd8deadSopenharmony_ci | genU64Type max(genU64Type x, | | 4985bd8deadSopenharmony_ci | genU64Type y) | | 4995bd8deadSopenharmony_ci | genU64Type max(genU64Type x, | | 5005bd8deadSopenharmony_ci | uint64_t y) | | 5015bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 5025bd8deadSopenharmony_ci | genI64Type clamp(genI64Type x, | Returns min(max(x, minVal), maxVal). | 5035bd8deadSopenharmony_ci | genI64Type minVal, | | 5045bd8deadSopenharmony_ci | genI64Type maxVal) | Results are undefined if minVal > maxVal. | 5055bd8deadSopenharmony_ci | genI64Type clamp(genI64Type x, | | 5065bd8deadSopenharmony_ci | int64_t minVal, | | 5075bd8deadSopenharmony_ci | int64_t maxVal) | | 5085bd8deadSopenharmony_ci | genU64Type clamp(genU64Type x, | | 5095bd8deadSopenharmony_ci | genU64Type minVal, | | 5105bd8deadSopenharmony_ci | genU64Type maxVal) | | 5115bd8deadSopenharmony_ci | genU64Type clamp(genU64Type x, | | 5125bd8deadSopenharmony_ci | uint64_t minVal, | | 5135bd8deadSopenharmony_ci | uint64_t maxVal) | | 5145bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 5155bd8deadSopenharmony_ci | genI64Type mix(genI64Type x, | Selects which vector each returned component comes | 5165bd8deadSopenharmony_ci | genI64Type y, | from. For a component of a that is false, the | 5175bd8deadSopenharmony_ci | genBType a) | corresponding component of x is returned. For a | 5185bd8deadSopenharmony_ci | genU64Type mix(genU64Type x, | component of a that is true, the corresponding | 5195bd8deadSopenharmony_ci | genU64Type y, | component of y is returned. | 5205bd8deadSopenharmony_ci | genBType a) | | 5215bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 5225bd8deadSopenharmony_ci | genI64Type doubleBitsToInt64(genDType value) | Returns a signed or unsigned 64-bit integer value | 5235bd8deadSopenharmony_ci | genU64Type doubleBitsToUint64(genDType value) | representing the encoding of a double. The double | 5245bd8deadSopenharmony_ci | | value's bit-level representation is preserved | 5255bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 5265bd8deadSopenharmony_ci | genDType int64BitsToDouble(genI64Type value) | Returns a double value corresponding to a signed | 5275bd8deadSopenharmony_ci | genDType uint64BitsToDouble(genU64Type value) | or unsigned integer encoding of a double. If a NaN | 5285bd8deadSopenharmony_ci | | is passed in, it will not signal, and the | 5295bd8deadSopenharmony_ci | | resulting value is unspecified. If an Inf is | 5305bd8deadSopenharmony_ci | | passed in, the resulting value is the | 5315bd8deadSopenharmony_ci | | corresponding Inf. | 5325bd8deadSopenharmony_ci +------------------------------------------------+----------------------------------------------------+ 5335bd8deadSopenharmony_ci 5345bd8deadSopenharmony_ci 5355bd8deadSopenharmony_ci Rename Section 8.4, Floating-Point Pack and Unpack Functions to 5365bd8deadSopenharmony_ci 8.4, Floating-Point and Integer Pack and Unpack Functions 5375bd8deadSopenharmony_ci 5385bd8deadSopenharmony_ci 5395bd8deadSopenharmony_ci Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions 5405bd8deadSopenharmony_ci 5415bd8deadSopenharmony_ci (add to the table of pack and unpack functions on p. 147) 5425bd8deadSopenharmony_ci 5435bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 5445bd8deadSopenharmony_ci | Syntax | Desciption | 5455bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 5465bd8deadSopenharmony_ci | int64_t packInt2x32(ivec2 v) | Returns a signed or unsigned 64-bit integer obtained | 5475bd8deadSopenharmony_ci | uint64_t packUint2x32(uvec2 v) | by packing the components of a two-component signed | 5485bd8deadSopenharmony_ci | | or unsigned integer vector, respectively. The first | 5495bd8deadSopenharmony_ci | | vector component specifies the 32 least significant | 5505bd8deadSopenharmony_ci | | bits; the second component specifies the 32 most | 5515bd8deadSopenharmony_ci | | significant bits. | 5525bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 5535bd8deadSopenharmony_ci | ivec2 unpackInt2x32(int64_t v) | Returns a signed or unsigned integer vector built | 5545bd8deadSopenharmony_ci | uvec2 unpackUint2x32(uint64_t v) | from a 64-bit signed or unsigned integer scalar, | 5555bd8deadSopenharmony_ci | | respectively. The first component of the vector | 5565bd8deadSopenharmony_ci | | contains the 32 least significant bits of the input; | 5575bd8deadSopenharmony_ci | | the second component contains the 32 most | 5585bd8deadSopenharmony_ci | | significant bits. | 5595bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 5605bd8deadSopenharmony_ci 5615bd8deadSopenharmony_ci 5625bd8deadSopenharmony_ci Modify Section, 8.7, Vector Relational Functions 5635bd8deadSopenharmony_ci 5645bd8deadSopenharmony_ci (add to the table of placeholders at the top of p. 154) 5655bd8deadSopenharmony_ci 5665bd8deadSopenharmony_ci +-------------+-----------------------------+ 5675bd8deadSopenharmony_ci | Placeholder | Specific Types Allowed | 5685bd8deadSopenharmony_ci +-------------+-----------------------------+ 5695bd8deadSopenharmony_ci | i64vec | i64vec2, i64vec3, i64vec4 | 5705bd8deadSopenharmony_ci | u64vec | u64vec2, u64vec3, u64vec4 | 5715bd8deadSopenharmony_ci +-------------+-----------------------------+ 5725bd8deadSopenharmony_ci 5735bd8deadSopenharmony_ci (add to the table of vector relational functions at the bottom of p. 154) 5745bd8deadSopenharmony_ci 5755bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5765bd8deadSopenharmony_ci | Syntax | Desciption | 5775bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5785bd8deadSopenharmony_ci | bvec lessThan(i64vec x, i64vec y) | Returns the component-wise compare of x < y. | 5795bd8deadSopenharmony_ci | bvec lessThan(u64vec x, u64vec y) | | 5805bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5815bd8deadSopenharmony_ci | bvec lessThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x <= y. | 5825bd8deadSopenharmony_ci | bvec lessThanEqual(u64vec x, u64vec y) | | 5835bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5845bd8deadSopenharmony_ci | bvec greaterThan(i64vec x, i64vec y) | Returns the component-wise compare of x > y. | 5855bd8deadSopenharmony_ci | bvec greaterThan(u64vec x, u64vec y) | | 5865bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5875bd8deadSopenharmony_ci | bvec greaterThanEqual(i64vec x, i64vec y) | Returns the component-wise compare of x >= y. | 5885bd8deadSopenharmony_ci | bvec greaterThanEqual(u64vec x, u64vec y) | | 5895bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5905bd8deadSopenharmony_ci | bvec equal(i64vec x, i64vec y) | Returns the component-wise compare of x == y. | 5915bd8deadSopenharmony_ci | bvec equal(u64vec x, u64vec y) | | 5925bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5935bd8deadSopenharmony_ci | bvec notEqual(i64vec x, i64vec y) | Returns the component-wise compare of x != y. | 5945bd8deadSopenharmony_ci | bvec notEqual(u64vec x, u64vec y) | | 5955bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5965bd8deadSopenharmony_ci 5975bd8deadSopenharmony_ci 5985bd8deadSopenharmony_ci Modify Section 9, Shading Language Grammar for Core Profile 5995bd8deadSopenharmony_ci 6005bd8deadSopenharmony_ci (add to the list of tokens on p. 187) 6015bd8deadSopenharmony_ci 6025bd8deadSopenharmony_ci ... 6035bd8deadSopenharmony_ci INT64 UINT64 I64VEC2 I64VEC3 I64VEC4 U64VEC2 U64VEC3 U64VEC4 6045bd8deadSopenharmony_ci ... 6055bd8deadSopenharmony_ci INT64CONSTANT UINT64CONSTANT 6065bd8deadSopenharmony_ci 6075bd8deadSopenharmony_ci (add to the rule of "primary_expression" on p. 188) 6085bd8deadSopenharmony_ci 6095bd8deadSopenharmony_ci primary_expression: 6105bd8deadSopenharmony_ci ... 6115bd8deadSopenharmony_ci INT64CONSTANT 6125bd8deadSopenharmony_ci UINT64CONSTANT 6135bd8deadSopenharmony_ci ... 6145bd8deadSopenharmony_ci 6155bd8deadSopenharmony_ci (add to the rule of "type_specifier_nonarray" on p. 195) 6165bd8deadSopenharmony_ci 6175bd8deadSopenharmony_ci type_specifier_nonarray: 6185bd8deadSopenharmony_ci ... 6195bd8deadSopenharmony_ci INT64 6205bd8deadSopenharmony_ci UINT64 6215bd8deadSopenharmony_ci ... 6225bd8deadSopenharmony_ci I64VEC2 6235bd8deadSopenharmony_ci I64VEC3 6245bd8deadSopenharmony_ci I64VEC4 6255bd8deadSopenharmony_ci U64VEC2 6265bd8deadSopenharmony_ci U64VEC3 6275bd8deadSopenharmony_ci U64VEC4 6285bd8deadSopenharmony_ci ... 6295bd8deadSopenharmony_ci 6305bd8deadSopenharmony_ci 6315bd8deadSopenharmony_ciDependencies on NV_gpu_shader5 6325bd8deadSopenharmony_ci 6335bd8deadSopenharmony_ci If the shader enables only NV_gpu_shader5, but not ARB_gpu_shader_int64 6345bd8deadSopenharmony_ci then the overloaded built-in functions abs, sign, min, max, clamp, and mix 6355bd8deadSopenharmony_ci are not available. 6365bd8deadSopenharmony_ci 6375bd8deadSopenharmony_ci 6385bd8deadSopenharmony_ciDependencies on NV_shader_buffer_load 6395bd8deadSopenharmony_ci 6405bd8deadSopenharmony_ci If NV_shader_buffer_load is supported, that specification should be edited 6415bd8deadSopenharmony_ci as follows, to allow pointers to dereference the new data types added by 6425bd8deadSopenharmony_ci this extension. 6435bd8deadSopenharmony_ci 6445bd8deadSopenharmony_ci Modify "Section 2.20.X, Shader Memory Access" from NV_shader_buffer_load. 6455bd8deadSopenharmony_ci 6465bd8deadSopenharmony_ci (add rules for loads of variables having the new data types from this 6475bd8deadSopenharmony_ci extension to the list of bullets following "When a shader dereferences a 6485bd8deadSopenharmony_ci pointer variable") 6495bd8deadSopenharmony_ci 6505bd8deadSopenharmony_ci - Data of type int64_t and uint64_t are read from or written to memory as 6515bd8deadSopenharmony_ci a signel 64-bit signed and unsigned integer value, respectively, at the 6525bd8deadSopenharmony_ci specified GPU address. 6535bd8deadSopenharmony_ci 6545bd8deadSopenharmony_ci 6555bd8deadSopenharmony_ciDependencies on NV_vertex_attrib_integer_64bit 6565bd8deadSopenharmony_ci 6575bd8deadSopenharmony_ci This extension only provides the ability to specify 64-bit integer input 6585bd8deadSopenharmony_ci variables in a GLSL vertex shader, but does not provide a way to specify 6595bd8deadSopenharmony_ci the values of the corresponding vertex attributes via the OpenGL API. 6605bd8deadSopenharmony_ci The NV_vertex_attrib_integer_64bit extension exactly provides that 6615bd8deadSopenharmony_ci functionality. 6625bd8deadSopenharmony_ci 6635bd8deadSopenharmony_ci 6645bd8deadSopenharmony_ciErrors 6655bd8deadSopenharmony_ci 6665bd8deadSopenharmony_ci None. 6675bd8deadSopenharmony_ci 6685bd8deadSopenharmony_ciNew State 6695bd8deadSopenharmony_ci 6705bd8deadSopenharmony_ci None. 6715bd8deadSopenharmony_ci 6725bd8deadSopenharmony_ciNew Implementation Dependent State 6735bd8deadSopenharmony_ci 6745bd8deadSopenharmony_ci None. 6755bd8deadSopenharmony_ci 6765bd8deadSopenharmony_ciIssues 6775bd8deadSopenharmony_ci 6785bd8deadSopenharmony_ci (1) How the functionality in this extension is different than the 64-bit 6795bd8deadSopenharmony_ci integer support introduced by NV_gpu_shader5 and AMD_gpu_shader_int64? 6805bd8deadSopenharmony_ci 6815bd8deadSopenharmony_ci RESOLVED: This extension is a functional superset of the 64-bit integer 6825bd8deadSopenharmony_ci support in NV_gpu_shader5 with the following additions: 6835bd8deadSopenharmony_ci 6845bd8deadSopenharmony_ci * support for overloaded versions of the functions abs, sign, min, 6855bd8deadSopenharmony_ci max, clamp, and mix that accept 64-bit integers as parameters. 6865bd8deadSopenharmony_ci 6875bd8deadSopenharmony_ci Also, this extension is equivalent with AMD_gpu_shader_int64, except that 6885bd8deadSopenharmony_ci the entry points now have an ARB suffix. 6895bd8deadSopenharmony_ci 6905bd8deadSopenharmony_ci (2) How do the implicit conversions impact binary operators? 6915bd8deadSopenharmony_ci 6925bd8deadSopenharmony_ci RESOLVED: For binary operators, we prefer converting to a common type 6935bd8deadSopenharmony_ci that is as close as possible in size and type to the original 6945bd8deadSopenharmony_ci expression. 6955bd8deadSopenharmony_ci 6965bd8deadSopenharmony_ci (3) How do the implicit conversions impact function overloading rules? 6975bd8deadSopenharmony_ci 6985bd8deadSopenharmony_ci RESOLVED: We extend the preference rules in core OpenGL to account 6995bd8deadSopenharmony_ci for the new data types, adding a rule to favor conversion from 32-bit 7005bd8deadSopenharmony_ci integers to 64-bit integers over coversions to floating-point values. 7015bd8deadSopenharmony_ci 7025bd8deadSopenharmony_ci (4) What should be done to distinguish between 32- and 64-bit integer 7035bd8deadSopenharmony_ci constants? 7045bd8deadSopenharmony_ci 7055bd8deadSopenharmony_ci RESOLVED: We will use "L" and "UL" to identify signed and unsigned 7065bd8deadSopenharmony_ci 64-bit integer constants; the use of "L" matches a similar ("long") 7075bd8deadSopenharmony_ci suffix in the C programming language. C leaves the size of integer 7085bd8deadSopenharmony_ci types implementation-dependent, and many implementations require an "LL" 7095bd8deadSopenharmony_ci suffix to declare 64-bit integer constants. With our size definitions, 7105bd8deadSopenharmony_ci "L" will be considered sufficient to make an integer constant 64-bit. 7115bd8deadSopenharmony_ci 7125bd8deadSopenharmony_ci (5) Should provide support for vertex attributes with 64-bit components, 7135bd8deadSopenharmony_ci and if so, how should the support be provided in the OpenGL API? 7145bd8deadSopenharmony_ci 7155bd8deadSopenharmony_ci RESOLVED: Yes, but in order to specify 64-bit vertex attribute values 7165bd8deadSopenharmony_ci in the OpenGL API support for NV_vertex_attrib_integer_64bit or a 7175bd8deadSopenharmony_ci similar extension is also required. 7185bd8deadSopenharmony_ci 7195bd8deadSopenharmony_ci (6) Should we support 64-bit integer uniforms in the default uniform 7205bd8deadSopenharmony_ci block? 7215bd8deadSopenharmony_ci 7225bd8deadSopenharmony_ci RESOLVED: Yes, for completeness. 7235bd8deadSopenharmony_ci 7245bd8deadSopenharmony_ci (7) Should we support 64-bit integer types as members of uniform blocks, 7255bd8deadSopenharmony_ci shader storage buffer blocks, or as transform feedback varyings? 7265bd8deadSopenharmony_ci 7275bd8deadSopenharmony_ci RESOLVED: Yes, support all of them. 64-bit integers will consume eight 7285bd8deadSopenharmony_ci basic machine units just like double-precision floating-point variables. 7295bd8deadSopenharmony_ci 7305bd8deadSopenharmony_ci (8) How do the uniform loading commands introduced by this extension 7315bd8deadSopenharmony_ci interact similar commands added by NV_shader_buffer_load? 7325bd8deadSopenharmony_ci 7335bd8deadSopenharmony_ci RESOLVED: NV_shader_buffer_load provided the command Uniformui64NV to 7345bd8deadSopenharmony_ci load pointer uniforms with a single 64-bit unsigned integer. This 7355bd8deadSopenharmony_ci extension provides vectors of 64-bit unsigned integers, so we needed 7365bd8deadSopenharmony_ci Uniform{2,3,4}ui64NV commands. We chose to provide a Uniform1ui64NV 7375bd8deadSopenharmony_ci command, which will be functionally equivalent to Uniformui64NV. 7385bd8deadSopenharmony_ci 7395bd8deadSopenharmony_ci (9) Should we provide distinct sized types for 32-bit integers, floats, 7405bd8deadSopenharmony_ci and doubles? 7415bd8deadSopenharmony_ci 7425bd8deadSopenharmony_ci RESOLVED: No. While NV_gpu_shader5 does add such types, it seems there 7435bd8deadSopenharmony_ci isn't much value in adding those in this extension, especially because 7445bd8deadSopenharmony_ci this extension strictly focuses on supporting 64-bit integers. 7455bd8deadSopenharmony_ci 7465bd8deadSopenharmony_ci (10) Can the 64-bit uniform APIs be used to load values for uniforms of 7475bd8deadSopenharmony_ci type "bool", "bvec2", "bvec3", or "bvec4"? 7485bd8deadSopenharmony_ci 7495bd8deadSopenharmony_ci RESOLVED: No. OpenGL 2.0 and beyond did allow "bool" variable to be 7505bd8deadSopenharmony_ci set with Uniform*i* and Uniform*f APIs, and OpenGL 3.0 extended that 7515bd8deadSopenharmony_ci support to Uniform*ui* for orthogonality. But it seems pointless to 7525bd8deadSopenharmony_ci extended this capability forward to 64-bit Uniform APIs as well. 7535bd8deadSopenharmony_ci 7545bd8deadSopenharmony_ci (11) There exists both an UNSIGNED_INT64_AMD and UNSIGNED_INT64_NV token 7555bd8deadSopenharmony_ci with different values (the former existed earlier) so which token 7565bd8deadSopenharmony_ci value this extension should reuse? 7575bd8deadSopenharmony_ci 7585bd8deadSopenharmony_ci DISCUSSION: No functions in this extension accept these values as 7595bd8deadSopenharmony_ci inputs, they only should return one of these in various scenarios. 7605bd8deadSopenharmony_ci 7615bd8deadSopenharmony_ci RESOLVED: This extension will reuse the value of UNSIGNED_INT64_NV to 7625bd8deadSopenharmony_ci stay source code compatible with NV_gpu_shader5 and AMD_gpu_shader_int64. 7635bd8deadSopenharmony_ci 7645bd8deadSopenharmony_ciRevision History 7655bd8deadSopenharmony_ci 7665bd8deadSopenharmony_ci Rev. Date Author Changes 7675bd8deadSopenharmony_ci ---- -------- -------- ------------------------------------------------- 7685bd8deadSopenharmony_ci 1 02/03/15 drakos Draft based on AMD_gpu_shader_int64. 7695bd8deadSopenharmony_ci Rebased language for GL 4.5 and GLSL 4.50. 770