diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/__init__.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9b912d19ef8f0e54409434cb78557ba570cae4c7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/__init__.py @@ -0,0 +1 @@ +"""OpenGL Extensions""" \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/aux_depth_stencil.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/aux_depth_stencil.py new file mode 100644 index 0000000000000000000000000000000000000000..e67952d46ccd7c19e2f0bedadf60df109493a3fa --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/aux_depth_stencil.py @@ -0,0 +1,47 @@ +'''OpenGL extension APPLE.aux_depth_stencil + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.aux_depth_stencil to provide a more +Python-friendly API + +Overview (from the spec) + + Normally, each OpenGL drawable allocates at most one depth buffer and one + stencil buffer, regardless of how many aux buffers there are. + + When the APPLE_aux_depth_stencil extension is used, and the depth buffer + size is non-zero, the GL silently allocates a separate depth buffer for the + color buffer and for each aux buffer. Similarly, if the stencil buffer size + is non-zero, a separate stencil buffer is allocated for the color buffer and + each aux buffer. This extension does not cause separate depth or stencil + buffers to be allocated for the left and right buffers of a stereo drawable. + A context with no aux buffers will be unaffected by this extension. + + Switching the draw or read buffer from the color buffer to an aux buffer, or + switching between two aux buffers, simultaneously switches the associated + depth and stencil buffers, for drawing or reading. + + For example, if an OpenGL context has two aux buffers and non-zero depth + buffer size, it will have a total of three depth buffers - one associated + with the color buffer and one associated with each aux buffer. If that + context is used to render to AUX0, then to render to AUX1, the changes to + the depth buffer made by the rendering to AUX1 will not affect the depth + buffer associated with AUX0, and vice versa. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/aux_depth_stencil.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.aux_depth_stencil import * +from OpenGL.raw.GL.APPLE.aux_depth_stencil import _EXTENSION_NAME + +def glInitAuxDepthStencilAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/client_storage.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/client_storage.py new file mode 100644 index 0000000000000000000000000000000000000000..9ddc4cff7affb76ebee30433761f45285993b4ca --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/client_storage.py @@ -0,0 +1,107 @@ +'''OpenGL extension APPLE.client_storage + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.client_storage to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a simple mechanism to optimize texture data handling + by clients. GL implementations normally maintain a copy of texture image + data supplied clients when any of the various texturing commands, such as + TexImage2D, are invoked. This extension eliminates GL's internal copy of + the texture image data and allows a client to maintain this data locally for + textures when the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter is + TRUE at the time of texture specification. Local texture data storage is + especially useful in cases where clients maintain internal copies of + textures used in any case. This results in what could be considered an + extra copy of the texture image data. Assuming all operations are error + free, the use of client storage has no affect on the result of texturing + operations and will not affect rendering results. APPLE_client_storage + allows clients to optimize memory requirements and copy operations it also + requires adherence to specific rules in maintaining texture image data. + + Clients using this extension are agreeing to preserve a texture's image data + for the life of the texture. The life of the texture is defined, in this + case, as the time from first issuing the TexImage3D, TexImage2D or + TexImage1D command, for the specific texture object with the + UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter set to TRUE, until the + DeleteTextures command or another TexImage command for that same object. + Only after DeleteTextures has completed, or new texture is specified, can + the local texture memory be released, as it will no longer be utilized by + OpenGL. Changing the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter + will have no additional effect once the texturing command has been issued + and specifically will not alleviate the client from maintaining the texture + data. + + Client storage is implemented as a pixel storage parameter which affects + texture image storage at the time the texturing command is issued. As with + other pixel storage parameters this state may differ from the time the + texturing command in executed if the command is placed in a display list. + The PixelStore command is used to set the parameter + UNPACK_CLIENT_STORAGE_APPLE. Values can either be TRUE or FALSE, with TRUE + representing the use of client local storage and FALSE indicating the OpenGL + engine and not the client will be responsible for maintaining texture + storage for future texturing commands issued per the OpenGL specification. + The default state for the UNPACK_CLIENT_STORAGE_APPLE parameter is FALSE + + Client storage is only available for texture objects and not the default + texture (of any target type). This means that a texture object has to + generated and bound to be used with client storage. Setting + UNPACK_CLIENT_STORAGE_APPLE to TRUE and texturing with the default texture + will result in normally texturing with GL maintaining a copy of the texture + image data. + + Normally, client storage will be used in conjunction with normal texturing + techniques. An application would use GenTextures to generate texture + objects as needed. BindTexture to the texture object name of interest. + Enable client storage via the PixelStore command setting the + UNPACK_CLIENT_STORAGE_APPLE parameter to TRUE. Then use TexImage3D, + TexImage2D or TexImage1D to specify the texture image. If no further use of + client storage is desired, it is recommended to again use the PixelStore + command, in this case setting the UNPACK_CLIENT_STORAGE_APPLE parameter to + FALSE to disable client storage, since this pixel state is maintained unless + explicitly set by the PixelStore command. + + If an application needs to modify the texture, using TexSubImage for + example, it should be noted that the pointer passed to TexSubImage1D, + TexSubImage2D or TexSubImage3D does not have to the same, or within the + original texture memory. It if is not, there is the likelihood of GL + copying the new data to the original texture memory owned by the client, + thus actually modifying this texture image data. This does not affect + requirement to maintain the original texture memory but also does not add + the requirement to maintain the sub image data, due to the copy. + + Once a client has completed use of the texture stored in client memory, it + should issue a DeleteTextures command to delete the texture object or issue + a texture command, with the same target type, for the object, with either a + different data pointer, or UNPACK_CLIENT_STORAGE_APPLE set to false, in any + case, breaking the tie between GL and the texture buffer. An implicit Flush + command is issued in these cases, ensuring all access to the texture by + OpenGL is complete. Only at this point can the texture buffer be safely + released. Releasing the texture buffer prior has undefined results and will + very possibly display texel anomalies at run time. System level memory + management and paging schemes should not affect the use of client storage. + Consider in any case, that GL has an alias of the base pointer for this + block of texture memory which is maintained until GL is finished rendering + with the texture and it has been deleted or reassigned to another set of + texture data. As long as this alias exists, applications must not + de-allocate, move or purge this memory. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/client_storage.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.client_storage import * +from OpenGL.raw.GL.APPLE.client_storage import _EXTENSION_NAME + +def glInitClientStorageAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/fence.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/fence.py new file mode 100644 index 0000000000000000000000000000000000000000..86e34f8d721dded702566b42e2746412269ead45 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/fence.py @@ -0,0 +1,79 @@ +'''OpenGL extension APPLE.fence + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.fence to provide a more +Python-friendly API + +Overview (from the spec) + + This extension is provided a finer granularity of synchronizing GL command + completion than offered by standard OpenGL, which currently offers only two + mechanisms for synchronization: Flush and Finish. Since Flush merely assures + the user that the commands complete in a finite (though undetermined) amount + of time, it is, thus, of only modest utility. Finish, on the other hand, + stalls CPU execution until all pending GL commands have completed forcing + completely synchronous operation, which most often not the desired result. + This extension offers a middle ground - the ability to "finish" a subset of + the command stream, and the ability to determine whether a given command has + completed or not. + + This extension introduces the concept of a "fence" to the OpenGL command + stream with SetFenceAPPLE. Once the fence is inserted into the command + stream, it can be tested for its completion with TestFenceAPPLE. Moreover, + the application may also request a partial Finish up to a particular "fence" + using the FinishFenceAPPLE command -- that is, all commands prior to the + fence will be forced to complete until control is returned to the calling + process. These new mechanisms allow for synchronization between the host + CPU and the GPU, which may be accessing the same resources (typically + memory). + + Fences are created and deleted, as are other objects in OpenGL, specifically + with GenFencesAPPLE and DeleteFencesAPPLE. The former returns a list of + unused fence names and the later deletes the provided list of fence names. + + In addition to being able to test or finish a fence this extension allows + testing for other types of completion, including texture objects, vertex + array objects, and draw pixels. This allows the client to use + TestObjectAPPLE or FinishObjectAPPLE with FENCE_APPLE, TEXTURE, + VERTEX_ARRAY, or DRAW_PIXELS_APPLE with the same type of results as + TestFenceAPPLE and FinishFenceAPPLE. Specifically, using the FENCE_APPLE + type is equivalent to calling TestFenceAPPLE or FinishFenceAPPLE with the + particular fence name. Using TEXTURE as the object type tests or waits for + completion of a specific texture, meaning when there are no pending + rendering commands which use that texture object. Using the VERTEX_ARRAY + type will test or wait for drawing commands using that particular vertex + array object name. Finally, DRAW_PIXELS_APPLE will wait or test for + completion of all pending DrawPixels commands. These tests and finishes + operate with the same limitations and results as test and finish fence. + + One use of this extension is in conjunction with APPLE_vertex_array_range to + determine when graphics hardware has completed accessing vertex data from a + vertex array range. Once a fence has been tested TRUE or finished, all + vertex indices issued before the fence must have completed being accessed. + This ensures that the vertex data memory corresponding to the issued vertex + indices can be safely modified (assuming no other outstanding vertex indices + are issued subsequent to the fence). + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/fence.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.fence import * +from OpenGL.raw.GL.APPLE.fence import _EXTENSION_NAME + +def glInitFenceAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glGenFencesAPPLE=wrapper.wrapper(glGenFencesAPPLE).setOutput( + 'fences',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +# INPUT glDeleteFencesAPPLE.fences size not checked against n +glDeleteFencesAPPLE=wrapper.wrapper(glDeleteFencesAPPLE).setInputArraySize( + 'fences', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/flush_buffer_range.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/flush_buffer_range.py new file mode 100644 index 0000000000000000000000000000000000000000..36d98307787b2a88d78038d581fb50244dde5356 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/flush_buffer_range.py @@ -0,0 +1,46 @@ +'''OpenGL extension APPLE.flush_buffer_range + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.flush_buffer_range to provide a more +Python-friendly API + +Overview (from the spec) + + APPLE_flush_buffer_range expands the buffer object API to allow greater + performance when a client application only needs to write to a sub-range + of a buffer object. To that end, this extension introduces two new buffer + object features: non-serialized buffer modification and explicit sub-range + flushing for mapped buffer objects. + + OpenGL requires that commands occur in a FIFO manner meaning that any + changes to buffer objects either block until the data has been processed by + the OpenGL pipeline or else create extra copies to avoid such a block. By + providing a method to asynchronously modify buffer object data, an + application is then able to manage the synchronization points themselves + and modify ranges of data contained by a buffer object even though OpenGL + might still be using other parts of it. + + This extension also provides a method for explicitly flushing ranges of a + mapped buffer object so OpenGL does not have to assume that the entire + range may have been modified. + + Affects ARB_vertex_buffer_object, ARB_pixel_buffer_object and OpenGL 1.5 + Buffer Objects. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/flush_buffer_range.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.flush_buffer_range import * +from OpenGL.raw.GL.APPLE.flush_buffer_range import _EXTENSION_NAME + +def glInitFlushBufferRangeAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/object_purgeable.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/object_purgeable.py new file mode 100644 index 0000000000000000000000000000000000000000..347f3f139ecda047cbf9640e6041dec74a8d1b43 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/object_purgeable.py @@ -0,0 +1,79 @@ +'''OpenGL extension APPLE.object_purgeable + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.object_purgeable to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides the ability to mark the storage of OpenGL + objects as "purgeable". + + Many of today's modern virtual memory systems include the concept of + purgeability in order to avoid unnecessary paging when the object + contents are no longer needed. In OpenGL, objects such as textures, + vertex buffers, pixel buffers, and renderbuffers all have + significant storage requirements. By default, the OpenGL is + required to preserve the contents of these objects regardless of + system resource stress, such as vram shortage or physical memory + shortage. Often this is accomplished by temporarily paging the + contents of objects that are not currently needed to some kind of + secondary storage area. This paging operation can be an unnecessary + computational expense in the cases where the data is not going to be + used again or where the content can be reproduced by the application + with less expense than the paging operation would require. + + This extension defines a mechanism for the application to mark the + storage of OpenGL objects as "purgeable" in order to influence these + paging operations. The application can further control the + semantics of making object storage "purgeable" with two options + ("volatile" and "released") and "unpurgeable" with two options + ("undefined" and "retained") + + Applications that use this extension will typically follow one of + two operational models. The typical model for most applications is + to mark an object storage as "purgeable" with the "volatile" option, + and then later mark the storage as "unpurgeable" with the "retained" + option. When this happens, the application may or may not need to + respecify the object contents, depending on the whether the object + storage was actually released. The application can find out whether + the storage was released by examining the return value of the + function which marks the storage as "unpurgeable". This model is + useful when the application does not know at the time it marks the + object storage as "purgeable" whether it will later need those + contents to be valid. + + Another operational model is for an application to mark the storage + for an object as "purgeable" with the "released" option, and then + later mark the object "unpurgeable" with the "undefined" option. In + this latter model, the application intends to unconditionally reload + the object contents later on, and so it tells the GL that it is okay + if the contents are "undefined" when the storage is re-allocated. + + Note that in both models, it is possible for the contents to become + undefined since they could have actually been purged from the system + in either case. The various options are still useful, however, + since they give more information to the GL about what the + application expects to happen and the GL can use this information to + make better predictions about which paging choices will be more + efficient. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/object_purgeable.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.object_purgeable import * +from OpenGL.raw.GL.APPLE.object_purgeable import _EXTENSION_NAME + +def glInitObjectPurgeableAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glGetObjectParameterivAPPLE=wrapper.wrapper(glGetObjectParameterivAPPLE).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/texture_range.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/texture_range.py new file mode 100644 index 0000000000000000000000000000000000000000..12d2b4da9c573aa3832e87896c63f9abfc575394 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/texture_range.py @@ -0,0 +1,45 @@ +'''OpenGL extension APPLE.texture_range + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.texture_range to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a method to specify the range of client address + space that may be used by a texture. In general, the storage size of a + texture may be easily determined by the texture's data type and geometry. + However, driver optimizations may be realized if an extended address + range is specified to encompass the storage of multiple textures, or to + encompass potential future changes in the size of a texture. A typical + usage of this extension is to specify an identical address range for + several textures in a particular working set that encompasses the storage + of all the textures in the set. This allows the driver to make a single + memory mapping for all of the textures. + + Further, a mechanism is provided to allow the application to give the GL + driver a hint regarding the storage requirements of the texture data. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/texture_range.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.texture_range import * +from OpenGL.raw.GL.APPLE.texture_range import _EXTENSION_NAME + +def glInitTextureRangeAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glTextureRangeAPPLE.pointer size not checked against length +glTextureRangeAPPLE=wrapper.wrapper(glTextureRangeAPPLE).setInputArraySize( + 'pointer', None +) +glGetTexParameterPointervAPPLE=wrapper.wrapper(glGetTexParameterPointervAPPLE).setOutput( + 'params',size=(1,),orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/transform_hint.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/transform_hint.py new file mode 100644 index 0000000000000000000000000000000000000000..b3206d84873f5399f88d10c4e443e3437becca68 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/transform_hint.py @@ -0,0 +1,43 @@ +'''OpenGL extension APPLE.transform_hint + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.transform_hint to provide a more +Python-friendly API + +Overview (from the spec) + + The transform_hint extension provides a new target, + TRANSFORM_HINT_APPLE, for the Hint procedure. When the + transform hint is set to FASTEST the GL may choose to + implement certain state dependent algebraic simplifications + in the geometry transformation that affect the sub-pixel + precision of the transformed vertex coordinates. + + For example, if two polygons are rendered with identical object + coordinates, different GL state settings, and the transform + hint set to FASTEST, there is no gaurantee that the resulting + window coordinates of the two polygons will be precisely + identical. Therefore, precise tests of the window coordinates, + such as a depth test setting of EQUAL, should not be used. + + If the transform hint is set to NICEST or DONT_CARE, two polygons + with identical object coordinates will always be transformed + to identical window coordinates. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/transform_hint.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.transform_hint import * +from OpenGL.raw.GL.APPLE.transform_hint import _EXTENSION_NAME + +def glInitTransformHintAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_object.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_object.py new file mode 100644 index 0000000000000000000000000000000000000000..eba0dbd64ea21a3b6aef18072905ebe8d7f7f0bd --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_object.py @@ -0,0 +1,52 @@ +'''OpenGL extension APPLE.vertex_array_object + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.vertex_array_object to provide a more +Python-friendly API + +Overview (from the spec) + + This extension introduces named vertex array objects which encapsulate + vertex array state on the client side. The main purpose of these + objects is to keep pointers to static vertex data and provide a name + for different sets of static vertex data. + + By extending vertex array range functionality this extension allows multiple + vertex array ranges to exist at one time, including their complete sets of + state, in manner analogous to texture objects. + + GenVertexArraysAPPLE creates a list of n number of vertex array object + names. After creating a name, BindVertexArrayAPPLE associates the name with + a vertex array object and selects this vertex array and its associated + state as current. To get back to the default vertex array and its + associated state the client should bind to vertex array named 0. + + Once a client is done using a vertex array object it can be deleted with + DeleteVertexArraysAPPLE. The client is responsible for allocating and + deallocating the memory used by the vertex array data, while the + DeleteVertexArraysAPPLE command deletes vertex array object names and + associated state only. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/vertex_array_object.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.vertex_array_object import * +from OpenGL.raw.GL.APPLE.vertex_array_object import _EXTENSION_NAME + +def glInitVertexArrayObjectAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glDeleteVertexArraysAPPLE.arrays size not checked against n +glDeleteVertexArraysAPPLE=wrapper.wrapper(glDeleteVertexArraysAPPLE).setInputArraySize( + 'arrays', None +) +glGenVertexArraysAPPLE=wrapper.wrapper(glGenVertexArraysAPPLE).setOutput( + 'arrays',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_range.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_range.py new file mode 100644 index 0000000000000000000000000000000000000000..0eba692b2143a9a90f38902fdb39aa46664e6f8d --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_range.py @@ -0,0 +1,154 @@ +'''OpenGL extension APPLE.vertex_array_range + +This module customises the behaviour of the +OpenGL.raw.GL.APPLE.vertex_array_range to provide a more +Python-friendly API + +Overview (from the spec) + + This extension is designed to allow very high vertex processing rates which + are facilitated both by relieving the CPU of as much processing burden as + possible and by allowing graphics hardware to directly access vertex data. + Because this extension is implemented as an addition to the vertex array + specification provided by OpenGL 1.1, applications can continue to use + existing vertex submission logic while taking advantage of vertex array + ranges to more efficiently process those arrays. + + The vertex array coherency model provided by OpenGL 1.1 requires that + vertex data specified in vertex arrays be transferred from system memory + each time Begin, DrawArrays, or DrawElements is called. Further, OpenGL + 1.1 requires that the transfer of data be completed by the time End, + DrawArrays, or DrawElements returns. Both of these requirements are + relaxed by the vertex array range extension. Vertex data may be cached + by the GL so there is no guarantee that changes to the vertex data will + be reflected in following drawing commands unless it is flushed with + FlushVertexArrayRangeAPPLE. The reading of vertex data may be deferred + by the GL so there is no guarantee that the GL will be finished reading + the data until completion is forced by the use of Finish or the APPLE_fence + extension. + + Vertex array range can be enabled in two ways. EnableClientState can be + used with the VERTEX_ARRAY_RANGE_APPLE param to enable vertex array range + for the client context. One can also simply set the vertex array storage + hint to either STORAGE_CACHED_APPLE or STORAGE_SHARED_APPLE (as discussed + below) to enable a particular vertex array range. Once this is done, use of + vertex array range requires the definition of a specific memory range for + vertex data through VertexArrayRangeAPPLE. It is recommended this data be + page aligned (4096 byte boundaries) and a multiple of page size in length + for maximum efficiency in data handling and internal flushing, but this is + not a requirement and any location and length of data can be defined as a + vertex array. This extension provides no memory allocators as any + convenient memory allocator can be used. + + Once a data set is established, using VertexArrayRangeAPPLE, it can be can + be drawn using standard OpenGL vertex array commands, as one would do + without this extension. Note, if any the data for any enabled array for a + given array element index falls outside of the vertex array range, an + undefined vertex is generated. One should also understand removing or + replacing all calls to vertex array range functions with no-ops or disabling + the vertex array range by disabling the VERTEX_ARRAY_RANGE_APPLE client + state should not change the results of an application's OpenGL drawing. + + For static data no additional coherency nor synchronization must be done and + the client is free to draw with the specified draw as it sees fit. + + If data is dynamic, thus to be modified, FlushVertexArrayRangeAPPLE should + be used. The command is issued when data has been modified since the last + call to VertexArrayRangeAPPLE or FlushVertexArrayRangeAPPLE and prior to + drawing with such data. FlushVertexArrayRangeAPPLE only provides memory + coherency prior to drawing (such as ensuring CPU caches are flushed or VRAM + cached copies are updated) and does not provide any synchronization with + previously issued drawing commands. The range flushed can be the specific + range modified and does not have to be the entire vertex array range. + Additionally, data maybe read immediately after a flush without need for + further synchronization, thus overlapping areas of data maybe read, modified + and written between two successive flushes and the data will be + consistent. + + To synchronize data modification after drawing two methods can be used. A + Finish command can be issued which will not return until all previously + issued commands are complete, forcing completely synchronous operation. + While this guarantees all drawing is complete it may not be the optimal + solution for clients which just need to ensure drawing with the vertex array + range or a specific range with the array is compete. The APPLE_fence + extension can be used when dynamic data modifications need to be + synchronized with drawing commands. Specifically, if data is to be modified, + a fence can be set immediately after drawing with the data. Once it comes + time to modify the data, the application must test (or finish) this fence to + ensure the drawing command has completed. Failure to do this could result in + new data being used by the previously issued drawing commands. It should be + noted that providing the maximum time between the drawing set fence and the + modification test/finish fence allows the most asynchronous behavior and + will result in the least stalling waiting for drawing completion. Techniques + such as double buffering vertex data can be used to help further prevent + stalls based on fence completion but are beyond the scope of this extension. + + Once an application is finished with a specific vertex array range or at + latest prior to exit, and prior to freeing the memory associated with this + vertex array, the client should call VertexArrayRangeAPPLE with a data + location and length of 0 to allow the internal memory managers to complete + any commitments for the array range. In this case once + VertexArrayRangeAPPLE returns it is safe to de-allocate the memory. + + Three types of storage hints are available for vertex array ranges; client, + shared, and cached. These hints are set by passing the + STORAGE_CLIENT_APPLE, STORAGE_SHARED_APPLE, or STORAGE_CACHED_APPLE param to + VertexArrayParameteriAPPLE with VERTEX_ARRAY_STORAGE_HINT_APPLE pname. + Client storage, the default OpenGL behavior, occurs when + VERTEX_ARRAY_RANGE_APPLE is disabled AND the STORAGE_CLIENT_APPLE hint is + set. Note, STORAGE_CLIENT_APPLE is also the default hint setting. Shared + memory usage is normally used for dynamic data that is expected to be + modified and is likely mapped to AGP memory space for access by both the + graphics hardware and client. It is set when either + VERTEX_ARRAY_RANGE_APPLE is enabled, without the STORAGE_CACHED_APPLE hint + being set, or in all cases when the STORAGE_SHARED_APPLE hint is set. + Finally, the cached storage is designed to support static data and data which + could be cached in VRAM. This provides maximum access bandwidth for the + vertex array and occurs when the STORAGE_CACHED_APPLE hint is set. + + The following pseudo-code represents the treatment of a vertex array range + memory depending on the hint setting and whether vertex array range is + enabled for the client context: + + if (VERTEX_ARRAY_STORAGE_HINT_APPLE == STORAGE_CACHED_APPLE) + vertex array is treated as cached + else if (VERTEX_ARRAY_STORAGE_HINT_APPLE == STORAGE_SHARED_APPLE) + vertex array is treated as shared + else if (VERTEX_ARRAY_RANGE_APPLE enabled) + vertex array is treated as shared + else + vertex array is treated as client + + Note, these hints can affect how array flushes are handled and the overhead + associated with flushing the array, it is recommended that data be handled + as shared unless it really is static and there are no plans to modify it. + + To summarize the vertex array range extension provides relaxed + synchronization rules for handling vertex array data allowing high bandwidth + asynchronous data transfer from client memory to graphics hardware. + Different flushing and synchronization rules are required to ensure data + coherency when modifying data. Lastly, memory handling hints are provided + to allow the tunning of memory storage and access for maximum efficiency. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/APPLE/vertex_array_range.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.APPLE.vertex_array_range import * +from OpenGL.raw.GL.APPLE.vertex_array_range import _EXTENSION_NAME + +def glInitVertexArrayRangeAPPLE(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glVertexArrayRangeAPPLE=wrapper.wrapper(glVertexArrayRangeAPPLE).setOutput( + 'pointer',size=lambda x:(x,),pnameArg='length',orPassIn=True +) +glFlushVertexArrayRangeAPPLE=wrapper.wrapper(glFlushVertexArrayRangeAPPLE).setOutput( + 'pointer',size=lambda x:(x,),pnameArg='length',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/__init__.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9b912d19ef8f0e54409434cb78557ba570cae4c7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/__init__.py @@ -0,0 +1 @@ +"""OpenGL Extensions""" \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/blend_func_extended.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/blend_func_extended.py new file mode 100644 index 0000000000000000000000000000000000000000..89452adc7bc8e738cf7e1fcf917ed20772da5f87 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/blend_func_extended.py @@ -0,0 +1,39 @@ +'''OpenGL extension ARB.blend_func_extended + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.blend_func_extended to provide a more +Python-friendly API + +Overview (from the spec) + + Traditional OpenGL includes fixed-function blending that combines source + colors with the existing content of a render buffer in a variety of ways. + A number of extensions have enhanced this functionality by adding further + sources of blending weights and methods to combine them. However, the inputs + to the fixed-function blending units are constrained to a source color (as + output from fragment shading), destination color (as the current content + of the frame buffer) or constants that may be used in their place. + + This extension adds new blending functions whereby a fragment shader may + output two colors, one of which is treated as the source color, and the + other used as a blending factor for either source or destination colors. + Furthermore, this extension increases orthogonality by allowing the + SRC_ALPHA_SATURATE function to be used as the destination weight. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/blend_func_extended.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.blend_func_extended import * +from OpenGL.raw.GL.ARB.blend_func_extended import _EXTENSION_NAME + +def glInitBlendFuncExtendedARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/buffer_storage.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/buffer_storage.py new file mode 100644 index 0000000000000000000000000000000000000000..7868f86a1987064cc29b17535f2c1de04fe92160 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/buffer_storage.py @@ -0,0 +1,48 @@ +'''OpenGL extension ARB.buffer_storage + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.buffer_storage to provide a more +Python-friendly API + +Overview (from the spec) + + OpenGL has long supported buffer objects as a means of storing data + that may be used to source vertex attributes, pixel data for textures, + uniforms and other elements. In un-extended GL, buffer data stores + are mutable - that is, they may be de-allocated or resized while they + are in use. The GL_ARB_texture_storage extension added immutable storage + for texture object (and was subsequently incorporated into OpenGL 4.2). + This extension further applies the concept of immutable storage to + buffer objects. If an implementation is aware of a buffer's immutability, + it may be able to make certain assumptions or apply particular + optimizations in order to increase performance or reliability. + + Furthermore, this extension allows applications to pass additional + information about a requested allocation to the implementation which it + may use to select memory heaps, caching behavior or allocation strategies. + + Finally, this extension introduces the concept of persistent client + mappings of buffer objects, which allow clients to retain pointers to a + buffer's data store returned as the result of a mapping, and to issue + drawing commands while those mappings are in place. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/buffer_storage.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.buffer_storage import * +from OpenGL.raw.GL.ARB.buffer_storage import _EXTENSION_NAME + +def glInitBufferStorageARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glBufferStorage.data size not checked against size +glBufferStorage=wrapper.wrapper(glBufferStorage).setInputArraySize( + 'data', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/color_buffer_float.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/color_buffer_float.py new file mode 100644 index 0000000000000000000000000000000000000000..c1b5ba276c06fd831d9643c43130cabe514cf800 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/color_buffer_float.py @@ -0,0 +1,55 @@ +'''OpenGL extension ARB.color_buffer_float + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.color_buffer_float to provide a more +Python-friendly API + +Overview (from the spec) + + The standard OpenGL pipeline is based on a fixed-point pipeline. + While color components are nominally floating-point values in the + pipeline, components are frequently clamped to the range [0,1] to + accomodate the fixed-point color buffer representation and allow + for fixed-point computational hardware. + + This extension adds pixel formats or visuals with floating-point + RGBA color components and controls for clamping of color + components within the pipeline. + + For a floating-point RGBA pixel format, the size of each float + components is specified using the same attributes that are used + for defining the size of fixed-point components. 32-bit + floating-point components are in the standard IEEE float format. + 16-bit floating-point components have 1 sign bit, 5 exponent bits, + and 10 mantissa bits. + + Clamping control provides a way to disable certain color clamps + and allow programs, and the fixed-function pipeline, to deal in + unclamped colors. There are controls to modify clamping of vertex + colors, clamping of fragment colors throughout the pipeline, and + for pixel return data. + + The default state for fragment clamping is "FIXED_ONLY", which + has the behavior of clamping colors for fixed-point color buffers + and not clamping colors for floating-pont color buffers. + + Vertex colors are clamped by default. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/color_buffer_float.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.color_buffer_float import * +from OpenGL.raw.GL.ARB.color_buffer_float import _EXTENSION_NAME + +def glInitColorBufferFloatARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compatibility.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compatibility.py new file mode 100644 index 0000000000000000000000000000000000000000..b62956438bbb8942b4aafd80599d0c24042997f2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compatibility.py @@ -0,0 +1,23 @@ +'''OpenGL extension ARB.compatibility + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.compatibility to provide a more +Python-friendly API + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/compatibility.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.compatibility import * +from OpenGL.raw.GL.ARB.compatibility import _EXTENSION_NAME + +def glInitCompatibilityARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compute_variable_group_size.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compute_variable_group_size.py new file mode 100644 index 0000000000000000000000000000000000000000..d1f37e5d224834fc6f5406350fe38071f79cc1e7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compute_variable_group_size.py @@ -0,0 +1,39 @@ +'''OpenGL extension ARB.compute_variable_group_size + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.compute_variable_group_size to provide a more +Python-friendly API + +Overview (from the spec) + + This extension allows applications to write generic compute shaders that + operate on work groups with arbitrary dimensions. Instead of specifying a + fixed work group size in the compute shader, an application can use a + compute shader using the /local_size_variable/ layout qualifer to indicate + a variable work group size. When using such compute shaders, the new + command DispatchComputeGroupSizeARB should be used to specify both a work + group size and work group count. + + In this extension, compute shaders with fixed group sizes must be + dispatched by DispatchCompute and DispatchComputeIndirect. Compute + shaders with variable group sizes must be dispatched via + DispatchComputeGroupSizeARB. No support is provided in this extension for + indirect dispatch of compute shaders with a variable group size. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/compute_variable_group_size.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.compute_variable_group_size import * +from OpenGL.raw.GL.ARB.compute_variable_group_size import _EXTENSION_NAME + +def glInitComputeVariableGroupSizeARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/conservative_depth.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/conservative_depth.py new file mode 100644 index 0000000000000000000000000000000000000000..7af485c5fda13fd5634f92ba4b39e897a320d269 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/conservative_depth.py @@ -0,0 +1,39 @@ +'''OpenGL extension ARB.conservative_depth + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.conservative_depth to provide a more +Python-friendly API + +Overview (from the spec) + + There is a common optimization for hardware accelerated implementation of + OpenGL which relies on an early depth test to be run before the fragment + shader so that the shader evaluation can be skipped if the fragment ends + up being discarded because it is occluded. + + This optimization does not affect the final rendering, and is typically + possible when the fragment does not change the depth programmatically. + (i.e.: it does not write to the built-in gl_FragDepth output). There are, + however a class of operations on the depth in the shader which could + still be performed while allowing the early depth test to operate. + + This extension allows the application to pass enough information to the + GL implementation to activate such optimizations safely. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/conservative_depth.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.conservative_depth import * +from OpenGL.raw.GL.ARB.conservative_depth import _EXTENSION_NAME + +def glInitConservativeDepthARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/copy_buffer.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/copy_buffer.py new file mode 100644 index 0000000000000000000000000000000000000000..720ccfffa94c04d54823c1581b62a8702150b03b --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/copy_buffer.py @@ -0,0 +1,30 @@ +'''OpenGL extension ARB.copy_buffer + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.copy_buffer to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a mechanism to do an accelerated copy from one + buffer object to another. This may be useful to load buffer objects + in a "loading thread" while minimizing cost and synchronization effort + in the "rendering thread." + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/copy_buffer.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.copy_buffer import * +from OpenGL.raw.GL.ARB.copy_buffer import _EXTENSION_NAME + +def glInitCopyBufferARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_buffer_float.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_buffer_float.py new file mode 100644 index 0000000000000000000000000000000000000000..760802896f1e390ffa266ab1bbcab1607c0af3d9 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_buffer_float.py @@ -0,0 +1,43 @@ +'''OpenGL extension ARB.depth_buffer_float + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.depth_buffer_float to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides new texture internal formats whose depth + components are stored as 32-bit floating-point values, rather than the + normalized unsigned integers used in existing depth formats. + Floating-point depth textures support all the functionality supported for + fixed-point depth textures, including shadow mapping and rendering support + via EXT_framebuffer_object. Floating-point depth textures can store + values outside the range [0,1]. + + Additionally, this extension provides new packed depth/stencil pixel + formats (see EXT_packed_depth_stencil) that have 64-bit pixels consisting + of a 32-bit floating-point depth value, 8 bits of stencil, and 24 unused + bites. A packed depth/stencil texture internal format is also provided. + + This extension does not provide support for WGL or GLX pixel formats with + floating-point depth buffers. The existing (but not commonly used) + WGL_EXT_depth_float extension could be used for this purpose. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/depth_buffer_float.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.depth_buffer_float import * +from OpenGL.raw.GL.ARB.depth_buffer_float import _EXTENSION_NAME + +def glInitDepthBufferFloatARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_clamp.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_clamp.py new file mode 100644 index 0000000000000000000000000000000000000000..2fbc9787403b21a39779c54510f4dec046cb2807 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_clamp.py @@ -0,0 +1,54 @@ +'''OpenGL extension ARB.depth_clamp + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.depth_clamp to provide a more +Python-friendly API + +Overview (from the spec) + + Conventional OpenGL clips geometric primitives to a clip volume + with six faces, two of which are the near and far clip planes. + Clipping to the near and far planes of the clip volume ensures that + interpolated depth values (after the depth range transform) must be + in the [0,1] range. + + In some rendering applications such as shadow volumes, it is useful + to allow line and polygon primitives to be rasterized without + clipping the primitive to the near or far clip volume planes (side + clip volume planes clip normally). Without the near and far clip + planes, rasterization (pixel coverage determination) in X and Y + can proceed normally if we ignore the near and far clip planes. + The one major issue is that fragments of a primitive may extend + beyond the conventional window space depth range for depth values + (typically the range [0,1]). Rather than discarding fragments that + defy the window space depth range (effectively what near and far + plane clipping accomplish), the depth values can be clamped to the + current depth range. + + This extension provides exactly such functionality. This + functionality is useful to obviate the need for near plane capping + of stenciled shadow volumes. The functionality may also be useful + for rendering geometry "beyond" the far plane if an alternative + algorithm (rather than depth testing) for hidden surface removal is + applied to such geometry (specifically, the painter's algorithm). + Similar situations at the near clip plane can be avoided at the + near clip plane where apparently solid objects can be "seen through" + if they intersect the near clip plane. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/depth_clamp.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.depth_clamp import * +from OpenGL.raw.GL.ARB.depth_clamp import _EXTENSION_NAME + +def glInitDepthClampARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_texture.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_texture.py new file mode 100644 index 0000000000000000000000000000000000000000..151c652b3c591fd773cc607752914a5b24937a2a --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_texture.py @@ -0,0 +1,37 @@ +'''OpenGL extension ARB.depth_texture + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.depth_texture to provide a more +Python-friendly API + +Overview (from the spec) + + This is a clarification of the GL_SGIX_depth_texture extension. The + original overview follows: + + This extension defines a new depth texture format. An important + application of depth texture images is shadow casting, but separating + this from the shadow extension allows for the potential use of depth + textures in other applications such as image-based rendering or + displacement mapping. This extension does not define new depth-texture + environment functions, such as filtering or applying the depth values + computed from a texture but leaves this to other extensions, such as + the shadow extension. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/depth_texture.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.depth_texture import * +from OpenGL.raw.GL.ARB.depth_texture import _EXTENSION_NAME + +def glInitDepthTextureARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/draw_instanced.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/draw_instanced.py new file mode 100644 index 0000000000000000000000000000000000000000..e532980dbba2a2dadccb726e6b8cfedd63dc63ae --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/draw_instanced.py @@ -0,0 +1,47 @@ +'''OpenGL extension ARB.draw_instanced + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.draw_instanced to provide a more +Python-friendly API + +Overview (from the spec) + + A common use case in GL for some applications is to be able to + draw the same object, or groups of similar objects that share + vertex data, primitive count and type, multiple times. This + extension provides a means of accelerating such use cases while + restricting the number of API calls, and keeping the amount of + duplicate data to a minimum. + + This extension introduces two draw calls which are conceptually + equivalent to a series of draw calls. Each conceptual call in + this series is considered an "instance" of the actual draw call. + + This extension also introduces a read-only built-in variable to + GLSL which contains the "instance ID." This variable initially + contains 0, but increases by one after each conceptual draw call. + + By using the instance ID or multiples thereof as an index into + a uniform array containing transform data, vertex shaders can + draw multiple instances of an object with a single draw call. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/draw_instanced.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.draw_instanced import * +from OpenGL.raw.GL.ARB.draw_instanced import _EXTENSION_NAME + +def glInitDrawInstancedARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glDrawElementsInstancedARB.indices size not checked against 'count,type' +glDrawElementsInstancedARB=wrapper.wrapper(glDrawElementsInstancedARB).setInputArraySize( + 'indices', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_attrib_location.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_attrib_location.py new file mode 100644 index 0000000000000000000000000000000000000000..dc449c4cb416eae4ae03c4d0deffb1b8762d2b32 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_attrib_location.py @@ -0,0 +1,32 @@ +'''OpenGL extension ARB.explicit_attrib_location + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.explicit_attrib_location to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a method to pre-assign attribute locations to + named vertex shader inputs and color numbers to named fragment shader + outputs. This allows applications to globally assign a particular + semantic meaning, such as diffuse color or vertex normal, to a particular + attribute location without knowing how that attribute will be named in any + particular shader. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/explicit_attrib_location.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.explicit_attrib_location import * +from OpenGL.raw.GL.ARB.explicit_attrib_location import _EXTENSION_NAME + +def glInitExplicitAttribLocationARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_uniform_location.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_uniform_location.py new file mode 100644 index 0000000000000000000000000000000000000000..ed79e4a6bcb81dee54c94aa735bc6e76ff8d8432 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_uniform_location.py @@ -0,0 +1,31 @@ +'''OpenGL extension ARB.explicit_uniform_location + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.explicit_uniform_location to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a method to pre-assign uniform locations to + uniform variables in the default uniform block, including subroutine + uniforms. This allows an application to modify the uniform values without + requiring a GL query like GetUniformLocation, GetSubroutineUniformLocation + and GetSubroutineIndex. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/explicit_uniform_location.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.explicit_uniform_location import * +from OpenGL.raw.GL.ARB.explicit_uniform_location import _EXTENSION_NAME + +def glInitExplicitUniformLocationARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_coord_conventions.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_coord_conventions.py new file mode 100644 index 0000000000000000000000000000000000000000..fb1b9d4e99028f8f5f39378d6f2e913bbafc38de --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_coord_conventions.py @@ -0,0 +1,84 @@ +'''OpenGL extension ARB.fragment_coord_conventions + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.fragment_coord_conventions to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides alternative conventions for the fragment + coordinate XY location available for programmable fragment processing. + + The scope of this extension deals *only* with how the fragment + coordinate XY location appears during programming fragment processing. + Beyond the scope of this extension are coordinate conventions used + for rasterization or transformation. + + In the case of the coordinate conventions for rasterization and + transformation, some combination of the viewport, depth range, culling + state, and projection matrix state can be reconfigured to adopt other + arbitrary clip-space and window-space coordinate space conventions. + Adopting other clip-space and window-space conventions involves + adjusting existing OpenGL state. However it is non-trivial to massage + an arbitrary fragment shader or program to adopt a different + window-space coordinate system because such shaders are encoded in + various textual representations. + + The dominant 2D and 3D rendering APIs make two basic choices of + convention when locating fragments in window space. + + The two choices are: + + 1) Is the origin nearest the lower-left- or upper-left-most pixel + of the window? + + 2) Is the (x,y) location of the pixel nearest the origin at (0,0) + or (0.5,0.5)? + + OpenGL assumes a lower-left origin for window coordinates and assumes + pixel centers are located at half-pixel coordinates. This means + the XY location (0.5,0.5) corresponds to the lower-left-most pixel + in a window. + + Other window coordinate conventions exist for other rendering APIs. + X11, GDI, and Direct3D version through DirectX 9 assume an upper-left + window origin and locate pixel centers at integer XY values. + By this alternative convention, the XY location (0,0) corresponds + to the upper-left-most pixel in a window. + + Direct3D for DirectX 10 assumes an upper-left origin (as do prior + DirectX versions) yet assumes half-pixel coordinates (unlike prior + DirectX versions). By the DirectX 10 convention, the XY location + (0.5,0.5) corresponds to the upper-left-most pixel in a window. + + Fragment shaders can directly access the location of a given + processed fragment in window space. We call this location the + "fragment coordinate". + + This extension provides a means for fragment shaders written in GLSL + or OpenGL assembly extensions to specify alternative conventions + for determining the fragment coordinate value accessed during + programmable fragment processing. + + The motivation for this extension is to provide an easy, efficient + means for fragment shaders accessing a fragment's window-space + location to adopt the fragment coordinate convention for which the + shader was originally written. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/fragment_coord_conventions.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.fragment_coord_conventions import * +from OpenGL.raw.GL.ARB.fragment_coord_conventions import _EXTENSION_NAME + +def glInitFragmentCoordConventionsARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_program_shadow.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_program_shadow.py new file mode 100644 index 0000000000000000000000000000000000000000..96c6b21e9a430ea653c3380603bc9024bd00de4f --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_program_shadow.py @@ -0,0 +1,49 @@ +'''OpenGL extension ARB.fragment_program_shadow + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.fragment_program_shadow to provide a more +Python-friendly API + +Overview (from the spec) + + This extension extends ARB_fragment_program to remove + the interaction with ARB_shadow. + + This extension defines the program option + "ARB_fragment_program_shadow". + + If a fragment program specifies the option "ARB_fragment_program_shadow" + + SHADOW1D, SHADOW2D, SHADOWRECT + + are added as texture targets. When shadow map comparisons are + desired, specify the SHADOW1D, SHADOW2D, or SHADOWRECT texture + targets in texture instructions. + + Programs must assure that the comparison mode for each depth + texture (TEXTURE_COMPARE_MODE) and/or the internal texture + format (DEPTH_COMPONENT) and the targets of the texture lookup + instructions match. Otherwise, if the comparison mode + and/or the internal texture format are inconsistent with the + texture target, the results of the texture lookup are undefined. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/fragment_program_shadow.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.fragment_program_shadow import * +from OpenGL.raw.GL.ARB.fragment_program_shadow import _EXTENSION_NAME + +def glInitFragmentProgramShadowARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION + +# This extension is entirely within the fragment program functionality, +# it doesn't affect the function-level operations AFAICS. \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_shader.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_shader.py new file mode 100644 index 0000000000000000000000000000000000000000..1bbc396f677a5e661e0f32fc0e4cccdf8939d0b2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_shader.py @@ -0,0 +1,37 @@ +'''OpenGL extension ARB.fragment_shader + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.fragment_shader to provide a more +Python-friendly API + +Overview (from the spec) + + This extension adds functionality to define fragment shader objects. A + fragment shader object is a shader object (see the ARB_shader_objects + extension) that, when attached to a program object, can be compiled and + linked to produce an executable that runs on the fragment processor in + OpenGL. The fragment processor is a programmable unit that replaces the + OpenGL 1.4 fixed-function texturing, color sum and fog stages. This + extension also defines how such an executable interacts with the fixed + functionality fragment processing of OpenGL 1.4. The language used to + write fragment shaders is not discussed here. That language is defined + in the OpenGL Shading Language specification as the Fragment Shading + Language. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/fragment_shader.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.fragment_shader import * +from OpenGL.raw.GL.ARB.fragment_shader import _EXTENSION_NAME + +def glInitFragmentShaderARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_no_attachments.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_no_attachments.py new file mode 100644 index 0000000000000000000000000000000000000000..3af804723b70ac9f67d43d20fc6429b3c1612ab2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_no_attachments.py @@ -0,0 +1,73 @@ +'''OpenGL extension ARB.framebuffer_no_attachments + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.framebuffer_no_attachments to provide a more +Python-friendly API + +Overview (from the spec) + + Framebuffer objects as introduced by ARB_framebuffer_object and OpenGL 3.0 + provide a generalized mechanism for rendering to off-screen surfaces. + Each framebuffer object may have depth, stencil and zero or more color + attachments that can be written to by the GL. The size of the framebuffer + (width, height, layer count, sample count) is derived from the attachments + of that framebuffer. In unextended OpenGL 4.2, it is not legal to render + into a framebuffer object that has no attachments. Such a framebuffer + would be considered incomplete with the + FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT status. + + With OpenGL 4.2 and ARB_shader_image_load_store, fragment shaders are + capable of doing random access writes to buffer and texture memory via + image loads, stores, and atomics. This ability enables algorithms using + the conventional rasterizer to generate a collection of fragments, where + each fragment shader invocation will write its outputs to buffer or + texture memory using image stores or atomics. Such algorithms may have no + need to write color or depth values to a conventional framebuffer. + However, a framebuffer with no attachments will be considered incomplete + and no rasterization or fragment shader exectuion will occur. To avoid + such errors, an application may be required to create an otherwise + unnecessary "dummy" texture and attach it to the framebuffer (possibly + with color writes masked off). If the algorithm requires the rasterizer + to operate over a large number of pixels, this dummy texture will + needlessly consume a significant amount of memory. + + This extension enables the algorithms described above to work even with a + framebuffer with no attachments. Applications can specify default width, + height, layer count, and sample count parameters for a framebuffer object. + When a framebuffer with no attachments is bound, it will be considered + complete as long as the application has specified non-zero default width + and height parameters. For the purposes of rasterization, the framebuffer + will be considered to have a width, height, layer count, and sample count + derived from its default parameters. Framebuffers with one or more + attachments are not affected by these default parameters; the size of the + framebuffer will still be derived from the sizes of the attachments in + that case. + + Additionally, this extension provides queryable implementation-dependent + maximums for framebuffer width, height, layer count, and sample count, + which may differ from similar limits on textures and renderbuffers. These + maximums will be used to error-check the default framebuffer parameters + and also permit implementations to expose the ability to rasterize to an + attachment-less framebuffer larger than the maximum supported texture + size. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/framebuffer_no_attachments.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.framebuffer_no_attachments import * +from OpenGL.raw.GL.ARB.framebuffer_no_attachments import _EXTENSION_NAME + +def glInitFramebufferNoAttachmentsARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glGetFramebufferParameteriv.params size not checked against 'pname' +glGetFramebufferParameteriv=wrapper.wrapper(glGetFramebufferParameteriv).setInputArraySize( + 'params', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_object.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_object.py new file mode 100644 index 0000000000000000000000000000000000000000..d9211bd8957d63892baf398e3ea1be0fbb2649f9 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_object.py @@ -0,0 +1,342 @@ +'''OpenGL extension ARB.framebuffer_object + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.framebuffer_object to provide a more +Python-friendly API + +Overview (from the spec) + + ARB_framebuffer_object is an extension intended to address the following + goals: + + - Reflect FBO-related functionality found in the OpenGL 3.0 specification. + + - Integrate multiple disjoint extensions into a single ARB extension. + These extensions are: + + EXT_framebuffer_object + EXT_framebuffer_blit + EXT_framebuffer_multisample + EXT_packed_depth_stencil + + - Where appropriate, relax some of the constraints expressed by previous + FBO-related extensions. In particular the requirement of matching + attachment dimensions and component sizes has been relaxed, to allow + implementations the freedom to support more flexible usages where + possible. + + + ARB_framebuffer_object defines an interface for drawing to rendering + destinations other than the buffers provided to the GL by the + window-system. + + In this extension, these newly defined rendering destinations are + known collectively as "framebuffer-attachable images". This + extension provides a mechanism for attaching framebuffer-attachable + images to the GL framebuffer as one of the standard GL logical + buffers: color, depth, and stencil. (Attaching a + framebuffer-attachable image to the accum logical buffer is left for + a future extension to define). When a framebuffer-attachable image + is attached to the framebuffer, it is used as the source and + destination of fragment operations as described in Chapter 4. + + By allowing the use of a framebuffer-attachable image as a rendering + destination, this extension enables a form of "offscreen" rendering. + Furthermore, "render to texture" is supported by allowing the images + of a texture to be used as framebuffer-attachable images. A + particular image of a texture object is selected for use as a + framebuffer-attachable image by specifying the mipmap level, cube + map face (for a cube map texture), and layer (for a 3D texture) + that identifies the image. The "render to texture" semantics of + this extension are similar to performing traditional rendering to + the framebuffer, followed immediately by a call to CopyTexSubImage. + However, by using this extension instead, an application can achieve + the same effect, but with the advantage that the GL can usually + eliminate the data copy that would have been incurred by calling + CopyTexSubImage. + + This extension also defines a new GL object type, called a + "renderbuffer", which encapsulates a single 2D pixel image. The + image of renderbuffer can be used as a framebuffer-attachable image + for generalized offscreen rendering and it also provides a means to + support rendering to GL logical buffer types which have no + corresponding texture format (stencil, accum, etc). A renderbuffer + is similar to a texture in that both renderbuffers and textures can + be independently allocated and shared among multiple contexts. The + framework defined by this extension is general enough that support + for attaching images from GL objects other than textures and + renderbuffers could be added by layered extensions. + + To facilitate efficient switching between collections of + framebuffer-attachable images, this extension introduces another new + GL object, called a framebuffer object. A framebuffer object + contains the state that defines the traditional GL framebuffer, + including its set of images. Prior to this extension, it was the + window-system which defined and managed this collection of images, + traditionally by grouping them into a "drawable". The window-system + API's would also provide a function (i.e., wglMakeCurrent, + glXMakeCurrent, aglSetDrawable, etc.) to bind a drawable with a GL + context (as is done in the WGL_ARB_pbuffer extension). In this + extension however, this functionality is subsumed by the GL and the + GL provides the function BindFramebufferARB to bind a framebuffer + object to the current context. Later, the context can bind back to + the window-system-provided framebuffer in order to display rendered + content. + + Previous extensions that enabled rendering to a texture have been + much more complicated. One example is the combination of + ARB_pbuffer and ARB_render_texture, both of which are window-system + extensions. This combination requires calling MakeCurrent, an + operation that may be expensive, to switch between the window and + the pbuffer drawables. An application must create one pbuffer per + renderable texture in order to portably use ARB_render_texture. An + application must maintain at least one GL context per texture + format, because each context can only operate on a single + pixelformat or FBConfig. All of these characteristics make + ARB_render_texture both inefficient and cumbersome to use. + + ARB_framebuffer_object, on the other hand, is both simpler to use + and more efficient than ARB_render_texture. The + ARB_framebuffer_object API is contained wholly within the GL API and + has no (non-portable) window-system components. Under + ARB_framebuffer_object, it is not necessary to create a second GL + context when rendering to a texture image whose format differs from + that of the window. Finally, unlike the pbuffers of + ARB_render_texture, a single framebuffer object can facilitate + rendering to an unlimited number of texture objects. + + This extension differs from EXT_framebuffer_object by splitting the + framebuffer object binding point into separate DRAW and READ + bindings (incorporating functionality introduced by + EXT_framebuffer_blit). This allows copying directly from one + framebuffer to another. In addition, a new high performance blit + function is added to facilitate these blits and perform some data + conversion where allowed. + + This extension also enables usage of multisampling in conjunction with + renderbuffers (incorporating functionality from + EXT_packed_depth_stencil), as follows: + + The new operation RenderbufferStorageMultisample() allocates + storage for a renderbuffer object that can be used as a multisample + buffer. A multisample render buffer image differs from a + single-sample render buffer image in that a multisample image has a + number of SAMPLES that is greater than zero. No method is provided + for creating multisample texture images. + + All of the framebuffer-attachable images attached to a framebuffer + object must have the same number of SAMPLES or else the framebuffer + object is not "framebuffer complete". If a framebuffer object with + multisample attachments is "framebuffer complete", then the + framebuffer object behaves as if SAMPLE_BUFFERS is one. + + In traditional multisample rendering, where + DRAW_FRAMEBUFFER_BINDING is zero and SAMPLE_BUFFERS is one, the + GL spec states that "the color sample values are resolved to a + single, displayable color each time a pixel is updated." There are, + however, several modern hardware implementations that do not + actually resolve for each sample update, but instead postpones the + resolve operation to a later time and resolve a batch of sample + updates at a time. This is OK as long as the implementation behaves + "as if" it had resolved a sample-at-a-time. Unfortunately, however, + honoring the "as if" rule can sometimes degrade performance. + + In contrast, when DRAW_FRAMEBUFFER_BINDING is an + application-created framebuffer object, MULTISAMPLE is enabled, and + SAMPLE_BUFFERS is one, there is no implicit per-sample-update + resolve. Instead, the application explicitly controls when the + resolve operation is performed. The resolve operation is affected + by calling BlitFramebuffer where the source is a multisample + application-created framebuffer object and the destination is a + single-sample framebuffer object (either application-created or + window-system provided). + + This design for multisample resolve more closely matches current + hardware, but still permits implementations which choose to resolve + a single sample at a time. If hardware that implements the + multisample resolution "one sample at a time" exposes + ARB_framebuffer_object, it could perform the implicit resolve + to a driver-managed hidden surface, then read from that surface when + the application calls BlitFramebuffer. + + Another motivation for granting the application explicit control + over the multisample resolve operation has to do with the + flexibility afforded by ARB_framebuffer_object. Previously, a + drawable (window or pbuffer) had exclusive access to all of its + buffers. There was no mechanism for sharing a buffer across + multiple drawables. Under ARB_framebuffer_object, however, a + mechanism exists for sharing a framebuffer-attachable image across + several framebuffer objects, as well as sharing an image between a + framebuffer object and a texture. If we had retained the "implicit" + resolve from traditional multisampled rendering, and allowed the + creation of "multisample" format renderbuffers, then this type of + sharing would have lead to two problematic situations: + + * Two contexts, which shared renderbuffers, might perform + competing resolve operations into the same single-sample buffer + with ambiguous results. + + * It would have introduced the unfortunate ability to use the + single-sample buffer as a texture while MULTISAMPLE is ENABLED. + + Using BlitFramebuffer as an explicit resolve to serialize access to + the multisampled contents and eliminate the implicit per-sample + resolve operation, we avoid both of these problems. + + This extension also enables usage of packed depth-stencil formats in + renderbuffers (incorporating functionality from + EXT_packed_depth_stencil), as follows: + + Many OpenGL implementations have chosen to interleave the depth and + stencil buffers into one buffer, often with 24 bits of depth + precision and 8 bits of stencil data. 32 bits is more than is + needed for the depth buffer much of the time; a 24-bit depth buffer, + on the other hand, requires that reads and writes of depth data be + unaligned with respect to power-of-two boundaries. On the other + hand, 8 bits of stencil data is more than sufficient for most + applications, so it is only natural to pack the two buffers into a + single buffer with both depth and stencil data. OpenGL never + provides direct access to the buffers, so the OpenGL implementation + can provide an interface to applications where it appears the one + merged buffer is composed of two logical buffers. + + One disadvantage of this scheme is that OpenGL lacks any means by + which this packed data can be handled efficiently. For example, + when an application reads from the 24-bit depth buffer, using the + type GL_UNSIGNED_SHORT will lose 8 bits of data, while + GL_UNSIGNED_INT has 8 too many. Both require expensive format + conversion operations. A 24-bit format would be no more suitable, + because it would also suffer from the unaligned memory accesses that + made the standalone 24-bit depth buffer an unattractive proposition + in the first place. + + Many applications, such as parallel rendering applications, may also + wish to draw to or read back from both the depth and stencil buffers + at the same time. Currently this requires two separate operations, + reducing performance. Since the buffers are interleaved, drawing to + or reading from both should be no more expensive than using just + one; in some cases, it may even be cheaper. + + This extension provides a new data format, GL_DEPTH_STENCIL, + that can be used with the glDrawPixels, glReadPixels, and + glCopyPixels commands, as well as a packed data type, + GL_UNSIGNED_INT_24_8, that is meant to be used with + GL_DEPTH_STENCIL. No other data types are supported with + GL_DEPTH_STENCIL. If ARB_depth_texture or SGIX_depth_texture is + supported, GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8 data can + also be used for textures; this provides a more efficient way to + supply data for a 24-bit depth texture. + + GL_DEPTH_STENCIL data, when passed through the pixel path, + undergoes both depth and stencil operations. The depth data is + scaled and biased by the current GL_DEPTH_SCALE and GL_DEPTH_BIAS, + while the stencil data is shifted and offset by the current + GL_INDEX_SHIFT and GL_INDEX_OFFSET. The stencil data is also put + through the stencil-to-stencil pixel map. + + glDrawPixels of GL_DEPTH_STENCIL data operates similarly to that + of GL_STENCIL_INDEX data, bypassing the OpenGL fragment pipeline + entirely, unlike the treatment of GL_DEPTH_COMPONENT data. The + stencil and depth masks are applied, as are the pixel ownership and + scissor tests, but all other operations are skipped. + + glReadPixels of GL_DEPTH_STENCIL data reads back a rectangle + from both the depth and stencil buffers. + + glCopyPixels of GL_DEPTH_STENCIL data copies a rectangle from + both the depth and stencil buffers. Like glDrawPixels, it applies + both the stencil and depth masks but skips the remainder of the + OpenGL fragment pipeline. + + glTex[Sub]Image[1,2,3]D of GL_DEPTH_STENCIL data loads depth and + stencil data into a depth_stencil texture. glGetTexImage of + GL_DEPTH_STENCIL data can be used to retrieve depth and stencil + data from a depth/stencil texture. + + In addition, a new base internal format, GL_DEPTH_STENCIL, can + be used by both texture images and renderbuffer storage. When an + image with a DEPTH_STENCIL internal format is attached to both + the depth and stencil attachment points of a framebuffer object, + then it becomes both the depth and stencil + buffers of the framebuffer. This fits nicely with hardware that + interleaves both depth and stencil data into a single buffer. When + a texture with DEPTH_STENCIL data is bound for texturing, only + the depth component is accessible through the texture fetcher. The + stencil data can be written with TexImage or CopyTexImage, and can + be read with GetTexImage. When a DEPTH_STENCIL image is + attached to the stencil attachment of the bound framebuffer object, + the stencil data can be accessed through any operation that reads + from or writes to the framebuffer's stencil buffer. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.framebuffer_object import * +from OpenGL.raw.GL.ARB.framebuffer_object import _EXTENSION_NAME + +def glInitFramebufferObjectARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glDeleteRenderbuffers.renderbuffers size not checked against n +glDeleteRenderbuffers=wrapper.wrapper(glDeleteRenderbuffers).setInputArraySize( + 'renderbuffers', None +) +glGenRenderbuffers=wrapper.wrapper(glGenRenderbuffers).setOutput( + 'renderbuffers',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +glGetRenderbufferParameteriv=wrapper.wrapper(glGetRenderbufferParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +# INPUT glDeleteFramebuffers.framebuffers size not checked against n +glDeleteFramebuffers=wrapper.wrapper(glDeleteFramebuffers).setInputArraySize( + 'framebuffers', None +) +glGenFramebuffers=wrapper.wrapper(glGenFramebuffers).setOutput( + 'framebuffers',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +glGetFramebufferAttachmentParameteriv=wrapper.wrapper(glGetFramebufferAttachmentParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION +from OpenGL.lazywrapper import lazy as _lazy + +glGenFramebuffers = wrapper.wrapper(glGenFramebuffers).setOutput( + 'framebuffers', + lambda x: (x,), + 'n', orPassIn=True) + +glGenRenderbuffers = wrapper.wrapper(glGenRenderbuffers).setOutput( + 'renderbuffers', + lambda x: (x,), + 'n', orPassIn=True) + + +@_lazy( glDeleteFramebuffers ) +def glDeleteFramebuffers( baseOperation, n, framebuffers=None ): + """glDeleteFramebuffers( framebuffers ) -> None + """ + if framebuffers is None: + framebuffers = arrays.GLuintArray.asArray( n ) + n = arrays.GLuintArray.arraySize( framebuffers ) + return baseOperation( n, framebuffers ) + +# Setup the GL_UNSIGNED_INT_24_8 image type +from OpenGL import images +from OpenGL.raw.GL.VERSION.GL_1_1 import GL_UNSIGNED_INT +images.TYPE_TO_ARRAYTYPE[ GL_UNSIGNED_INT_24_8 ] = GL_UNSIGNED_INT +images.TIGHT_PACK_FORMATS[ GL_UNSIGNED_INT_24_8 ] = 4 + +# The extensions actually use the _EXT forms, which is a bit confusing +# for users, IMO. +GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = constant.Constant( 'GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS', 0x8CD9 ) +GL_FRAMEBUFFER_INCOMPLETE_FORMATS = constant.Constant( 'GL_FRAMEBUFFER_INCOMPLETE_FORMATS', 0x8CDA ) +GL_FRAMEBUFFER_UNSUPPORTED = constant.Constant( 'GL_FRAMEBUFFER_UNSUPPORTED', 0x8CDD ) +del images +del GL_UNSIGNED_INT diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_sRGB.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_sRGB.py new file mode 100644 index 0000000000000000000000000000000000000000..63423ddd549cc5eded940e917097e9532d4e07c7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_sRGB.py @@ -0,0 +1,55 @@ +'''OpenGL extension ARB.framebuffer_sRGB + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.framebuffer_sRGB to provide a more +Python-friendly API + +Overview (from the spec) + + Conventionally, OpenGL assumes framebuffer color components are stored + in a linear color space. In particular, framebuffer blending is a + linear operation. + + The sRGB color space is based on typical (non-linear) monitor + characteristics expected in a dimly lit office. It has been + standardized by the International Electrotechnical Commission (IEC) + as IEC 61966-2-1. The sRGB color space roughly corresponds to 2.2 + gamma correction. + + This extension adds a framebuffer capability for sRGB framebuffer + update and blending. When blending is disabled but the new sRGB + updated mode is enabled (assume the framebuffer supports the + capability), high-precision linear color component values for red, + green, and blue generated by fragment coloring are encoded for sRGB + prior to being written into the framebuffer. When blending is enabled + along with the new sRGB update mode, red, green, and blue framebuffer + color components are treated as sRGB values that are converted to + linear color values, blended with the high-precision color values + generated by fragment coloring, and then the blend result is encoded + for sRGB just prior to being written into the framebuffer. + + The primary motivation for this extension is that it allows OpenGL + applications to render into a framebuffer that is scanned to a monitor + configured to assume framebuffer color values are sRGB encoded. + This assumption is roughly true of most PC monitors with default + gamma correction. This allows applications to achieve faithful + color reproduction for OpenGL rendering without adjusting the + monitor's gamma correction. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.framebuffer_sRGB import * +from OpenGL.raw.GL.ARB.framebuffer_sRGB import _EXTENSION_NAME + +def glInitFramebufferSrgbARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/geometry_shader4.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/geometry_shader4.py new file mode 100644 index 0000000000000000000000000000000000000000..07fc8ade464dab37b6f1f2c10799728454ca8113 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/geometry_shader4.py @@ -0,0 +1,53 @@ +'''OpenGL extension ARB.geometry_shader4 + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.geometry_shader4 to provide a more +Python-friendly API + +Overview (from the spec) + + ARB_geometry_shader4 defines a new shader type available to be run on the + GPU, called a geometry shader. Geometry shaders are run after vertices are + transformed, but prior to color clamping, flat shading and clipping. + + A geometry shader begins with a single primitive (point, line, + triangle). It can read the attributes of any of the vertices in the + primitive and use them to generate new primitives. A geometry shader has a + fixed output primitive type (point, line strip, or triangle strip) and + emits vertices to define a new primitive. A geometry shader can emit + multiple disconnected primitives. The primitives emitted by the geometry + shader are clipped and then processed like an equivalent OpenGL primitive + specified by the application. + + Furthermore, ARB_geometry_shader4 provides four additional primitive + types: lines with adjacency, line strips with adjacency, separate + triangles with adjacency, and triangle strips with adjacency. Some of the + vertices specified in these new primitive types are not part of the + ordinary primitives, instead they represent neighboring vertices that are + adjacent to the two line segment end points (lines/strips) or the three + triangle edges (triangles/tstrips). These vertices can be accessed by + geometry shaders and used to match up the vertices emitted by the geometry + shader with those of neighboring primitives. + + Since geometry shaders expect a specific input primitive type, an error + will occur if the application presents primitives of a different type. + For example, if a geometry shader expects points, an error will occur at + Begin() time, if a primitive mode of TRIANGLES is specified. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.geometry_shader4 import * +from OpenGL.raw.GL.ARB.geometry_shader4 import _EXTENSION_NAME + +def glInitGeometryShader4ARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/imaging.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/imaging.py new file mode 100644 index 0000000000000000000000000000000000000000..5733eb2b130c6f4e69816d43daeb20c8c2916f06 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/imaging.py @@ -0,0 +1,225 @@ +'''OpenGL extension ARB.imaging + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.imaging to provide a more +Python-friendly API + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/imaging.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.imaging import * +from OpenGL.raw.GL.ARB.imaging import _EXTENSION_NAME + +def glInitImagingARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glColorTable.table size not checked against 'format,type,width' +glColorTable=wrapper.wrapper(glColorTable).setInputArraySize( + 'table', None +) +# INPUT glColorTableParameterfv.params size not checked against 'pname' +glColorTableParameterfv=wrapper.wrapper(glColorTableParameterfv).setInputArraySize( + 'params', None +) +# INPUT glColorTableParameteriv.params size not checked against 'pname' +glColorTableParameteriv=wrapper.wrapper(glColorTableParameteriv).setInputArraySize( + 'params', None +) +# OUTPUT glGetColorTable.table COMPSIZE(target,format,type) +glGetColorTableParameterfv=wrapper.wrapper(glGetColorTableParameterfv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetColorTableParameteriv=wrapper.wrapper(glGetColorTableParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +# INPUT glColorSubTable.data size not checked against 'format,type,count' +glColorSubTable=wrapper.wrapper(glColorSubTable).setInputArraySize( + 'data', None +) +# INPUT glConvolutionFilter1D.image size not checked against 'format,type,width' +glConvolutionFilter1D=wrapper.wrapper(glConvolutionFilter1D).setInputArraySize( + 'image', None +) +# INPUT glConvolutionFilter2D.image size not checked against 'format,type,width,height' +glConvolutionFilter2D=wrapper.wrapper(glConvolutionFilter2D).setInputArraySize( + 'image', None +) +# INPUT glConvolutionParameterfv.params size not checked against 'pname' +glConvolutionParameterfv=wrapper.wrapper(glConvolutionParameterfv).setInputArraySize( + 'params', None +) +# INPUT glConvolutionParameteriv.params size not checked against 'pname' +glConvolutionParameteriv=wrapper.wrapper(glConvolutionParameteriv).setInputArraySize( + 'params', None +) +# OUTPUT glGetConvolutionFilter.image COMPSIZE(target,format,type) +glGetConvolutionParameterfv=wrapper.wrapper(glGetConvolutionParameterfv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetConvolutionParameteriv=wrapper.wrapper(glGetConvolutionParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +# OUTPUT glGetSeparableFilter.column COMPSIZE(target,format,type) +# OUTPUT glGetSeparableFilter.span COMPSIZE(target,format,type) +# OUTPUT glGetSeparableFilter.row COMPSIZE(target,format,type) +# INPUT glSeparableFilter2D.column size not checked against 'target,format,type,height' +# INPUT glSeparableFilter2D.row size not checked against 'target,format,type,width' +glSeparableFilter2D=wrapper.wrapper(glSeparableFilter2D).setInputArraySize( + 'column', None +).setInputArraySize( + 'row', None +) +# OUTPUT glGetHistogram.values COMPSIZE(target,format,type) +glGetHistogramParameterfv=wrapper.wrapper(glGetHistogramParameterfv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetHistogramParameteriv=wrapper.wrapper(glGetHistogramParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +# OUTPUT glGetMinmax.values COMPSIZE(target,format,type) +glGetMinmaxParameterfv=wrapper.wrapper(glGetMinmaxParameterfv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetMinmaxParameteriv=wrapper.wrapper(glGetMinmaxParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION +from OpenGL.GL import images +from OpenGL.lazywrapper import lazy as _lazy +glColorTable = images.setDimensionsAsInts( + images.setImageInput( + glColorTable, + pixelName = 'table', + typeName = 'type', + ) +) +glColorSubTable = images.setDimensionsAsInts( + images.setImageInput( + glColorSubTable, + pixelName = 'data', + ) +) +glSeparableFilter2D = images.setDimensionsAsInts( + images.setImageInput( + images.setImageInput( + glSeparableFilter2D, + pixelName = 'row', + typeName = 'type', + ), + pixelName = 'column', + typeName = 'type', + ) +) +glConvolutionFilter1D = images.setDimensionsAsInts( + images.setImageInput( + glConvolutionFilter1D, + pixelName = 'image', + typeName = 'type', + ) +) +glConvolutionFilter2D = images.setDimensionsAsInts( + images.setImageInput( + glConvolutionFilter2D, + pixelName = 'image', + typeName = 'type', + ) +) + +@_lazy( glGetConvolutionFilter ) +def glGetConvolutionFilter( baseFunction, target, format, type ): + """Retrieve 1 or 2D convolution parameter "kernels" as pixel data""" + dims = ( + glGetConvolutionParameteriv( target, GL_CONVOLUTION_WIDTH )[0], + ) + if target != GL_CONVOLUTION_1D: + dims += ( + glGetConvolutionParameteriv( target, GL_CONVOLUTION_HEIGHT )[0], + ) + # is it always 4? Seems to be, but the spec/man-page isn't really clear about it... + dims += (4,) + array = images.images.SetupPixelRead( format, dims, type ) + arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ + images.images.TYPE_TO_ARRAYTYPE.get(type,type) + ] + baseFunction( + target, format, type, + ctypes.c_void_p( arrayType.dataPointer(array)) + ) + return array +@_lazy( glGetSeparableFilter ) +def glGetSeparableFilter( baseFunction, target, format, type ): + """Retrieve 2 1D convolution parameter "kernels" as pixel data""" + rowDims = ( + glGetConvolutionParameteriv( GL_CONVOLUTION_WIDTH )[0], + 4, + ) + columnDims = ( + glGetConvolutionParameteriv( GL_CONVOLUTION_HEIGHT )[0], + 4, + ) + arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ + images.images.TYPE_TO_ARRAYTYPE.get(type,type) + ] + row = images.images.SetupPixelRead( format, rowDims, type ) + column = images.images.SetupPixelRead( format, columnDims, type ) + baseFunction( + target, format, type, + ctypes.c_void_p( arrayType.dataPointer(row)), + ctypes.c_void_p( arrayType.dataPointer(column)), + None # span + ) + return row, column +@_lazy( glGetColorTable ) +def glGetColorTable( baseFunction, target, format, type ): + """Retrieve the current 1D color table as a bitmap""" + dims = ( + glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH), + 4, # Grr, spec *seems* to say that it's different sizes, but it doesn't really say... + ) + array = images.images.SetupPixelRead( format, dims, type ) + arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ + images.images.TYPE_TO_ARRAYTYPE.get(type,type) + ] + baseFunction( + target, format, type, + ctypes.c_void_p( arrayType.dataPointer(array)) + ) + return array +@_lazy( glGetHistogram ) +def glGetHistogram( baseFunction, target, reset, format, type, values=None): + """Retrieve current 1D histogram as a 1D bitmap""" + if values is None: + width = glGetHistogramParameteriv( + target, + GL_HISTOGRAM_WIDTH, + ) + values = images.images.SetupPixelRead( format, (width,4), type ) + arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ + images.images.TYPE_TO_ARRAYTYPE.get(type,type) + ] + baseFunction( + target, reset, format, type, + ctypes.c_void_p( arrayType.dataPointer(values)) + ) + return values + +@_lazy( glGetMinmax ) +def glGetMinmax( baseFunction, target, reset, format, type, values=None): + """Retrieve minimum and maximum values as a 2-element image""" + if values is None: + width = 2 + values = images.images.SetupPixelRead( format, (width,4), type ) + arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ + images.images.TYPE_TO_ARRAYTYPE.get(type,type) + ] + baseFunction( + target, reset, format, type, + ctypes.c_void_p( arrayType.dataPointer(values)) + ) + return values diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/indirect_parameters.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/indirect_parameters.py new file mode 100644 index 0000000000000000000000000000000000000000..0cee9714c23548e0a8edd276e055fca093b7d3b4 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/indirect_parameters.py @@ -0,0 +1,46 @@ +'''OpenGL extension ARB.indirect_parameters + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.indirect_parameters to provide a more +Python-friendly API + +Overview (from the spec) + + OpenGL 4.3 (with the introduction of the GL_ARB_multi_draw_indirect + extension) enhanced the ability of OpenGL to allow a large sets of + parameters for indirect draws (introduced with OpenGL 4.0) into a buffer + object and dispatch the entire list with one API call. This allows, for + example, a shader (such as a compute shader via shader storage buffers, + or a geometry shader via transform feedback) to produce lists of draw + commands that can then be consumed by OpenGL without a server-client + round trip. However, when a variable and potentially unknown number of + draws are produced by such a shader, it becomes difficult to know how + many draws are in the output array(s). Applications must resort to + techniques such as transform feedback primitive queries, or mapping + buffers containing the content of atomic counters, which can cause stalls + or bubbles in the OpenGL pipeline. + + This extension introduces the concept of the "parameter buffer", which + is a target allowing buffers to store parameters for certain drawing + commands. Also in this extension, new variants of MultiDrawArraysIndirect + and MultiDrawElementsIndirect are introduced that source some of their + parameters from this buffer. Further commands could potentially be + introduced that source other parameters from a buffer. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/indirect_parameters.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.indirect_parameters import * +from OpenGL.raw.GL.ARB.indirect_parameters import _EXTENSION_NAME + +def glInitIndirectParametersARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/map_buffer_alignment.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/map_buffer_alignment.py new file mode 100644 index 0000000000000000000000000000000000000000..1affe26f27f0cd3babb54b83f14c44e30c16b9f7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/map_buffer_alignment.py @@ -0,0 +1,30 @@ +'''OpenGL extension ARB.map_buffer_alignment + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.map_buffer_alignment to provide a more +Python-friendly API + +Overview (from the spec) + + This extension adds a requirement to the pointer returned by MapBuffer + and MapBufferRange that they provide a minimum of 64 byte alignment to + support processing of the data directly with special CPU instructions + like SSE and AVX. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/map_buffer_alignment.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.map_buffer_alignment import * +from OpenGL.raw.GL.ARB.map_buffer_alignment import _EXTENSION_NAME + +def glInitMapBufferAlignmentARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/occlusion_query.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/occlusion_query.py new file mode 100644 index 0000000000000000000000000000000000000000..ca6596c30781f53b24f636a682654073bcf7798f --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/occlusion_query.py @@ -0,0 +1,138 @@ +'''OpenGL extension ARB.occlusion_query + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.occlusion_query to provide a more +Python-friendly API + +Overview (from the spec) + + This extension defines a mechanism whereby an application can query + the number of pixels (or, more precisely, samples) drawn by a + primitive or group of primitives. + + The primary purpose of such a query (hereafter referred to as an + "occlusion query") is to determine the visibility of an object. + Typically, the application will render the major occluders in the + scene, then perform an occlusion query for the bounding box of each + detail object in the scene. Only if said bounding box is visible, + i.e., if at least one sample is drawn, should the corresponding object + be drawn. + + The earlier HP_occlusion_test extension defined a similar mechanism, + but it had two major shortcomings. + + - It returned the result as a simple GL_TRUE/GL_FALSE result, when in + fact it is often useful to know exactly how many samples were + drawn. + - It provided only a simple "stop-and-wait" model for using multiple + queries. The application begins an occlusion test and ends it; + then, at some later point, it asks for the result, at which point + the driver must stop and wait until the result from the previous + test is back before the application can even begin the next one. + This is a very simple model, but its performance is mediocre when + an application wishes to perform many queries, and it eliminates + most of the opportunities for parallelism between the CPU and GPU. + + This extension solves both of those problems. It returns as its + result the number of samples that pass the depth and stencil tests, + and it encapsulates occlusion queries in "query objects" that allow + applications to issue many queries before asking for the result of + any one. As a result, they can overlap the time it takes for the + occlusion query results to be returned with other, more useful work, + such as rendering other parts of the scene or performing other + computations on the CPU. + + There are many situations where a pixel/sample count, rather than a + boolean result, is useful. + + - Objects that are visible but cover only a very small number of + pixels can be skipped at a minimal reduction of image quality. + - Knowing exactly how many pixels an object might cover may help the + application decide which level-of-detail model should be used. If + only a few pixels are visible, a low-detail model may be + acceptable. + - "Depth peeling" techniques, such as order-independent transparency, + need to know when to stop rendering more layers; it is difficult to + determine a priori how many layers are needed. A boolean result + allows applications to stop when more layers will not affect the + image at all, but this will likely result in unacceptable + performance. Instead, it makes more sense to stop rendering when + the number of pixels in each layer falls below a given threshold. + - Occlusion queries can replace glReadPixels of the depth buffer to + determine whether (for example) a light source is visible for the + purposes of a lens flare effect or a halo to simulate glare. Pixel + counts allow you to compute the percentage of the light source that + is visible, and the brightness of these effects can be modulated + accordingly. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/occlusion_query.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.occlusion_query import * +from OpenGL.raw.GL.ARB.occlusion_query import _EXTENSION_NAME + +def glInitOcclusionQueryARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glGenQueriesARB=wrapper.wrapper(glGenQueriesARB).setOutput( + 'ids',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +# INPUT glDeleteQueriesARB.ids size not checked against n +glDeleteQueriesARB=wrapper.wrapper(glDeleteQueriesARB).setInputArraySize( + 'ids', None +) +glGetQueryivARB=wrapper.wrapper(glGetQueryivARB).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetQueryObjectivARB=wrapper.wrapper(glGetQueryObjectivARB).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetQueryObjectuivARB=wrapper.wrapper(glGetQueryObjectuivARB).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION +from OpenGL.lazywrapper import lazy as _lazy +from OpenGL.GL import glget +from OpenGL import converters +@_lazy( glDeleteQueriesARB ) +def glDeleteQueriesARB( baseOperation, n, ids=None ): + """Delete the given queries + + n -- either the number of queries to delete, or an array of query values + ids -- if provided, the array/pointer to the queries to delete + """ + if ids is None: + ids = arrays.GLuintArray.asArray( n ) + n = arrays.GLuintArray.arraySize( ids ) + else: + ids = arrays.GLuintArray.asArray( ids ) + return baseOperation( n,ids ) +@_lazy( glGenQueriesARB ) +def glGenQueriesARB( baseOperation, n, ids=None ): + """Generate n queries, if ids is None, is allocated + + returns array of ids + """ + if ids is None: + ids = arrays.GLuintArray.zeros( (n,)) + else: + ids = arrays.GLuintArray.asArray( ids ) + baseOperation( n, ids ) + return ids + +for func in ( + 'glGetQueryivARB','glGetQueryObjectivARB','glGetQueryObjectuivARB', +): + globals()[func] = wrapper.wrapper(globals()[func]).setOutput( + "params", (1,), orPassIn=True + ) +try: + del func, glget +except NameError as err: + pass diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/program_interface_query.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/program_interface_query.py new file mode 100644 index 0000000000000000000000000000000000000000..dba1c0c7f51a6d0bf499360f6b028aec014e11b2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/program_interface_query.py @@ -0,0 +1,89 @@ +'''OpenGL extension ARB.program_interface_query + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.program_interface_query to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a single unified set of query commands that can be + used by applications to determine properties of various interfaces and + resources used by program objects to communicate with application code, + fixed-function OpenGL pipeline stages, and other programs. In unextended + OpenGL 4.2, there is a separate set of query commands for each different + type of interface or resource used by the program. These different sets + of queries are structured nearly identically, but the queries for some + interfaces have limited capability (e.g., there is no ability to enumerate + fragment shader outputs). + + With the single set of query commands provided by this extension, a + consistent set of queries is available for all interfaces, and a new + interface can be added without having to introduce a completely new set of + query commands. These queries are intended to provide a superset of the + capabilities provided by similar queries in OpenGL 4.2, and should allow + for the deprecation of the existing queries. + + This extension defines two terms: interfaces and active resources. Each + interface of a program object provides a way for the program to + communicate with application code, fixed-function OpenGL pipeline stages, + and other programs. Examples of interfaces for a program object include + inputs (receiving values from vertex attributes or outputs of other + programs), outputs (sending values to other programs or per-fragment + operations), uniforms (receiving values from API calls), uniform blocks + (receiving values from bound buffer objects), subroutines and subroutine + uniforms (receiving API calls to indicate functions to call during program + execution), and atomic counter buffers (holding values to be manipulated + by atomic counter shader functions). Each interface of a program has a + set of active resources used by the program. For example, the resources + of a program's input interface includes all active input variables used by + the first stage of the program. The resources of a program's uniform + block interface consists of the set of uniform blocks with at least one + member used by any shader in the program. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/program_interface_query.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.program_interface_query import * +from OpenGL.raw.GL.ARB.program_interface_query import _EXTENSION_NAME + +def glInitProgramInterfaceQueryARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glGetProgramInterfaceiv.params size not checked against 'pname' +glGetProgramInterfaceiv=wrapper.wrapper(glGetProgramInterfaceiv).setInputArraySize( + 'params', None +) +# INPUT glGetProgramResourceIndex.name size not checked against 'name' +glGetProgramResourceIndex=wrapper.wrapper(glGetProgramResourceIndex).setInputArraySize( + 'name', None +) +# INPUT glGetProgramResourceName.name size not checked against bufSize +glGetProgramResourceName=wrapper.wrapper(glGetProgramResourceName).setInputArraySize( + 'length', 1 +).setInputArraySize( + 'name', None +) +# INPUT glGetProgramResourceiv.params size not checked against bufSize +# INPUT glGetProgramResourceiv.props size not checked against propCount +glGetProgramResourceiv=wrapper.wrapper(glGetProgramResourceiv).setInputArraySize( + 'length', 1 +).setInputArraySize( + 'params', None +).setInputArraySize( + 'props', None +) +# INPUT glGetProgramResourceLocation.name size not checked against 'name' +glGetProgramResourceLocation=wrapper.wrapper(glGetProgramResourceLocation).setInputArraySize( + 'name', None +) +# INPUT glGetProgramResourceLocationIndex.name size not checked against 'name' +glGetProgramResourceLocationIndex=wrapper.wrapper(glGetProgramResourceLocationIndex).setInputArraySize( + 'name', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/provoking_vertex.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/provoking_vertex.py new file mode 100644 index 0000000000000000000000000000000000000000..c9e9d67b041e1078adcf1f46f352d8b85dcc3233 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/provoking_vertex.py @@ -0,0 +1,52 @@ +'''OpenGL extension ARB.provoking_vertex + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.provoking_vertex to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides an alternative provoking vertex convention + for rendering lines, triangles, and (optionally depending on the + implementation) quads. + + The provoking vertex of a primitive is the vertex that determines the + constant primary and secondary colors when flat shading is enabled. + + In OpenGL, the provoking vertex for triangle, quad, line, and + (trivially) point primitives is the last vertex used to assemble + the primitive. The polygon primitive is an exception in OpenGL where + the first vertex of a polygon primitive determines the color of the + polygon, even if actually broken into triangles and/or quads. + + See section 2.14.7 (Flatshading) of the OpenGL 2.1 specification, + particularly Table 2.12 for more details. + + Alternatively the provoking vertex could be the first vertex of + the primitive. Other APIs with flat-shading functionality such + as Reality Lab and Direct3D have adopted the "first vertex of the + primitive" convention to determine the provoking vertex. However, + these APIs lack quads so do not have a defined provoking vertex + convention for quads. + + The motivation for this extension is to allow applications developed + for APIs with a "first vertex of the primitive" provoking vertex to + be easily converted to OpenGL. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/provoking_vertex.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.provoking_vertex import * +from OpenGL.raw.GL.ARB.provoking_vertex import _EXTENSION_NAME + +def glInitProvokingVertexARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/robustness_isolation.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/robustness_isolation.py new file mode 100644 index 0000000000000000000000000000000000000000..12023a58c0443bc7ef1bae7a521a30733bd24d4e --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/robustness_isolation.py @@ -0,0 +1,40 @@ +'''OpenGL extension ARB.robustness_isolation + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.robustness_isolation to provide a more +Python-friendly API + +Overview (from the spec) + + GL_ARB_robustness and supporting window system extensions allow + creating an OpenGL context supporting graphics reset notification + behavior. GL_ARB_robustness_isolation provides stronger + guarantees about the possible side-effects of a graphics reset. + + It is expected that there may be a performance cost associated + with isolating an application or share group from other contexts + on the GPU. For this reason, GL_ARB_robustness_isolation is + phrased as an opt-in mechanism, with a new context creation bit + defined in the window system bindings. It is expected that + implementations might only advertise the strings in this extension + if both the implementation supports the desired isolation + properties, and the context was created with the appropriate reset + isolation bit. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/robustness_isolation.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.robustness_isolation import * +from OpenGL.raw.GL.ARB.robustness_isolation import _EXTENSION_NAME + +def glInitRobustnessIsolationARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sample_shading.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sample_shading.py new file mode 100644 index 0000000000000000000000000000000000000000..fa80b7c868f21a770fb89c8a28c09511f8e7ceab --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sample_shading.py @@ -0,0 +1,50 @@ +'''OpenGL extension ARB.sample_shading + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.sample_shading to provide a more +Python-friendly API + +Overview (from the spec) + + In standard multisample rendering, an implementation is allowed to + assign the same color and texture coordinate values to each sample, + which then allows the optimization where the shader is only + evaluated once and then distributed to the samples that have been + determined to be covered by the primitive currently being + rasterized. This can cause aliasing where the input color and + texture coordinates are used to generate a result that doesn't + antialias itself, for example with alpha-tested transparency. + + This extension adds the ability to explicitly request that an + implementation use a minimum number of unique set of fragment + computation inputs when multisampling a pixel. Specifying such a + requirement can reduce aliasing that results from evaluating the + fragment computations too few times per pixel. + + This extension adds new global state that controls the minimum + number of samples for which attribute data is independently + interpolated. When enabled, all operations that were traditionally + executed per-fragment operate independently on each sample. + + This also extends the shading language to allow control over the + sample being processed. This includes built-in fragment input + variables identifying the sample number and position being processed + when executing fragment shaders per sample. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/sample_shading.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.sample_shading import * +from OpenGL.raw.GL.ARB.sample_shading import _EXTENSION_NAME + +def glInitSampleShadingARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sampler_objects.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sampler_objects.py new file mode 100644 index 0000000000000000000000000000000000000000..5da9b2bae95be2979481674cf90f5e7a0ea9c67e --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sampler_objects.py @@ -0,0 +1,86 @@ +'''OpenGL extension ARB.sampler_objects + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.sampler_objects to provide a more +Python-friendly API + +Overview (from the spec) + + In unextended OpenGL textures are considered to be sets of image + data (mip-chains, arrays, cube-map face sets, etc.) and sampling + state (sampling mode, mip-mapping state, coordinate wrapping and + clamping rules, etc.) combined into a single object. It is typical + for an application to use many textures with a limited set of + sampling states that are the same between them. In order to use + textures in this way, an application must generate and configure + many texture names, adding overhead both to applications and to + implementations. Furthermore, should an application wish to sample + from a texture in more than one way (with and without mip-mapping, + for example) it must either modify the state of the texture or + create two textures, each with a copy of the same image data. This + can introduce runtime and memory costs to the application. + + This extension separates sampler state from texture image data. A + new object type is introduced, the sampler (representing generic + sampling parameters). The new sampler objects are represented by a + new named type encapsulating the sampling parameters of a + traditional texture object. Sampler objects may be bound to texture + units to supplant the bound texture's sampling state. A single + sampler may be bound to more than one texture unit simultaneously, + allowing different textures to be accessed with a single set of + shared sampling parameters. Also, by binding different sampler + objects to texture units to which the same texture has been bound, + the same texture image data may be sampled with different sampling + parameters. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/sampler_objects.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.sampler_objects import * +from OpenGL.raw.GL.ARB.sampler_objects import _EXTENSION_NAME + +def glInitSamplerObjectsARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glGenSamplers=wrapper.wrapper(glGenSamplers).setOutput( + 'samplers',size=lambda x:(x,),pnameArg='count',orPassIn=True +) +# INPUT glDeleteSamplers.samplers size not checked against count +glDeleteSamplers=wrapper.wrapper(glDeleteSamplers).setInputArraySize( + 'samplers', None +) +# INPUT glSamplerParameteriv.param size not checked against 'pname' +glSamplerParameteriv=wrapper.wrapper(glSamplerParameteriv).setInputArraySize( + 'param', None +) +# INPUT glSamplerParameterfv.param size not checked against 'pname' +glSamplerParameterfv=wrapper.wrapper(glSamplerParameterfv).setInputArraySize( + 'param', None +) +# INPUT glSamplerParameterIiv.param size not checked against 'pname' +glSamplerParameterIiv=wrapper.wrapper(glSamplerParameterIiv).setInputArraySize( + 'param', None +) +# INPUT glSamplerParameterIuiv.param size not checked against 'pname' +glSamplerParameterIuiv=wrapper.wrapper(glSamplerParameterIuiv).setInputArraySize( + 'param', None +) +glGetSamplerParameteriv=wrapper.wrapper(glGetSamplerParameteriv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetSamplerParameterIiv=wrapper.wrapper(glGetSamplerParameterIiv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetSamplerParameterfv=wrapper.wrapper(glGetSamplerParameterfv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetSamplerParameterIuiv=wrapper.wrapper(glGetSamplerParameterIuiv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cube_map.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cube_map.py new file mode 100644 index 0000000000000000000000000000000000000000..3ede5671acb1a8b97603be54728db70542da1edd --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cube_map.py @@ -0,0 +1,45 @@ +'''OpenGL extension ARB.seamless_cube_map + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.seamless_cube_map to provide a more +Python-friendly API + +Overview (from the spec) + + When sampling from cube map textures, a three-dimensional texture + coordinate is used to select one of the cube map faces and generate + a two dimensional texture coordinate ( s t ), at which a texel is + sampled from the determined face of the cube map texture. Each face + of the texture is treated as an independent two-dimensional texture, + and the generated ( s t ) coordinate is subjected to the same + clamping and wrapping rules as for any other two dimensional texture + fetch. + + Although it is unlikely that the generated ( s t ) coordinate lies + significantly outside the determined cube map face, it is often the + case that the locations of the individual elements required during a + linear sampling do not lie within the determined face, and their + coordinates will therefore be modified by the selected clamping and + wrapping rules. This often has the effect of producing seams or + other discontinuities in the sampled texture. + + This extension allows implementations to take samples from adjacent + cube map faces, providing the ability to create seamless cube maps. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/seamless_cube_map.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.seamless_cube_map import * +from OpenGL.raw.GL.ARB.seamless_cube_map import _EXTENSION_NAME + +def glInitSeamlessCubeMapARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cubemap_per_texture.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cubemap_per_texture.py new file mode 100644 index 0000000000000000000000000000000000000000..52faf7c4ae60773f4a897a7192b8e65cf0e1affc --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cubemap_per_texture.py @@ -0,0 +1,48 @@ +'''OpenGL extension ARB.seamless_cubemap_per_texture + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.seamless_cubemap_per_texture to provide a more +Python-friendly API + +Overview (from the spec) + + In unextended OpenGL, cube maps are treated as sets of six, independent + texture images. Once a face is selected from the set, it is treated exactly + as any other two-dimensional texture would be. When sampling linearly from + the texture, all of the individual texels that would be used to to create + the final, bilinear sample values are taken from the same cube face. The + normal, two-dimensional texture coordinate wrapping modes are honored. + This sometimes causes seams to appear in cube maps. + + ARB_seamless_cube_map (and subsequently, OpenGL 3.2) addresses this issue + by providing a mechanism whereby an implementation could take each of the + taps of a bilinear sample from a different face, spanning face boundaries + and providing seamless filtering from cube map textures. However, in + ARB_seamless_cube_map, this feature was exposed as a global state, + affecting all bound cube map textures. It was not possible to mix seamless + and per-face cube map sampling modes during sampling. Furthermore, if an + application included cube maps that were meant to be sampled seamlessly + and non-seamlessly, it would have to track this state and enable or disable + seamless cube map sampling as needed. + + This extension addresses this issue and provides an orthogonal method for + allowing an implementation to provide a per-texture setting for enabling + seamless sampling from cube maps. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/seamless_cubemap_per_texture.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.seamless_cubemap_per_texture import * +from OpenGL.raw.GL.ARB.seamless_cubemap_per_texture import _EXTENSION_NAME + +def glInitSeamlessCubemapPerTextureARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/separate_shader_objects.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/separate_shader_objects.py new file mode 100644 index 0000000000000000000000000000000000000000..aa1957901a905cb8d8d609f394d4a5453c47af83 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/separate_shader_objects.py @@ -0,0 +1,230 @@ +'''OpenGL extension ARB.separate_shader_objects + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.separate_shader_objects to provide a more +Python-friendly API + +Overview (from the spec) + + Conventional GLSL requires multiple shader stages (vertex, + fragment, geometry, tessellation control, and tessellation + evaluation) to be linked into a single monolithic program object to + specify a GLSL shader for each stage. + + While GLSL's monolithic approach has some advantages for + optimizing shaders as a unit that span multiple stages, all + existing GPU hardware supports the more flexible mix-and-match + approach. + + Shaders written for HLSL9, Cg, the prior OpenGL assembly program + extensions, and game console favor a more flexible "mix-and-match" + approach to specifying shaders independently for these different + shader stages. Many developers build their shader content around + the mix-and-match approach where they can use a single vertex shader + with multiple fragment shaders (or vice versa). + + This extension adopts a "mix-and-match" shader stage model for GLSL + allowing multiple different GLSL program objects to be bound at once + each to an individual rendering pipeline stage independently of + other stage bindings. This allows program objects to contain only + the shader stages that best suit the applications needs. + + This extension introduces the program pipeline object that serves as + a container for the program bound to any particular rendering stage. + It can be bound, unbound, and rebound to simply save and restore the + complete shader stage to program object bindings. Like framebuffer + and vertex array objects, program pipeline objects are "container" + objects that are not shared between contexts. + + To bind a program object to a specific shader stage or set of + stages, UseProgramStages is used. The VERTEX_SHADER_BIT, + GEOMETRY_SHADER_BIT, FRAGMENT_SHADER_BIT, TESS_CONTROL_SHADER_BIT, + and TESS_EVALUATION_SHADER_BIT tokens refer to the conventional + vertex, geometry, fragment, tessellation control and tessellation + evaluation stages respectively. ActiveShaderProgram specifies the + program that Uniform* commands will update. + + While ActiveShaderProgram allows the use of conventional Uniform* + commands to update uniform variable values for separable program + objects, this extension provides a preferrable interface in a set + of ProgramUniform* commands that update the same uniform variables + but take a parameter indicating the program object to be updated, + rather than updating the currently active program object. These + commands mirror those introduced in EXT_direct_state_access. + + While glActiveShaderProgram provides a selector for setting and + querying uniform values of a program object, the glProgramUniform* + commands provide a selector-free way to modify uniforms of a GLSL + program object without an explicit bind. This selector-free model + reduces API overhead and provides a cleaner interface for + applications. + + Separate linking creates the possibility that certain output varyings + of a shader may go unread by the subsequent shader inputting varyings. + In this case, the output varyings are simply ignored. It is also + possible input varyings from a shader may not be written as output + varyings of a preceding shader. In this case, the unwritten input + varying values are undefined. + + This extension builds on the proof-of-concept provided by + EXT_separate_shader_objects which demonstrated that separate + shader objects can work for GLSL. EXT_separate_shader_objects + was a response to repeated requests for this functionality from + 3D developers. + + This ARB version addresses several "loose ends" in the prior + EXT extension. In particular, it allows user-defined varyings + with explicitly defined locations or implicitly assigned locations. + + This ARB extension extends the GLSL language's use of layout + qualifiers to provide cross-stage interfacing. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/separate_shader_objects.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.separate_shader_objects import * +from OpenGL.raw.GL.ARB.separate_shader_objects import _EXTENSION_NAME + +def glInitSeparateShaderObjectsARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glCreateShaderProgramv.strings size not checked against count +glCreateShaderProgramv=wrapper.wrapper(glCreateShaderProgramv).setInputArraySize( + 'strings', None +) +# INPUT glDeleteProgramPipelines.pipelines size not checked against n +glDeleteProgramPipelines=wrapper.wrapper(glDeleteProgramPipelines).setInputArraySize( + 'pipelines', None +) +glGenProgramPipelines=wrapper.wrapper(glGenProgramPipelines).setOutput( + 'pipelines',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +glGetProgramPipelineiv=wrapper.wrapper(glGetProgramPipelineiv).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glProgramUniform1iv=wrapper.wrapper(glProgramUniform1iv).setInputArraySize( + 'value', 1 +) +glProgramUniform1fv=wrapper.wrapper(glProgramUniform1fv).setInputArraySize( + 'value', 1 +) +glProgramUniform1dv=wrapper.wrapper(glProgramUniform1dv).setInputArraySize( + 'value', 1 +) +glProgramUniform1uiv=wrapper.wrapper(glProgramUniform1uiv).setInputArraySize( + 'value', 1 +) +glProgramUniform2iv=wrapper.wrapper(glProgramUniform2iv).setInputArraySize( + 'value', 2 +) +glProgramUniform2fv=wrapper.wrapper(glProgramUniform2fv).setInputArraySize( + 'value', 2 +) +glProgramUniform2dv=wrapper.wrapper(glProgramUniform2dv).setInputArraySize( + 'value', 2 +) +glProgramUniform2uiv=wrapper.wrapper(glProgramUniform2uiv).setInputArraySize( + 'value', 2 +) +glProgramUniform3iv=wrapper.wrapper(glProgramUniform3iv).setInputArraySize( + 'value', 3 +) +glProgramUniform3fv=wrapper.wrapper(glProgramUniform3fv).setInputArraySize( + 'value', 3 +) +glProgramUniform3dv=wrapper.wrapper(glProgramUniform3dv).setInputArraySize( + 'value', 3 +) +glProgramUniform3uiv=wrapper.wrapper(glProgramUniform3uiv).setInputArraySize( + 'value', 3 +) +glProgramUniform4iv=wrapper.wrapper(glProgramUniform4iv).setInputArraySize( + 'value', 4 +) +glProgramUniform4fv=wrapper.wrapper(glProgramUniform4fv).setInputArraySize( + 'value', 4 +) +glProgramUniform4dv=wrapper.wrapper(glProgramUniform4dv).setInputArraySize( + 'value', 4 +) +glProgramUniform4uiv=wrapper.wrapper(glProgramUniform4uiv).setInputArraySize( + 'value', 4 +) +glProgramUniformMatrix2fv=wrapper.wrapper(glProgramUniformMatrix2fv).setInputArraySize( + 'value', 2 +) +glProgramUniformMatrix3fv=wrapper.wrapper(glProgramUniformMatrix3fv).setInputArraySize( + 'value', 3 +) +glProgramUniformMatrix4fv=wrapper.wrapper(glProgramUniformMatrix4fv).setInputArraySize( + 'value', 4 +) +glProgramUniformMatrix2dv=wrapper.wrapper(glProgramUniformMatrix2dv).setInputArraySize( + 'value', 2 +) +glProgramUniformMatrix3dv=wrapper.wrapper(glProgramUniformMatrix3dv).setInputArraySize( + 'value', 3 +) +glProgramUniformMatrix4dv=wrapper.wrapper(glProgramUniformMatrix4dv).setInputArraySize( + 'value', 4 +) +# INPUT glProgramUniformMatrix2x3fv.value size not checked against count +glProgramUniformMatrix2x3fv=wrapper.wrapper(glProgramUniformMatrix2x3fv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix3x2fv.value size not checked against count +glProgramUniformMatrix3x2fv=wrapper.wrapper(glProgramUniformMatrix3x2fv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix2x4fv.value size not checked against count +glProgramUniformMatrix2x4fv=wrapper.wrapper(glProgramUniformMatrix2x4fv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix4x2fv.value size not checked against count +glProgramUniformMatrix4x2fv=wrapper.wrapper(glProgramUniformMatrix4x2fv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix3x4fv.value size not checked against count +glProgramUniformMatrix3x4fv=wrapper.wrapper(glProgramUniformMatrix3x4fv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix4x3fv.value size not checked against count +glProgramUniformMatrix4x3fv=wrapper.wrapper(glProgramUniformMatrix4x3fv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix2x3dv.value size not checked against count +glProgramUniformMatrix2x3dv=wrapper.wrapper(glProgramUniformMatrix2x3dv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix3x2dv.value size not checked against count +glProgramUniformMatrix3x2dv=wrapper.wrapper(glProgramUniformMatrix3x2dv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix2x4dv.value size not checked against count +glProgramUniformMatrix2x4dv=wrapper.wrapper(glProgramUniformMatrix2x4dv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix4x2dv.value size not checked against count +glProgramUniformMatrix4x2dv=wrapper.wrapper(glProgramUniformMatrix4x2dv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix3x4dv.value size not checked against count +glProgramUniformMatrix3x4dv=wrapper.wrapper(glProgramUniformMatrix3x4dv).setInputArraySize( + 'value', None +) +# INPUT glProgramUniformMatrix4x3dv.value size not checked against count +glProgramUniformMatrix4x3dv=wrapper.wrapper(glProgramUniformMatrix4x3dv).setInputArraySize( + 'value', None +) +glGetProgramPipelineInfoLog=wrapper.wrapper(glGetProgramPipelineInfoLog).setOutput( + 'length',size=(1,),orPassIn=True +).setOutput( + 'infoLog',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_bit_encoding.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_bit_encoding.py new file mode 100644 index 0000000000000000000000000000000000000000..21b02ef66561c75c7de090669dae5681b148926f --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_bit_encoding.py @@ -0,0 +1,31 @@ +'''OpenGL extension ARB.shader_bit_encoding + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shader_bit_encoding to provide a more +Python-friendly API + +Overview (from the spec) + + This extension trivially adds built-in functions for getting/setting + the bit encoding for floating-point values in the OpenGL Shading Language. + + These functions are pulled out of ARB_gpu_shader5, since support for such + built-in functions exists in current hardware. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shader_bit_encoding.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shader_bit_encoding import * +from OpenGL.raw.GL.ARB.shader_bit_encoding import _EXTENSION_NAME + +def glInitShaderBitEncodingARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_group_vote.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_group_vote.py new file mode 100644 index 0000000000000000000000000000000000000000..96c129d8ef6b3a5ff791f5c02325eca65f634461 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_group_vote.py @@ -0,0 +1,77 @@ +'''OpenGL extension ARB.shader_group_vote + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shader_group_vote to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides new built-in functions to compute the composite of + a set of boolean conditions across a group of shader invocations. These + composite results may be used to execute shaders more efficiently on a + single-instruction multiple-data (SIMD) processor. The set of shader + invocations across which boolean conditions are evaluated is + implementation-dependent, and this extension provides no guarantee over + how individual shader invocations are assigned to such sets. In + particular, the set of shader invocations has no necessary relationship + with the compute shader local work group -- a pair of shader invocations + in a single compute shader work group may end up in different sets used by + these built-ins. + + Compute shaders operate on an explicitly specified group of threads (a + local work group), but many implementations of OpenGL 4.3 will even group + non-compute shader invocations and execute them in a SIMD fashion. When + executing code like + + if (condition) { + result = do_fast_path(); + } else { + result = do_general_path(); + } + + where diverges between invocations, a SIMD implementation + might first call do_fast_path() for the invocations where is + true and leave the other invocations dormant. Once do_fast_path() + returns, it might call do_general_path() for invocations where + is false and leave the other invocations dormant. In this case, the + shader executes *both* the fast and the general path and might be better + off just using the general path for all invocations. + + This extension provides the ability to avoid divergent execution by + evaluting a condition across an entire SIMD invocation group using code + like: + + if (allInvocationsARB(condition)) { + result = do_fast_path(); + } else { + result = do_general_path(); + } + + The built-in function allInvocationsARB() will return the same value for + all invocations in the group, so the group will either execute + do_fast_path() or do_general_path(), but never both. For example, shader + code might want to evaluate a complex function iteratively by starting + with an approximation of the result and then refining the approximation. + Some input values may require a small number of iterations to generate an + accurate result (do_fast_path) while others require a larger number + (do_general_path). In another example, shader code might want to evaluate + a complex function (do_general_path) that can be greatly simplified when + assuming a specific value for one of its inputs (do_fast_path). + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shader_group_vote.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shader_group_vote import * +from OpenGL.raw.GL.ARB.shader_group_vote import _EXTENSION_NAME + +def glInitShaderGroupVoteARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_load_store.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_load_store.py new file mode 100644 index 0000000000000000000000000000000000000000..7d9da4cf845416a55557a8e627687471bb649d42 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_load_store.py @@ -0,0 +1,68 @@ +'''OpenGL extension ARB.shader_image_load_store + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shader_image_load_store to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides GLSL built-in functions allowing shaders to load + from, store to, and perform atomic read-modify-write operations to a + single level of a texture object from any shader stage. These built-in + functions are named imageLoad(), imageStore(), and imageAtomic*(), + respectively, and accept integer texel coordinates to identify the texel + accessed. The extension adds the notion of "image units" to the OpenGL + API, to which texture levels are bound for access by the GLSL built-in + functions. To allow shaders to specify the image unit to access, GLSL + provides a new set of data types ("image*") similar to samplers. Each + image variable is assigned an integer value to identify an image unit to + access, which is specified using Uniform*() APIs in a manner similar to + samplers. + + This extension also provides the capability to explicitly enable "early" + per-fragment tests, where operations like depth and stencil testing are + performed prior to fragment shader execution. In unextended OpenGL, + fragment shaders never have any side effects and implementations can + sometimes perform per-fragment tests and discard some fragments prior to + executing the fragment shader. Since this extension allows fragment + shaders to write to texture and buffer object memory using the built-in + image functions, such optimizations could lead to non-deterministic + results. To avoid this, implementations supporting this extension may not + perform such optimizations on shaders having such side effects. However, + enabling early per-fragment tests guarantees that such tests will be + performed prior to fragment shader execution, and ensures that image + stores and atomics will not be performed by fragment shader invocations + where these per-fragment tests fail. + + Finally, this extension provides both a GLSL built-in function and an + OpenGL API function allowing applications some control over the ordering + of image loads, stores, and atomics relative to other OpenGL pipeline + operations accessing the same memory. Because the extension provides the + ability to perform random accesses to texture or buffer object memory, + such accesses are not easily tracked by the OpenGL driver. To avoid the + need for heavy-handed synchronization at the driver level, this extension + requires manual synchronization. The MemoryBarrier() OpenGL API + function allows applications to specify a bitfield indicating the set of + OpenGL API operations to synchronize relative to shader memory access. + The memoryBarrier() GLSL built-in function provides a synchronization + point within a given shader invocation to ensure that all memory accesses + performed prior to the synchronization point complete prior to any started + after the synchronization point. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shader_image_load_store.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shader_image_load_store import * +from OpenGL.raw.GL.ARB.shader_image_load_store import _EXTENSION_NAME + +def glInitShaderImageLoadStoreARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_size.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_size.py new file mode 100644 index 0000000000000000000000000000000000000000..62b0c1ec8d1d48bbcf79bc76bf21376f347eebf3 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_size.py @@ -0,0 +1,27 @@ +'''OpenGL extension ARB.shader_image_size + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shader_image_size to provide a more +Python-friendly API + +Overview (from the spec) + This extension provides GLSL built-in functions allowing shaders to query + the size of an image. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shader_image_size.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shader_image_size import * +from OpenGL.raw.GL.ARB.shader_image_size import _EXTENSION_NAME + +def glInitShaderImageSizeARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_100.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_100.py new file mode 100644 index 0000000000000000000000000000000000000000..7ff639f9d7be4079d25ad95badabff92c34a5f6e --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_100.py @@ -0,0 +1,31 @@ +'''OpenGL extension ARB.shading_language_100 + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shading_language_100 to provide a more +Python-friendly API + +Overview (from the spec) + + This extension string indicates that the OpenGL Shading Language is + supported. The Shading Language is defined by a separate specification + document which can be downloaded from + + http://www.opengl.org/documentation/oglsl.html + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shading_language_100.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shading_language_100 import * +from OpenGL.raw.GL.ARB.shading_language_100 import _EXTENSION_NAME + +def glInitShadingLanguage100ARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_include.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_include.py new file mode 100644 index 0000000000000000000000000000000000000000..9f8d6d45977cb399eb751b8f6670bcea2db2dbb0 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_include.py @@ -0,0 +1,66 @@ +'''OpenGL extension ARB.shading_language_include + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shading_language_include to provide a more +Python-friendly API + +Overview (from the spec) + + This extension introduces a #include GLSL directive to allow reusing + the same shader text in multiple shaders and defines the semantics + and syntax of the names allowed in #include directives. It also + defines API mechanisms to define the named string backing a + #include. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shading_language_include.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shading_language_include import * +from OpenGL.raw.GL.ARB.shading_language_include import _EXTENSION_NAME + +def glInitShadingLanguageIncludeARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glNamedStringARB.name size not checked against namelen +# INPUT glNamedStringARB.string size not checked against stringlen +glNamedStringARB=wrapper.wrapper(glNamedStringARB).setInputArraySize( + 'name', None +).setInputArraySize( + 'string', None +) +# INPUT glDeleteNamedStringARB.name size not checked against namelen +glDeleteNamedStringARB=wrapper.wrapper(glDeleteNamedStringARB).setInputArraySize( + 'name', None +) +# INPUT glCompileShaderIncludeARB.path size not checked against count +# INPUT glCompileShaderIncludeARB.length size not checked against count +glCompileShaderIncludeARB=wrapper.wrapper(glCompileShaderIncludeARB).setInputArraySize( + 'path', None +).setInputArraySize( + 'length', None +) +# INPUT glIsNamedStringARB.name size not checked against namelen +glIsNamedStringARB=wrapper.wrapper(glIsNamedStringARB).setInputArraySize( + 'name', None +) +# INPUT glGetNamedStringARB.name size not checked against namelen +glGetNamedStringARB=wrapper.wrapper(glGetNamedStringARB).setOutput( + 'stringlen',size=(1,),orPassIn=True +).setOutput( + 'string',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True +).setInputArraySize( + 'name', None +) +# INPUT glGetNamedStringivARB.name size not checked against namelen +glGetNamedStringivARB=wrapper.wrapper(glGetNamedStringivARB).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +).setInputArraySize( + 'name', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_packing.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_packing.py new file mode 100644 index 0000000000000000000000000000000000000000..2c15b0c27b6113b3bc67a4e012fdaaf5ec605698 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_packing.py @@ -0,0 +1,43 @@ +'''OpenGL extension ARB.shading_language_packing + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shading_language_packing to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides the GLSL built-in functions to convert a 32-bit + unsigned integer holding a pair of 16-bit floating-point values to or from + a two-component floating-point vector (vec2). + + This mechanism allows GLSL shaders to read and write 16-bit floating-point + encodings (via 32-bit unsigned integers) without introducing a full set of + 16-bit floating-point data types. + + This extension also adds the GLSL built-in packing functions included in + GLSL version 4.00 and the ARB_gpu_shader5 extension which pack and unpack + vectors of small fixed-point data types into a larger scalar. By putting + these packing functions in this separate extension it allows + implementations to provide these functions in hardware that supports them + independent of the other ARB_gpu_shader5 features. + + In addition to the packing functions from ARB_gpu_shader5 this extension + also adds the missing [un]packSnorm2x16 for completeness. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shading_language_packing.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shading_language_packing import * +from OpenGL.raw.GL.ARB.shading_language_packing import _EXTENSION_NAME + +def glInitShadingLanguagePackingARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shadow_ambient.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shadow_ambient.py new file mode 100644 index 0000000000000000000000000000000000000000..65da5fca97ec91aa436ad9913705495aabf2ccee --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shadow_ambient.py @@ -0,0 +1,35 @@ +'''OpenGL extension ARB.shadow_ambient + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.shadow_ambient to provide a more +Python-friendly API + +Overview (from the spec) + + This is based on the GL_SGIX_shadow_ambient extension and is layered + upon the GL_ARB_shadow extension. + + Basically, this extension allows the user to specify the texture + value to use when the texture compare function fails. Normally + this value is zero. By allowing an arbitrary value we can get + functionality which otherwise requires an advanced texture + combine extension (such as GL_NV_register_combiners) and multiple + texture units. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/shadow_ambient.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.shadow_ambient import * +from OpenGL.raw.GL.ARB.shadow_ambient import _EXTENSION_NAME + +def glInitShadowAmbientARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sparse_texture.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sparse_texture.py new file mode 100644 index 0000000000000000000000000000000000000000..c2842918c69594ce518273ad76539709f2446844 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sparse_texture.py @@ -0,0 +1,42 @@ +'''OpenGL extension ARB.sparse_texture + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.sparse_texture to provide a more +Python-friendly API + +Overview (from the spec) + + Recent advances in application complexity and a desire for higher + resolutions have pushed texture sizes up considerably. Often, the amount + of physical memory available to a graphics processor is a limiting factor + in the performance of texture-heavy applications. Once the available + physical memory is exhausted, paging may occur bringing performance down + considerably - or worse, the application may fail. Nevertheless, the amount + of address space available to the graphics processor has increased to the + point where many gigabytes - or even terabytes of address space may be + usable even though that amount of physical memory is not present. + + This extension allows the separation of the graphics processor's address + space (reservation) from the requirement that all textures must be + physically backed (commitment). This exposes a limited form of + virtualization for textures. Use cases include sparse (or partially + resident) textures, texture paging, on-demand and delayed loading of + texture assets and application controlled level of detail. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/sparse_texture.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.sparse_texture import * +from OpenGL.raw.GL.ARB.sparse_texture import _EXTENSION_NAME + +def glInitSparseTextureARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/tessellation_shader.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/tessellation_shader.py new file mode 100644 index 0000000000000000000000000000000000000000..7e08183514d5a1d9bd9761badc3f7a1fa4f7b1d2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/tessellation_shader.py @@ -0,0 +1,95 @@ +'''OpenGL extension ARB.tessellation_shader + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.tessellation_shader to provide a more +Python-friendly API + +Overview (from the spec) + + This extension introduces new tessellation stages and two new shader types + to the OpenGL primitive processing pipeline. These pipeline stages + operate on a new basic primitive type, called a patch. A patch consists + of a fixed-size collection of vertices, each with per-vertex attributes, + plus a number of associated per-patch attributes. Tessellation control + shaders transform an input patch specified by the application, computing + per-vertex and per-patch attributes for a new output patch. A + fixed-function tessellation primitive generator subdivides the patch, and + tessellation evaluation shaders are used to compute the position and + attributes of each vertex produced by the tessellator. + + When tessellation is active, it begins by running the optional + tessellation control shader. This shader consumes an input patch and + produces a new fixed-size output patch. The output patch consists of an + array of vertices, and a set of per-patch attributes. The per-patch + attributes include tessellation levels that control how finely the patch + will be tessellated. For each patch processed, multiple tessellation + control shader invocations are performed -- one per output patch vertex. + Each tessellation control shader invocation writes all the attributes of + its corresponding output patch vertex. A tessellation control shader may + also read the per-vertex outputs of other tessellation control shader + invocations, as well as read and write shared per-patch outputs. The + tessellation control shader invocations for a single patch effectively run + as a group. A built-in barrier() function is provided to allow + synchronization points where no shader invocation will continue until all + shader invocations have reached the barrier. + + The tessellation primitive generator then decomposes a patch into a new + set of primitives using the tessellation levels to determine how finely + tessellated the output should be. The primitive generator begins with + either a triangle or a quad, and splits each outer edge of the primitive + into a number of segments approximately equal to the corresponding element + of the outer tessellation level array. The interior of the primitive is + tessellated according to elements of the inner tessellation level array. + The primitive generator has three modes: "triangles" and "quads" split a + triangular or quad-shaped patch into a set of triangles that cover the + original patch; "isolines" splits a quad-shaped patch into a set of line + strips running across the patch horizontally. Each vertex generated by + the tessellation primitive generator is assigned a (u,v) or (u,v,w) + coordinate indicating its relative location in the subdivided triangle or + quad. + + For each vertex produced by the tessellation primitive generator, the + tessellation evaluation shader is run to compute its position and other + attributes of the vertex, using its (u,v) or (u,v,w) coordinate. When + computing final vertex attributes, the tessellation evaluation shader can + also read the attributes of any of the vertices of the patch written by + the tessellation control shader. Tessellation evaluation shader + invocations are completely independent, although all invocations for a + single patch share the same collection of input vertices and per-patch + attributes. + + The tessellator operates on vertices after they have been transformed by a + vertex shader. The primitives generated by the tessellator are passed + further down the OpenGL pipeline, where they can be used as inputs to + geometry shaders, transform feedback, and the rasterizer. + + The tessellation control and evaluation shaders are both optional. If + neither shader type is present, the tessellation stage has no effect. If + no tessellation control shader is present, the input patch provided by the + application is passed directly to the tessellation primitive generator, + and a set of default tessellation level parameters is used to control + primitive generation. In this extension, patches may not be passed beyond + the tessellation evaluation shader, and an error is generated if an + application provides patches and the current program object contains no + tessellation evaluation shader. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/tessellation_shader.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.tessellation_shader import * +from OpenGL.raw.GL.ARB.tessellation_shader import _EXTENSION_NAME + +def glInitTessellationShaderARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glPatchParameterfv.values size not checked against 'pname' +glPatchParameterfv=wrapper.wrapper(glPatchParameterfv).setInputArraySize( + 'values', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_buffer_object_rgb32.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_buffer_object_rgb32.py new file mode 100644 index 0000000000000000000000000000000000000000..f2769b4db53928497917c7e4497ec7050344147d --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_buffer_object_rgb32.py @@ -0,0 +1,30 @@ +'''OpenGL extension ARB.texture_buffer_object_rgb32 + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_buffer_object_rgb32 to provide a more +Python-friendly API + +Overview (from the spec) + + This extension adds three new buffer texture formats - RGB32F, RGB32I, + and RGB32UI. This partially addresses one of the limitations of buffer + textures in the original EXT_texture_buffer_object extension and in + OpenGL 3.1, which provide no support for three-component formats. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_buffer_object_rgb32.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_buffer_object_rgb32 import * +from OpenGL.raw.GL.ARB.texture_buffer_object_rgb32 import _EXTENSION_NAME + +def glInitTextureBufferObjectRgb32ARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression.py new file mode 100644 index 0000000000000000000000000000000000000000..e9bb0b512528f3d41c6d1ae0fa598d65b2201fcf --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression.py @@ -0,0 +1,132 @@ +'''OpenGL extension ARB.texture_compression + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_compression to provide a more +Python-friendly API + +Overview (from the spec) + + Compressing texture images can reduce texture memory utilization and + improve performance when rendering textured primitives. This extension + allows OpenGL applications to use compressed texture images by providing: + + (1) A framework upon which extensions providing specific compressed + image formats can be built. + + (2) A set of generic compressed internal formats that allow + applications to specify that texture images should be stored in + compressed form without needing to code for specific compression + formats. + + An application can define compressed texture images by providing a texture + image stored in a specific compressed image format. This extension does + not define any specific compressed image formats, but it does provide the + mechanisms necessary to enable other extensions that do. + + An application can also define compressed texture images by providing an + uncompressed texture image but specifying a compressed internal format. + In this case, the GL will automatically compress the texture image using + the appropriate image format. Compressed internal formats can either be + specific (as above) or generic. Generic compressed internal formats are + not actual image formats, but are instead mapped into one of the specific + compressed formats provided by the GL (or to an uncompressed base internal + format if no appropriate compressed format is available). Generic + compressed internal formats allow applications to use texture compression + without needing to code to any particular compression algorithm. Generic + compressed formats allow the use of texture compression across a wide + range of platforms with differing compression algorithms and also allow + future GL implementations to substitute improved compression methods + transparently. + + Compressed texture images can be obtained from the GL in uncompressed form + by calling GetTexImage and in compressed form by calling + GetCompressedTexImageARB. Queried compressed images can be saved and + later reused by calling CompressedTexImage[123]DARB. Pre-compressed + texture images do not need to be processed by the GL and should + significantly improve texture loading performance relative to uncompressed + images. + + This extension does not define specific compressed image formats (e.g., + S3TC, FXT1), nor does it provide means to encode or decode such images. + To support images in a specific compressed format, a hardware vendor + would: + + (1) Provide a new extension defininig specific compressed + and tokens for TexImage[123]D, + TexSubImage[123]D, CopyTexImage[12]D, CompressedTexImage[123]DARB, + CompressedTexSubImage[123]DARB, and GetCompressedTexImageARB calls. + + (2) Specify the encoding of compressed images of that specific format. + + (3) Specify a method for deriving the size of compressed images of that + specific format, using the , , , + parameters, and (if necessary) the compressed image itself. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_compression.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_compression import * +from OpenGL.raw.GL.ARB.texture_compression import _EXTENSION_NAME + +def glInitTextureCompressionARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glCompressedTexImage3DARB.data size not checked against imageSize +glCompressedTexImage3DARB=wrapper.wrapper(glCompressedTexImage3DARB).setInputArraySize( + 'data', None +) +# INPUT glCompressedTexImage2DARB.data size not checked against imageSize +glCompressedTexImage2DARB=wrapper.wrapper(glCompressedTexImage2DARB).setInputArraySize( + 'data', None +) +# INPUT glCompressedTexImage1DARB.data size not checked against imageSize +glCompressedTexImage1DARB=wrapper.wrapper(glCompressedTexImage1DARB).setInputArraySize( + 'data', None +) +# INPUT glCompressedTexSubImage3DARB.data size not checked against imageSize +glCompressedTexSubImage3DARB=wrapper.wrapper(glCompressedTexSubImage3DARB).setInputArraySize( + 'data', None +) +# INPUT glCompressedTexSubImage2DARB.data size not checked against imageSize +glCompressedTexSubImage2DARB=wrapper.wrapper(glCompressedTexSubImage2DARB).setInputArraySize( + 'data', None +) +# INPUT glCompressedTexSubImage1DARB.data size not checked against imageSize +glCompressedTexSubImage1DARB=wrapper.wrapper(glCompressedTexSubImage1DARB).setInputArraySize( + 'data', None +) +# OUTPUT glGetCompressedTexImageARB.img COMPSIZE(target,level) +### END AUTOGENERATED SECTION +from OpenGL.GL import images + +for dimensions in (1,2,3): + for function in ('glCompressedTexImage%sDARB','glCompressedTexSubImage%sDARB'): + name = function%(dimensions,) + globals()[ name ] = images.compressedImageFunction( + globals()[ name ] + ) + try: + del name, function + except NameError as err: + pass + try: + del dimensions + except NameError as err: + pass + +if glGetCompressedTexImageARB: + def glGetCompressedTexImageARB( target, level, img=None ): + """Retrieve a compressed texture image""" + if img is None: + length = glget.glGetTexLevelParameteriv( + target, 0, + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB, + ) + img = arrays.ArrayDataType.zeros( (length,), GL_1_0.GL_UNSIGNED_BYTE ) + return glGetCompressedTexImageARB(target, 0, img); diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression_bptc.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression_bptc.py new file mode 100644 index 0000000000000000000000000000000000000000..42f677e841437d6045f3d55fd682b884fcc916a6 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression_bptc.py @@ -0,0 +1,42 @@ +'''OpenGL extension ARB.texture_compression_bptc + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_compression_bptc to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides additional texture compression functionality + specific to the BPTC and BPTC_FLOAT compressed texture formats (called BC7 + and BC6H respectively in Microsoft's DirectX API), subject to all the + requirements and limitations described by the extension + GL_ARB_texture_compression. + + Traditional block compression methods as typified by s3tc and latc + compress a block of pixels into indicies along a gradient. This works well + for smooth images, but can have quality issues along sharp edges and + strong chrominance transitions. To improve quality in these problematic + cases, the BPTC formats can divide each block into multiple partitions, + each of which are compressed using an independent gradient. + + In addition, it is desirable to directly support high dynamic range + imagery in compressed formats, which is accomplished by the BPTC_FLOAT + formats. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_compression_bptc.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_compression_bptc import * +from OpenGL.raw.GL.ARB.texture_compression_bptc import _EXTENSION_NAME + +def glInitTextureCompressionBptcARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression_rgtc.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression_rgtc.py new file mode 100644 index 0000000000000000000000000000000000000000..e6a555f330e437d8f0ca5a6bb4e14968f99c8f6b --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_compression_rgtc.py @@ -0,0 +1,44 @@ +'''OpenGL extension ARB.texture_compression_rgtc + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_compression_rgtc to provide a more +Python-friendly API + +Overview (from the spec) + + This extension introduces four new block-based texture compression + formats suited for unsigned and signed red and red-green textures + (hence the name "rgtc" for Red-Green Texture Compression). + + These formats are designed to reduce the storage requirements + and memory bandwidth required for red and red-green textures by + a factor of 2-to-1 over conventional uncompressed luminance and + luminance-alpha textures with 8-bit components (GL_LUMINANCE8 and + GL_LUMINANCE8_ALPHA8). + + The compressed signed red-green format is reasonably suited for + storing compressed normal maps. + + This extension uses the same compression format as the + EXT_texture_compression_latc extension except the color data is stored + in the red and green components rather than luminance and alpha. + Representing compressed red and green components is consistent with + the BC4 and BC5 compressed formats supported by DirectX 10. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_compression_rgtc.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_compression_rgtc import * +from OpenGL.raw.GL.ARB.texture_compression_rgtc import _EXTENSION_NAME + +def glInitTextureCompressionRgtcARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_cube_map_array.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_cube_map_array.py new file mode 100644 index 0000000000000000000000000000000000000000..c100e0c0fed3e3a12a85d8de7bca25fdb4e6e787 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_cube_map_array.py @@ -0,0 +1,51 @@ +'''OpenGL extension ARB.texture_cube_map_array + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_cube_map_array to provide a more +Python-friendly API + +Overview (from the spec) + + The GL_EXT_texture_array extension, and subsequently OpenGL 3.0 have + introduced the concept of one- and two-dimensional array textures. + An array texture is an ordered set of images with the same size and + format. Each image in an array texture has a unique level. This + extension expands texture array support to include cube map + textures. + + A cube map array texture is a 2-dimensional array texture that may + contain many cube map layers. Each cube map layer is a unique cube + map image set. Images in a cube map array have the same size and + format limitations as one- and two-dimensional array textures. A + cube map array texture is specified using TexImage3D in a similar + manner to two-dimensional arrays. Cube map array textures can be + bound to a render targets of a frame buffer object as + two-dimensional arrays are using FramebufferTextureLayer. + + When accessed by a programmable shader, a cube map array texture + acts as a single unit. The "s", "t", "r" texture coordinates are + treated as a regular cube map texture fetch. The "q" texture is + treated as an unnormalized floating-point value identifying the + layer of the cube map array texture. Cube map array texture lookups + do not filter between layers. + + This extension does not provide for the use of cube map array + textures with fixed-function fragment processing. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_cube_map_array.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_cube_map_array import * +from OpenGL.raw.GL.ARB.texture_cube_map_array import _EXTENSION_NAME + +def glInitTextureCubeMapArrayARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_env_add.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_env_add.py new file mode 100644 index 0000000000000000000000000000000000000000..e9266d1cbb905ca701a281461900d40634098d07 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_env_add.py @@ -0,0 +1,36 @@ +'''OpenGL extension ARB.texture_env_add + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_env_add to provide a more +Python-friendly API + +Overview (from the spec) + + New texture environment function ADD is supported with the following + equation: + Cv = min(1, Cf + Ct) + + New function may be specified by calling TexEnv with ADD token. + + One possible application is to add a specular highlight texture to + a Gouraud-shaded primitive to emulate Phong shading, in a single + pass. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_env_add.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_env_add import * +from OpenGL.raw.GL.ARB.texture_env_add import _EXTENSION_NAME + +def glInitTextureEnvAddARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_env_dot3.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_env_dot3.py new file mode 100644 index 0000000000000000000000000000000000000000..e8a4c4fbee85e7d27df64f68a92b173fc4f14b73 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_env_dot3.py @@ -0,0 +1,34 @@ +'''OpenGL extension ARB.texture_env_dot3 + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_env_dot3 to provide a more +Python-friendly API + +Overview (from the spec) + + Adds new operation to the texture combiner operations. + + DOT3_RGB_ARB Arg0 Arg1 + DOT3_RGBA_ARB Arg0 Arg1 + + where Arg0, Arg1 are specified by parameter of + TexEnvf, TexEnvi, TexEnvfv, and TexEnviv when the + parameter value is SOURCE0_RGB_ARB and SOURCE1_RGB_ARB. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_env_dot3.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_env_dot3 import * +from OpenGL.raw.GL.ARB.texture_env_dot3 import _EXTENSION_NAME + +def glInitTextureEnvDot3ARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_gather.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_gather.py new file mode 100644 index 0000000000000000000000000000000000000000..fd757d5cc2b89abe7d486968121cb81575d5e3e3 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_gather.py @@ -0,0 +1,32 @@ +'''OpenGL extension ARB.texture_gather + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_gather to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a new set of texture functions + (textureGather) to the shading language that determine 2x2 footprint + that are used for linear filtering in a texture lookup, and return a + vector consisting of the first component from each of the four + texels in the footprint. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_gather.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_gather import * +from OpenGL.raw.GL.ARB.texture_gather import _EXTENSION_NAME + +def glInitTextureGatherARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_mirror_clamp_to_edge.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_mirror_clamp_to_edge.py new file mode 100644 index 0000000000000000000000000000000000000000..d4dc277d7d410c1df7ac130afb67b0812b579956 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_mirror_clamp_to_edge.py @@ -0,0 +1,35 @@ +'''OpenGL extension ARB.texture_mirror_clamp_to_edge + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_mirror_clamp_to_edge to provide a more +Python-friendly API + +Overview (from the spec) + + ARB_texture_mirror_clamp_to_edge extends the set of texture wrap modes to + include an additional mode (GL_MIRROR_CLAMP_TO_EDGE) that effectively uses + a texture map twice as large as the original image in which the additional + half of the new image is a mirror image of the original image. + + This new mode relaxes the need to generate images whose opposite edges + match by using the original image to generate a matching "mirror image". + This mode allows the texture to be mirrored only once in the negative + s, t, and r directions. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_mirror_clamp_to_edge.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_mirror_clamp_to_edge import * +from OpenGL.raw.GL.ARB.texture_mirror_clamp_to_edge import _EXTENSION_NAME + +def glInitTextureMirrorClampToEdgeARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_mirrored_repeat.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_mirrored_repeat.py new file mode 100644 index 0000000000000000000000000000000000000000..6815ee6c91156561b832485d9a0e2bc5c4e183b4 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_mirrored_repeat.py @@ -0,0 +1,34 @@ +'''OpenGL extension ARB.texture_mirrored_repeat + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_mirrored_repeat to provide a more +Python-friendly API + +Overview (from the spec) + + ARB_texture_mirrored_repeat extends the set of texture wrap modes to + include a mode (GL_MIRRORED_REPEAT_ARB) that effectively uses a texture + map twice as large at the original image in which the additional half, + for each coordinate, of the new image is a mirror image of the original + image. + + This new mode relaxes the need to generate images whose opposite edges + match by using the original image to generate a matching "mirror image". + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_mirrored_repeat.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_mirrored_repeat import * +from OpenGL.raw.GL.ARB.texture_mirrored_repeat import _EXTENSION_NAME + +def glInitTextureMirroredRepeatARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_multisample.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_multisample.py new file mode 100644 index 0000000000000000000000000000000000000000..8ee64fd34327016b070500b00f08ecf62a1bd138 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_multisample.py @@ -0,0 +1,40 @@ +'''OpenGL extension ARB.texture_multisample + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_multisample to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides support for two new types of "multisample + textures" - two-dimensional and two-dimensional array - as well as + mechanisms to fetch a specific sample from such a texture in a shader, + and to attach such textures to FBOs for rendering. + + This extension also includes the following functionality, first described + in NV_explicit_multisample: + + * A query in the API to query the location of samples within the pixel + + * An explicit control for the multisample sample mask to augment the + control provided by SampleCoverage + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_multisample.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_multisample import * +from OpenGL.raw.GL.ARB.texture_multisample import _EXTENSION_NAME + +def glInitTextureMultisampleARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glGetMultisamplefv=wrapper.wrapper(glGetMultisamplefv).setOutput( + 'val',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_non_power_of_two.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_non_power_of_two.py new file mode 100644 index 0000000000000000000000000000000000000000..007d007a2f91de4ab03b2b7f5fcddbc0fb2ad384 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_non_power_of_two.py @@ -0,0 +1,44 @@ +'''OpenGL extension ARB.texture_non_power_of_two + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_non_power_of_two to provide a more +Python-friendly API + +Overview (from the spec) + + Conventional OpenGL texturing is limited to images with + power-of-two dimensions and an optional 1-texel border. + ARB_texture_non_power_of_two extension relaxes the size restrictions + for the 1D, 2D, cube map, and 3D texture targets. + + There is no additional procedural or enumerant api introduced by this + extension except that an implementation which exports the extension + string will allow an application to pass in texture dimensions for + the 1D, 2D, cube map, and 3D targets that may or may not be a power + of two. + + An implementation which supports relaxing traditional GL's + power-of-two size restrictions across all texture targets will export + the extension string: "ARB_texture_non_power_of_two". + + When this extension is supported, mipmapping, automatic mipmap + generation, and all the conventional wrap modes are supported for + non-power-of-two textures + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_non_power_of_two.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_non_power_of_two import * +from OpenGL.raw.GL.ARB.texture_non_power_of_two import _EXTENSION_NAME + +def glInitTextureNonPowerOfTwoARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_rg.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_rg.py new file mode 100644 index 0000000000000000000000000000000000000000..17da705f29c6b68c8bf6c190325338fa62cc3f1f --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_rg.py @@ -0,0 +1,47 @@ +'''OpenGL extension ARB.texture_rg + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_rg to provide a more +Python-friendly API + +Overview (from the spec) + + Historically one- and two- component textures have been specified in OpenGL + using the intensity, luminance or luminance-alpha (I/L/LA) formats. + With the advent of programmable shaders and render-to-texture capabilites + these legacy formats carry some historical artifacts which are no longer + useful. + + For example, when sampling from such textures, the luminance values + are replicated across the color components, and the intensity values are + replicated across both the color and alpha components. This is no + longer necessary with programmable shaders. + + It is also desirable to be able to render to one- and two- + component format textures using capabilities such as framebuffer + objects (FBO), but rendering to I/L/LA formats is under-specified + (specifically how to map R/G/B/A values to I/L/A texture channels). + + This extension adds new base internal formats for the one-component RED + and two-component RG (red green) texture formats as well as sized + internal formats for fixed-point, floating-point and pure integer texture + formats. The new texure formats can be used for texturing as well + as for rendering into with framebuffer objects. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_rg.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_rg import * +from OpenGL.raw.GL.ARB.texture_rg import _EXTENSION_NAME + +def glInitTextureRgARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_stencil8.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_stencil8.py new file mode 100644 index 0000000000000000000000000000000000000000..abd2fd364c1d86541cf8ad4bcf2cf1163045cb23 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_stencil8.py @@ -0,0 +1,29 @@ +'''OpenGL extension ARB.texture_stencil8 + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_stencil8 to provide a more +Python-friendly API + +Overview (from the spec) + + This extension accepts STENCIL_INDEX8 as a texture internal format, and + adds STENCIL_INDEX8 to the required internal format list. This removes the + need to use renderbuffers if a stencil-only format is desired. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_stencil8.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_stencil8 import * +from OpenGL.raw.GL.ARB.texture_stencil8 import _EXTENSION_NAME + +def glInitTextureStencil8ARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_storage.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_storage.py new file mode 100644 index 0000000000000000000000000000000000000000..4c33c5fc108bb117e42df026b80b64486ee395a7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_storage.py @@ -0,0 +1,45 @@ +'''OpenGL extension ARB.texture_storage + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_storage to provide a more +Python-friendly API + +Overview (from the spec) + + The texture image specification commands in OpenGL allow each level + to be separately specified with different sizes, formats, types and + so on, and only imposes consistency checks at draw time. This adds + overhead for implementations. + + This extension provides a mechanism for specifying the entire + structure of a texture in a single call, allowing certain + consistency checks and memory allocations to be done up front. Once + specified, the format and dimensions of the image array become + immutable, to simplify completeness checks in the implementation. + + When using this extension, it is no longer possible to supply texture + data using TexImage*. Instead, data can be uploaded using TexSubImage*, + or produced by other means (such as render-to-texture, mipmap generation, + or rendering to a sibling EGLImage). + + This extension has complicated interactions with other extensions. + The goal of most of these interactions is to ensure that a texture + is always mipmap complete (and cube complete for cubemap textures). + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_storage.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_storage import * +from OpenGL.raw.GL.ARB.texture_storage import _EXTENSION_NAME + +def glInitTextureStorageARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_storage_multisample.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_storage_multisample.py new file mode 100644 index 0000000000000000000000000000000000000000..b71ba01d6ccd7f80af931ca8ab98dbe8a3ecf084 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/texture_storage_multisample.py @@ -0,0 +1,37 @@ +'''OpenGL extension ARB.texture_storage_multisample + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.texture_storage_multisample to provide a more +Python-friendly API + +Overview (from the spec) + + The ARB_texture_storage extension and OpenGL 4.2 introduced the concept + of immutable texture objects. With these objects, once their data store + has been sized and allocated, it could not be resized for the lifetime + of the objects (although its content could be updated). OpenGL + implementations may be able to take advantage of the knowledge that the + underlying data store of certain objects cannot be deleted or otherwise + reallocated without destruction of the whole object (normally, a much + heavier weight and less frequent operation). Immutable storage + for all types of textures besides multisample and buffer textures was + introduced by ARB_texture_storage. For completeness, this extension + introduces immutable storage for multisampled textures. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/texture_storage_multisample.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.texture_storage_multisample import * +from OpenGL.raw.GL.ARB.texture_storage_multisample import _EXTENSION_NAME + +def glInitTextureStorageMultisampleARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/timer_query.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/timer_query.py new file mode 100644 index 0000000000000000000000000000000000000000..64c951eaddfdf5cac08198248db69b8bacfcdaab --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/timer_query.py @@ -0,0 +1,51 @@ +'''OpenGL extension ARB.timer_query + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.timer_query to provide a more +Python-friendly API + +Overview (from the spec) + + Applications can benefit from accurate timing information in a number of + different ways. During application development, timing information can + help identify application or driver bottlenecks. At run time, + applications can use timing information to dynamically adjust the amount + of detail in a scene to achieve constant frame rates. OpenGL + implementations have historically provided little to no useful timing + information. Applications can get some idea of timing by reading timers + on the CPU, but these timers are not synchronized with the graphics + rendering pipeline. Reading a CPU timer does not guarantee the completion + of a potentially large amount of graphics work accumulated before the + timer is read, and will thus produce wildly inaccurate results. + glFinish() can be used to determine when previous rendering commands have + been completed, but will idle the graphics pipeline and adversely affect + application performance. + + This extension provides a query mechanism that can be used to determine + the amount of time it takes to fully complete a set of GL commands, and + without stalling the rendering pipeline. It uses the query object + mechanisms first introduced in the occlusion query extension, which allow + time intervals to be polled asynchronously by the application. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/timer_query.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.timer_query import * +from OpenGL.raw.GL.ARB.timer_query import _EXTENSION_NAME + +def glInitTimerQueryARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glGetQueryObjecti64v=wrapper.wrapper(glGetQueryObjecti64v).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +glGetQueryObjectui64v=wrapper.wrapper(glGetQueryObjectui64v).setOutput( + 'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_array_bgra.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_array_bgra.py new file mode 100644 index 0000000000000000000000000000000000000000..8c81035d5ebc454f24eaaef17ae54a815cff2a63 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_array_bgra.py @@ -0,0 +1,80 @@ +'''OpenGL extension ARB.vertex_array_bgra + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.vertex_array_bgra to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides a single new component format for vertex + arrays to read 4-component unsigned byte vertex attributes with a + BGRA component ordering. + + OpenGL expects vertex arrays containing 4 unsigned bytes per + element to be in the RGBA, STRQ, or XYZW order (reading components + left-to-right in their lower address to higher address order). + Essentially the order the components appear in memory is the order + the components appear in the resulting vertex attribute vector. + + However Direct3D has color (diffuse and specular) vertex arrays + containing 4 unsigned bytes per element that are in a BGRA order + (again reading components left-to-right in their lower address + to higher address order). Direct3D calls this "ARGB" reading the + components in the opposite order (reading components left-to-right + in their higher address to lower address order). This ordering is + generalized in the DirectX 10 by the DXGI_FORMAT_B8G8R8A8_UNORM + format. + + For an OpenGL application to source color data from a vertex + buffer formatted for Direct3D's color array format conventions, + the application is forced to either: + + 1. Rely on a vertex program or shader to swizzle the color components + from the BGRA to conventional RGBA order. + + 2. Re-order the color data components in the vertex buffer from + Direct3D's native BGRA order to OpenGL's native RGBA order. + + Neither option is entirely satisfactory. + + Option 1 means vertex shaders have to be re-written to source colors + differently. If the same vertex shader is used with vertex arrays + configured to source the color as 4 floating-point color components, + the swizzle for BGRA colors stored as 4 unsigned bytes is no longer + appropriate. The shader's swizzling of colors becomes dependent on + the type and number of color components. Ideally the vertex shader + should be independent from the format and component ordering of the + data it sources. + + Option 2 is expensive because vertex buffers may have to be + reformatted prior to use. OpenGL treats the memory for vertex arrays + (whether client-side memory or buffer objects) as essentially untyped + memory and vertex arrays can be stored separately, interleaved, + or even interwoven (where multiple arrays overlap with differing + strides and formats). + + Rather than force a re-ordering of either vertex array components + in memory or a vertex array format-dependent re-ordering of vertex + shader inputs, OpenGL can simply provide a vertex array format that + matches the Direct3D color component ordering. + + This approach mimics that of the EXT_bgra extension for pixel and + texel formats except for vertex instead of image data. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/vertex_array_bgra.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.vertex_array_bgra import * +from OpenGL.raw.GL.ARB.vertex_array_bgra import _EXTENSION_NAME + +def glInitVertexArrayBgraARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_array_object.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_array_object.py new file mode 100644 index 0000000000000000000000000000000000000000..5edda68560d9d6ad478ea07bb05b0fc246b40db7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_array_object.py @@ -0,0 +1,47 @@ +'''OpenGL extension ARB.vertex_array_object + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.vertex_array_object to provide a more +Python-friendly API + +Overview (from the spec) + + This extension introduces named vertex array objects which encapsulate + vertex array state on the client side. These objects allow applications + to rapidly switch between large sets of array state. In addition, layered + libraries can return to the default array state by simply creating and + binding a new vertex array object. + + This extension differs from GL_APPLE_vertex_array_object in that client + memory cannot be accessed through a non-zero vertex array object. It also + differs in that vertex array objects are explicitly not sharable between + contexts. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.vertex_array_object import * +from OpenGL.raw.GL.ARB.vertex_array_object import _EXTENSION_NAME + +def glInitVertexArrayObjectARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glDeleteVertexArrays.arrays size not checked against n +glDeleteVertexArrays=wrapper.wrapper(glDeleteVertexArrays).setInputArraySize( + 'arrays', None +) +glGenVertexArrays=wrapper.wrapper(glGenVertexArrays).setOutput( + 'arrays',size=lambda x:(x,),pnameArg='n',orPassIn=True +) +### END AUTOGENERATED SECTION + +glGenVertexArrays = wrapper.wrapper(glGenVertexArrays).setOutput( + 'arrays', lambda n, array=None: (n,), 'n', arrayType = arrays.GLuintArray, + orPassIn=True, +) diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_attrib_binding.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_attrib_binding.py new file mode 100644 index 0000000000000000000000000000000000000000..94d7f3710c462a49f167f3151e9bac61d1d192b3 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_attrib_binding.py @@ -0,0 +1,61 @@ +'''OpenGL extension ARB.vertex_attrib_binding + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.vertex_attrib_binding to provide a more +Python-friendly API + +Overview (from the spec) + + OpenGL currently supports (at least) 16 vertex attributes and 16 vertex + buffer bindings, with a fixed mapping between vertex attributes and + vertex buffer bindings. This extension allows the application to change + the mapping between attributes and bindings, which can make it more + efficient to update vertex buffer bindings for interleaved vertex formats + where many attributes share the same buffer. + + This extension also separates the vertex binding update from the vertex + attribute format update, which saves applications the effort of + redundantly specifying the same format state over and over. + + Conceptually, this extension splits the state for generic vertex attribute + arrays into: + + - An array of vertex buffer binding points, each of which specifies: + + - a bound buffer object, + + - a starting offset for the vertex attribute data in that buffer object, + + - a stride used by all attributes using that binding point, and + + - a frequency divisor used by all attributes using that binding point. + + - An array of generic vertex attribute format information records, each of + which specifies: + + - a reference to one of the new buffer binding points above, + + - a component count and format, and a normalization flag for the + attribute data, and + + - the offset of the attribute data relative to the base offset of each + vertex found at the associated binding point. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/vertex_attrib_binding.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.vertex_attrib_binding import * +from OpenGL.raw.GL.ARB.vertex_attrib_binding import _EXTENSION_NAME + +def glInitVertexAttribBindingARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + + +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_blend.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_blend.py new file mode 100644 index 0000000000000000000000000000000000000000..1b077a58ae5b8b9d6515503980f5aa74dfc77a3c --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/vertex_blend.py @@ -0,0 +1,77 @@ +'''OpenGL extension ARB.vertex_blend + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.vertex_blend to provide a more +Python-friendly API + +Overview (from the spec) + + This extension provides the ability to replace the single + modelview transformation with a set of n vertex units. (Where + n is constrained to an implementation defined maximum.) Each + unit has its own modelview transform matrix. For each unit, + there is a current weight associated with the vertex. When + this extension is enabled the vertices are transformed by + the modelview matrices of all of the enabled units. Afterward, + these results are scaled by the weights for the respective + units and then summed to create the eye-space vertex. A + similar procedure is followed for the normals, except they + are transformed by the inverse transpose of the modelview + matrices. + + This extension is an orthoganalized version of functionality + already provided by other 3D graphics API's. + + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/vertex_blend.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.vertex_blend import * +from OpenGL.raw.GL.ARB.vertex_blend import _EXTENSION_NAME + +def glInitVertexBlendARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +# INPUT glWeightbvARB.weights size not checked against size +glWeightbvARB=wrapper.wrapper(glWeightbvARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightsvARB.weights size not checked against size +glWeightsvARB=wrapper.wrapper(glWeightsvARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightivARB.weights size not checked against size +glWeightivARB=wrapper.wrapper(glWeightivARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightfvARB.weights size not checked against size +glWeightfvARB=wrapper.wrapper(glWeightfvARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightdvARB.weights size not checked against size +glWeightdvARB=wrapper.wrapper(glWeightdvARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightubvARB.weights size not checked against size +glWeightubvARB=wrapper.wrapper(glWeightubvARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightusvARB.weights size not checked against size +glWeightusvARB=wrapper.wrapper(glWeightusvARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightuivARB.weights size not checked against size +glWeightuivARB=wrapper.wrapper(glWeightuivARB).setInputArraySize( + 'weights', None +) +# INPUT glWeightPointerARB.pointer size not checked against 'type,stride' +glWeightPointerARB=wrapper.wrapper(glWeightPointerARB).setInputArraySize( + 'pointer', None +) +### END AUTOGENERATED SECTION \ No newline at end of file diff --git a/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/window_pos.py b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/window_pos.py new file mode 100644 index 0000000000000000000000000000000000000000..ae1e7bda154801b27c50613aba9148d3771418de --- /dev/null +++ b/vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/window_pos.py @@ -0,0 +1,66 @@ +'''OpenGL extension ARB.window_pos + +This module customises the behaviour of the +OpenGL.raw.GL.ARB.window_pos to provide a more +Python-friendly API + +Overview (from the spec) + + In order to set the current raster position to a specific window + coordinate with the RasterPos command, the modelview matrix, projection + matrix and viewport must be set very carefully. Furthermore, if the + desired window coordinate is outside of the window's bounds one must rely + on a subtle side-effect of the Bitmap command in order to avoid frustum + clipping. + + This extension provides a set of functions to directly set the current + raster position in window coordinates, bypassing the modelview matrix, the + projection matrix and the viewport-to-window mapping. Furthermore, clip + testing is not performed, so that the current raster position is always + valid. + + This greatly simplifies the process of setting the current raster position + to a specific window coordinate prior to calling DrawPixels, CopyPixels or + Bitmap. Many matrix operations can be avoided when mixing 2D and 3D + rendering. + +The official definition of this extension is available here: +http://www.opengl.org/registry/specs/ARB/window_pos.txt +''' +from OpenGL import platform, constant, arrays +from OpenGL import extensions, wrapper +import ctypes +from OpenGL.raw.GL import _types, _glgets +from OpenGL.raw.GL.ARB.window_pos import * +from OpenGL.raw.GL.ARB.window_pos import _EXTENSION_NAME + +def glInitWindowPosARB(): + '''Return boolean indicating whether this extension is available''' + from OpenGL import extensions + return extensions.hasGLExtension( _EXTENSION_NAME ) + +glWindowPos2dvARB=wrapper.wrapper(glWindowPos2dvARB).setInputArraySize( + 'v', 2 +) +glWindowPos2fvARB=wrapper.wrapper(glWindowPos2fvARB).setInputArraySize( + 'v', 2 +) +glWindowPos2ivARB=wrapper.wrapper(glWindowPos2ivARB).setInputArraySize( + 'v', 2 +) +glWindowPos2svARB=wrapper.wrapper(glWindowPos2svARB).setInputArraySize( + 'v', 2 +) +glWindowPos3dvARB=wrapper.wrapper(glWindowPos3dvARB).setInputArraySize( + 'v', 3 +) +glWindowPos3fvARB=wrapper.wrapper(glWindowPos3fvARB).setInputArraySize( + 'v', 3 +) +glWindowPos3ivARB=wrapper.wrapper(glWindowPos3ivARB).setInputArraySize( + 'v', 3 +) +glWindowPos3svARB=wrapper.wrapper(glWindowPos3svARB).setInputArraySize( + 'v', 3 +) +### END AUTOGENERATED SECTION