diff options
author | Ian Romanick <[email protected]> | 2005-06-21 23:42:43 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2005-06-21 23:42:43 +0000 |
commit | 66a5548fbbf4c04a74b0bbc451718a8fc95502d9 (patch) | |
tree | f0e5a5964bca25e1e48c62bdb09e7f4c2fb88ce1 /src/mesa/glapi/gl_API.xml | |
parent | f292e13a20a262411360bf4af5337595976cebc7 (diff) |
Mammoth update to the Python code generator scripts that live in
src/mesa/glapi. Basically, the scripts that did simple things (like
gl_offsets.py) were simple, and the scripts that did more complicated things
(like glX_proto_send.py) were getting progressively more and more out of
control. So, I re-write the foundation classes on which everything is based.
One problem with the existing code is that the division between the GL API
database representation and the way the output code is generated was either
blury or nonexistant. The new code somewhat follows the
Model-View-Controller pattern, minus the Controller. There is a distinct
set of classes that model the API data, and there is a distinct set of
classes that generate code from that data.
One big change is in the class that represents GL functions (was glFunction,
is now gl_function). There used to be an instance of this calls for each
function and for each alias to that function. For example, there was an
instance for PointParameterivSGIS, PointParameterivEXT, PointParameterivARB,
and PointParameteriv. In the new code, there is one instance. Each
instance has a list of entrypoint names for the function. In the next
revision, this will allow a couple useful things. The script will be able
to verify that the parameters, return type, and GLX protocol for a function
and all it's aliases match.
It will also allow aliases to be represented in the XML more compactly.
Instead of repeating all the information, an alias can be listed as:
<function name="PointParameterivARB" alias="PointParameterivEXT"/>
Because the data representation was changed, the order that the alias
functions are processed by the scripts also changed. This accounts for at
least 2,700 of the ~3,600 lines of diffs in the generated code.
Most of the remaining ~900 lines of diffs are the result of bugs *fixed* by
the new scripts. The old scripts also generated code with some bugs in it.
These bugs were discovered while the new code was being written.
These changes were discussed on the mesa3d-dev mailing list back at the end
of May:
http://marc.theaimsgroup.com/?t=111714569000004&r=1&w=2
Xorg bug: 3197, 3208
Diffstat (limited to 'src/mesa/glapi/gl_API.xml')
-rw-r--r-- | src/mesa/glapi/gl_API.xml | 191 |
1 files changed, 20 insertions, 171 deletions
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index 19f204c3172..49eb6d17e20 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -1078,26 +1078,26 @@ <enum name="SCISSOR_BIT" value="0x00080000"/> <enum name="ALL_ATTRIB_BITS" value="0x000FFFFF"/> - <type name="double" size="8" glx_name="FLOAT64"/> - <type name="clampd" size="8" glx_name="FLOAT64"/> + <type name="double" size="8" float="true" glx_name="FLOAT64"/> + <type name="clampd" size="8" float="true" glx_name="FLOAT64"/> - <type name="float" size="4" glx_name="FLOAT32"/> - <type name="clampf" size="4" glx_name="FLOAT32"/> + <type name="float" size="4" float="true" glx_name="FLOAT32"/> + <type name="clampf" size="4" float="true" glx_name="FLOAT32"/> - <type name="int" size="4" glx_name="CARD32"/> - <type name="uint" size="4" glx_name="CARD32"/> - <type name="sizei" size="4" glx_name="CARD32"/> - <type name="enum" size="4" glx_name="ENUM"/> - <type name="bitfield" size="4" glx_name="CARD32"/> + <type name="int" size="4" glx_name="CARD32"/> + <type name="uint" size="4" unsigned="true" glx_name="CARD32"/> + <type name="sizei" size="4" unsigned="true" glx_name="CARD32"/> + <type name="enum" size="4" unsigned="true" glx_name="ENUM"/> + <type name="bitfield" size="4" unsigned="true" glx_name="CARD32"/> - <type name="short" size="2" glx_name="CARD16"/> - <type name="ushort" size="2" glx_name="CARD16"/> + <type name="short" size="2" glx_name="CARD16"/> + <type name="ushort" size="2" unsigned="true" glx_name="CARD16"/> - <type name="byte" size="1" glx_name="CARD8"/> - <type name="ubyte" size="1" glx_name="CARD8"/> - <type name="boolean" size="1" glx_name="CARD8"/> + <type name="byte" size="1" glx_name="CARD8"/> + <type name="ubyte" size="1" unsigned="true" glx_name="CARD8"/> + <type name="boolean" size="1" unsigned="true" glx_name="CARD8"/> - <type name="void" size="0"/> + <type name="void" size="1"/> <function name="NewList" offset="0"> <param name="list" type="GLuint"/> @@ -4909,8 +4909,8 @@ <enum name="SRC1_ALPHA" value="0x8589"/> <enum name="SRC2_ALPHA" value="0x858A"/> - <type name="intptr" size="4" glx_name="CARD32"/> - <type name="sizeiptr" size="4" glx_name="CARD32"/> + <type name="intptr" size="4" glx_name="CARD32"/> + <type name="sizeiptr" size="4" unsigned="true" glx_name="CARD32"/> <function name="BindBuffer" alias="BindBufferARB"> <param name="target" type="GLenum"/> @@ -6622,8 +6622,8 @@ <enum name="DYNAMIC_READ_ARB" value="0x88E9"/> <enum name="DYNAMIC_COPY_ARB" value="0x88EA"/> - <type name="intptrARB" size="4"/> - <type name="sizeiptrARB" size="4"/> + <type name="intptrARB" size="4"/> + <type name="sizeiptrARB" unsigned="true" size="4"/> <function name="BindBufferARB" offset="688"> <param name="target" type="GLenum"/> @@ -11378,158 +11378,7 @@ <enum name="MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB" count="1" value="0x8B4C"/> </category> -<category name="GL_EXT_framebuffer_object" number="310"> - <enum name="FRAMEBUFFER_EXT" value="0x8D40"/> - <enum name="RENDERBUFFER_EXT" value="0x8D41"/> - <enum name="STENCIL_INDEX_EXT" value="0x8D45"/> - <enum name="STENCIL_INDEX1_EXT" value="0x8D46"/> - <enum name="STENCIL_INDEX4_EXT" value="0x8D47"/> - <enum name="STENCIL_INDEX8_EXT" value="0x8D48"/> - <enum name="STENCIL_INDEX16_EXT" value="0x8D49"/> - <enum name="RENDERBUFFER_WIDTH_EXT" value="0x8D42"/> - <enum name="RENDERBUFFER_HEIGHT_EXT" value="0x8D43"/> - <enum name="RENDERBUFFER_INTERNAL_FORMAT_EXT" value="0x8D44"/> - <enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT" value="0x8CD0"/> - <enum name="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT" value="0x8CD1"/> - <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT" value="0x8CD2"/> - <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT" value="0x8CD3"/> - <enum name="FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT" value="0x8CD4"/> - <enum name="COLOR_ATTACHMENT0_EXT" value="0x8CE0"/> - <enum name="COLOR_ATTACHMENT1_EXT" value="0x8CE1"/> - <enum name="COLOR_ATTACHMENT2_EXT" value="0x8CE2"/> - <enum name="COLOR_ATTACHMENT3_EXT" value="0x8CE3"/> - <enum name="COLOR_ATTACHMENT4_EXT" value="0x8CE4"/> - <enum name="COLOR_ATTACHMENT5_EXT" value="0x8CE5"/> - <enum name="COLOR_ATTACHMENT6_EXT" value="0x8CE6"/> - <enum name="COLOR_ATTACHMENT7_EXT" value="0x8CE7"/> - <enum name="COLOR_ATTACHMENT8_EXT" value="0x8CE8"/> - <enum name="COLOR_ATTACHMENT9_EXT" value="0x8CE9"/> - <enum name="COLOR_ATTACHMENT10_EXT" value="0x8CEA"/> - <enum name="COLOR_ATTACHMENT11_EXT" value="0x8CEB"/> - <enum name="COLOR_ATTACHMENT12_EXT" value="0x8CEC"/> - <enum name="COLOR_ATTACHMENT13_EXT" value="0x8CED"/> - <enum name="COLOR_ATTACHMENT14_EXT" value="0x8CEE"/> - <enum name="COLOR_ATTACHMENT15_EXT" value="0x8CEF"/> - <enum name="DEPTH_ATTACHMENT_EXT" value="0x8D00"/> - <enum name="STENCIL_ATTACHMENT_EXT" value="0x8D20"/> - <enum name="FRAMEBUFFER_COMPLETE_EXT" value="0x8CD5"/> - <enum name="FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT" value="0x8CD6"/> - <enum name="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT" value="0x8CD7"/> - <enum name="FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT" value="0x8CD8"/> - <enum name="FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT" value="0x8CD9"/> - <enum name="FRAMEBUFFER_INCOMPLETE_FORMATS_EXT" value="0x8CDA"/> - <enum name="FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT" value="0x8CDB"/> - <enum name="FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT" value="0x8CDC"/> - <enum name="FRAMEBUFFER_UNSUPPORTED_EXT" value="0x8CDD"/> - <enum name="FRAMEBUFFER_STATUS_ERROR_EXT" value="0x8CDE"/> - <enum name="FRAMEBUFFER_BINDING_EXT" value="0x8CA6"/> - <enum name="RENDERBUFFER_BINDING_EXT" value="0x8CA7"/> - <enum name="MAX_COLOR_ATTACHMENTS_EXT" value="0x8CDF"/> - <enum name="MAX_RENDERBUFFER_SIZE_EXT" value="0x84E8"/> - <enum name="INVALID_FRAMEBUFFER_OPERATION_EXT" value="0x0506"/> - - <function name="IsRenderbufferEXT" offset="796"> - <param name="renderbuffer" type="GLuint"/> - <return type="GLboolean"/> - </function> - - <function name="BindRenderbufferEXT" offset="797"> - <param name="target" type="GLenum"/> - <param name="renderbuffer" type="GLuint"/> - </function> - - <function name="DeleteRenderbuffersEXT" offset="798"> - <param name="n" type="GLsizei"/> - <param name="renderbuffers" type="const GLuint *"/> - </function> - - <function name="GenRenderbuffersEXT" offset="799"> - <param name="n" type="GLsizei"/> - <param name="renderbuffers" type="GLuint *"/> - </function> - - <function name="RenderbufferStorageEXT" offset="800"> - <param name="target" type="GLenum"/> - <param name="internalformat" type="GLenum"/> - <param name="width" type="GLsizei"/> - <param name="height" type="GLsizei"/> - </function> - - <function name="GetRenderbufferParameterivEXT" offset="801"> - <param name="target" type="GLenum"/> - <param name="pname" type="GLenum"/> - <param name="params" type="GLint *"/> - </function> - - <function name="IsFramebufferEXT" offset="802"> - <param name="framebuffer" type="GLuint"/> - <return type="GLboolean"/> - </function> - - <function name="BindFramebufferEXT" offset="803"> - <param name="target" type="GLenum"/> - <param name="framebuffer" type="GLuint"/> - </function> - - <function name="DeleteFramebuffersEXT" offset="804"> - <param name="n" type="GLsizei"/> - <param name="framebuffers" type="const GLuint *"/> - </function> - - <function name="GenFramebuffersEXT" offset="805"> - <param name="n" type="GLsizei"/> - <param name="framebuffers" type="GLuint *"/> - </function> - - <function name="CheckFramebufferStatusEXT" offset="806"> - <param name="target" type="GLenum"/> - <return type="GLenum"/> - </function> - - <function name="FramebufferTexture1DEXT" offset="807"> - <param name="target" type="GLenum"/> - <param name="attachment" type="GLenum"/> - <param name="textarget" type="GLenum"/> - <param name="texture" type="GLuint"/> - <param name="level" type="GLint"/> - </function> - - <function name="FramebufferTexture2DEXT" offset="808"> - <param name="target" type="GLenum"/> - <param name="attachment" type="GLenum"/> - <param name="textarget" type="GLenum"/> - <param name="texture" type="GLuint"/> - <param name="level" type="GLint"/> - </function> - - <function name="FramebufferTexture3DEXT" offset="809"> - <param name="target" type="GLenum"/> - <param name="attachment" type="GLenum"/> - <param name="textarget" type="GLenum"/> - <param name="texture" type="GLuint"/> - <param name="level" type="GLint"/> - <param name="zoffset" type="GLint"/> - </function> - - <function name="FramebufferRenderbufferEXT" offset="810"> - <param name="target" type="GLenum"/> - <param name="attachment" type="GLenum"/> - <param name="renderbuffertarget" type="GLenum"/> - <param name="renderbuffer" type="GLuint"/> - </function> - - <function name="GetFramebufferAttachmentParameterivEXT" offset="811"> - <param name="target" type="GLenum"/> - <param name="attachment" type="GLenum"/> - <param name="pname" type="GLenum"/> - <param name="params" type="GLint *"/> - </function> - - <function name="GenerateMipmapEXT" offset="812"> - <param name="target" type="GLenum"/> - </function> -</category> - +<xi:include href="EXT_framebuffer_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <!-- Extension number 307 is a GLX extension. --> <!-- Extension number 308 is a GLX extension. --> |