diff --git a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/AMD_shader_trinary_minmax.kt b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/AMD_shader_trinary_minmax.kt index c459f0e96e..3fcad3a5f0 100644 --- a/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/AMD_shader_trinary_minmax.kt +++ b/modules/templates/src/main/kotlin/org/lwjgl/vulkan/templates/AMD_shader_trinary_minmax.kt @@ -13,8 +13,26 @@ val AMD_shader_trinary_minmax = "AMDShaderTrinaryMinmax".nativeClassVK("AMD_shad When the {@code VK_AMD_shader_trinary_minmax} device extension is enabled the application $can pass a SPIR-V module to #CreateShaderModule() that uses the {@code SPV_AMD_shader_trinary_minmax} SPIR-V extension. - This extension introduces 3-parameter {@code min}, {@code max} and {@code med} functions which map directly to the corresponding GCN opcodes: - {@code min3}, {@code max3}, {@code med3} + This extension is written to provide the functionality of the {@code AMD_shader_trinary_minmax}, OpenGL Shading Language Specification extension, for + SPIR-V. + + This extension introduces nine new trinary extended instructions to SPIR-V. These functions allow the minimum, maximum or median of three inputs to be + found with a single function call. These operations may be useful for sorting and filtering operations, for example. By explicitly performing a trinary + operation with a single built-in function, shader compilers and optimizers may be able to generate better instruction sequences to perform sorting and + to other multi-input functions. + + This extension adds the following extended instructions: + ${ul( + "FMin3AMD", + "UMin3AMD", + "SMin3AMD", + "FMax3AMD", + "UMax3AMD", + "SMax3AMD", + "FMid3AMD", + "UMid3AMD", + "SMid3AMD" + )} """ IntConstant(