15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci AMD_gpu_shader_int16 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_AMD_gpu_shader_int16 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Dominik Witczak, AMD (dominik.witczak 'at' amd.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Daniel Rakos, AMD 165bd8deadSopenharmony_ci Matthaeus G. Chajdas, AMD 175bd8deadSopenharmony_ci Quentin Lin, AMD 185bd8deadSopenharmony_ci Rex Xu, AMD 195bd8deadSopenharmony_ci Timothy Lottes, AMD 205bd8deadSopenharmony_ci Zhi Cai, AMD 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciStatus 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Shipping. 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ciVersion 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci Last Modified Date: 03/28/2018 295bd8deadSopenharmony_ci Author Revision: #2 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ciNumber 325bd8deadSopenharmony_ci 335bd8deadSopenharmony_ci OpenGL Extension #507 345bd8deadSopenharmony_ci 355bd8deadSopenharmony_ciDependencies 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ci This extension is written against version 4.50 of the OpenGL Shading 385bd8deadSopenharmony_ci Language Specification. 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ci GLSL 4.00 is required. 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci This extension interacts with AMD_gpu_shader_half_float. 435bd8deadSopenharmony_ci This extension interacts with ARB_gpu_shader_int64. 445bd8deadSopenharmony_ci This extension interacts with KHR_vulkan_glsl. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciOverview 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci This extension was developed to allow implementations supporting 16-bit 495bd8deadSopenharmony_ci integers to expose the feature in GLSL. 505bd8deadSopenharmony_ci 515bd8deadSopenharmony_ci The extension introduces the following features for all shader types: 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci * new built-in functions to pack and unpack 32-bit integer types into a 545bd8deadSopenharmony_ci two-component 16-bit integer vector; 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci * new built-in functions to convert half-precision floating-point 575bd8deadSopenharmony_ci values to or from their 16-bit integer bit encodings; 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci * vector relational functions supporting comparisons of vectors of 605bd8deadSopenharmony_ci 16-bit integer types; and 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci * common functions abs, frexp, ldexp, sign, min, max, clamp, and mix 635bd8deadSopenharmony_ci supporting arguments of 16-bit integer types. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ciNew Procedures and Functions 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci NONE 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ciNew Tokens 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci NONE 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ciModifications to the OpenGL Shading Language Specification, Version 4.50 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci Including the following line in a shader can be used to control the 795bd8deadSopenharmony_ci language features described in this extension: 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ci #extension GL_AMD_gpu_shader_int16 : <behavior> 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci where <behavior> is as specified in section 3.3. 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci New preprocessor #defines are added to the OpenGL Shading Language: 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci #define GL_AMD_gpu_shader_int16 1 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL Shading Language Specification (Basics) 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci Modify Section 3.6, Keywords 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci (add the following to the list of reserved keywords at p. 18) 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ci int16_t i16vec2 i16vec3 i16vec4 uint16_t u16vec2 u16vec3 u16vec4 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL Shading Language Specification 1005bd8deadSopenharmony_ci(Variables and Types) 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci Modify Section 4.1, Basic Types 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci (add to the basic "Transparent Types" table, p. 19) 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci +-----------+------------------------------------------------------------+ 1075bd8deadSopenharmony_ci | Type | Meaning | 1085bd8deadSopenharmony_ci +-----------+------------------------------------------------------------+ 1095bd8deadSopenharmony_ci | int16_t | a 16-bit signed integer | 1105bd8deadSopenharmony_ci | uint16_t | a 16-bit unsigned integer | 1115bd8deadSopenharmony_ci | i16vec2 | a two-component 16-bit signed integer vector | 1125bd8deadSopenharmony_ci | i16vec3 | a three-component 16-bit signed integer vector | 1135bd8deadSopenharmony_ci | i16vec4 | a four-component 16-bit signed integer vector | 1145bd8deadSopenharmony_ci | u16vec2 | a two-component 16-bit unsigned integer vector | 1155bd8deadSopenharmony_ci | u16vec3 | a three-component 16-bit unsigned integer vector | 1165bd8deadSopenharmony_ci | u16vec4 | a four-component 16-bit unsigned integer vector | 1175bd8deadSopenharmony_ci +-----------+------------------------------------------------------------+ 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci Modify Section 4.1.3, Integers 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci (replace first paragraph of the section, p. 26) 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci Signed and unsigned integer variables are fully supported. In this 1255bd8deadSopenharmony_ci document, the term integer is meant to generally include both signed and 1265bd8deadSopenharmony_ci unsigned integers, including both 16-bit and 32-bit integers. Unsigned 1275bd8deadSopenharmony_ci integers of type uint16_t, u16vec2, u16vec3, and u16vec4 have exactly 16 bits 1285bd8deadSopenharmony_ci of precision, while unsigned integers of type uint, uvec2, uvec3, and 1295bd8deadSopenharmony_ci uvec4 have exactly 32 bits of precision. Signed integers of type int16_t, 1305bd8deadSopenharmony_ci i16vec2, i16vec3, and i16vec4 have exactly 16 bits of precision, while signed 1315bd8deadSopenharmony_ci integers of type int, ivec2, ivec3, and ivec4 have exactly 32 bits of precision. 1325bd8deadSopenharmony_ci Addition, subtraction, and shift operations resulting in overflow or underflow 1335bd8deadSopenharmony_ci will not cause any exceptions, nor will they saturate, rather they will "wrap" 1345bd8deadSopenharmony_ci to yield the low-order bits of the result. Divison and multiplication operations 1355bd8deadSopenharmony_ci resulting in overflow or underflow will not cause any exception but will result in 1365bd8deadSopenharmony_ci an undefined value. 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci Change "integer-suffix" definition: 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci "integer-suffix: 1415bd8deadSopenharmony_ci unsigned-suffix short-suffixopt 1425bd8deadSopenharmony_ci short-suffix 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ci unsigned-suffix: one of 1455bd8deadSopenharmony_ci u U 1465bd8deadSopenharmony_ci short-suffix: one of 1475bd8deadSopenharmony_ci s S 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci Modify the next paragraph to say: 1505bd8deadSopenharmony_ci "No white space is allowed between the digits of an integer constant, 1515bd8deadSopenharmony_ci including after the leading 0 or after the leading 0x or 0X of a constant, 1525bd8deadSopenharmony_ci or before the integer-suffix. When tokenizing, the maximal token matching 1535bd8deadSopenharmony_ci the above will be recognized before a new token is started. 1545bd8deadSopenharmony_ci When the suffix is present, the literal type is determined as follows: 1555bd8deadSopenharmony_ci ------------------------------------- 1565bd8deadSopenharmony_ci | suffix | type | 1575bd8deadSopenharmony_ci ------------------------------------- 1585bd8deadSopenharmony_ci | no suffix | int | 1595bd8deadSopenharmony_ci | u or U | uint | 1605bd8deadSopenharmony_ci | s or S | int16_t | 1615bd8deadSopenharmony_ci | both u/U and s/S | uint16_t | 1625bd8deadSopenharmony_ci ------------------------------------- 1635bd8deadSopenharmony_ci A leading unary minus sign (-) is interpreted as an arithmetic 1645bd8deadSopenharmony_ci unary negation, not as part of the constant. Hence, literals themselves 1655bd8deadSopenharmony_ci are always expressed with non-negative syntax, though they could result 1665bd8deadSopenharmony_ci in a negative value." 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci Modify subsection 4.1.10 Implicit Conversions to say: 1695bd8deadSopenharmony_ci "In some situations, an expression and its type will be implicitly 1705bd8deadSopenharmony_ci converted to a different type. Such conversion are classified into the 1715bd8deadSopenharmony_ci following types: integral promotions, floating-point promotions, 1725bd8deadSopenharmony_ci integral conversions, floating-point conversions, and 1735bd8deadSopenharmony_ci floating-integral conversions. 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci The following table shows allowed integral promotions: 1765bd8deadSopenharmony_ci -------------------------------------------------------- 1775bd8deadSopenharmony_ci | Type of | Can be implicitly promoted to | 1785bd8deadSopenharmony_ci | expression | | 1795bd8deadSopenharmony_ci -------------------------------------------------------- 1805bd8deadSopenharmony_ci | int16_t | int, int64_t, uint16_t | 1815bd8deadSopenharmony_ci | uint16_t | uint, uint64_t | 1825bd8deadSopenharmony_ci -------------------------------------------------------- 1835bd8deadSopenharmony_ci | i16vec2 | ivec2, i64vec2, u64vec2 | 1845bd8deadSopenharmony_ci | u16vec2 | uvec2, u64vec2 | 1855bd8deadSopenharmony_ci -------------------------------------------------------- 1865bd8deadSopenharmony_ci | i16vec3 | ivec3, i64vec3, u64vec3 | 1875bd8deadSopenharmony_ci | u16vec3 | uvec3, u64vec3 | 1885bd8deadSopenharmony_ci -------------------------------------------------------- 1895bd8deadSopenharmony_ci | i16vec4 | ivec4, i64vec4, u64vec4 | 1905bd8deadSopenharmony_ci | u16vec4 | uvec4, u64vec4 | 1915bd8deadSopenharmony_ci -------------------------------------------------------- 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci The following table shows allowed integral conversions: 1945bd8deadSopenharmony_ci ------------------------------------------------------------------------- 1955bd8deadSopenharmony_ci | Type of | Can be implicitly converted to | 1965bd8deadSopenharmony_ci | expression | | 1975bd8deadSopenharmony_ci ------------------------------------------------------------------------- 1985bd8deadSopenharmony_ci | int16_t | uint16_t, uint, uint64_t | 1995bd8deadSopenharmony_ci | i16vec2 | u16vec2, uvec2, u64vec2 | 2005bd8deadSopenharmony_ci | i16vec3 | u16vec3, uvec3, u64vec3 | 2015bd8deadSopenharmony_ci | i16vec4 | u16vec4, uvec4, u64vec4 | 2025bd8deadSopenharmony_ci | uint16_t | uint, uint64_t | 2035bd8deadSopenharmony_ci | u16vec2 | uvec2, u64vec2 | 2045bd8deadSopenharmony_ci | u16vec3 | uvec3, u64vec3 | 2055bd8deadSopenharmony_ci | u16vec4 | uvec4, u64vec4 | 2065bd8deadSopenharmony_ci | int | uint, uint64_t | 2075bd8deadSopenharmony_ci ------------------------------------------------------------------------- 2085bd8deadSopenharmony_ci 2095bd8deadSopenharmony_ci The following table shows allowed floating-integral conversions: 2105bd8deadSopenharmony_ci -------------------------------------------------------- 2115bd8deadSopenharmony_ci | Type of | Can be implicitly converted to | 2125bd8deadSopenharmony_ci | expression | | 2135bd8deadSopenharmony_ci -------------------------------------------------------- 2145bd8deadSopenharmony_ci | int16_t | double, float16_t, float | 2155bd8deadSopenharmony_ci | i16vec2 | dvec2, f16vec2, vec2 | 2165bd8deadSopenharmony_ci | i16vec3 | dvec3, f16vec3, vec3 | 2175bd8deadSopenharmony_ci | i16vec4 | dvec4, f16vec4, vec4 | 2185bd8deadSopenharmony_ci | uint16_t | double, float16_t, float | 2195bd8deadSopenharmony_ci | u16vec2 | dvec2, f16vec2, vec2 | 2205bd8deadSopenharmony_ci | u16vec3 | dvec3, f16vec3, vec3 | 2215bd8deadSopenharmony_ci | u16vec4 | dvec4, f16vec4, vec4 | 2225bd8deadSopenharmony_ci | int | float | 2235bd8deadSopenharmony_ci | ivec2 | vec2 | 2245bd8deadSopenharmony_ci | ivec3 | vec3 | 2255bd8deadSopenharmony_ci | ivec4 | vec4 | 2265bd8deadSopenharmony_ci | uint | float | 2275bd8deadSopenharmony_ci | uvec2 | vec2 | 2285bd8deadSopenharmony_ci | uvec3 | vec3 | 2295bd8deadSopenharmony_ci | uvec4 | vec4 | 2305bd8deadSopenharmony_ci -------------------------------------------------------- 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci When performing implicit conversion for binary operators, there may be 2335bd8deadSopenharmony_ci multiple data types to which the two operands can be converted. For 2345bd8deadSopenharmony_ci example, when adding an int32_t value to a uint32_t value, both values 2355bd8deadSopenharmony_ci can be implicitly converted to uint32_t, float32_t, and double. In such 2365bd8deadSopenharmony_ci cases conversion happens as defined as follows: 2375bd8deadSopenharmony_ci (Note: In this paragraph vector and matrix types are referred to as 2385bd8deadSopenharmony_ci types derived from scalar types with the same bit width and bit 2395bd8deadSopenharmony_ci interpretation) 2405bd8deadSopenharmony_ci - If either operand has type double or derived from double, 2415bd8deadSopenharmony_ci the other shall be converted to double or derived type. 2425bd8deadSopenharmony_ci - Otherwise, if either operand has type float32_t or derived from 2435bd8deadSopenharmony_ci float32_t, the other shall be converted to float32_t or derived type. 2445bd8deadSopenharmony_ci - Otherwise, if either operand has type float16_t or derived from 2455bd8deadSopenharmony_ci float16_t, the other shall be converted to float16_t or derived type. 2465bd8deadSopenharmony_ci - Otherwise, the integral promotions shall be performed on both 2475bd8deadSopenharmony_ci operands. Then the following rules shall be applied to the promoted 2485bd8deadSopenharmony_ci operands: 2495bd8deadSopenharmony_ci - If both operands have the same type, no further conversion 2505bd8deadSopenharmony_ci is needed. 2515bd8deadSopenharmony_ci - Otherwise, if both operands have signed integer types or both 2525bd8deadSopenharmony_ci have unsigned integer types, the operand with the type of lesser 2535bd8deadSopenharmony_ci integer conversion rank shall be converted to the type of the 2545bd8deadSopenharmony_ci operand with greater rank. 2555bd8deadSopenharmony_ci - Otherwise, if the operand that has unsigned integer type has rank 2565bd8deadSopenharmony_ci greater than or equal to the rank of the type of the other 2575bd8deadSopenharmony_ci operand, the operand with signed integer type shall be converted 2585bd8deadSopenharmony_ci to the type of the operand with unsigned integer type. 2595bd8deadSopenharmony_ci - Otherwise, if the type of the operand with signed integer type can 2605bd8deadSopenharmony_ci represent all of the values of the type of the operand with 2615bd8deadSopenharmony_ci unsigned integer type, the operand with unsigned integer type 2625bd8deadSopenharmony_ci shall be converted to the type of the operand with signed 2635bd8deadSopenharmony_ci integer type. 2645bd8deadSopenharmony_ci - Otherwise, both operands shall be converted to the unsigned 2655bd8deadSopenharmony_ci integer type corresponding to the type of the operand with signed 2665bd8deadSopenharmony_ci integer type. 2675bd8deadSopenharmony_ci 2685bd8deadSopenharmony_ci The conversions listed in the following subsections are done only as 2695bd8deadSopenharmony_ci indicated by other sections of this specification. 2705bd8deadSopenharmony_ci 2715bd8deadSopenharmony_ci Every integer type has an integer conversion rank defined as follows: 2725bd8deadSopenharmony_ci - No two signed integer types have the same rank. 2735bd8deadSopenharmony_ci - The rank of a scalar signed integer type shall be greater than the rank 2745bd8deadSopenharmony_ci of any scalar signed integer type with a smaller size. 2755bd8deadSopenharmony_ci - The rank of any vector signed integer type is equal to the rank of the 2765bd8deadSopenharmony_ci base scalar signed integer type. 2775bd8deadSopenharmony_ci - The rank of int64_t shall be greater than the rank of int32_t, which 2785bd8deadSopenharmony_ci shall be greater than the rank of int16_t. 2795bd8deadSopenharmony_ci - The rank of any scalar unsigned integer type shall equal the rank of 2805bd8deadSopenharmony_ci the corresponding scalar signed integer type. 2815bd8deadSopenharmony_ci - The rank of any vector unsigned integer type is equal to the rank of 2825bd8deadSopenharmony_ci the respective scalar unsigned integer type. 2835bd8deadSopenharmony_ci 2845bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL Shading Language Specification 2855bd8deadSopenharmony_ci(Operators and Expressions) 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci Modify Section 5.4.1, Conversion and Scalar Constructors 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ci (add after first list of constructor examples on p. 97) 2905bd8deadSopenharmony_ci 2915bd8deadSopenharmony_ci bool(int16_t) // converts a 16-bit signed integer value to a Boolean 2925bd8deadSopenharmony_ci // value. 2935bd8deadSopenharmony_ci bool(uint16_t) // converts a 16-bit unsigned integer value to a Boolean 2945bd8deadSopenharmony_ci // value. 2955bd8deadSopenharmony_ci double(int16_t) // converts a 16-bit signed integer value to a double 2965bd8deadSopenharmony_ci // value. 2975bd8deadSopenharmony_ci double(uint16_t) // converts a 16-bit unsigned integer value to a double 2985bd8deadSopenharmony_ci // value. 2995bd8deadSopenharmony_ci float(int16_t) // converts a 16-bit signed integer value to a float 3005bd8deadSopenharmony_ci // value. 3015bd8deadSopenharmony_ci float(uint16_t) // converts a 16-bit unsigned integer value to a float 3025bd8deadSopenharmony_ci // value. 3035bd8deadSopenharmony_ci float16_t(int16_t) // converts a 16-bit signed integer value to a 16-bit 3045bd8deadSopenharmony_ci // float value. 3055bd8deadSopenharmony_ci float16_t(uint16_t) // converts a 16-bit unsigned integer value to a 16-bit 3065bd8deadSopenharmony_ci // float value. 3075bd8deadSopenharmony_ci int16_t(bool) // converts a Boolean value to a 16-bit signed integer 3085bd8deadSopenharmony_ci // value. 3095bd8deadSopenharmony_ci int16_t(double) // converts a double value to a 16-bit signed integer 3105bd8deadSopenharmony_ci // value. 3115bd8deadSopenharmony_ci int16_t(float) // converts a float value to a 16-bit signed integer 3125bd8deadSopenharmony_ci // value. 3135bd8deadSopenharmony_ci int16_t(float16_t) // converts a 16-bit float value to a 16-bit signed 3145bd8deadSopenharmony_ci // integer value. 3155bd8deadSopenharmony_ci int16_t(int64_t) // converts a 64-bit signed integer value to a 16-bit 3165bd8deadSopenharmony_ci // signed integer value. 3175bd8deadSopenharmony_ci int16_t(int) // converts a signed integer value to a 16-bit signed 3185bd8deadSopenharmony_ci // integer value. 3195bd8deadSopenharmony_ci int16_t(uint) // converts an unsigned integer value to a 16-bit signed 3205bd8deadSopenharmony_ci // integer value. 3215bd8deadSopenharmony_ci int16_t(uint16_t) // converts a 16-bit unsigned integer value to a 16-bit 3225bd8deadSopenharmony_ci // signed integer value. 3235bd8deadSopenharmony_ci int16_t(uint64_t) // converts a 64-bit unsigned integer value to a 16-bit 3245bd8deadSopenharmony_ci // signed integer value. 3255bd8deadSopenharmony_ci int(int16_t) // converts a 16-bit signed integer value to a signed 3265bd8deadSopenharmony_ci // integer value. 3275bd8deadSopenharmony_ci int(uint16_t) // converts a 16-bit unsigned integer value to a signed 3285bd8deadSopenharmony_ci // integer value. 3295bd8deadSopenharmony_ci int64_t(int16_t) // converts a 16-bit signed integer value to a 64-bit 3305bd8deadSopenharmony_ci // signed integer value. 3315bd8deadSopenharmony_ci int64_t(uint16_t) // converts a 16-bit unsigned integer value to a 64-bit 3325bd8deadSopenharmony_ci // signed integer value. 3335bd8deadSopenharmony_ci uint16_t(bool) // converts a Boolean value to a 16-bit unsigned integer 3345bd8deadSopenharmony_ci // value. 3355bd8deadSopenharmony_ci uint16_t(double) // converts a double value to a 16-bit unsigned integer 3365bd8deadSopenharmony_ci // value. 3375bd8deadSopenharmony_ci uint16_t(float) // converts a float value to a 16-bit unsigned integer 3385bd8deadSopenharmony_ci // value. 3395bd8deadSopenharmony_ci uint16_t(float16_t) // converts a 16-bit float value to a 16-bit unsigned 3405bd8deadSopenharmony_ci // integer value. 3415bd8deadSopenharmony_ci uint16_t(int) // converts a signed integer value to a 16-bit unsigned 3425bd8deadSopenharmony_ci // integer value. 3435bd8deadSopenharmony_ci uint16_t(int16_t) // converts a 16-bit signed integer value to a 16-bit 3445bd8deadSopenharmony_ci // unsigned integer value. 3455bd8deadSopenharmony_ci uint16_t(uint) // converts an unsigned integer value to a 16-bit unsigned 3465bd8deadSopenharmony_ci // integer value. 3475bd8deadSopenharmony_ci uint16_t(int64_t) // converts a 64-bit signed integer value to a 16-bit 3485bd8deadSopenharmony_ci // unsigned integer value. 3495bd8deadSopenharmony_ci uint16_t(uint64_t) // converts a 64-bit unsigned integer value to a 16-bit 3505bd8deadSopenharmony_ci // unsigned integer value. 3515bd8deadSopenharmony_ci uint(int16_t) // converts a 16-bit signed integer value to an unsigned 3525bd8deadSopenharmony_ci // integer value. 3535bd8deadSopenharmony_ci uint(uint16_t) // converts a 16-bit unsigned integer value to an unsigned 3545bd8deadSopenharmony_ci // integer value. 3555bd8deadSopenharmony_ci uint64_t(int16_t) // converts a 16-bit signed integer value to a 64-bit 3565bd8deadSopenharmony_ci // unsigned integer value. 3575bd8deadSopenharmony_ci uint64_t(uint16_t) // converts a 16-bit unsigned integer value to a 64-bit 3585bd8deadSopenharmony_ci // unsigned integer value. 3595bd8deadSopenharmony_ci 3605bd8deadSopenharmony_ci (modify second sentence of first paragraph on p. 98) 3615bd8deadSopenharmony_ci 3625bd8deadSopenharmony_ci ... is dropped. It is undefined to convert a negative floating-point value 3635bd8deadSopenharmony_ci to an uint or uint16_t. 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ci (replace third paragraph on p. 98) 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ci The constructors int(uint) and int16_t(uint16_t) preserve the bit pattern 3685bd8deadSopenharmony_ci in the argument, which will change the argument's value if its sign bit is 3695bd8deadSopenharmony_ci set. The constructor uint(int) and uint16_t(int16_t) preserve the bit 3705bd8deadSopenharmony_ci pattern in the argument, which will change its value if it is negative. 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci 3735bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL Shading Language Specification 3745bd8deadSopenharmony_ci(Statements and Structure) 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci Modify Section 6.1, Function Defintions 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci (replace second rule in third paragraph on p. 113) 3795bd8deadSopenharmony_ci 3805bd8deadSopenharmony_ci 2. A match involving a conversion from a signed integer, unsigned 3815bd8deadSopenharmony_ci integer, or floating-point type to a similar type having a larger 3825bd8deadSopenharmony_ci number of bits is better than a match involving any other implicit 3835bd8deadSopenharmony_ci conversion. 3845bd8deadSopenharmony_ci 3855bd8deadSopenharmony_ci 3865bd8deadSopenharmony_ciAdditions to Chapter 8 of the OpenGL Shading Language Specification 3875bd8deadSopenharmony_ci(Built-in Functions) 3885bd8deadSopenharmony_ci 3895bd8deadSopenharmony_ci (insert after third sentence of last paragraph on p. 132) 3905bd8deadSopenharmony_ci 3915bd8deadSopenharmony_ci ... genUType is used as the argument. Where the input arguments (and 3925bd8deadSopenharmony_ci corresponding output) can be int16_t, i16vec2, i16vec3, i16vec4, 3935bd8deadSopenharmony_ci genI16Type is used as the argument. Where the input arguments (and 3945bd8deadSopenharmony_ci corresponding output) can be uint16_t, u16vec2, u16vec3, u16vec4, 3955bd8deadSopenharmony_ci genU16Type is used as the argument. 3965bd8deadSopenharmony_ci 3975bd8deadSopenharmony_ci 3985bd8deadSopenharmony_ci Modify Section 8.3, Common Functions 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci (add to the table of common functions on p. 136) 4015bd8deadSopenharmony_ci 4025bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4035bd8deadSopenharmony_ci | Syntax | Desciption | 4045bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4055bd8deadSopenharmony_ci | genI16Type abs(genI16Type x) | Returns x if x >= 0; otherwise it returns -x. | 4065bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4075bd8deadSopenharmony_ci | genI16Type sign(genI16Type x) | Returns 1 if x > 0, 0 if x = 0, or -1 if x < 0. | 4085bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4095bd8deadSopenharmony_ci | genI16Type min(genI16Type x, | Returns y if y < x; otherwise it returns x. | 4105bd8deadSopenharmony_ci | genI16Type y) | | 4115bd8deadSopenharmony_ci | genI16Type min(genI16Type x, | | 4125bd8deadSopenharmony_ci | int16_t y) | | 4135bd8deadSopenharmony_ci | genU16Type min(genU16Type x, | | 4145bd8deadSopenharmony_ci | genU16Type y) | | 4155bd8deadSopenharmony_ci | genU16Type min(genU16Type x, | | 4165bd8deadSopenharmony_ci | uint16_t y) | | 4175bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4185bd8deadSopenharmony_ci | genI16Type max(genI16Type x, | Returns y if x < y; otherwise it returns x. | 4195bd8deadSopenharmony_ci | genI16Type y) | | 4205bd8deadSopenharmony_ci | genI16Type max(genI16Type x, | | 4215bd8deadSopenharmony_ci | int16_t y) | | 4225bd8deadSopenharmony_ci | genU16Type max(genU16Type x, | | 4235bd8deadSopenharmony_ci | genU16Type y) | | 4245bd8deadSopenharmony_ci | genU16Type max(genU16Type x, | | 4255bd8deadSopenharmony_ci | uint16_t y) | | 4265bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4275bd8deadSopenharmony_ci | genI16Type clamp(genI16Type x, | Returns min(max(x, minVal), maxVal). | 4285bd8deadSopenharmony_ci | genI16Type minVal, | | 4295bd8deadSopenharmony_ci | genI16Type maxVal) | Results are undefined if minVal > maxVal. | 4305bd8deadSopenharmony_ci | genI16Type clamp(genI16Type x, | | 4315bd8deadSopenharmony_ci | int16_t minVal, | | 4325bd8deadSopenharmony_ci | int16_t maxVal) | | 4335bd8deadSopenharmony_ci | genU16Type clamp(genU16Type x, | | 4345bd8deadSopenharmony_ci | genU16Type minVal, | | 4355bd8deadSopenharmony_ci | genU16Type maxVal) | | 4365bd8deadSopenharmony_ci | genU16Type clamp(genU16Type x, | | 4375bd8deadSopenharmony_ci | uint16_t minVal, | | 4385bd8deadSopenharmony_ci | uint16_t maxVal) | | 4395bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4405bd8deadSopenharmony_ci | genI16Type mix(genI16Type x, | Selects which vector each returned component comes | 4415bd8deadSopenharmony_ci | genI16Type y, | from. For a component of a that is false, the | 4425bd8deadSopenharmony_ci | genBType a) | corresponding component of x is returned. For a | 4435bd8deadSopenharmony_ci | genU16Type mix(genU16Type x, | component of a that is true, the corresponding | 4445bd8deadSopenharmony_ci | genU16Type y, | component of y is returned. | 4455bd8deadSopenharmony_ci | genBType a) | | 4465bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4475bd8deadSopenharmony_ci | genI16Type float16BitsToInt16(genF16Type value) | Returns a signed or unsigned 16-bit integer value | 4485bd8deadSopenharmony_ci | genU16Type float16BitsToUint16(genF16Type value)| representing the encoding of a 16-bit float. The | 4495bd8deadSopenharmony_ci | | half floating-point value's bit-level | 4505bd8deadSopenharmony_ci | | representation is preserved | 4515bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4525bd8deadSopenharmony_ci | genF16Type int16BitsToFloat16(genI16Type value) | Returns a half-floating point value corresponding | 4535bd8deadSopenharmony_ci | genF16Type uint16BitsToFloat16(genU16Type value)| to a signed or unsigned 16-bit integer encoding of | 4545bd8deadSopenharmony_ci | | a 16-bit float. If a NaN is passed in, it will not | 4555bd8deadSopenharmony_ci | | signal, and the resulting value is unspecified. If | 4565bd8deadSopenharmony_ci | | an Inf is passed in, the resulting value is the | 4575bd8deadSopenharmony_ci | | corresponding Inf. | 4585bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4595bd8deadSopenharmony_ci | genF16Type frexp(genF16Type x, | Splits x into a floating-point significand in the | 4605bd8deadSopenharmony_ci | out genI16Type exp) | range [0.5, 1.0) and an integral exponent of two, | 4615bd8deadSopenharmony_ci | | such that: | 4625bd8deadSopenharmony_ci | | | 4635bd8deadSopenharmony_ci | | x = significand * 2 ** exponent | 4645bd8deadSopenharmony_ci | | | 4655bd8deadSopenharmony_ci | | The significand is returned by the function and | 4665bd8deadSopenharmony_ci | | the exponent is returned in the parameter exp. For | 4675bd8deadSopenharmony_ci | | a floating-point value of zero, the significand | 4685bd8deadSopenharmony_ci | | and exponent are both zero. For a floating-point | 4695bd8deadSopenharmony_ci | | value that is an infinity or is not a number, the | 4705bd8deadSopenharmony_ci | | results are undefined. | 4715bd8deadSopenharmony_ci | | | 4725bd8deadSopenharmony_ci | | If an implementation supports negative 0, | 4735bd8deadSopenharmony_ci | | frexp(-0) should return -0; otherwise it will | 4745bd8deadSopenharmony_ci | | return 0. | 4755bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4765bd8deadSopenharmony_ci | genF16Type ldexp(genF16Type x, | Returns x * (2 ** exp). | 4775bd8deadSopenharmony_ci | genI16Type exp) | | 4785bd8deadSopenharmony_ci +-------------------------------------------------+----------------------------------------------------+ 4795bd8deadSopenharmony_ci 4805bd8deadSopenharmony_ci 4815bd8deadSopenharmony_ci Modify Section 8.4, Floating-Point and Integer Pack and Unpack Functions 4825bd8deadSopenharmony_ci 4835bd8deadSopenharmony_ci (add to the table of pack and unpack functions on p. 149 4845bd8deadSopenharmony_ci 4855bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 4865bd8deadSopenharmony_ci | Syntax | Desciption | 4875bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 4885bd8deadSopenharmony_ci | | Returns an unsigned 32- or 64-bit integer obtained | 4895bd8deadSopenharmony_ci | int packInt2x16 (i16vec2 v) | by packing the components of a two- or | 4905bd8deadSopenharmony_ci | int64_t packInt4x16 (i16vec4 v) | four-component 16-bit signed or unsigned integer | 4915bd8deadSopenharmony_ci | uint packUint2x16(u16vec2 v) | vector, respectively. The first vector component | 4925bd8deadSopenharmony_ci | uint64_t packUint4x16(u16vec4 v) | specifies the 16 least significant bits; the | 4935bd8deadSopenharmony_ci | | last component specifies the 16 most significant | 4945bd8deadSopenharmony_ci | | bits. | 4955bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 4965bd8deadSopenharmony_ci | | Returns a signed or unsigned integer vector built | 4975bd8deadSopenharmony_ci | i16vec2 unpackInt2x16 (int v)| from a 32- or 64-bit signed or unsigned integer | 4985bd8deadSopenharmony_ci | i16vec4 unpackInt4x16 (int64_t v)| scalar, respectively. The first component of the | 4995bd8deadSopenharmony_ci | u16vec2 unpackUint2x16(uint v)| vector contains the 16 least significant bits of the | 5005bd8deadSopenharmony_ci | u16vec4 unpackUint4x16(uint64_t v)| input; the last component specifies the 16 most | 5015bd8deadSopenharmony_ci | | significant bits. | 5025bd8deadSopenharmony_ci | | | 5035bd8deadSopenharmony_ci +-----------------------------------+------------------------------------------------------+ 5045bd8deadSopenharmony_ci 5055bd8deadSopenharmony_ci 5065bd8deadSopenharmony_ci Modify Section, 8.7, Vector Relational Functions 5075bd8deadSopenharmony_ci 5085bd8deadSopenharmony_ci Modify the first table to state: 5095bd8deadSopenharmony_ci 5105bd8deadSopenharmony_ci +-------------+-----------------------------+ 5115bd8deadSopenharmony_ci | Placeholder | Specific Types Allowed | 5125bd8deadSopenharmony_ci +-------------+-----------------------------+ 5135bd8deadSopenharmony_ci | i16vec | i16vec2, i16vec3, i16vec4 | 5145bd8deadSopenharmony_ci | u16vec | u16vec2, u16vec3, u16vec4 | 5155bd8deadSopenharmony_ci +-------------+-----------------------------+ 5165bd8deadSopenharmony_ci 5175bd8deadSopenharmony_ci (add to the table of vector relational functions at the bottom of p. 147) 5185bd8deadSopenharmony_ci 5195bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5205bd8deadSopenharmony_ci | Syntax | Desciption | 5215bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5225bd8deadSopenharmony_ci | bvec lessThan(i16vec x, i16vec y) | Returns the component-wise compare of x < y. | 5235bd8deadSopenharmony_ci | bvec lessThan(u16vec x, u16vec y) | | 5245bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5255bd8deadSopenharmony_ci | bvec lessThanEqual(i16vec x, i16vec y) | Returns the component-wise compare of x <= y. | 5265bd8deadSopenharmony_ci | bvec lessThanEqual(u16vec x, u16vec y) | | 5275bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5285bd8deadSopenharmony_ci | bvec greaterThan(i16vec x, i16vec y) | Returns the component-wise compare of x > y. | 5295bd8deadSopenharmony_ci | bvec greaterThan(u16vec x, u16vec y) | | 5305bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5315bd8deadSopenharmony_ci | bvec greaterThanEqual(i16vec x, i16vec y) | Returns the component-wise compare of x >= y. | 5325bd8deadSopenharmony_ci | bvec greaterThanEqual(u16vec x, u16vec y) | | 5335bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5345bd8deadSopenharmony_ci | bvec equal(i16vec x, i16vec y) | Returns the component-wise compare of x == y. | 5355bd8deadSopenharmony_ci | bvec equal(u16vec x, u16vec y) | | 5365bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5375bd8deadSopenharmony_ci | bvec notEqual(i16vec x, i16vec y) | Returns the component-wise compare of x != y. | 5385bd8deadSopenharmony_ci | bvec notEqual(u16vec x, u16vec y) | | 5395bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5405bd8deadSopenharmony_ci 5415bd8deadSopenharmony_ci 5425bd8deadSopenharmony_ci Modify language in the Overview section of GL_KHR_vulkan_glsl 5435bd8deadSopenharmony_ci 5445bd8deadSopenharmony_ci Replace the following sentence: 5455bd8deadSopenharmony_ci 5465bd8deadSopenharmony_ci The constant_id can only be applied to a scalar *int*, a scalar *float* 5475bd8deadSopenharmony_ci or a scalar *bool*. 5485bd8deadSopenharmony_ci 5495bd8deadSopenharmony_ci with: 5505bd8deadSopenharmony_ci 5515bd8deadSopenharmony_ci The constant_id can only be applied to a scalar *int* (incl. 16-bit signed 5525bd8deadSopenharmony_ci and unsigned integers), a scalar *float* or a scalar *bool*. 5535bd8deadSopenharmony_ci 5545bd8deadSopenharmony_ci 5555bd8deadSopenharmony_ciDependencies on AMD_gpu_shader_half_float 5565bd8deadSopenharmony_ci 5575bd8deadSopenharmony_ci If the shader enables only AMD_gpu_shader_int16, but not AMD_gpu_shader_half_float 5585bd8deadSopenharmony_ci then: 5595bd8deadSopenharmony_ci 5605bd8deadSopenharmony_ci * the table describing floating-integral conversions is discarded. 5615bd8deadSopenharmony_ci * the float16BitsTo{Int, Uint}16(), {int, uint}16BitsToFloat16(), frexp() 5625bd8deadSopenharmony_ci and ldexp() functions are unavailable. 5635bd8deadSopenharmony_ci 5645bd8deadSopenharmony_ci 5655bd8deadSopenharmony_ciDependencies on ARB_gpu_shader_int64: 5665bd8deadSopenharmony_ci 5675bd8deadSopenharmony_ci If the shader enables only AMD_gpu_shader_int16, but not ARB_gpu_shader_int64 5685bd8deadSopenharmony_ci then: 5695bd8deadSopenharmony_ci 5705bd8deadSopenharmony_ci * all references to int64_t and uint64_t should be ignored. 5715bd8deadSopenharmony_ci 5725bd8deadSopenharmony_ciDependencies on KHR_vulkan_glsl: 5735bd8deadSopenharmony_ci 5745bd8deadSopenharmony_ci If the shader only enables AMD_gpu_shader_int16, but not KHR_vulkan_glsl, 5755bd8deadSopenharmony_ci then any changes to the language of the latter specification should be discarded. 5765bd8deadSopenharmony_ci 5775bd8deadSopenharmony_ciDependencies on AMD_shader_trinary_minmax 5785bd8deadSopenharmony_ci 5795bd8deadSopenharmony_ci If the shader enables AMD_shader_trinary_minmax, this extension adds 5805bd8deadSopenharmony_ci additional common functions. 5815bd8deadSopenharmony_ci 5825bd8deadSopenharmony_ci Modify Section 8.3, Common Functions 5835bd8deadSopenharmony_ci 5845bd8deadSopenharmony_ci (add to the table of common functions on p. 144) 5855bd8deadSopenharmony_ci 5865bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5875bd8deadSopenharmony_ci | Syntax | Description | 5885bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5895bd8deadSopenharmony_ci | genI16Type min3(genI16Type x, | Returns the per-component minimum value of x, | 5905bd8deadSopenharmony_ci | genI16Type y, | y, and z. | 5915bd8deadSopenharmony_ci | genI16Type z) | | 5925bd8deadSopenharmony_ci | genU16Type min3(genU16Type x, | | 5935bd8deadSopenharmony_ci | genU16Type y, | | 5945bd8deadSopenharmony_ci | genU16Type z) | | 5955bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 5965bd8deadSopenharmony_ci | genI16Type max3(genI16Type x, | Returns the per-component maximum value of x, | 5975bd8deadSopenharmony_ci | genI16Type y, | y, and z. | 5985bd8deadSopenharmony_ci | genI16Type z) | | 5995bd8deadSopenharmony_ci | genU16Type max3(genU16Type x, | | 6005bd8deadSopenharmony_ci | genU16Type y, | | 6015bd8deadSopenharmony_ci | genU16Type z) | | 6025bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 6035bd8deadSopenharmony_ci | genI16Type mid3(genI16Type x, | Returns the per-component median value of x, | 6045bd8deadSopenharmony_ci | genI16Type y, | y, and z. | 6055bd8deadSopenharmony_ci | genI16Type z) | | 6065bd8deadSopenharmony_ci | genU16Type mid3(genU16Type x, | | 6075bd8deadSopenharmony_ci | genU16Type y, | | 6085bd8deadSopenharmony_ci | genU16Type z) | | 6095bd8deadSopenharmony_ci +-------------------------------------------+-----------------------------------------------+ 6105bd8deadSopenharmony_ci 6115bd8deadSopenharmony_ciErrors 6125bd8deadSopenharmony_ci 6135bd8deadSopenharmony_ci None. 6145bd8deadSopenharmony_ci 6155bd8deadSopenharmony_ciNew State 6165bd8deadSopenharmony_ci 6175bd8deadSopenharmony_ci None. 6185bd8deadSopenharmony_ci 6195bd8deadSopenharmony_ciNew Implementation Dependent State 6205bd8deadSopenharmony_ci 6215bd8deadSopenharmony_ci None. 6225bd8deadSopenharmony_ci 6235bd8deadSopenharmony_ciIssues 6245bd8deadSopenharmony_ci 6255bd8deadSopenharmony_ci (1) Should the new int16_t and uint16_t types support types as members of 6265bd8deadSopenharmony_ci uniform blocks and shader storage buffer blocks? 6275bd8deadSopenharmony_ci 6285bd8deadSopenharmony_ci RESOLVED: Yes, both types can be used in both SSBOs and UBOs, each consuming 6295bd8deadSopenharmony_ci 2 basic machine units. 6305bd8deadSopenharmony_ci 6315bd8deadSopenharmony_ci 6325bd8deadSopenharmony_ci (2) Should we support int16_t and uint16_t types as members of uniform blocks, 6335bd8deadSopenharmony_ci shader storage buffer blocks, or as transform feedback varyings? 6345bd8deadSopenharmony_ci 6355bd8deadSopenharmony_ci RESOLVED: Yes, support all of them. both types consume two basic machine 6365bd8deadSopenharmony_ci units. Some examples: 6375bd8deadSopenharmony_ci 6385bd8deadSopenharmony_ci struct S { 6395bd8deadSopenharmony_ci 6405bd8deadSopenharmony_ci uint16_t x; // rule 1: align = 2, takes offsets 0-1 6415bd8deadSopenharmony_ci u16vec2 y; // rule 2: align = 4, takes offsets 4-7 6425bd8deadSopenharmony_ci u16vec3 z; // rule 3: align = 8, takes offsets 8-13 6435bd8deadSopenharmony_ci }; 6445bd8deadSopenharmony_ci 6455bd8deadSopenharmony_ci layout(std140) uniform B1 { 6465bd8deadSopenharmony_ci 6475bd8deadSopenharmony_ci uint16_t a; // rule 1: align = 2, takes offsets 0-1 6485bd8deadSopenharmony_ci u16vec2 b; // rule 2: align = 4, takes offsets 4-7 6495bd8deadSopenharmony_ci u16vec3 c; // rule 3: align = 8, takes offsets 8-13 6505bd8deadSopenharmony_ci uint16_t d[2]; // rule 4: align = 16, array stride = 16, 6515bd8deadSopenharmony_ci // takes offsets 16-47 6525bd8deadSopenharmony_ci S g; // rule 9: align = 16, g.x takes offsets 6535bd8deadSopenharmony_ci // 48-49, g.y takes offsets 52-55, 6545bd8deadSopenharmony_ci // g.z takes offsets 56-63 6555bd8deadSopenharmony_ci S h[2]; // rule 10: align = 16, array stride = 16, h[0] 6565bd8deadSopenharmony_ci // takes offsets 64-77, h[1] takes 6575bd8deadSopenharmony_ci // offsets 78-93 6585bd8deadSopenharmony_ci }; 6595bd8deadSopenharmony_ci 6605bd8deadSopenharmony_ci layout(std430) buffer B2 { 6615bd8deadSopenharmony_ci 6625bd8deadSopenharmony_ci uint16_t o; // rule 1: align = 2, takes offsets 0-1 6635bd8deadSopenharmony_ci u16vec2 p; // rule 2: align = 4, takes offsets 4-7 6645bd8deadSopenharmony_ci u16vec3 q; // rule 3: align = 8, takes offsets 8-13 6655bd8deadSopenharmony_ci uint16_t r[2]; // rule 4: align = 2, array stride = 2, takes 6665bd8deadSopenharmony_ci // offsets 14-17 6675bd8deadSopenharmony_ci S u; // rule 9: align = 8, u.x takes offsets 6685bd8deadSopenharmony_ci // 24-25, u.y takes offsets 28-31, u.z 6695bd8deadSopenharmony_ci // takes offsets 32-37 6705bd8deadSopenharmony_ci S v[2]; // rule 10: align = 8, array stride = 16, v[0] 6715bd8deadSopenharmony_ci // takes offsets 40-55, v[1] takes 6725bd8deadSopenharmony_ci // offsets 56-71 6735bd8deadSopenharmony_ci }; 6745bd8deadSopenharmony_ci 6755bd8deadSopenharmony_ci (3) Are interactions with GL_AMD_shader_ballot supported? 6765bd8deadSopenharmony_ci (4) Are interactions with GL_AMD_shader_explicit_vertex_parameter supported? 6775bd8deadSopenharmony_ci (5) Are interactions with GL_AMD_shader_trinary_minmax supported? 6785bd8deadSopenharmony_ci 6795bd8deadSopenharmony_ci RESOLVED: Not yet. These will be resolved at a later time. 6805bd8deadSopenharmony_ci 6815bd8deadSopenharmony_ci (6) Does this extension provide a new subpassLoad() function prototype which 6825bd8deadSopenharmony_ci returns a(n) {u}int16 vector value? 6835bd8deadSopenharmony_ci 6845bd8deadSopenharmony_ci RESOLVED: No. This functionality may be added at a later time in a separate 6855bd8deadSopenharmony_ci extension. 6865bd8deadSopenharmony_ci 6875bd8deadSopenharmony_ci (7) Can the new int16 and uint16 types be used as array indexes? 6885bd8deadSopenharmony_ci 6895bd8deadSopenharmony_ci RESOLVED: No. 6905bd8deadSopenharmony_ci 6915bd8deadSopenharmony_ci 6925bd8deadSopenharmony_ciRevision History 6935bd8deadSopenharmony_ci 6945bd8deadSopenharmony_ci Rev. Date Author Changes 6955bd8deadSopenharmony_ci ---- -------- -------- ----------------------------------------- 6965bd8deadSopenharmony_ci 2 03/28/2018 rexu Add interactions with AMD_shader_trinary_minmax. 6975bd8deadSopenharmony_ci New common functions are added to support 6985bd8deadSopenharmony_ci 16-bit integer type in these trinary operations. 6995bd8deadSopenharmony_ci 7005bd8deadSopenharmony_ci 1 06/08/2017 dwitczak First release.