• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    AMD_shader_trinary_minmax
4
5Name Strings
6
7    GL_AMD_shader_trinary_minmax
8
9Contact
10
11    Graham Sellers, AMD (graham.sellers 'at' amd.com)
12
13Status
14
15    Shipping
16
17Version
18
19    Last Modified Date:         10/01/2012
20    Author Revision:            2
21
22Number
23
24    428
25
26Dependencies
27
28    OpenGL 2.0 or ARB_shader_objects is required.
29
30    This extension is written against the OpenGL Shading Language
31    Specification, Version 4.30.
32
33Overview
34
35    This extension introduces three new trinary built-in functions to the
36    OpenGL Shading Languages. These functions allow the minimum, maximum
37    or median of three inputs to be found with a single function call. These
38    operations may be useful for sorting and filtering operations, for example.
39    By explicitly performing a trinary operation with a single built-in
40    function, shader compilers and optimizers may be able to generate better
41    instruction sequences for perform sorting and other multi-input functions.
42
43IP Status
44
45    None.
46
47New Procedures and Functions
48
49    None.
50
51New Tokens
52
53    None.
54
55Additions to Chapter 2 of the OpenGL Shading Language (GLSL) Specification,
56version 4.30, (Overview of OpenGL Shading)
57
58    None.
59
60Additions to Chapter 3 of the OpenGL Shading Language (GLSL) Specification,
61version 4.30, (Basics)
62
63    None.
64
65Additions to Chapter 4 of the OpenGL Shading Language (GLSL) Specification,
66version 4.30, (Variables and Types)
67
68    None.
69
70Additions to Chapter 5 of the OpenGL Shading Language (GLSL) Specification,
71version 4.30, (Operators and Expressions)
72
73    None.
74
75Additions to Chapter 6 of the OpenGL Shading Language (GLSL) Specification,
76version 4.30, (Statement Structure)
77
78    None.
79
80Additions to Chapter 7 of the OpenGL Shading Language (GLSL) Specification,
81version 4.30 (Built-in variables)
82
83    None.
84
85Additions to Chapter 8 of the OpenGL Shading Language (GLSL) Specification,
86version 4.30 (Built-in functions)
87
88    In Section 8.3, "Common Functions", add to the table of functions, p.133:
89
90    +---------------------------------------------------+--------------------------------------------------------+
91    | Syntax                                            | Description                                            |
92    +---------------------------------------------------+--------------------------------------------------------+
93    | genType min3(genType x, genType y, genType z)     | Returns the per-component minimum value of x, y, and z |
94    | genIType min3(genIType x, genIType y, genIType z) | Returns the per-component minimum value of x, y, and z |
95    | genUType min3(genUType x, genUType y, genUType z) | Returns the per-component minimum value of x, y, and z |
96    +---------------------------------------------------+--------------------------------------------------------+
97    | genType max3(genType x, genType y, genType z)     | Returns the per-component maximum value of x, y, and z |
98    | genIType max3(genIType x, genIType y, genIType z) | Returns the per-component maximum value of x, y, and z |
99    | genUType max3(genUType x, genUType y, genUType z) | Returns the per-component maximum value of x, y, and z |
100    +---------------------------------------------------+--------------------------------------------------------+
101    | genType mid3(genType x, genType y, genType z)     | Returns the per-component median value of x, y, and z  |
102    | genIType mid3(genIType x, genIType y, genIType z) | Returns the per-component median value of x, y, and z  |
103    | genUType mid3(genUType x, genUType y, genUType z) | Returns the per-component median value of x, y, and z  |
104    +---------------------------------------------------+--------------------------------------------------------+
105
106Additions to Chapter 9 of the OpenGL Shading Language (GLSL) Specification,
107version 4.30, (Shading Language Grammar)
108
109    None.
110
111Additions to the AGL/GLX/WGL Specifications
112
113    None.
114
115GLX Protocol
116
117    None.
118
119Errors
120
121    None.
122
123Issues
124
125    1) Should the trinary min and max functions be given new names (min3, max3)
126       or simply overload the existing min and max functions?
127
128       RESOLVED: Use new names.
129
130Revision History
131
132    Rev.    Date      Author    Changes
133    ----  --------    --------  -----------------------------------------
134
135     2    10/01/2012  gsellers  Update to GLSL 4.30. Ready to post.
136     1    11/01/2012  gsellers  Initial Revision
137