Skip to content

Commit

Permalink
Update AMD_shader_trinary_minmax documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Jun 3, 2016
1 parent c550047 commit c614278
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit c614278

Please sign in to comment.