• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Name
2
3    ARB_shader_bit_encoding
4
5Name Strings
6
7    GL_ARB_shader_bit_encoding
8
9Contributors
10
11    Bill Licea-Kane
12
13Contact
14
15    Bill Licea-Kane (bill 'at' amd.com)
16
17Notice
18
19    Copyright (c) 2010-2013 The Khronos Group Inc. Copyright terms at
20        http://www.khronos.org/registry/speccopyright.html
21
22Specification Update Policy
23
24    Khronos-approved extension specifications are updated in response to
25    issues and bugs prioritized by the Khronos OpenGL Working Group. For
26    extensions which have been promoted to a core Specification, fixes will
27    first appear in the latest version of that core Specification, and will
28    eventually be backported to the extension document. This policy is
29    described in more detail at
30        https://www.khronos.org/registry/OpenGL/docs/update_policy.php
31
32Status
33
34    Complete. Approved by the ARB at the 2010/01/22 F2F meeting.
35    Approved by the Khronos Board of Promoters on March 10, 2010.
36
37Version
38
39    Date: March 21, 2010
40    Revision: 3
41    $Id$
42
43Number
44
45    ARB Extension #82
46
47Dependencies
48
49    This extension is written against Version 1.50 (Revision 09) of the OpenGL
50    Shading Language Specification.
51
52    This extension is based on ARB_gpu_shader5.
53
54Overview
55
56    This extension trivially adds built-in functions for getting/setting
57    the bit encoding for floating-point values in the OpenGL Shading Language.
58
59    These functions are pulled out of ARB_gpu_shader5, since support for such
60    built-in functions exists in current hardware.
61
62IP Status
63
64    No known IP claims.
65
66New Procedures and Functions
67
68    None
69
70New Tokens
71
72    None
73
74Additions to Chapter 8 of the OpenGL Shading Language 1.50 Specification
75(Built-in Functions)
76
77
78    Modify Section 8.3, Common Functions, p. 84
79
80    (add functions to get/set the bit encoding for floating-point values)
81
82    32-bit floating-point data types in the OpenGL shading language are
83    specified to be encoded according to the IEEE specification for
84    single-precision floating-point values.  The functions below allow shaders
85    to convert floating-point values to and from signed or unsigned integers
86    representing their encoding.
87
88    To obtain signed or unsigned integer values holding the encoding of a
89    floating-point value, use:
90
91      genIType floatBitsToInt(genType value);
92      genUType floatBitsToUint(genType value);
93
94    Conversions are done on a component-by-component basis.
95
96    To obtain a floating-point value corresponding to a signed or unsigned
97    integer encoding, use:
98
99      genType intBitsToFloat(genIType value);
100      genType uintBitsToFloat(genUType value);
101
102
103
104Issues
105
106    1) What should this extension be called?
107
108    Resolved.  Currently ARB_shader_bit_encoding.
109
110    2) Are there other built-in functions from ARB_gpu_shader5 that should
111    be pulled in here?
112
113    Resolved.  Given the deadline, hearing no additional candidates for
114    exposing in current hardware, no.
115
116    3) Are there other issues?
117
118    Resolved.  Certainly.  They will be found in ARB_gpu_shader5.  This
119    extension will track resolutions of ARB_gpu_shader5.  It is a simple
120    subset of ARB_gpu_shader5.
121
122
123Revision History
124
125    2009-10-08
126    1, wwlk
127    first draft
128
129    2009-10-22
130    2, wwlk
131    Rename to ARB (draft!)
132    No additional features have been proposed.
133
134    2010-03-21
135    3, pbrown
136    Update to rename references to "EXT_gpu_shader5" to "ARB_gpu_shader5".
137