Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/__init__.py +1 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/aux_depth_stencil.py +47 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/client_storage.py +107 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/fence.py +79 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/flush_buffer_range.py +46 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/object_purgeable.py +79 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/texture_range.py +45 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/transform_hint.py +43 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_object.py +52 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_range.py +154 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/__init__.py +1 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/blend_func_extended.py +39 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/buffer_storage.py +48 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/color_buffer_float.py +55 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compatibility.py +23 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compute_variable_group_size.py +39 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/conservative_depth.py +39 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/copy_buffer.py +30 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_buffer_float.py +43 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_clamp.py +54 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_texture.py +37 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/draw_instanced.py +47 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_attrib_location.py +32 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_uniform_location.py +31 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_coord_conventions.py +84 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_program_shadow.py +49 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_shader.py +37 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_no_attachments.py +73 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_object.py +342 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_sRGB.py +55 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/geometry_shader4.py +53 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/imaging.py +225 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/indirect_parameters.py +46 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/map_buffer_alignment.py +30 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/occlusion_query.py +138 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/program_interface_query.py +89 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/provoking_vertex.py +52 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/robustness_isolation.py +40 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sample_shading.py +50 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sampler_objects.py +86 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cube_map.py +45 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cubemap_per_texture.py +48 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/separate_shader_objects.py +230 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_bit_encoding.py +31 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_group_vote.py +77 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_load_store.py +68 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_size.py +27 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_100.py +31 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_include.py +66 -0
- vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_packing.py +43 -0
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""OpenGL Extensions"""
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/aux_depth_stencil.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.aux_depth_stencil
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.aux_depth_stencil to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
Normally, each OpenGL drawable allocates at most one depth buffer and one
|
| 10 |
+
stencil buffer, regardless of how many aux buffers there are.
|
| 11 |
+
|
| 12 |
+
When the APPLE_aux_depth_stencil extension is used, and the depth buffer
|
| 13 |
+
size is non-zero, the GL silently allocates a separate depth buffer for the
|
| 14 |
+
color buffer and for each aux buffer. Similarly, if the stencil buffer size
|
| 15 |
+
is non-zero, a separate stencil buffer is allocated for the color buffer and
|
| 16 |
+
each aux buffer. This extension does not cause separate depth or stencil
|
| 17 |
+
buffers to be allocated for the left and right buffers of a stereo drawable.
|
| 18 |
+
A context with no aux buffers will be unaffected by this extension.
|
| 19 |
+
|
| 20 |
+
Switching the draw or read buffer from the color buffer to an aux buffer, or
|
| 21 |
+
switching between two aux buffers, simultaneously switches the associated
|
| 22 |
+
depth and stencil buffers, for drawing or reading.
|
| 23 |
+
|
| 24 |
+
For example, if an OpenGL context has two aux buffers and non-zero depth
|
| 25 |
+
buffer size, it will have a total of three depth buffers - one associated
|
| 26 |
+
with the color buffer and one associated with each aux buffer. If that
|
| 27 |
+
context is used to render to AUX0, then to render to AUX1, the changes to
|
| 28 |
+
the depth buffer made by the rendering to AUX1 will not affect the depth
|
| 29 |
+
buffer associated with AUX0, and vice versa.
|
| 30 |
+
|
| 31 |
+
The official definition of this extension is available here:
|
| 32 |
+
http://www.opengl.org/registry/specs/APPLE/aux_depth_stencil.txt
|
| 33 |
+
'''
|
| 34 |
+
from OpenGL import platform, constant, arrays
|
| 35 |
+
from OpenGL import extensions, wrapper
|
| 36 |
+
import ctypes
|
| 37 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 38 |
+
from OpenGL.raw.GL.APPLE.aux_depth_stencil import *
|
| 39 |
+
from OpenGL.raw.GL.APPLE.aux_depth_stencil import _EXTENSION_NAME
|
| 40 |
+
|
| 41 |
+
def glInitAuxDepthStencilAPPLE():
|
| 42 |
+
'''Return boolean indicating whether this extension is available'''
|
| 43 |
+
from OpenGL import extensions
|
| 44 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/client_storage.py
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.client_storage
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.client_storage to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides a simple mechanism to optimize texture data handling
|
| 10 |
+
by clients. GL implementations normally maintain a copy of texture image
|
| 11 |
+
data supplied clients when any of the various texturing commands, such as
|
| 12 |
+
TexImage2D, are invoked. This extension eliminates GL's internal copy of
|
| 13 |
+
the texture image data and allows a client to maintain this data locally for
|
| 14 |
+
textures when the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter is
|
| 15 |
+
TRUE at the time of texture specification. Local texture data storage is
|
| 16 |
+
especially useful in cases where clients maintain internal copies of
|
| 17 |
+
textures used in any case. This results in what could be considered an
|
| 18 |
+
extra copy of the texture image data. Assuming all operations are error
|
| 19 |
+
free, the use of client storage has no affect on the result of texturing
|
| 20 |
+
operations and will not affect rendering results. APPLE_client_storage
|
| 21 |
+
allows clients to optimize memory requirements and copy operations it also
|
| 22 |
+
requires adherence to specific rules in maintaining texture image data.
|
| 23 |
+
|
| 24 |
+
Clients using this extension are agreeing to preserve a texture's image data
|
| 25 |
+
for the life of the texture. The life of the texture is defined, in this
|
| 26 |
+
case, as the time from first issuing the TexImage3D, TexImage2D or
|
| 27 |
+
TexImage1D command, for the specific texture object with the
|
| 28 |
+
UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter set to TRUE, until the
|
| 29 |
+
DeleteTextures command or another TexImage command for that same object.
|
| 30 |
+
Only after DeleteTextures has completed, or new texture is specified, can
|
| 31 |
+
the local texture memory be released, as it will no longer be utilized by
|
| 32 |
+
OpenGL. Changing the UNPACK_CLIENT_STORAGE_APPLE pixel storage parameter
|
| 33 |
+
will have no additional effect once the texturing command has been issued
|
| 34 |
+
and specifically will not alleviate the client from maintaining the texture
|
| 35 |
+
data.
|
| 36 |
+
|
| 37 |
+
Client storage is implemented as a pixel storage parameter which affects
|
| 38 |
+
texture image storage at the time the texturing command is issued. As with
|
| 39 |
+
other pixel storage parameters this state may differ from the time the
|
| 40 |
+
texturing command in executed if the command is placed in a display list.
|
| 41 |
+
The PixelStore command is used to set the parameter
|
| 42 |
+
UNPACK_CLIENT_STORAGE_APPLE. Values can either be TRUE or FALSE, with TRUE
|
| 43 |
+
representing the use of client local storage and FALSE indicating the OpenGL
|
| 44 |
+
engine and not the client will be responsible for maintaining texture
|
| 45 |
+
storage for future texturing commands issued per the OpenGL specification.
|
| 46 |
+
The default state for the UNPACK_CLIENT_STORAGE_APPLE parameter is FALSE
|
| 47 |
+
|
| 48 |
+
Client storage is only available for texture objects and not the default
|
| 49 |
+
texture (of any target type). This means that a texture object has to
|
| 50 |
+
generated and bound to be used with client storage. Setting
|
| 51 |
+
UNPACK_CLIENT_STORAGE_APPLE to TRUE and texturing with the default texture
|
| 52 |
+
will result in normally texturing with GL maintaining a copy of the texture
|
| 53 |
+
image data.
|
| 54 |
+
|
| 55 |
+
Normally, client storage will be used in conjunction with normal texturing
|
| 56 |
+
techniques. An application would use GenTextures to generate texture
|
| 57 |
+
objects as needed. BindTexture to the texture object name of interest.
|
| 58 |
+
Enable client storage via the PixelStore command setting the
|
| 59 |
+
UNPACK_CLIENT_STORAGE_APPLE parameter to TRUE. Then use TexImage3D,
|
| 60 |
+
TexImage2D or TexImage1D to specify the texture image. If no further use of
|
| 61 |
+
client storage is desired, it is recommended to again use the PixelStore
|
| 62 |
+
command, in this case setting the UNPACK_CLIENT_STORAGE_APPLE parameter to
|
| 63 |
+
FALSE to disable client storage, since this pixel state is maintained unless
|
| 64 |
+
explicitly set by the PixelStore command.
|
| 65 |
+
|
| 66 |
+
If an application needs to modify the texture, using TexSubImage for
|
| 67 |
+
example, it should be noted that the pointer passed to TexSubImage1D,
|
| 68 |
+
TexSubImage2D or TexSubImage3D does not have to the same, or within the
|
| 69 |
+
original texture memory. It if is not, there is the likelihood of GL
|
| 70 |
+
copying the new data to the original texture memory owned by the client,
|
| 71 |
+
thus actually modifying this texture image data. This does not affect
|
| 72 |
+
requirement to maintain the original texture memory but also does not add
|
| 73 |
+
the requirement to maintain the sub image data, due to the copy.
|
| 74 |
+
|
| 75 |
+
Once a client has completed use of the texture stored in client memory, it
|
| 76 |
+
should issue a DeleteTextures command to delete the texture object or issue
|
| 77 |
+
a texture command, with the same target type, for the object, with either a
|
| 78 |
+
different data pointer, or UNPACK_CLIENT_STORAGE_APPLE set to false, in any
|
| 79 |
+
case, breaking the tie between GL and the texture buffer. An implicit Flush
|
| 80 |
+
command is issued in these cases, ensuring all access to the texture by
|
| 81 |
+
OpenGL is complete. Only at this point can the texture buffer be safely
|
| 82 |
+
released. Releasing the texture buffer prior has undefined results and will
|
| 83 |
+
very possibly display texel anomalies at run time. System level memory
|
| 84 |
+
management and paging schemes should not affect the use of client storage.
|
| 85 |
+
Consider in any case, that GL has an alias of the base pointer for this
|
| 86 |
+
block of texture memory which is maintained until GL is finished rendering
|
| 87 |
+
with the texture and it has been deleted or reassigned to another set of
|
| 88 |
+
texture data. As long as this alias exists, applications must not
|
| 89 |
+
de-allocate, move or purge this memory.
|
| 90 |
+
|
| 91 |
+
The official definition of this extension is available here:
|
| 92 |
+
http://www.opengl.org/registry/specs/APPLE/client_storage.txt
|
| 93 |
+
'''
|
| 94 |
+
from OpenGL import platform, constant, arrays
|
| 95 |
+
from OpenGL import extensions, wrapper
|
| 96 |
+
import ctypes
|
| 97 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 98 |
+
from OpenGL.raw.GL.APPLE.client_storage import *
|
| 99 |
+
from OpenGL.raw.GL.APPLE.client_storage import _EXTENSION_NAME
|
| 100 |
+
|
| 101 |
+
def glInitClientStorageAPPLE():
|
| 102 |
+
'''Return boolean indicating whether this extension is available'''
|
| 103 |
+
from OpenGL import extensions
|
| 104 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/fence.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.fence
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.fence to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension is provided a finer granularity of synchronizing GL command
|
| 10 |
+
completion than offered by standard OpenGL, which currently offers only two
|
| 11 |
+
mechanisms for synchronization: Flush and Finish. Since Flush merely assures
|
| 12 |
+
the user that the commands complete in a finite (though undetermined) amount
|
| 13 |
+
of time, it is, thus, of only modest utility. Finish, on the other hand,
|
| 14 |
+
stalls CPU execution until all pending GL commands have completed forcing
|
| 15 |
+
completely synchronous operation, which most often not the desired result.
|
| 16 |
+
This extension offers a middle ground - the ability to "finish" a subset of
|
| 17 |
+
the command stream, and the ability to determine whether a given command has
|
| 18 |
+
completed or not.
|
| 19 |
+
|
| 20 |
+
This extension introduces the concept of a "fence" to the OpenGL command
|
| 21 |
+
stream with SetFenceAPPLE. Once the fence is inserted into the command
|
| 22 |
+
stream, it can be tested for its completion with TestFenceAPPLE. Moreover,
|
| 23 |
+
the application may also request a partial Finish up to a particular "fence"
|
| 24 |
+
using the FinishFenceAPPLE command -- that is, all commands prior to the
|
| 25 |
+
fence will be forced to complete until control is returned to the calling
|
| 26 |
+
process. These new mechanisms allow for synchronization between the host
|
| 27 |
+
CPU and the GPU, which may be accessing the same resources (typically
|
| 28 |
+
memory).
|
| 29 |
+
|
| 30 |
+
Fences are created and deleted, as are other objects in OpenGL, specifically
|
| 31 |
+
with GenFencesAPPLE and DeleteFencesAPPLE. The former returns a list of
|
| 32 |
+
unused fence names and the later deletes the provided list of fence names.
|
| 33 |
+
|
| 34 |
+
In addition to being able to test or finish a fence this extension allows
|
| 35 |
+
testing for other types of completion, including texture objects, vertex
|
| 36 |
+
array objects, and draw pixels. This allows the client to use
|
| 37 |
+
TestObjectAPPLE or FinishObjectAPPLE with FENCE_APPLE, TEXTURE,
|
| 38 |
+
VERTEX_ARRAY, or DRAW_PIXELS_APPLE with the same type of results as
|
| 39 |
+
TestFenceAPPLE and FinishFenceAPPLE. Specifically, using the FENCE_APPLE
|
| 40 |
+
type is equivalent to calling TestFenceAPPLE or FinishFenceAPPLE with the
|
| 41 |
+
particular fence name. Using TEXTURE as the object type tests or waits for
|
| 42 |
+
completion of a specific texture, meaning when there are no pending
|
| 43 |
+
rendering commands which use that texture object. Using the VERTEX_ARRAY
|
| 44 |
+
type will test or wait for drawing commands using that particular vertex
|
| 45 |
+
array object name. Finally, DRAW_PIXELS_APPLE will wait or test for
|
| 46 |
+
completion of all pending DrawPixels commands. These tests and finishes
|
| 47 |
+
operate with the same limitations and results as test and finish fence.
|
| 48 |
+
|
| 49 |
+
One use of this extension is in conjunction with APPLE_vertex_array_range to
|
| 50 |
+
determine when graphics hardware has completed accessing vertex data from a
|
| 51 |
+
vertex array range. Once a fence has been tested TRUE or finished, all
|
| 52 |
+
vertex indices issued before the fence must have completed being accessed.
|
| 53 |
+
This ensures that the vertex data memory corresponding to the issued vertex
|
| 54 |
+
indices can be safely modified (assuming no other outstanding vertex indices
|
| 55 |
+
are issued subsequent to the fence).
|
| 56 |
+
|
| 57 |
+
The official definition of this extension is available here:
|
| 58 |
+
http://www.opengl.org/registry/specs/APPLE/fence.txt
|
| 59 |
+
'''
|
| 60 |
+
from OpenGL import platform, constant, arrays
|
| 61 |
+
from OpenGL import extensions, wrapper
|
| 62 |
+
import ctypes
|
| 63 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 64 |
+
from OpenGL.raw.GL.APPLE.fence import *
|
| 65 |
+
from OpenGL.raw.GL.APPLE.fence import _EXTENSION_NAME
|
| 66 |
+
|
| 67 |
+
def glInitFenceAPPLE():
|
| 68 |
+
'''Return boolean indicating whether this extension is available'''
|
| 69 |
+
from OpenGL import extensions
|
| 70 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 71 |
+
|
| 72 |
+
glGenFencesAPPLE=wrapper.wrapper(glGenFencesAPPLE).setOutput(
|
| 73 |
+
'fences',size=lambda x:(x,),pnameArg='n',orPassIn=True
|
| 74 |
+
)
|
| 75 |
+
# INPUT glDeleteFencesAPPLE.fences size not checked against n
|
| 76 |
+
glDeleteFencesAPPLE=wrapper.wrapper(glDeleteFencesAPPLE).setInputArraySize(
|
| 77 |
+
'fences', None
|
| 78 |
+
)
|
| 79 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/flush_buffer_range.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.flush_buffer_range
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.flush_buffer_range to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
APPLE_flush_buffer_range expands the buffer object API to allow greater
|
| 10 |
+
performance when a client application only needs to write to a sub-range
|
| 11 |
+
of a buffer object. To that end, this extension introduces two new buffer
|
| 12 |
+
object features: non-serialized buffer modification and explicit sub-range
|
| 13 |
+
flushing for mapped buffer objects.
|
| 14 |
+
|
| 15 |
+
OpenGL requires that commands occur in a FIFO manner meaning that any
|
| 16 |
+
changes to buffer objects either block until the data has been processed by
|
| 17 |
+
the OpenGL pipeline or else create extra copies to avoid such a block. By
|
| 18 |
+
providing a method to asynchronously modify buffer object data, an
|
| 19 |
+
application is then able to manage the synchronization points themselves
|
| 20 |
+
and modify ranges of data contained by a buffer object even though OpenGL
|
| 21 |
+
might still be using other parts of it.
|
| 22 |
+
|
| 23 |
+
This extension also provides a method for explicitly flushing ranges of a
|
| 24 |
+
mapped buffer object so OpenGL does not have to assume that the entire
|
| 25 |
+
range may have been modified.
|
| 26 |
+
|
| 27 |
+
Affects ARB_vertex_buffer_object, ARB_pixel_buffer_object and OpenGL 1.5
|
| 28 |
+
Buffer Objects.
|
| 29 |
+
|
| 30 |
+
The official definition of this extension is available here:
|
| 31 |
+
http://www.opengl.org/registry/specs/APPLE/flush_buffer_range.txt
|
| 32 |
+
'''
|
| 33 |
+
from OpenGL import platform, constant, arrays
|
| 34 |
+
from OpenGL import extensions, wrapper
|
| 35 |
+
import ctypes
|
| 36 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 37 |
+
from OpenGL.raw.GL.APPLE.flush_buffer_range import *
|
| 38 |
+
from OpenGL.raw.GL.APPLE.flush_buffer_range import _EXTENSION_NAME
|
| 39 |
+
|
| 40 |
+
def glInitFlushBufferRangeAPPLE():
|
| 41 |
+
'''Return boolean indicating whether this extension is available'''
|
| 42 |
+
from OpenGL import extensions
|
| 43 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/object_purgeable.py
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.object_purgeable
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.object_purgeable to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides the ability to mark the storage of OpenGL
|
| 10 |
+
objects as "purgeable".
|
| 11 |
+
|
| 12 |
+
Many of today's modern virtual memory systems include the concept of
|
| 13 |
+
purgeability in order to avoid unnecessary paging when the object
|
| 14 |
+
contents are no longer needed. In OpenGL, objects such as textures,
|
| 15 |
+
vertex buffers, pixel buffers, and renderbuffers all have
|
| 16 |
+
significant storage requirements. By default, the OpenGL is
|
| 17 |
+
required to preserve the contents of these objects regardless of
|
| 18 |
+
system resource stress, such as vram shortage or physical memory
|
| 19 |
+
shortage. Often this is accomplished by temporarily paging the
|
| 20 |
+
contents of objects that are not currently needed to some kind of
|
| 21 |
+
secondary storage area. This paging operation can be an unnecessary
|
| 22 |
+
computational expense in the cases where the data is not going to be
|
| 23 |
+
used again or where the content can be reproduced by the application
|
| 24 |
+
with less expense than the paging operation would require.
|
| 25 |
+
|
| 26 |
+
This extension defines a mechanism for the application to mark the
|
| 27 |
+
storage of OpenGL objects as "purgeable" in order to influence these
|
| 28 |
+
paging operations. The application can further control the
|
| 29 |
+
semantics of making object storage "purgeable" with two options
|
| 30 |
+
("volatile" and "released") and "unpurgeable" with two options
|
| 31 |
+
("undefined" and "retained")
|
| 32 |
+
|
| 33 |
+
Applications that use this extension will typically follow one of
|
| 34 |
+
two operational models. The typical model for most applications is
|
| 35 |
+
to mark an object storage as "purgeable" with the "volatile" option,
|
| 36 |
+
and then later mark the storage as "unpurgeable" with the "retained"
|
| 37 |
+
option. When this happens, the application may or may not need to
|
| 38 |
+
respecify the object contents, depending on the whether the object
|
| 39 |
+
storage was actually released. The application can find out whether
|
| 40 |
+
the storage was released by examining the return value of the
|
| 41 |
+
function which marks the storage as "unpurgeable". This model is
|
| 42 |
+
useful when the application does not know at the time it marks the
|
| 43 |
+
object storage as "purgeable" whether it will later need those
|
| 44 |
+
contents to be valid.
|
| 45 |
+
|
| 46 |
+
Another operational model is for an application to mark the storage
|
| 47 |
+
for an object as "purgeable" with the "released" option, and then
|
| 48 |
+
later mark the object "unpurgeable" with the "undefined" option. In
|
| 49 |
+
this latter model, the application intends to unconditionally reload
|
| 50 |
+
the object contents later on, and so it tells the GL that it is okay
|
| 51 |
+
if the contents are "undefined" when the storage is re-allocated.
|
| 52 |
+
|
| 53 |
+
Note that in both models, it is possible for the contents to become
|
| 54 |
+
undefined since they could have actually been purged from the system
|
| 55 |
+
in either case. The various options are still useful, however,
|
| 56 |
+
since they give more information to the GL about what the
|
| 57 |
+
application expects to happen and the GL can use this information to
|
| 58 |
+
make better predictions about which paging choices will be more
|
| 59 |
+
efficient.
|
| 60 |
+
|
| 61 |
+
The official definition of this extension is available here:
|
| 62 |
+
http://www.opengl.org/registry/specs/APPLE/object_purgeable.txt
|
| 63 |
+
'''
|
| 64 |
+
from OpenGL import platform, constant, arrays
|
| 65 |
+
from OpenGL import extensions, wrapper
|
| 66 |
+
import ctypes
|
| 67 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 68 |
+
from OpenGL.raw.GL.APPLE.object_purgeable import *
|
| 69 |
+
from OpenGL.raw.GL.APPLE.object_purgeable import _EXTENSION_NAME
|
| 70 |
+
|
| 71 |
+
def glInitObjectPurgeableAPPLE():
|
| 72 |
+
'''Return boolean indicating whether this extension is available'''
|
| 73 |
+
from OpenGL import extensions
|
| 74 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 75 |
+
|
| 76 |
+
glGetObjectParameterivAPPLE=wrapper.wrapper(glGetObjectParameterivAPPLE).setOutput(
|
| 77 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 78 |
+
)
|
| 79 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/texture_range.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.texture_range
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.texture_range to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides a method to specify the range of client address
|
| 10 |
+
space that may be used by a texture. In general, the storage size of a
|
| 11 |
+
texture may be easily determined by the texture's data type and geometry.
|
| 12 |
+
However, driver optimizations may be realized if an extended address
|
| 13 |
+
range is specified to encompass the storage of multiple textures, or to
|
| 14 |
+
encompass potential future changes in the size of a texture. A typical
|
| 15 |
+
usage of this extension is to specify an identical address range for
|
| 16 |
+
several textures in a particular working set that encompasses the storage
|
| 17 |
+
of all the textures in the set. This allows the driver to make a single
|
| 18 |
+
memory mapping for all of the textures.
|
| 19 |
+
|
| 20 |
+
Further, a mechanism is provided to allow the application to give the GL
|
| 21 |
+
driver a hint regarding the storage requirements of the texture data.
|
| 22 |
+
|
| 23 |
+
The official definition of this extension is available here:
|
| 24 |
+
http://www.opengl.org/registry/specs/APPLE/texture_range.txt
|
| 25 |
+
'''
|
| 26 |
+
from OpenGL import platform, constant, arrays
|
| 27 |
+
from OpenGL import extensions, wrapper
|
| 28 |
+
import ctypes
|
| 29 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 30 |
+
from OpenGL.raw.GL.APPLE.texture_range import *
|
| 31 |
+
from OpenGL.raw.GL.APPLE.texture_range import _EXTENSION_NAME
|
| 32 |
+
|
| 33 |
+
def glInitTextureRangeAPPLE():
|
| 34 |
+
'''Return boolean indicating whether this extension is available'''
|
| 35 |
+
from OpenGL import extensions
|
| 36 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 37 |
+
|
| 38 |
+
# INPUT glTextureRangeAPPLE.pointer size not checked against length
|
| 39 |
+
glTextureRangeAPPLE=wrapper.wrapper(glTextureRangeAPPLE).setInputArraySize(
|
| 40 |
+
'pointer', None
|
| 41 |
+
)
|
| 42 |
+
glGetTexParameterPointervAPPLE=wrapper.wrapper(glGetTexParameterPointervAPPLE).setOutput(
|
| 43 |
+
'params',size=(1,),orPassIn=True
|
| 44 |
+
)
|
| 45 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/transform_hint.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.transform_hint
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.transform_hint to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
The transform_hint extension provides a new target,
|
| 10 |
+
TRANSFORM_HINT_APPLE, for the Hint procedure. When the
|
| 11 |
+
transform hint is set to FASTEST the GL may choose to
|
| 12 |
+
implement certain state dependent algebraic simplifications
|
| 13 |
+
in the geometry transformation that affect the sub-pixel
|
| 14 |
+
precision of the transformed vertex coordinates.
|
| 15 |
+
|
| 16 |
+
For example, if two polygons are rendered with identical object
|
| 17 |
+
coordinates, different GL state settings, and the transform
|
| 18 |
+
hint set to FASTEST, there is no gaurantee that the resulting
|
| 19 |
+
window coordinates of the two polygons will be precisely
|
| 20 |
+
identical. Therefore, precise tests of the window coordinates,
|
| 21 |
+
such as a depth test setting of EQUAL, should not be used.
|
| 22 |
+
|
| 23 |
+
If the transform hint is set to NICEST or DONT_CARE, two polygons
|
| 24 |
+
with identical object coordinates will always be transformed
|
| 25 |
+
to identical window coordinates.
|
| 26 |
+
|
| 27 |
+
The official definition of this extension is available here:
|
| 28 |
+
http://www.opengl.org/registry/specs/APPLE/transform_hint.txt
|
| 29 |
+
'''
|
| 30 |
+
from OpenGL import platform, constant, arrays
|
| 31 |
+
from OpenGL import extensions, wrapper
|
| 32 |
+
import ctypes
|
| 33 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 34 |
+
from OpenGL.raw.GL.APPLE.transform_hint import *
|
| 35 |
+
from OpenGL.raw.GL.APPLE.transform_hint import _EXTENSION_NAME
|
| 36 |
+
|
| 37 |
+
def glInitTransformHintAPPLE():
|
| 38 |
+
'''Return boolean indicating whether this extension is available'''
|
| 39 |
+
from OpenGL import extensions
|
| 40 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_object.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.vertex_array_object
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.vertex_array_object to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension introduces named vertex array objects which encapsulate
|
| 10 |
+
vertex array state on the client side. The main purpose of these
|
| 11 |
+
objects is to keep pointers to static vertex data and provide a name
|
| 12 |
+
for different sets of static vertex data.
|
| 13 |
+
|
| 14 |
+
By extending vertex array range functionality this extension allows multiple
|
| 15 |
+
vertex array ranges to exist at one time, including their complete sets of
|
| 16 |
+
state, in manner analogous to texture objects.
|
| 17 |
+
|
| 18 |
+
GenVertexArraysAPPLE creates a list of n number of vertex array object
|
| 19 |
+
names. After creating a name, BindVertexArrayAPPLE associates the name with
|
| 20 |
+
a vertex array object and selects this vertex array and its associated
|
| 21 |
+
state as current. To get back to the default vertex array and its
|
| 22 |
+
associated state the client should bind to vertex array named 0.
|
| 23 |
+
|
| 24 |
+
Once a client is done using a vertex array object it can be deleted with
|
| 25 |
+
DeleteVertexArraysAPPLE. The client is responsible for allocating and
|
| 26 |
+
deallocating the memory used by the vertex array data, while the
|
| 27 |
+
DeleteVertexArraysAPPLE command deletes vertex array object names and
|
| 28 |
+
associated state only.
|
| 29 |
+
|
| 30 |
+
The official definition of this extension is available here:
|
| 31 |
+
http://www.opengl.org/registry/specs/APPLE/vertex_array_object.txt
|
| 32 |
+
'''
|
| 33 |
+
from OpenGL import platform, constant, arrays
|
| 34 |
+
from OpenGL import extensions, wrapper
|
| 35 |
+
import ctypes
|
| 36 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 37 |
+
from OpenGL.raw.GL.APPLE.vertex_array_object import *
|
| 38 |
+
from OpenGL.raw.GL.APPLE.vertex_array_object import _EXTENSION_NAME
|
| 39 |
+
|
| 40 |
+
def glInitVertexArrayObjectAPPLE():
|
| 41 |
+
'''Return boolean indicating whether this extension is available'''
|
| 42 |
+
from OpenGL import extensions
|
| 43 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 44 |
+
|
| 45 |
+
# INPUT glDeleteVertexArraysAPPLE.arrays size not checked against n
|
| 46 |
+
glDeleteVertexArraysAPPLE=wrapper.wrapper(glDeleteVertexArraysAPPLE).setInputArraySize(
|
| 47 |
+
'arrays', None
|
| 48 |
+
)
|
| 49 |
+
glGenVertexArraysAPPLE=wrapper.wrapper(glGenVertexArraysAPPLE).setOutput(
|
| 50 |
+
'arrays',size=lambda x:(x,),pnameArg='n',orPassIn=True
|
| 51 |
+
)
|
| 52 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/APPLE/vertex_array_range.py
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension APPLE.vertex_array_range
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.APPLE.vertex_array_range to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension is designed to allow very high vertex processing rates which
|
| 10 |
+
are facilitated both by relieving the CPU of as much processing burden as
|
| 11 |
+
possible and by allowing graphics hardware to directly access vertex data.
|
| 12 |
+
Because this extension is implemented as an addition to the vertex array
|
| 13 |
+
specification provided by OpenGL 1.1, applications can continue to use
|
| 14 |
+
existing vertex submission logic while taking advantage of vertex array
|
| 15 |
+
ranges to more efficiently process those arrays.
|
| 16 |
+
|
| 17 |
+
The vertex array coherency model provided by OpenGL 1.1 requires that
|
| 18 |
+
vertex data specified in vertex arrays be transferred from system memory
|
| 19 |
+
each time Begin, DrawArrays, or DrawElements is called. Further, OpenGL
|
| 20 |
+
1.1 requires that the transfer of data be completed by the time End,
|
| 21 |
+
DrawArrays, or DrawElements returns. Both of these requirements are
|
| 22 |
+
relaxed by the vertex array range extension. Vertex data may be cached
|
| 23 |
+
by the GL so there is no guarantee that changes to the vertex data will
|
| 24 |
+
be reflected in following drawing commands unless it is flushed with
|
| 25 |
+
FlushVertexArrayRangeAPPLE. The reading of vertex data may be deferred
|
| 26 |
+
by the GL so there is no guarantee that the GL will be finished reading
|
| 27 |
+
the data until completion is forced by the use of Finish or the APPLE_fence
|
| 28 |
+
extension.
|
| 29 |
+
|
| 30 |
+
Vertex array range can be enabled in two ways. EnableClientState can be
|
| 31 |
+
used with the VERTEX_ARRAY_RANGE_APPLE param to enable vertex array range
|
| 32 |
+
for the client context. One can also simply set the vertex array storage
|
| 33 |
+
hint to either STORAGE_CACHED_APPLE or STORAGE_SHARED_APPLE (as discussed
|
| 34 |
+
below) to enable a particular vertex array range. Once this is done, use of
|
| 35 |
+
vertex array range requires the definition of a specific memory range for
|
| 36 |
+
vertex data through VertexArrayRangeAPPLE. It is recommended this data be
|
| 37 |
+
page aligned (4096 byte boundaries) and a multiple of page size in length
|
| 38 |
+
for maximum efficiency in data handling and internal flushing, but this is
|
| 39 |
+
not a requirement and any location and length of data can be defined as a
|
| 40 |
+
vertex array. This extension provides no memory allocators as any
|
| 41 |
+
convenient memory allocator can be used.
|
| 42 |
+
|
| 43 |
+
Once a data set is established, using VertexArrayRangeAPPLE, it can be can
|
| 44 |
+
be drawn using standard OpenGL vertex array commands, as one would do
|
| 45 |
+
without this extension. Note, if any the data for any enabled array for a
|
| 46 |
+
given array element index falls outside of the vertex array range, an
|
| 47 |
+
undefined vertex is generated. One should also understand removing or
|
| 48 |
+
replacing all calls to vertex array range functions with no-ops or disabling
|
| 49 |
+
the vertex array range by disabling the VERTEX_ARRAY_RANGE_APPLE client
|
| 50 |
+
state should not change the results of an application's OpenGL drawing.
|
| 51 |
+
|
| 52 |
+
For static data no additional coherency nor synchronization must be done and
|
| 53 |
+
the client is free to draw with the specified draw as it sees fit.
|
| 54 |
+
|
| 55 |
+
If data is dynamic, thus to be modified, FlushVertexArrayRangeAPPLE should
|
| 56 |
+
be used. The command is issued when data has been modified since the last
|
| 57 |
+
call to VertexArrayRangeAPPLE or FlushVertexArrayRangeAPPLE and prior to
|
| 58 |
+
drawing with such data. FlushVertexArrayRangeAPPLE only provides memory
|
| 59 |
+
coherency prior to drawing (such as ensuring CPU caches are flushed or VRAM
|
| 60 |
+
cached copies are updated) and does not provide any synchronization with
|
| 61 |
+
previously issued drawing commands. The range flushed can be the specific
|
| 62 |
+
range modified and does not have to be the entire vertex array range.
|
| 63 |
+
Additionally, data maybe read immediately after a flush without need for
|
| 64 |
+
further synchronization, thus overlapping areas of data maybe read, modified
|
| 65 |
+
and written between two successive flushes and the data will be
|
| 66 |
+
consistent.
|
| 67 |
+
|
| 68 |
+
To synchronize data modification after drawing two methods can be used. A
|
| 69 |
+
Finish command can be issued which will not return until all previously
|
| 70 |
+
issued commands are complete, forcing completely synchronous operation.
|
| 71 |
+
While this guarantees all drawing is complete it may not be the optimal
|
| 72 |
+
solution for clients which just need to ensure drawing with the vertex array
|
| 73 |
+
range or a specific range with the array is compete. The APPLE_fence
|
| 74 |
+
extension can be used when dynamic data modifications need to be
|
| 75 |
+
synchronized with drawing commands. Specifically, if data is to be modified,
|
| 76 |
+
a fence can be set immediately after drawing with the data. Once it comes
|
| 77 |
+
time to modify the data, the application must test (or finish) this fence to
|
| 78 |
+
ensure the drawing command has completed. Failure to do this could result in
|
| 79 |
+
new data being used by the previously issued drawing commands. It should be
|
| 80 |
+
noted that providing the maximum time between the drawing set fence and the
|
| 81 |
+
modification test/finish fence allows the most asynchronous behavior and
|
| 82 |
+
will result in the least stalling waiting for drawing completion. Techniques
|
| 83 |
+
such as double buffering vertex data can be used to help further prevent
|
| 84 |
+
stalls based on fence completion but are beyond the scope of this extension.
|
| 85 |
+
|
| 86 |
+
Once an application is finished with a specific vertex array range or at
|
| 87 |
+
latest prior to exit, and prior to freeing the memory associated with this
|
| 88 |
+
vertex array, the client should call VertexArrayRangeAPPLE with a data
|
| 89 |
+
location and length of 0 to allow the internal memory managers to complete
|
| 90 |
+
any commitments for the array range. In this case once
|
| 91 |
+
VertexArrayRangeAPPLE returns it is safe to de-allocate the memory.
|
| 92 |
+
|
| 93 |
+
Three types of storage hints are available for vertex array ranges; client,
|
| 94 |
+
shared, and cached. These hints are set by passing the
|
| 95 |
+
STORAGE_CLIENT_APPLE, STORAGE_SHARED_APPLE, or STORAGE_CACHED_APPLE param to
|
| 96 |
+
VertexArrayParameteriAPPLE with VERTEX_ARRAY_STORAGE_HINT_APPLE pname.
|
| 97 |
+
Client storage, the default OpenGL behavior, occurs when
|
| 98 |
+
VERTEX_ARRAY_RANGE_APPLE is disabled AND the STORAGE_CLIENT_APPLE hint is
|
| 99 |
+
set. Note, STORAGE_CLIENT_APPLE is also the default hint setting. Shared
|
| 100 |
+
memory usage is normally used for dynamic data that is expected to be
|
| 101 |
+
modified and is likely mapped to AGP memory space for access by both the
|
| 102 |
+
graphics hardware and client. It is set when either
|
| 103 |
+
VERTEX_ARRAY_RANGE_APPLE is enabled, without the STORAGE_CACHED_APPLE hint
|
| 104 |
+
being set, or in all cases when the STORAGE_SHARED_APPLE hint is set.
|
| 105 |
+
Finally, the cached storage is designed to support static data and data which
|
| 106 |
+
could be cached in VRAM. This provides maximum access bandwidth for the
|
| 107 |
+
vertex array and occurs when the STORAGE_CACHED_APPLE hint is set.
|
| 108 |
+
|
| 109 |
+
The following pseudo-code represents the treatment of a vertex array range
|
| 110 |
+
memory depending on the hint setting and whether vertex array range is
|
| 111 |
+
enabled for the client context:
|
| 112 |
+
|
| 113 |
+
if (VERTEX_ARRAY_STORAGE_HINT_APPLE == STORAGE_CACHED_APPLE)
|
| 114 |
+
vertex array is treated as cached
|
| 115 |
+
else if (VERTEX_ARRAY_STORAGE_HINT_APPLE == STORAGE_SHARED_APPLE)
|
| 116 |
+
vertex array is treated as shared
|
| 117 |
+
else if (VERTEX_ARRAY_RANGE_APPLE enabled)
|
| 118 |
+
vertex array is treated as shared
|
| 119 |
+
else
|
| 120 |
+
vertex array is treated as client
|
| 121 |
+
|
| 122 |
+
Note, these hints can affect how array flushes are handled and the overhead
|
| 123 |
+
associated with flushing the array, it is recommended that data be handled
|
| 124 |
+
as shared unless it really is static and there are no plans to modify it.
|
| 125 |
+
|
| 126 |
+
To summarize the vertex array range extension provides relaxed
|
| 127 |
+
synchronization rules for handling vertex array data allowing high bandwidth
|
| 128 |
+
asynchronous data transfer from client memory to graphics hardware.
|
| 129 |
+
Different flushing and synchronization rules are required to ensure data
|
| 130 |
+
coherency when modifying data. Lastly, memory handling hints are provided
|
| 131 |
+
to allow the tunning of memory storage and access for maximum efficiency.
|
| 132 |
+
|
| 133 |
+
The official definition of this extension is available here:
|
| 134 |
+
http://www.opengl.org/registry/specs/APPLE/vertex_array_range.txt
|
| 135 |
+
'''
|
| 136 |
+
from OpenGL import platform, constant, arrays
|
| 137 |
+
from OpenGL import extensions, wrapper
|
| 138 |
+
import ctypes
|
| 139 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 140 |
+
from OpenGL.raw.GL.APPLE.vertex_array_range import *
|
| 141 |
+
from OpenGL.raw.GL.APPLE.vertex_array_range import _EXTENSION_NAME
|
| 142 |
+
|
| 143 |
+
def glInitVertexArrayRangeAPPLE():
|
| 144 |
+
'''Return boolean indicating whether this extension is available'''
|
| 145 |
+
from OpenGL import extensions
|
| 146 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 147 |
+
|
| 148 |
+
glVertexArrayRangeAPPLE=wrapper.wrapper(glVertexArrayRangeAPPLE).setOutput(
|
| 149 |
+
'pointer',size=lambda x:(x,),pnameArg='length',orPassIn=True
|
| 150 |
+
)
|
| 151 |
+
glFlushVertexArrayRangeAPPLE=wrapper.wrapper(glFlushVertexArrayRangeAPPLE).setOutput(
|
| 152 |
+
'pointer',size=lambda x:(x,),pnameArg='length',orPassIn=True
|
| 153 |
+
)
|
| 154 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""OpenGL Extensions"""
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/blend_func_extended.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.blend_func_extended
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.blend_func_extended to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
Traditional OpenGL includes fixed-function blending that combines source
|
| 10 |
+
colors with the existing content of a render buffer in a variety of ways.
|
| 11 |
+
A number of extensions have enhanced this functionality by adding further
|
| 12 |
+
sources of blending weights and methods to combine them. However, the inputs
|
| 13 |
+
to the fixed-function blending units are constrained to a source color (as
|
| 14 |
+
output from fragment shading), destination color (as the current content
|
| 15 |
+
of the frame buffer) or constants that may be used in their place.
|
| 16 |
+
|
| 17 |
+
This extension adds new blending functions whereby a fragment shader may
|
| 18 |
+
output two colors, one of which is treated as the source color, and the
|
| 19 |
+
other used as a blending factor for either source or destination colors.
|
| 20 |
+
Furthermore, this extension increases orthogonality by allowing the
|
| 21 |
+
SRC_ALPHA_SATURATE function to be used as the destination weight.
|
| 22 |
+
|
| 23 |
+
The official definition of this extension is available here:
|
| 24 |
+
http://www.opengl.org/registry/specs/ARB/blend_func_extended.txt
|
| 25 |
+
'''
|
| 26 |
+
from OpenGL import platform, constant, arrays
|
| 27 |
+
from OpenGL import extensions, wrapper
|
| 28 |
+
import ctypes
|
| 29 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 30 |
+
from OpenGL.raw.GL.ARB.blend_func_extended import *
|
| 31 |
+
from OpenGL.raw.GL.ARB.blend_func_extended import _EXTENSION_NAME
|
| 32 |
+
|
| 33 |
+
def glInitBlendFuncExtendedARB():
|
| 34 |
+
'''Return boolean indicating whether this extension is available'''
|
| 35 |
+
from OpenGL import extensions
|
| 36 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/buffer_storage.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.buffer_storage
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.buffer_storage to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
OpenGL has long supported buffer objects as a means of storing data
|
| 10 |
+
that may be used to source vertex attributes, pixel data for textures,
|
| 11 |
+
uniforms and other elements. In un-extended GL, buffer data stores
|
| 12 |
+
are mutable - that is, they may be de-allocated or resized while they
|
| 13 |
+
are in use. The GL_ARB_texture_storage extension added immutable storage
|
| 14 |
+
for texture object (and was subsequently incorporated into OpenGL 4.2).
|
| 15 |
+
This extension further applies the concept of immutable storage to
|
| 16 |
+
buffer objects. If an implementation is aware of a buffer's immutability,
|
| 17 |
+
it may be able to make certain assumptions or apply particular
|
| 18 |
+
optimizations in order to increase performance or reliability.
|
| 19 |
+
|
| 20 |
+
Furthermore, this extension allows applications to pass additional
|
| 21 |
+
information about a requested allocation to the implementation which it
|
| 22 |
+
may use to select memory heaps, caching behavior or allocation strategies.
|
| 23 |
+
|
| 24 |
+
Finally, this extension introduces the concept of persistent client
|
| 25 |
+
mappings of buffer objects, which allow clients to retain pointers to a
|
| 26 |
+
buffer's data store returned as the result of a mapping, and to issue
|
| 27 |
+
drawing commands while those mappings are in place.
|
| 28 |
+
|
| 29 |
+
The official definition of this extension is available here:
|
| 30 |
+
http://www.opengl.org/registry/specs/ARB/buffer_storage.txt
|
| 31 |
+
'''
|
| 32 |
+
from OpenGL import platform, constant, arrays
|
| 33 |
+
from OpenGL import extensions, wrapper
|
| 34 |
+
import ctypes
|
| 35 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 36 |
+
from OpenGL.raw.GL.ARB.buffer_storage import *
|
| 37 |
+
from OpenGL.raw.GL.ARB.buffer_storage import _EXTENSION_NAME
|
| 38 |
+
|
| 39 |
+
def glInitBufferStorageARB():
|
| 40 |
+
'''Return boolean indicating whether this extension is available'''
|
| 41 |
+
from OpenGL import extensions
|
| 42 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 43 |
+
|
| 44 |
+
# INPUT glBufferStorage.data size not checked against size
|
| 45 |
+
glBufferStorage=wrapper.wrapper(glBufferStorage).setInputArraySize(
|
| 46 |
+
'data', None
|
| 47 |
+
)
|
| 48 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/color_buffer_float.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.color_buffer_float
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.color_buffer_float to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
The standard OpenGL pipeline is based on a fixed-point pipeline.
|
| 10 |
+
While color components are nominally floating-point values in the
|
| 11 |
+
pipeline, components are frequently clamped to the range [0,1] to
|
| 12 |
+
accomodate the fixed-point color buffer representation and allow
|
| 13 |
+
for fixed-point computational hardware.
|
| 14 |
+
|
| 15 |
+
This extension adds pixel formats or visuals with floating-point
|
| 16 |
+
RGBA color components and controls for clamping of color
|
| 17 |
+
components within the pipeline.
|
| 18 |
+
|
| 19 |
+
For a floating-point RGBA pixel format, the size of each float
|
| 20 |
+
components is specified using the same attributes that are used
|
| 21 |
+
for defining the size of fixed-point components. 32-bit
|
| 22 |
+
floating-point components are in the standard IEEE float format.
|
| 23 |
+
16-bit floating-point components have 1 sign bit, 5 exponent bits,
|
| 24 |
+
and 10 mantissa bits.
|
| 25 |
+
|
| 26 |
+
Clamping control provides a way to disable certain color clamps
|
| 27 |
+
and allow programs, and the fixed-function pipeline, to deal in
|
| 28 |
+
unclamped colors. There are controls to modify clamping of vertex
|
| 29 |
+
colors, clamping of fragment colors throughout the pipeline, and
|
| 30 |
+
for pixel return data.
|
| 31 |
+
|
| 32 |
+
The default state for fragment clamping is "FIXED_ONLY", which
|
| 33 |
+
has the behavior of clamping colors for fixed-point color buffers
|
| 34 |
+
and not clamping colors for floating-pont color buffers.
|
| 35 |
+
|
| 36 |
+
Vertex colors are clamped by default.
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
The official definition of this extension is available here:
|
| 40 |
+
http://www.opengl.org/registry/specs/ARB/color_buffer_float.txt
|
| 41 |
+
'''
|
| 42 |
+
from OpenGL import platform, constant, arrays
|
| 43 |
+
from OpenGL import extensions, wrapper
|
| 44 |
+
import ctypes
|
| 45 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 46 |
+
from OpenGL.raw.GL.ARB.color_buffer_float import *
|
| 47 |
+
from OpenGL.raw.GL.ARB.color_buffer_float import _EXTENSION_NAME
|
| 48 |
+
|
| 49 |
+
def glInitColorBufferFloatARB():
|
| 50 |
+
'''Return boolean indicating whether this extension is available'''
|
| 51 |
+
from OpenGL import extensions
|
| 52 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compatibility.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.compatibility
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.compatibility to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
The official definition of this extension is available here:
|
| 8 |
+
http://www.opengl.org/registry/specs/ARB/compatibility.txt
|
| 9 |
+
'''
|
| 10 |
+
from OpenGL import platform, constant, arrays
|
| 11 |
+
from OpenGL import extensions, wrapper
|
| 12 |
+
import ctypes
|
| 13 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 14 |
+
from OpenGL.raw.GL.ARB.compatibility import *
|
| 15 |
+
from OpenGL.raw.GL.ARB.compatibility import _EXTENSION_NAME
|
| 16 |
+
|
| 17 |
+
def glInitCompatibilityARB():
|
| 18 |
+
'''Return boolean indicating whether this extension is available'''
|
| 19 |
+
from OpenGL import extensions
|
| 20 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/compute_variable_group_size.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.compute_variable_group_size
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.compute_variable_group_size to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension allows applications to write generic compute shaders that
|
| 10 |
+
operate on work groups with arbitrary dimensions. Instead of specifying a
|
| 11 |
+
fixed work group size in the compute shader, an application can use a
|
| 12 |
+
compute shader using the /local_size_variable/ layout qualifer to indicate
|
| 13 |
+
a variable work group size. When using such compute shaders, the new
|
| 14 |
+
command DispatchComputeGroupSizeARB should be used to specify both a work
|
| 15 |
+
group size and work group count.
|
| 16 |
+
|
| 17 |
+
In this extension, compute shaders with fixed group sizes must be
|
| 18 |
+
dispatched by DispatchCompute and DispatchComputeIndirect. Compute
|
| 19 |
+
shaders with variable group sizes must be dispatched via
|
| 20 |
+
DispatchComputeGroupSizeARB. No support is provided in this extension for
|
| 21 |
+
indirect dispatch of compute shaders with a variable group size.
|
| 22 |
+
|
| 23 |
+
The official definition of this extension is available here:
|
| 24 |
+
http://www.opengl.org/registry/specs/ARB/compute_variable_group_size.txt
|
| 25 |
+
'''
|
| 26 |
+
from OpenGL import platform, constant, arrays
|
| 27 |
+
from OpenGL import extensions, wrapper
|
| 28 |
+
import ctypes
|
| 29 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 30 |
+
from OpenGL.raw.GL.ARB.compute_variable_group_size import *
|
| 31 |
+
from OpenGL.raw.GL.ARB.compute_variable_group_size import _EXTENSION_NAME
|
| 32 |
+
|
| 33 |
+
def glInitComputeVariableGroupSizeARB():
|
| 34 |
+
'''Return boolean indicating whether this extension is available'''
|
| 35 |
+
from OpenGL import extensions
|
| 36 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/conservative_depth.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.conservative_depth
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.conservative_depth to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
There is a common optimization for hardware accelerated implementation of
|
| 10 |
+
OpenGL which relies on an early depth test to be run before the fragment
|
| 11 |
+
shader so that the shader evaluation can be skipped if the fragment ends
|
| 12 |
+
up being discarded because it is occluded.
|
| 13 |
+
|
| 14 |
+
This optimization does not affect the final rendering, and is typically
|
| 15 |
+
possible when the fragment does not change the depth programmatically.
|
| 16 |
+
(i.e.: it does not write to the built-in gl_FragDepth output). There are,
|
| 17 |
+
however a class of operations on the depth in the shader which could
|
| 18 |
+
still be performed while allowing the early depth test to operate.
|
| 19 |
+
|
| 20 |
+
This extension allows the application to pass enough information to the
|
| 21 |
+
GL implementation to activate such optimizations safely.
|
| 22 |
+
|
| 23 |
+
The official definition of this extension is available here:
|
| 24 |
+
http://www.opengl.org/registry/specs/ARB/conservative_depth.txt
|
| 25 |
+
'''
|
| 26 |
+
from OpenGL import platform, constant, arrays
|
| 27 |
+
from OpenGL import extensions, wrapper
|
| 28 |
+
import ctypes
|
| 29 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 30 |
+
from OpenGL.raw.GL.ARB.conservative_depth import *
|
| 31 |
+
from OpenGL.raw.GL.ARB.conservative_depth import _EXTENSION_NAME
|
| 32 |
+
|
| 33 |
+
def glInitConservativeDepthARB():
|
| 34 |
+
'''Return boolean indicating whether this extension is available'''
|
| 35 |
+
from OpenGL import extensions
|
| 36 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/copy_buffer.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.copy_buffer
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.copy_buffer to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides a mechanism to do an accelerated copy from one
|
| 10 |
+
buffer object to another. This may be useful to load buffer objects
|
| 11 |
+
in a "loading thread" while minimizing cost and synchronization effort
|
| 12 |
+
in the "rendering thread."
|
| 13 |
+
|
| 14 |
+
The official definition of this extension is available here:
|
| 15 |
+
http://www.opengl.org/registry/specs/ARB/copy_buffer.txt
|
| 16 |
+
'''
|
| 17 |
+
from OpenGL import platform, constant, arrays
|
| 18 |
+
from OpenGL import extensions, wrapper
|
| 19 |
+
import ctypes
|
| 20 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 21 |
+
from OpenGL.raw.GL.ARB.copy_buffer import *
|
| 22 |
+
from OpenGL.raw.GL.ARB.copy_buffer import _EXTENSION_NAME
|
| 23 |
+
|
| 24 |
+
def glInitCopyBufferARB():
|
| 25 |
+
'''Return boolean indicating whether this extension is available'''
|
| 26 |
+
from OpenGL import extensions
|
| 27 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_buffer_float.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.depth_buffer_float
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.depth_buffer_float to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides new texture internal formats whose depth
|
| 10 |
+
components are stored as 32-bit floating-point values, rather than the
|
| 11 |
+
normalized unsigned integers used in existing depth formats.
|
| 12 |
+
Floating-point depth textures support all the functionality supported for
|
| 13 |
+
fixed-point depth textures, including shadow mapping and rendering support
|
| 14 |
+
via EXT_framebuffer_object. Floating-point depth textures can store
|
| 15 |
+
values outside the range [0,1].
|
| 16 |
+
|
| 17 |
+
Additionally, this extension provides new packed depth/stencil pixel
|
| 18 |
+
formats (see EXT_packed_depth_stencil) that have 64-bit pixels consisting
|
| 19 |
+
of a 32-bit floating-point depth value, 8 bits of stencil, and 24 unused
|
| 20 |
+
bites. A packed depth/stencil texture internal format is also provided.
|
| 21 |
+
|
| 22 |
+
This extension does not provide support for WGL or GLX pixel formats with
|
| 23 |
+
floating-point depth buffers. The existing (but not commonly used)
|
| 24 |
+
WGL_EXT_depth_float extension could be used for this purpose.
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
The official definition of this extension is available here:
|
| 28 |
+
http://www.opengl.org/registry/specs/ARB/depth_buffer_float.txt
|
| 29 |
+
'''
|
| 30 |
+
from OpenGL import platform, constant, arrays
|
| 31 |
+
from OpenGL import extensions, wrapper
|
| 32 |
+
import ctypes
|
| 33 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 34 |
+
from OpenGL.raw.GL.ARB.depth_buffer_float import *
|
| 35 |
+
from OpenGL.raw.GL.ARB.depth_buffer_float import _EXTENSION_NAME
|
| 36 |
+
|
| 37 |
+
def glInitDepthBufferFloatARB():
|
| 38 |
+
'''Return boolean indicating whether this extension is available'''
|
| 39 |
+
from OpenGL import extensions
|
| 40 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_clamp.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.depth_clamp
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.depth_clamp to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
Conventional OpenGL clips geometric primitives to a clip volume
|
| 10 |
+
with six faces, two of which are the near and far clip planes.
|
| 11 |
+
Clipping to the near and far planes of the clip volume ensures that
|
| 12 |
+
interpolated depth values (after the depth range transform) must be
|
| 13 |
+
in the [0,1] range.
|
| 14 |
+
|
| 15 |
+
In some rendering applications such as shadow volumes, it is useful
|
| 16 |
+
to allow line and polygon primitives to be rasterized without
|
| 17 |
+
clipping the primitive to the near or far clip volume planes (side
|
| 18 |
+
clip volume planes clip normally). Without the near and far clip
|
| 19 |
+
planes, rasterization (pixel coverage determination) in X and Y
|
| 20 |
+
can proceed normally if we ignore the near and far clip planes.
|
| 21 |
+
The one major issue is that fragments of a primitive may extend
|
| 22 |
+
beyond the conventional window space depth range for depth values
|
| 23 |
+
(typically the range [0,1]). Rather than discarding fragments that
|
| 24 |
+
defy the window space depth range (effectively what near and far
|
| 25 |
+
plane clipping accomplish), the depth values can be clamped to the
|
| 26 |
+
current depth range.
|
| 27 |
+
|
| 28 |
+
This extension provides exactly such functionality. This
|
| 29 |
+
functionality is useful to obviate the need for near plane capping
|
| 30 |
+
of stenciled shadow volumes. The functionality may also be useful
|
| 31 |
+
for rendering geometry "beyond" the far plane if an alternative
|
| 32 |
+
algorithm (rather than depth testing) for hidden surface removal is
|
| 33 |
+
applied to such geometry (specifically, the painter's algorithm).
|
| 34 |
+
Similar situations at the near clip plane can be avoided at the
|
| 35 |
+
near clip plane where apparently solid objects can be "seen through"
|
| 36 |
+
if they intersect the near clip plane.
|
| 37 |
+
|
| 38 |
+
The official definition of this extension is available here:
|
| 39 |
+
http://www.opengl.org/registry/specs/ARB/depth_clamp.txt
|
| 40 |
+
'''
|
| 41 |
+
from OpenGL import platform, constant, arrays
|
| 42 |
+
from OpenGL import extensions, wrapper
|
| 43 |
+
import ctypes
|
| 44 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 45 |
+
from OpenGL.raw.GL.ARB.depth_clamp import *
|
| 46 |
+
from OpenGL.raw.GL.ARB.depth_clamp import _EXTENSION_NAME
|
| 47 |
+
|
| 48 |
+
def glInitDepthClampARB():
|
| 49 |
+
'''Return boolean indicating whether this extension is available'''
|
| 50 |
+
from OpenGL import extensions
|
| 51 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/depth_texture.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.depth_texture
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.depth_texture to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This is a clarification of the GL_SGIX_depth_texture extension. The
|
| 10 |
+
original overview follows:
|
| 11 |
+
|
| 12 |
+
This extension defines a new depth texture format. An important
|
| 13 |
+
application of depth texture images is shadow casting, but separating
|
| 14 |
+
this from the shadow extension allows for the potential use of depth
|
| 15 |
+
textures in other applications such as image-based rendering or
|
| 16 |
+
displacement mapping. This extension does not define new depth-texture
|
| 17 |
+
environment functions, such as filtering or applying the depth values
|
| 18 |
+
computed from a texture but leaves this to other extensions, such as
|
| 19 |
+
the shadow extension.
|
| 20 |
+
|
| 21 |
+
The official definition of this extension is available here:
|
| 22 |
+
http://www.opengl.org/registry/specs/ARB/depth_texture.txt
|
| 23 |
+
'''
|
| 24 |
+
from OpenGL import platform, constant, arrays
|
| 25 |
+
from OpenGL import extensions, wrapper
|
| 26 |
+
import ctypes
|
| 27 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 28 |
+
from OpenGL.raw.GL.ARB.depth_texture import *
|
| 29 |
+
from OpenGL.raw.GL.ARB.depth_texture import _EXTENSION_NAME
|
| 30 |
+
|
| 31 |
+
def glInitDepthTextureARB():
|
| 32 |
+
'''Return boolean indicating whether this extension is available'''
|
| 33 |
+
from OpenGL import extensions
|
| 34 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/draw_instanced.py
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.draw_instanced
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.draw_instanced to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
A common use case in GL for some applications is to be able to
|
| 10 |
+
draw the same object, or groups of similar objects that share
|
| 11 |
+
vertex data, primitive count and type, multiple times. This
|
| 12 |
+
extension provides a means of accelerating such use cases while
|
| 13 |
+
restricting the number of API calls, and keeping the amount of
|
| 14 |
+
duplicate data to a minimum.
|
| 15 |
+
|
| 16 |
+
This extension introduces two draw calls which are conceptually
|
| 17 |
+
equivalent to a series of draw calls. Each conceptual call in
|
| 18 |
+
this series is considered an "instance" of the actual draw call.
|
| 19 |
+
|
| 20 |
+
This extension also introduces a read-only built-in variable to
|
| 21 |
+
GLSL which contains the "instance ID." This variable initially
|
| 22 |
+
contains 0, but increases by one after each conceptual draw call.
|
| 23 |
+
|
| 24 |
+
By using the instance ID or multiples thereof as an index into
|
| 25 |
+
a uniform array containing transform data, vertex shaders can
|
| 26 |
+
draw multiple instances of an object with a single draw call.
|
| 27 |
+
|
| 28 |
+
The official definition of this extension is available here:
|
| 29 |
+
http://www.opengl.org/registry/specs/ARB/draw_instanced.txt
|
| 30 |
+
'''
|
| 31 |
+
from OpenGL import platform, constant, arrays
|
| 32 |
+
from OpenGL import extensions, wrapper
|
| 33 |
+
import ctypes
|
| 34 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 35 |
+
from OpenGL.raw.GL.ARB.draw_instanced import *
|
| 36 |
+
from OpenGL.raw.GL.ARB.draw_instanced import _EXTENSION_NAME
|
| 37 |
+
|
| 38 |
+
def glInitDrawInstancedARB():
|
| 39 |
+
'''Return boolean indicating whether this extension is available'''
|
| 40 |
+
from OpenGL import extensions
|
| 41 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 42 |
+
|
| 43 |
+
# INPUT glDrawElementsInstancedARB.indices size not checked against 'count,type'
|
| 44 |
+
glDrawElementsInstancedARB=wrapper.wrapper(glDrawElementsInstancedARB).setInputArraySize(
|
| 45 |
+
'indices', None
|
| 46 |
+
)
|
| 47 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_attrib_location.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.explicit_attrib_location
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.explicit_attrib_location to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides a method to pre-assign attribute locations to
|
| 10 |
+
named vertex shader inputs and color numbers to named fragment shader
|
| 11 |
+
outputs. This allows applications to globally assign a particular
|
| 12 |
+
semantic meaning, such as diffuse color or vertex normal, to a particular
|
| 13 |
+
attribute location without knowing how that attribute will be named in any
|
| 14 |
+
particular shader.
|
| 15 |
+
|
| 16 |
+
The official definition of this extension is available here:
|
| 17 |
+
http://www.opengl.org/registry/specs/ARB/explicit_attrib_location.txt
|
| 18 |
+
'''
|
| 19 |
+
from OpenGL import platform, constant, arrays
|
| 20 |
+
from OpenGL import extensions, wrapper
|
| 21 |
+
import ctypes
|
| 22 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 23 |
+
from OpenGL.raw.GL.ARB.explicit_attrib_location import *
|
| 24 |
+
from OpenGL.raw.GL.ARB.explicit_attrib_location import _EXTENSION_NAME
|
| 25 |
+
|
| 26 |
+
def glInitExplicitAttribLocationARB():
|
| 27 |
+
'''Return boolean indicating whether this extension is available'''
|
| 28 |
+
from OpenGL import extensions
|
| 29 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/explicit_uniform_location.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.explicit_uniform_location
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.explicit_uniform_location to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides a method to pre-assign uniform locations to
|
| 10 |
+
uniform variables in the default uniform block, including subroutine
|
| 11 |
+
uniforms. This allows an application to modify the uniform values without
|
| 12 |
+
requiring a GL query like GetUniformLocation, GetSubroutineUniformLocation
|
| 13 |
+
and GetSubroutineIndex.
|
| 14 |
+
|
| 15 |
+
The official definition of this extension is available here:
|
| 16 |
+
http://www.opengl.org/registry/specs/ARB/explicit_uniform_location.txt
|
| 17 |
+
'''
|
| 18 |
+
from OpenGL import platform, constant, arrays
|
| 19 |
+
from OpenGL import extensions, wrapper
|
| 20 |
+
import ctypes
|
| 21 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 22 |
+
from OpenGL.raw.GL.ARB.explicit_uniform_location import *
|
| 23 |
+
from OpenGL.raw.GL.ARB.explicit_uniform_location import _EXTENSION_NAME
|
| 24 |
+
|
| 25 |
+
def glInitExplicitUniformLocationARB():
|
| 26 |
+
'''Return boolean indicating whether this extension is available'''
|
| 27 |
+
from OpenGL import extensions
|
| 28 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_coord_conventions.py
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.fragment_coord_conventions
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.fragment_coord_conventions to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides alternative conventions for the fragment
|
| 10 |
+
coordinate XY location available for programmable fragment processing.
|
| 11 |
+
|
| 12 |
+
The scope of this extension deals *only* with how the fragment
|
| 13 |
+
coordinate XY location appears during programming fragment processing.
|
| 14 |
+
Beyond the scope of this extension are coordinate conventions used
|
| 15 |
+
for rasterization or transformation.
|
| 16 |
+
|
| 17 |
+
In the case of the coordinate conventions for rasterization and
|
| 18 |
+
transformation, some combination of the viewport, depth range, culling
|
| 19 |
+
state, and projection matrix state can be reconfigured to adopt other
|
| 20 |
+
arbitrary clip-space and window-space coordinate space conventions.
|
| 21 |
+
Adopting other clip-space and window-space conventions involves
|
| 22 |
+
adjusting existing OpenGL state. However it is non-trivial to massage
|
| 23 |
+
an arbitrary fragment shader or program to adopt a different
|
| 24 |
+
window-space coordinate system because such shaders are encoded in
|
| 25 |
+
various textual representations.
|
| 26 |
+
|
| 27 |
+
The dominant 2D and 3D rendering APIs make two basic choices of
|
| 28 |
+
convention when locating fragments in window space.
|
| 29 |
+
|
| 30 |
+
The two choices are:
|
| 31 |
+
|
| 32 |
+
1) Is the origin nearest the lower-left- or upper-left-most pixel
|
| 33 |
+
of the window?
|
| 34 |
+
|
| 35 |
+
2) Is the (x,y) location of the pixel nearest the origin at (0,0)
|
| 36 |
+
or (0.5,0.5)?
|
| 37 |
+
|
| 38 |
+
OpenGL assumes a lower-left origin for window coordinates and assumes
|
| 39 |
+
pixel centers are located at half-pixel coordinates. This means
|
| 40 |
+
the XY location (0.5,0.5) corresponds to the lower-left-most pixel
|
| 41 |
+
in a window.
|
| 42 |
+
|
| 43 |
+
Other window coordinate conventions exist for other rendering APIs.
|
| 44 |
+
X11, GDI, and Direct3D version through DirectX 9 assume an upper-left
|
| 45 |
+
window origin and locate pixel centers at integer XY values.
|
| 46 |
+
By this alternative convention, the XY location (0,0) corresponds
|
| 47 |
+
to the upper-left-most pixel in a window.
|
| 48 |
+
|
| 49 |
+
Direct3D for DirectX 10 assumes an upper-left origin (as do prior
|
| 50 |
+
DirectX versions) yet assumes half-pixel coordinates (unlike prior
|
| 51 |
+
DirectX versions). By the DirectX 10 convention, the XY location
|
| 52 |
+
(0.5,0.5) corresponds to the upper-left-most pixel in a window.
|
| 53 |
+
|
| 54 |
+
Fragment shaders can directly access the location of a given
|
| 55 |
+
processed fragment in window space. We call this location the
|
| 56 |
+
"fragment coordinate".
|
| 57 |
+
|
| 58 |
+
This extension provides a means for fragment shaders written in GLSL
|
| 59 |
+
or OpenGL assembly extensions to specify alternative conventions
|
| 60 |
+
for determining the fragment coordinate value accessed during
|
| 61 |
+
programmable fragment processing.
|
| 62 |
+
|
| 63 |
+
The motivation for this extension is to provide an easy, efficient
|
| 64 |
+
means for fragment shaders accessing a fragment's window-space
|
| 65 |
+
location to adopt the fragment coordinate convention for which the
|
| 66 |
+
shader was originally written.
|
| 67 |
+
|
| 68 |
+
The official definition of this extension is available here:
|
| 69 |
+
http://www.opengl.org/registry/specs/ARB/fragment_coord_conventions.txt
|
| 70 |
+
'''
|
| 71 |
+
from OpenGL import platform, constant, arrays
|
| 72 |
+
from OpenGL import extensions, wrapper
|
| 73 |
+
import ctypes
|
| 74 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 75 |
+
from OpenGL.raw.GL.ARB.fragment_coord_conventions import *
|
| 76 |
+
from OpenGL.raw.GL.ARB.fragment_coord_conventions import _EXTENSION_NAME
|
| 77 |
+
|
| 78 |
+
def glInitFragmentCoordConventionsARB():
|
| 79 |
+
'''Return boolean indicating whether this extension is available'''
|
| 80 |
+
from OpenGL import extensions
|
| 81 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_program_shadow.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.fragment_program_shadow
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.fragment_program_shadow to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension extends ARB_fragment_program to remove
|
| 10 |
+
the interaction with ARB_shadow.
|
| 11 |
+
|
| 12 |
+
This extension defines the program option
|
| 13 |
+
"ARB_fragment_program_shadow".
|
| 14 |
+
|
| 15 |
+
If a fragment program specifies the option "ARB_fragment_program_shadow"
|
| 16 |
+
|
| 17 |
+
SHADOW1D, SHADOW2D, SHADOWRECT
|
| 18 |
+
|
| 19 |
+
are added as texture targets. When shadow map comparisons are
|
| 20 |
+
desired, specify the SHADOW1D, SHADOW2D, or SHADOWRECT texture
|
| 21 |
+
targets in texture instructions.
|
| 22 |
+
|
| 23 |
+
Programs must assure that the comparison mode for each depth
|
| 24 |
+
texture (TEXTURE_COMPARE_MODE) and/or the internal texture
|
| 25 |
+
format (DEPTH_COMPONENT) and the targets of the texture lookup
|
| 26 |
+
instructions match. Otherwise, if the comparison mode
|
| 27 |
+
and/or the internal texture format are inconsistent with the
|
| 28 |
+
texture target, the results of the texture lookup are undefined.
|
| 29 |
+
|
| 30 |
+
The official definition of this extension is available here:
|
| 31 |
+
http://www.opengl.org/registry/specs/ARB/fragment_program_shadow.txt
|
| 32 |
+
'''
|
| 33 |
+
from OpenGL import platform, constant, arrays
|
| 34 |
+
from OpenGL import extensions, wrapper
|
| 35 |
+
import ctypes
|
| 36 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 37 |
+
from OpenGL.raw.GL.ARB.fragment_program_shadow import *
|
| 38 |
+
from OpenGL.raw.GL.ARB.fragment_program_shadow import _EXTENSION_NAME
|
| 39 |
+
|
| 40 |
+
def glInitFragmentProgramShadowARB():
|
| 41 |
+
'''Return boolean indicating whether this extension is available'''
|
| 42 |
+
from OpenGL import extensions
|
| 43 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
### END AUTOGENERATED SECTION
|
| 47 |
+
|
| 48 |
+
# This extension is entirely within the fragment program functionality,
|
| 49 |
+
# it doesn't affect the function-level operations AFAICS.
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/fragment_shader.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.fragment_shader
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.fragment_shader to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension adds functionality to define fragment shader objects. A
|
| 10 |
+
fragment shader object is a shader object (see the ARB_shader_objects
|
| 11 |
+
extension) that, when attached to a program object, can be compiled and
|
| 12 |
+
linked to produce an executable that runs on the fragment processor in
|
| 13 |
+
OpenGL. The fragment processor is a programmable unit that replaces the
|
| 14 |
+
OpenGL 1.4 fixed-function texturing, color sum and fog stages. This
|
| 15 |
+
extension also defines how such an executable interacts with the fixed
|
| 16 |
+
functionality fragment processing of OpenGL 1.4. The language used to
|
| 17 |
+
write fragment shaders is not discussed here. That language is defined
|
| 18 |
+
in the OpenGL Shading Language specification as the Fragment Shading
|
| 19 |
+
Language.
|
| 20 |
+
|
| 21 |
+
The official definition of this extension is available here:
|
| 22 |
+
http://www.opengl.org/registry/specs/ARB/fragment_shader.txt
|
| 23 |
+
'''
|
| 24 |
+
from OpenGL import platform, constant, arrays
|
| 25 |
+
from OpenGL import extensions, wrapper
|
| 26 |
+
import ctypes
|
| 27 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 28 |
+
from OpenGL.raw.GL.ARB.fragment_shader import *
|
| 29 |
+
from OpenGL.raw.GL.ARB.fragment_shader import _EXTENSION_NAME
|
| 30 |
+
|
| 31 |
+
def glInitFragmentShaderARB():
|
| 32 |
+
'''Return boolean indicating whether this extension is available'''
|
| 33 |
+
from OpenGL import extensions
|
| 34 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_no_attachments.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.framebuffer_no_attachments
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.framebuffer_no_attachments to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
Framebuffer objects as introduced by ARB_framebuffer_object and OpenGL 3.0
|
| 10 |
+
provide a generalized mechanism for rendering to off-screen surfaces.
|
| 11 |
+
Each framebuffer object may have depth, stencil and zero or more color
|
| 12 |
+
attachments that can be written to by the GL. The size of the framebuffer
|
| 13 |
+
(width, height, layer count, sample count) is derived from the attachments
|
| 14 |
+
of that framebuffer. In unextended OpenGL 4.2, it is not legal to render
|
| 15 |
+
into a framebuffer object that has no attachments. Such a framebuffer
|
| 16 |
+
would be considered incomplete with the
|
| 17 |
+
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT status.
|
| 18 |
+
|
| 19 |
+
With OpenGL 4.2 and ARB_shader_image_load_store, fragment shaders are
|
| 20 |
+
capable of doing random access writes to buffer and texture memory via
|
| 21 |
+
image loads, stores, and atomics. This ability enables algorithms using
|
| 22 |
+
the conventional rasterizer to generate a collection of fragments, where
|
| 23 |
+
each fragment shader invocation will write its outputs to buffer or
|
| 24 |
+
texture memory using image stores or atomics. Such algorithms may have no
|
| 25 |
+
need to write color or depth values to a conventional framebuffer.
|
| 26 |
+
However, a framebuffer with no attachments will be considered incomplete
|
| 27 |
+
and no rasterization or fragment shader exectuion will occur. To avoid
|
| 28 |
+
such errors, an application may be required to create an otherwise
|
| 29 |
+
unnecessary "dummy" texture and attach it to the framebuffer (possibly
|
| 30 |
+
with color writes masked off). If the algorithm requires the rasterizer
|
| 31 |
+
to operate over a large number of pixels, this dummy texture will
|
| 32 |
+
needlessly consume a significant amount of memory.
|
| 33 |
+
|
| 34 |
+
This extension enables the algorithms described above to work even with a
|
| 35 |
+
framebuffer with no attachments. Applications can specify default width,
|
| 36 |
+
height, layer count, and sample count parameters for a framebuffer object.
|
| 37 |
+
When a framebuffer with no attachments is bound, it will be considered
|
| 38 |
+
complete as long as the application has specified non-zero default width
|
| 39 |
+
and height parameters. For the purposes of rasterization, the framebuffer
|
| 40 |
+
will be considered to have a width, height, layer count, and sample count
|
| 41 |
+
derived from its default parameters. Framebuffers with one or more
|
| 42 |
+
attachments are not affected by these default parameters; the size of the
|
| 43 |
+
framebuffer will still be derived from the sizes of the attachments in
|
| 44 |
+
that case.
|
| 45 |
+
|
| 46 |
+
Additionally, this extension provides queryable implementation-dependent
|
| 47 |
+
maximums for framebuffer width, height, layer count, and sample count,
|
| 48 |
+
which may differ from similar limits on textures and renderbuffers. These
|
| 49 |
+
maximums will be used to error-check the default framebuffer parameters
|
| 50 |
+
and also permit implementations to expose the ability to rasterize to an
|
| 51 |
+
attachment-less framebuffer larger than the maximum supported texture
|
| 52 |
+
size.
|
| 53 |
+
|
| 54 |
+
The official definition of this extension is available here:
|
| 55 |
+
http://www.opengl.org/registry/specs/ARB/framebuffer_no_attachments.txt
|
| 56 |
+
'''
|
| 57 |
+
from OpenGL import platform, constant, arrays
|
| 58 |
+
from OpenGL import extensions, wrapper
|
| 59 |
+
import ctypes
|
| 60 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 61 |
+
from OpenGL.raw.GL.ARB.framebuffer_no_attachments import *
|
| 62 |
+
from OpenGL.raw.GL.ARB.framebuffer_no_attachments import _EXTENSION_NAME
|
| 63 |
+
|
| 64 |
+
def glInitFramebufferNoAttachmentsARB():
|
| 65 |
+
'''Return boolean indicating whether this extension is available'''
|
| 66 |
+
from OpenGL import extensions
|
| 67 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 68 |
+
|
| 69 |
+
# INPUT glGetFramebufferParameteriv.params size not checked against 'pname'
|
| 70 |
+
glGetFramebufferParameteriv=wrapper.wrapper(glGetFramebufferParameteriv).setInputArraySize(
|
| 71 |
+
'params', None
|
| 72 |
+
)
|
| 73 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_object.py
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.framebuffer_object
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.framebuffer_object to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
ARB_framebuffer_object is an extension intended to address the following
|
| 10 |
+
goals:
|
| 11 |
+
|
| 12 |
+
- Reflect FBO-related functionality found in the OpenGL 3.0 specification.
|
| 13 |
+
|
| 14 |
+
- Integrate multiple disjoint extensions into a single ARB extension.
|
| 15 |
+
These extensions are:
|
| 16 |
+
|
| 17 |
+
EXT_framebuffer_object
|
| 18 |
+
EXT_framebuffer_blit
|
| 19 |
+
EXT_framebuffer_multisample
|
| 20 |
+
EXT_packed_depth_stencil
|
| 21 |
+
|
| 22 |
+
- Where appropriate, relax some of the constraints expressed by previous
|
| 23 |
+
FBO-related extensions. In particular the requirement of matching
|
| 24 |
+
attachment dimensions and component sizes has been relaxed, to allow
|
| 25 |
+
implementations the freedom to support more flexible usages where
|
| 26 |
+
possible.
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
ARB_framebuffer_object defines an interface for drawing to rendering
|
| 30 |
+
destinations other than the buffers provided to the GL by the
|
| 31 |
+
window-system.
|
| 32 |
+
|
| 33 |
+
In this extension, these newly defined rendering destinations are
|
| 34 |
+
known collectively as "framebuffer-attachable images". This
|
| 35 |
+
extension provides a mechanism for attaching framebuffer-attachable
|
| 36 |
+
images to the GL framebuffer as one of the standard GL logical
|
| 37 |
+
buffers: color, depth, and stencil. (Attaching a
|
| 38 |
+
framebuffer-attachable image to the accum logical buffer is left for
|
| 39 |
+
a future extension to define). When a framebuffer-attachable image
|
| 40 |
+
is attached to the framebuffer, it is used as the source and
|
| 41 |
+
destination of fragment operations as described in Chapter 4.
|
| 42 |
+
|
| 43 |
+
By allowing the use of a framebuffer-attachable image as a rendering
|
| 44 |
+
destination, this extension enables a form of "offscreen" rendering.
|
| 45 |
+
Furthermore, "render to texture" is supported by allowing the images
|
| 46 |
+
of a texture to be used as framebuffer-attachable images. A
|
| 47 |
+
particular image of a texture object is selected for use as a
|
| 48 |
+
framebuffer-attachable image by specifying the mipmap level, cube
|
| 49 |
+
map face (for a cube map texture), and layer (for a 3D texture)
|
| 50 |
+
that identifies the image. The "render to texture" semantics of
|
| 51 |
+
this extension are similar to performing traditional rendering to
|
| 52 |
+
the framebuffer, followed immediately by a call to CopyTexSubImage.
|
| 53 |
+
However, by using this extension instead, an application can achieve
|
| 54 |
+
the same effect, but with the advantage that the GL can usually
|
| 55 |
+
eliminate the data copy that would have been incurred by calling
|
| 56 |
+
CopyTexSubImage.
|
| 57 |
+
|
| 58 |
+
This extension also defines a new GL object type, called a
|
| 59 |
+
"renderbuffer", which encapsulates a single 2D pixel image. The
|
| 60 |
+
image of renderbuffer can be used as a framebuffer-attachable image
|
| 61 |
+
for generalized offscreen rendering and it also provides a means to
|
| 62 |
+
support rendering to GL logical buffer types which have no
|
| 63 |
+
corresponding texture format (stencil, accum, etc). A renderbuffer
|
| 64 |
+
is similar to a texture in that both renderbuffers and textures can
|
| 65 |
+
be independently allocated and shared among multiple contexts. The
|
| 66 |
+
framework defined by this extension is general enough that support
|
| 67 |
+
for attaching images from GL objects other than textures and
|
| 68 |
+
renderbuffers could be added by layered extensions.
|
| 69 |
+
|
| 70 |
+
To facilitate efficient switching between collections of
|
| 71 |
+
framebuffer-attachable images, this extension introduces another new
|
| 72 |
+
GL object, called a framebuffer object. A framebuffer object
|
| 73 |
+
contains the state that defines the traditional GL framebuffer,
|
| 74 |
+
including its set of images. Prior to this extension, it was the
|
| 75 |
+
window-system which defined and managed this collection of images,
|
| 76 |
+
traditionally by grouping them into a "drawable". The window-system
|
| 77 |
+
API's would also provide a function (i.e., wglMakeCurrent,
|
| 78 |
+
glXMakeCurrent, aglSetDrawable, etc.) to bind a drawable with a GL
|
| 79 |
+
context (as is done in the WGL_ARB_pbuffer extension). In this
|
| 80 |
+
extension however, this functionality is subsumed by the GL and the
|
| 81 |
+
GL provides the function BindFramebufferARB to bind a framebuffer
|
| 82 |
+
object to the current context. Later, the context can bind back to
|
| 83 |
+
the window-system-provided framebuffer in order to display rendered
|
| 84 |
+
content.
|
| 85 |
+
|
| 86 |
+
Previous extensions that enabled rendering to a texture have been
|
| 87 |
+
much more complicated. One example is the combination of
|
| 88 |
+
ARB_pbuffer and ARB_render_texture, both of which are window-system
|
| 89 |
+
extensions. This combination requires calling MakeCurrent, an
|
| 90 |
+
operation that may be expensive, to switch between the window and
|
| 91 |
+
the pbuffer drawables. An application must create one pbuffer per
|
| 92 |
+
renderable texture in order to portably use ARB_render_texture. An
|
| 93 |
+
application must maintain at least one GL context per texture
|
| 94 |
+
format, because each context can only operate on a single
|
| 95 |
+
pixelformat or FBConfig. All of these characteristics make
|
| 96 |
+
ARB_render_texture both inefficient and cumbersome to use.
|
| 97 |
+
|
| 98 |
+
ARB_framebuffer_object, on the other hand, is both simpler to use
|
| 99 |
+
and more efficient than ARB_render_texture. The
|
| 100 |
+
ARB_framebuffer_object API is contained wholly within the GL API and
|
| 101 |
+
has no (non-portable) window-system components. Under
|
| 102 |
+
ARB_framebuffer_object, it is not necessary to create a second GL
|
| 103 |
+
context when rendering to a texture image whose format differs from
|
| 104 |
+
that of the window. Finally, unlike the pbuffers of
|
| 105 |
+
ARB_render_texture, a single framebuffer object can facilitate
|
| 106 |
+
rendering to an unlimited number of texture objects.
|
| 107 |
+
|
| 108 |
+
This extension differs from EXT_framebuffer_object by splitting the
|
| 109 |
+
framebuffer object binding point into separate DRAW and READ
|
| 110 |
+
bindings (incorporating functionality introduced by
|
| 111 |
+
EXT_framebuffer_blit). This allows copying directly from one
|
| 112 |
+
framebuffer to another. In addition, a new high performance blit
|
| 113 |
+
function is added to facilitate these blits and perform some data
|
| 114 |
+
conversion where allowed.
|
| 115 |
+
|
| 116 |
+
This extension also enables usage of multisampling in conjunction with
|
| 117 |
+
renderbuffers (incorporating functionality from
|
| 118 |
+
EXT_packed_depth_stencil), as follows:
|
| 119 |
+
|
| 120 |
+
The new operation RenderbufferStorageMultisample() allocates
|
| 121 |
+
storage for a renderbuffer object that can be used as a multisample
|
| 122 |
+
buffer. A multisample render buffer image differs from a
|
| 123 |
+
single-sample render buffer image in that a multisample image has a
|
| 124 |
+
number of SAMPLES that is greater than zero. No method is provided
|
| 125 |
+
for creating multisample texture images.
|
| 126 |
+
|
| 127 |
+
All of the framebuffer-attachable images attached to a framebuffer
|
| 128 |
+
object must have the same number of SAMPLES or else the framebuffer
|
| 129 |
+
object is not "framebuffer complete". If a framebuffer object with
|
| 130 |
+
multisample attachments is "framebuffer complete", then the
|
| 131 |
+
framebuffer object behaves as if SAMPLE_BUFFERS is one.
|
| 132 |
+
|
| 133 |
+
In traditional multisample rendering, where
|
| 134 |
+
DRAW_FRAMEBUFFER_BINDING is zero and SAMPLE_BUFFERS is one, the
|
| 135 |
+
GL spec states that "the color sample values are resolved to a
|
| 136 |
+
single, displayable color each time a pixel is updated." There are,
|
| 137 |
+
however, several modern hardware implementations that do not
|
| 138 |
+
actually resolve for each sample update, but instead postpones the
|
| 139 |
+
resolve operation to a later time and resolve a batch of sample
|
| 140 |
+
updates at a time. This is OK as long as the implementation behaves
|
| 141 |
+
"as if" it had resolved a sample-at-a-time. Unfortunately, however,
|
| 142 |
+
honoring the "as if" rule can sometimes degrade performance.
|
| 143 |
+
|
| 144 |
+
In contrast, when DRAW_FRAMEBUFFER_BINDING is an
|
| 145 |
+
application-created framebuffer object, MULTISAMPLE is enabled, and
|
| 146 |
+
SAMPLE_BUFFERS is one, there is no implicit per-sample-update
|
| 147 |
+
resolve. Instead, the application explicitly controls when the
|
| 148 |
+
resolve operation is performed. The resolve operation is affected
|
| 149 |
+
by calling BlitFramebuffer where the source is a multisample
|
| 150 |
+
application-created framebuffer object and the destination is a
|
| 151 |
+
single-sample framebuffer object (either application-created or
|
| 152 |
+
window-system provided).
|
| 153 |
+
|
| 154 |
+
This design for multisample resolve more closely matches current
|
| 155 |
+
hardware, but still permits implementations which choose to resolve
|
| 156 |
+
a single sample at a time. If hardware that implements the
|
| 157 |
+
multisample resolution "one sample at a time" exposes
|
| 158 |
+
ARB_framebuffer_object, it could perform the implicit resolve
|
| 159 |
+
to a driver-managed hidden surface, then read from that surface when
|
| 160 |
+
the application calls BlitFramebuffer.
|
| 161 |
+
|
| 162 |
+
Another motivation for granting the application explicit control
|
| 163 |
+
over the multisample resolve operation has to do with the
|
| 164 |
+
flexibility afforded by ARB_framebuffer_object. Previously, a
|
| 165 |
+
drawable (window or pbuffer) had exclusive access to all of its
|
| 166 |
+
buffers. There was no mechanism for sharing a buffer across
|
| 167 |
+
multiple drawables. Under ARB_framebuffer_object, however, a
|
| 168 |
+
mechanism exists for sharing a framebuffer-attachable image across
|
| 169 |
+
several framebuffer objects, as well as sharing an image between a
|
| 170 |
+
framebuffer object and a texture. If we had retained the "implicit"
|
| 171 |
+
resolve from traditional multisampled rendering, and allowed the
|
| 172 |
+
creation of "multisample" format renderbuffers, then this type of
|
| 173 |
+
sharing would have lead to two problematic situations:
|
| 174 |
+
|
| 175 |
+
* Two contexts, which shared renderbuffers, might perform
|
| 176 |
+
competing resolve operations into the same single-sample buffer
|
| 177 |
+
with ambiguous results.
|
| 178 |
+
|
| 179 |
+
* It would have introduced the unfortunate ability to use the
|
| 180 |
+
single-sample buffer as a texture while MULTISAMPLE is ENABLED.
|
| 181 |
+
|
| 182 |
+
Using BlitFramebuffer as an explicit resolve to serialize access to
|
| 183 |
+
the multisampled contents and eliminate the implicit per-sample
|
| 184 |
+
resolve operation, we avoid both of these problems.
|
| 185 |
+
|
| 186 |
+
This extension also enables usage of packed depth-stencil formats in
|
| 187 |
+
renderbuffers (incorporating functionality from
|
| 188 |
+
EXT_packed_depth_stencil), as follows:
|
| 189 |
+
|
| 190 |
+
Many OpenGL implementations have chosen to interleave the depth and
|
| 191 |
+
stencil buffers into one buffer, often with 24 bits of depth
|
| 192 |
+
precision and 8 bits of stencil data. 32 bits is more than is
|
| 193 |
+
needed for the depth buffer much of the time; a 24-bit depth buffer,
|
| 194 |
+
on the other hand, requires that reads and writes of depth data be
|
| 195 |
+
unaligned with respect to power-of-two boundaries. On the other
|
| 196 |
+
hand, 8 bits of stencil data is more than sufficient for most
|
| 197 |
+
applications, so it is only natural to pack the two buffers into a
|
| 198 |
+
single buffer with both depth and stencil data. OpenGL never
|
| 199 |
+
provides direct access to the buffers, so the OpenGL implementation
|
| 200 |
+
can provide an interface to applications where it appears the one
|
| 201 |
+
merged buffer is composed of two logical buffers.
|
| 202 |
+
|
| 203 |
+
One disadvantage of this scheme is that OpenGL lacks any means by
|
| 204 |
+
which this packed data can be handled efficiently. For example,
|
| 205 |
+
when an application reads from the 24-bit depth buffer, using the
|
| 206 |
+
type GL_UNSIGNED_SHORT will lose 8 bits of data, while
|
| 207 |
+
GL_UNSIGNED_INT has 8 too many. Both require expensive format
|
| 208 |
+
conversion operations. A 24-bit format would be no more suitable,
|
| 209 |
+
because it would also suffer from the unaligned memory accesses that
|
| 210 |
+
made the standalone 24-bit depth buffer an unattractive proposition
|
| 211 |
+
in the first place.
|
| 212 |
+
|
| 213 |
+
Many applications, such as parallel rendering applications, may also
|
| 214 |
+
wish to draw to or read back from both the depth and stencil buffers
|
| 215 |
+
at the same time. Currently this requires two separate operations,
|
| 216 |
+
reducing performance. Since the buffers are interleaved, drawing to
|
| 217 |
+
or reading from both should be no more expensive than using just
|
| 218 |
+
one; in some cases, it may even be cheaper.
|
| 219 |
+
|
| 220 |
+
This extension provides a new data format, GL_DEPTH_STENCIL,
|
| 221 |
+
that can be used with the glDrawPixels, glReadPixels, and
|
| 222 |
+
glCopyPixels commands, as well as a packed data type,
|
| 223 |
+
GL_UNSIGNED_INT_24_8, that is meant to be used with
|
| 224 |
+
GL_DEPTH_STENCIL. No other data types are supported with
|
| 225 |
+
GL_DEPTH_STENCIL. If ARB_depth_texture or SGIX_depth_texture is
|
| 226 |
+
supported, GL_DEPTH_STENCIL/GL_UNSIGNED_INT_24_8 data can
|
| 227 |
+
also be used for textures; this provides a more efficient way to
|
| 228 |
+
supply data for a 24-bit depth texture.
|
| 229 |
+
|
| 230 |
+
GL_DEPTH_STENCIL data, when passed through the pixel path,
|
| 231 |
+
undergoes both depth and stencil operations. The depth data is
|
| 232 |
+
scaled and biased by the current GL_DEPTH_SCALE and GL_DEPTH_BIAS,
|
| 233 |
+
while the stencil data is shifted and offset by the current
|
| 234 |
+
GL_INDEX_SHIFT and GL_INDEX_OFFSET. The stencil data is also put
|
| 235 |
+
through the stencil-to-stencil pixel map.
|
| 236 |
+
|
| 237 |
+
glDrawPixels of GL_DEPTH_STENCIL data operates similarly to that
|
| 238 |
+
of GL_STENCIL_INDEX data, bypassing the OpenGL fragment pipeline
|
| 239 |
+
entirely, unlike the treatment of GL_DEPTH_COMPONENT data. The
|
| 240 |
+
stencil and depth masks are applied, as are the pixel ownership and
|
| 241 |
+
scissor tests, but all other operations are skipped.
|
| 242 |
+
|
| 243 |
+
glReadPixels of GL_DEPTH_STENCIL data reads back a rectangle
|
| 244 |
+
from both the depth and stencil buffers.
|
| 245 |
+
|
| 246 |
+
glCopyPixels of GL_DEPTH_STENCIL data copies a rectangle from
|
| 247 |
+
both the depth and stencil buffers. Like glDrawPixels, it applies
|
| 248 |
+
both the stencil and depth masks but skips the remainder of the
|
| 249 |
+
OpenGL fragment pipeline.
|
| 250 |
+
|
| 251 |
+
glTex[Sub]Image[1,2,3]D of GL_DEPTH_STENCIL data loads depth and
|
| 252 |
+
stencil data into a depth_stencil texture. glGetTexImage of
|
| 253 |
+
GL_DEPTH_STENCIL data can be used to retrieve depth and stencil
|
| 254 |
+
data from a depth/stencil texture.
|
| 255 |
+
|
| 256 |
+
In addition, a new base internal format, GL_DEPTH_STENCIL, can
|
| 257 |
+
be used by both texture images and renderbuffer storage. When an
|
| 258 |
+
image with a DEPTH_STENCIL internal format is attached to both
|
| 259 |
+
the depth and stencil attachment points of a framebuffer object,
|
| 260 |
+
then it becomes both the depth and stencil
|
| 261 |
+
buffers of the framebuffer. This fits nicely with hardware that
|
| 262 |
+
interleaves both depth and stencil data into a single buffer. When
|
| 263 |
+
a texture with DEPTH_STENCIL data is bound for texturing, only
|
| 264 |
+
the depth component is accessible through the texture fetcher. The
|
| 265 |
+
stencil data can be written with TexImage or CopyTexImage, and can
|
| 266 |
+
be read with GetTexImage. When a DEPTH_STENCIL image is
|
| 267 |
+
attached to the stencil attachment of the bound framebuffer object,
|
| 268 |
+
the stencil data can be accessed through any operation that reads
|
| 269 |
+
from or writes to the framebuffer's stencil buffer.
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
The official definition of this extension is available here:
|
| 273 |
+
http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt
|
| 274 |
+
'''
|
| 275 |
+
from OpenGL import platform, constant, arrays
|
| 276 |
+
from OpenGL import extensions, wrapper
|
| 277 |
+
import ctypes
|
| 278 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 279 |
+
from OpenGL.raw.GL.ARB.framebuffer_object import *
|
| 280 |
+
from OpenGL.raw.GL.ARB.framebuffer_object import _EXTENSION_NAME
|
| 281 |
+
|
| 282 |
+
def glInitFramebufferObjectARB():
|
| 283 |
+
'''Return boolean indicating whether this extension is available'''
|
| 284 |
+
from OpenGL import extensions
|
| 285 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 286 |
+
|
| 287 |
+
# INPUT glDeleteRenderbuffers.renderbuffers size not checked against n
|
| 288 |
+
glDeleteRenderbuffers=wrapper.wrapper(glDeleteRenderbuffers).setInputArraySize(
|
| 289 |
+
'renderbuffers', None
|
| 290 |
+
)
|
| 291 |
+
glGenRenderbuffers=wrapper.wrapper(glGenRenderbuffers).setOutput(
|
| 292 |
+
'renderbuffers',size=lambda x:(x,),pnameArg='n',orPassIn=True
|
| 293 |
+
)
|
| 294 |
+
glGetRenderbufferParameteriv=wrapper.wrapper(glGetRenderbufferParameteriv).setOutput(
|
| 295 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 296 |
+
)
|
| 297 |
+
# INPUT glDeleteFramebuffers.framebuffers size not checked against n
|
| 298 |
+
glDeleteFramebuffers=wrapper.wrapper(glDeleteFramebuffers).setInputArraySize(
|
| 299 |
+
'framebuffers', None
|
| 300 |
+
)
|
| 301 |
+
glGenFramebuffers=wrapper.wrapper(glGenFramebuffers).setOutput(
|
| 302 |
+
'framebuffers',size=lambda x:(x,),pnameArg='n',orPassIn=True
|
| 303 |
+
)
|
| 304 |
+
glGetFramebufferAttachmentParameteriv=wrapper.wrapper(glGetFramebufferAttachmentParameteriv).setOutput(
|
| 305 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 306 |
+
)
|
| 307 |
+
### END AUTOGENERATED SECTION
|
| 308 |
+
from OpenGL.lazywrapper import lazy as _lazy
|
| 309 |
+
|
| 310 |
+
glGenFramebuffers = wrapper.wrapper(glGenFramebuffers).setOutput(
|
| 311 |
+
'framebuffers',
|
| 312 |
+
lambda x: (x,),
|
| 313 |
+
'n', orPassIn=True)
|
| 314 |
+
|
| 315 |
+
glGenRenderbuffers = wrapper.wrapper(glGenRenderbuffers).setOutput(
|
| 316 |
+
'renderbuffers',
|
| 317 |
+
lambda x: (x,),
|
| 318 |
+
'n', orPassIn=True)
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
@_lazy( glDeleteFramebuffers )
|
| 322 |
+
def glDeleteFramebuffers( baseOperation, n, framebuffers=None ):
|
| 323 |
+
"""glDeleteFramebuffers( framebuffers ) -> None
|
| 324 |
+
"""
|
| 325 |
+
if framebuffers is None:
|
| 326 |
+
framebuffers = arrays.GLuintArray.asArray( n )
|
| 327 |
+
n = arrays.GLuintArray.arraySize( framebuffers )
|
| 328 |
+
return baseOperation( n, framebuffers )
|
| 329 |
+
|
| 330 |
+
# Setup the GL_UNSIGNED_INT_24_8 image type
|
| 331 |
+
from OpenGL import images
|
| 332 |
+
from OpenGL.raw.GL.VERSION.GL_1_1 import GL_UNSIGNED_INT
|
| 333 |
+
images.TYPE_TO_ARRAYTYPE[ GL_UNSIGNED_INT_24_8 ] = GL_UNSIGNED_INT
|
| 334 |
+
images.TIGHT_PACK_FORMATS[ GL_UNSIGNED_INT_24_8 ] = 4
|
| 335 |
+
|
| 336 |
+
# The extensions actually use the _EXT forms, which is a bit confusing
|
| 337 |
+
# for users, IMO.
|
| 338 |
+
GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = constant.Constant( 'GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS', 0x8CD9 )
|
| 339 |
+
GL_FRAMEBUFFER_INCOMPLETE_FORMATS = constant.Constant( 'GL_FRAMEBUFFER_INCOMPLETE_FORMATS', 0x8CDA )
|
| 340 |
+
GL_FRAMEBUFFER_UNSUPPORTED = constant.Constant( 'GL_FRAMEBUFFER_UNSUPPORTED', 0x8CDD )
|
| 341 |
+
del images
|
| 342 |
+
del GL_UNSIGNED_INT
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/framebuffer_sRGB.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.framebuffer_sRGB
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.framebuffer_sRGB to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
Conventionally, OpenGL assumes framebuffer color components are stored
|
| 10 |
+
in a linear color space. In particular, framebuffer blending is a
|
| 11 |
+
linear operation.
|
| 12 |
+
|
| 13 |
+
The sRGB color space is based on typical (non-linear) monitor
|
| 14 |
+
characteristics expected in a dimly lit office. It has been
|
| 15 |
+
standardized by the International Electrotechnical Commission (IEC)
|
| 16 |
+
as IEC 61966-2-1. The sRGB color space roughly corresponds to 2.2
|
| 17 |
+
gamma correction.
|
| 18 |
+
|
| 19 |
+
This extension adds a framebuffer capability for sRGB framebuffer
|
| 20 |
+
update and blending. When blending is disabled but the new sRGB
|
| 21 |
+
updated mode is enabled (assume the framebuffer supports the
|
| 22 |
+
capability), high-precision linear color component values for red,
|
| 23 |
+
green, and blue generated by fragment coloring are encoded for sRGB
|
| 24 |
+
prior to being written into the framebuffer. When blending is enabled
|
| 25 |
+
along with the new sRGB update mode, red, green, and blue framebuffer
|
| 26 |
+
color components are treated as sRGB values that are converted to
|
| 27 |
+
linear color values, blended with the high-precision color values
|
| 28 |
+
generated by fragment coloring, and then the blend result is encoded
|
| 29 |
+
for sRGB just prior to being written into the framebuffer.
|
| 30 |
+
|
| 31 |
+
The primary motivation for this extension is that it allows OpenGL
|
| 32 |
+
applications to render into a framebuffer that is scanned to a monitor
|
| 33 |
+
configured to assume framebuffer color values are sRGB encoded.
|
| 34 |
+
This assumption is roughly true of most PC monitors with default
|
| 35 |
+
gamma correction. This allows applications to achieve faithful
|
| 36 |
+
color reproduction for OpenGL rendering without adjusting the
|
| 37 |
+
monitor's gamma correction.
|
| 38 |
+
|
| 39 |
+
The official definition of this extension is available here:
|
| 40 |
+
http://www.opengl.org/registry/specs/ARB/framebuffer_sRGB.txt
|
| 41 |
+
'''
|
| 42 |
+
from OpenGL import platform, constant, arrays
|
| 43 |
+
from OpenGL import extensions, wrapper
|
| 44 |
+
import ctypes
|
| 45 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 46 |
+
from OpenGL.raw.GL.ARB.framebuffer_sRGB import *
|
| 47 |
+
from OpenGL.raw.GL.ARB.framebuffer_sRGB import _EXTENSION_NAME
|
| 48 |
+
|
| 49 |
+
def glInitFramebufferSrgbARB():
|
| 50 |
+
'''Return boolean indicating whether this extension is available'''
|
| 51 |
+
from OpenGL import extensions
|
| 52 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/geometry_shader4.py
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.geometry_shader4
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.geometry_shader4 to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
ARB_geometry_shader4 defines a new shader type available to be run on the
|
| 10 |
+
GPU, called a geometry shader. Geometry shaders are run after vertices are
|
| 11 |
+
transformed, but prior to color clamping, flat shading and clipping.
|
| 12 |
+
|
| 13 |
+
A geometry shader begins with a single primitive (point, line,
|
| 14 |
+
triangle). It can read the attributes of any of the vertices in the
|
| 15 |
+
primitive and use them to generate new primitives. A geometry shader has a
|
| 16 |
+
fixed output primitive type (point, line strip, or triangle strip) and
|
| 17 |
+
emits vertices to define a new primitive. A geometry shader can emit
|
| 18 |
+
multiple disconnected primitives. The primitives emitted by the geometry
|
| 19 |
+
shader are clipped and then processed like an equivalent OpenGL primitive
|
| 20 |
+
specified by the application.
|
| 21 |
+
|
| 22 |
+
Furthermore, ARB_geometry_shader4 provides four additional primitive
|
| 23 |
+
types: lines with adjacency, line strips with adjacency, separate
|
| 24 |
+
triangles with adjacency, and triangle strips with adjacency. Some of the
|
| 25 |
+
vertices specified in these new primitive types are not part of the
|
| 26 |
+
ordinary primitives, instead they represent neighboring vertices that are
|
| 27 |
+
adjacent to the two line segment end points (lines/strips) or the three
|
| 28 |
+
triangle edges (triangles/tstrips). These vertices can be accessed by
|
| 29 |
+
geometry shaders and used to match up the vertices emitted by the geometry
|
| 30 |
+
shader with those of neighboring primitives.
|
| 31 |
+
|
| 32 |
+
Since geometry shaders expect a specific input primitive type, an error
|
| 33 |
+
will occur if the application presents primitives of a different type.
|
| 34 |
+
For example, if a geometry shader expects points, an error will occur at
|
| 35 |
+
Begin() time, if a primitive mode of TRIANGLES is specified.
|
| 36 |
+
|
| 37 |
+
The official definition of this extension is available here:
|
| 38 |
+
http://www.opengl.org/registry/specs/ARB/geometry_shader4.txt
|
| 39 |
+
'''
|
| 40 |
+
from OpenGL import platform, constant, arrays
|
| 41 |
+
from OpenGL import extensions, wrapper
|
| 42 |
+
import ctypes
|
| 43 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 44 |
+
from OpenGL.raw.GL.ARB.geometry_shader4 import *
|
| 45 |
+
from OpenGL.raw.GL.ARB.geometry_shader4 import _EXTENSION_NAME
|
| 46 |
+
|
| 47 |
+
def glInitGeometryShader4ARB():
|
| 48 |
+
'''Return boolean indicating whether this extension is available'''
|
| 49 |
+
from OpenGL import extensions
|
| 50 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/imaging.py
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.imaging
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.imaging to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
The official definition of this extension is available here:
|
| 8 |
+
http://www.opengl.org/registry/specs/ARB/imaging.txt
|
| 9 |
+
'''
|
| 10 |
+
from OpenGL import platform, constant, arrays
|
| 11 |
+
from OpenGL import extensions, wrapper
|
| 12 |
+
import ctypes
|
| 13 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 14 |
+
from OpenGL.raw.GL.ARB.imaging import *
|
| 15 |
+
from OpenGL.raw.GL.ARB.imaging import _EXTENSION_NAME
|
| 16 |
+
|
| 17 |
+
def glInitImagingARB():
|
| 18 |
+
'''Return boolean indicating whether this extension is available'''
|
| 19 |
+
from OpenGL import extensions
|
| 20 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 21 |
+
|
| 22 |
+
# INPUT glColorTable.table size not checked against 'format,type,width'
|
| 23 |
+
glColorTable=wrapper.wrapper(glColorTable).setInputArraySize(
|
| 24 |
+
'table', None
|
| 25 |
+
)
|
| 26 |
+
# INPUT glColorTableParameterfv.params size not checked against 'pname'
|
| 27 |
+
glColorTableParameterfv=wrapper.wrapper(glColorTableParameterfv).setInputArraySize(
|
| 28 |
+
'params', None
|
| 29 |
+
)
|
| 30 |
+
# INPUT glColorTableParameteriv.params size not checked against 'pname'
|
| 31 |
+
glColorTableParameteriv=wrapper.wrapper(glColorTableParameteriv).setInputArraySize(
|
| 32 |
+
'params', None
|
| 33 |
+
)
|
| 34 |
+
# OUTPUT glGetColorTable.table COMPSIZE(target,format,type)
|
| 35 |
+
glGetColorTableParameterfv=wrapper.wrapper(glGetColorTableParameterfv).setOutput(
|
| 36 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 37 |
+
)
|
| 38 |
+
glGetColorTableParameteriv=wrapper.wrapper(glGetColorTableParameteriv).setOutput(
|
| 39 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 40 |
+
)
|
| 41 |
+
# INPUT glColorSubTable.data size not checked against 'format,type,count'
|
| 42 |
+
glColorSubTable=wrapper.wrapper(glColorSubTable).setInputArraySize(
|
| 43 |
+
'data', None
|
| 44 |
+
)
|
| 45 |
+
# INPUT glConvolutionFilter1D.image size not checked against 'format,type,width'
|
| 46 |
+
glConvolutionFilter1D=wrapper.wrapper(glConvolutionFilter1D).setInputArraySize(
|
| 47 |
+
'image', None
|
| 48 |
+
)
|
| 49 |
+
# INPUT glConvolutionFilter2D.image size not checked against 'format,type,width,height'
|
| 50 |
+
glConvolutionFilter2D=wrapper.wrapper(glConvolutionFilter2D).setInputArraySize(
|
| 51 |
+
'image', None
|
| 52 |
+
)
|
| 53 |
+
# INPUT glConvolutionParameterfv.params size not checked against 'pname'
|
| 54 |
+
glConvolutionParameterfv=wrapper.wrapper(glConvolutionParameterfv).setInputArraySize(
|
| 55 |
+
'params', None
|
| 56 |
+
)
|
| 57 |
+
# INPUT glConvolutionParameteriv.params size not checked against 'pname'
|
| 58 |
+
glConvolutionParameteriv=wrapper.wrapper(glConvolutionParameteriv).setInputArraySize(
|
| 59 |
+
'params', None
|
| 60 |
+
)
|
| 61 |
+
# OUTPUT glGetConvolutionFilter.image COMPSIZE(target,format,type)
|
| 62 |
+
glGetConvolutionParameterfv=wrapper.wrapper(glGetConvolutionParameterfv).setOutput(
|
| 63 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 64 |
+
)
|
| 65 |
+
glGetConvolutionParameteriv=wrapper.wrapper(glGetConvolutionParameteriv).setOutput(
|
| 66 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 67 |
+
)
|
| 68 |
+
# OUTPUT glGetSeparableFilter.column COMPSIZE(target,format,type)
|
| 69 |
+
# OUTPUT glGetSeparableFilter.span COMPSIZE(target,format,type)
|
| 70 |
+
# OUTPUT glGetSeparableFilter.row COMPSIZE(target,format,type)
|
| 71 |
+
# INPUT glSeparableFilter2D.column size not checked against 'target,format,type,height'
|
| 72 |
+
# INPUT glSeparableFilter2D.row size not checked against 'target,format,type,width'
|
| 73 |
+
glSeparableFilter2D=wrapper.wrapper(glSeparableFilter2D).setInputArraySize(
|
| 74 |
+
'column', None
|
| 75 |
+
).setInputArraySize(
|
| 76 |
+
'row', None
|
| 77 |
+
)
|
| 78 |
+
# OUTPUT glGetHistogram.values COMPSIZE(target,format,type)
|
| 79 |
+
glGetHistogramParameterfv=wrapper.wrapper(glGetHistogramParameterfv).setOutput(
|
| 80 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 81 |
+
)
|
| 82 |
+
glGetHistogramParameteriv=wrapper.wrapper(glGetHistogramParameteriv).setOutput(
|
| 83 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 84 |
+
)
|
| 85 |
+
# OUTPUT glGetMinmax.values COMPSIZE(target,format,type)
|
| 86 |
+
glGetMinmaxParameterfv=wrapper.wrapper(glGetMinmaxParameterfv).setOutput(
|
| 87 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 88 |
+
)
|
| 89 |
+
glGetMinmaxParameteriv=wrapper.wrapper(glGetMinmaxParameteriv).setOutput(
|
| 90 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 91 |
+
)
|
| 92 |
+
### END AUTOGENERATED SECTION
|
| 93 |
+
from OpenGL.GL import images
|
| 94 |
+
from OpenGL.lazywrapper import lazy as _lazy
|
| 95 |
+
glColorTable = images.setDimensionsAsInts(
|
| 96 |
+
images.setImageInput(
|
| 97 |
+
glColorTable,
|
| 98 |
+
pixelName = 'table',
|
| 99 |
+
typeName = 'type',
|
| 100 |
+
)
|
| 101 |
+
)
|
| 102 |
+
glColorSubTable = images.setDimensionsAsInts(
|
| 103 |
+
images.setImageInput(
|
| 104 |
+
glColorSubTable,
|
| 105 |
+
pixelName = 'data',
|
| 106 |
+
)
|
| 107 |
+
)
|
| 108 |
+
glSeparableFilter2D = images.setDimensionsAsInts(
|
| 109 |
+
images.setImageInput(
|
| 110 |
+
images.setImageInput(
|
| 111 |
+
glSeparableFilter2D,
|
| 112 |
+
pixelName = 'row',
|
| 113 |
+
typeName = 'type',
|
| 114 |
+
),
|
| 115 |
+
pixelName = 'column',
|
| 116 |
+
typeName = 'type',
|
| 117 |
+
)
|
| 118 |
+
)
|
| 119 |
+
glConvolutionFilter1D = images.setDimensionsAsInts(
|
| 120 |
+
images.setImageInput(
|
| 121 |
+
glConvolutionFilter1D,
|
| 122 |
+
pixelName = 'image',
|
| 123 |
+
typeName = 'type',
|
| 124 |
+
)
|
| 125 |
+
)
|
| 126 |
+
glConvolutionFilter2D = images.setDimensionsAsInts(
|
| 127 |
+
images.setImageInput(
|
| 128 |
+
glConvolutionFilter2D,
|
| 129 |
+
pixelName = 'image',
|
| 130 |
+
typeName = 'type',
|
| 131 |
+
)
|
| 132 |
+
)
|
| 133 |
+
|
| 134 |
+
@_lazy( glGetConvolutionFilter )
|
| 135 |
+
def glGetConvolutionFilter( baseFunction, target, format, type ):
|
| 136 |
+
"""Retrieve 1 or 2D convolution parameter "kernels" as pixel data"""
|
| 137 |
+
dims = (
|
| 138 |
+
glGetConvolutionParameteriv( target, GL_CONVOLUTION_WIDTH )[0],
|
| 139 |
+
)
|
| 140 |
+
if target != GL_CONVOLUTION_1D:
|
| 141 |
+
dims += (
|
| 142 |
+
glGetConvolutionParameteriv( target, GL_CONVOLUTION_HEIGHT )[0],
|
| 143 |
+
)
|
| 144 |
+
# is it always 4? Seems to be, but the spec/man-page isn't really clear about it...
|
| 145 |
+
dims += (4,)
|
| 146 |
+
array = images.images.SetupPixelRead( format, dims, type )
|
| 147 |
+
arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[
|
| 148 |
+
images.images.TYPE_TO_ARRAYTYPE.get(type,type)
|
| 149 |
+
]
|
| 150 |
+
baseFunction(
|
| 151 |
+
target, format, type,
|
| 152 |
+
ctypes.c_void_p( arrayType.dataPointer(array))
|
| 153 |
+
)
|
| 154 |
+
return array
|
| 155 |
+
@_lazy( glGetSeparableFilter )
|
| 156 |
+
def glGetSeparableFilter( baseFunction, target, format, type ):
|
| 157 |
+
"""Retrieve 2 1D convolution parameter "kernels" as pixel data"""
|
| 158 |
+
rowDims = (
|
| 159 |
+
glGetConvolutionParameteriv( GL_CONVOLUTION_WIDTH )[0],
|
| 160 |
+
4,
|
| 161 |
+
)
|
| 162 |
+
columnDims = (
|
| 163 |
+
glGetConvolutionParameteriv( GL_CONVOLUTION_HEIGHT )[0],
|
| 164 |
+
4,
|
| 165 |
+
)
|
| 166 |
+
arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[
|
| 167 |
+
images.images.TYPE_TO_ARRAYTYPE.get(type,type)
|
| 168 |
+
]
|
| 169 |
+
row = images.images.SetupPixelRead( format, rowDims, type )
|
| 170 |
+
column = images.images.SetupPixelRead( format, columnDims, type )
|
| 171 |
+
baseFunction(
|
| 172 |
+
target, format, type,
|
| 173 |
+
ctypes.c_void_p( arrayType.dataPointer(row)),
|
| 174 |
+
ctypes.c_void_p( arrayType.dataPointer(column)),
|
| 175 |
+
None # span
|
| 176 |
+
)
|
| 177 |
+
return row, column
|
| 178 |
+
@_lazy( glGetColorTable )
|
| 179 |
+
def glGetColorTable( baseFunction, target, format, type ):
|
| 180 |
+
"""Retrieve the current 1D color table as a bitmap"""
|
| 181 |
+
dims = (
|
| 182 |
+
glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH),
|
| 183 |
+
4, # Grr, spec *seems* to say that it's different sizes, but it doesn't really say...
|
| 184 |
+
)
|
| 185 |
+
array = images.images.SetupPixelRead( format, dims, type )
|
| 186 |
+
arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[
|
| 187 |
+
images.images.TYPE_TO_ARRAYTYPE.get(type,type)
|
| 188 |
+
]
|
| 189 |
+
baseFunction(
|
| 190 |
+
target, format, type,
|
| 191 |
+
ctypes.c_void_p( arrayType.dataPointer(array))
|
| 192 |
+
)
|
| 193 |
+
return array
|
| 194 |
+
@_lazy( glGetHistogram )
|
| 195 |
+
def glGetHistogram( baseFunction, target, reset, format, type, values=None):
|
| 196 |
+
"""Retrieve current 1D histogram as a 1D bitmap"""
|
| 197 |
+
if values is None:
|
| 198 |
+
width = glGetHistogramParameteriv(
|
| 199 |
+
target,
|
| 200 |
+
GL_HISTOGRAM_WIDTH,
|
| 201 |
+
)
|
| 202 |
+
values = images.images.SetupPixelRead( format, (width,4), type )
|
| 203 |
+
arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[
|
| 204 |
+
images.images.TYPE_TO_ARRAYTYPE.get(type,type)
|
| 205 |
+
]
|
| 206 |
+
baseFunction(
|
| 207 |
+
target, reset, format, type,
|
| 208 |
+
ctypes.c_void_p( arrayType.dataPointer(values))
|
| 209 |
+
)
|
| 210 |
+
return values
|
| 211 |
+
|
| 212 |
+
@_lazy( glGetMinmax )
|
| 213 |
+
def glGetMinmax( baseFunction, target, reset, format, type, values=None):
|
| 214 |
+
"""Retrieve minimum and maximum values as a 2-element image"""
|
| 215 |
+
if values is None:
|
| 216 |
+
width = 2
|
| 217 |
+
values = images.images.SetupPixelRead( format, (width,4), type )
|
| 218 |
+
arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[
|
| 219 |
+
images.images.TYPE_TO_ARRAYTYPE.get(type,type)
|
| 220 |
+
]
|
| 221 |
+
baseFunction(
|
| 222 |
+
target, reset, format, type,
|
| 223 |
+
ctypes.c_void_p( arrayType.dataPointer(values))
|
| 224 |
+
)
|
| 225 |
+
return values
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/indirect_parameters.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.indirect_parameters
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.indirect_parameters to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
OpenGL 4.3 (with the introduction of the GL_ARB_multi_draw_indirect
|
| 10 |
+
extension) enhanced the ability of OpenGL to allow a large sets of
|
| 11 |
+
parameters for indirect draws (introduced with OpenGL 4.0) into a buffer
|
| 12 |
+
object and dispatch the entire list with one API call. This allows, for
|
| 13 |
+
example, a shader (such as a compute shader via shader storage buffers,
|
| 14 |
+
or a geometry shader via transform feedback) to produce lists of draw
|
| 15 |
+
commands that can then be consumed by OpenGL without a server-client
|
| 16 |
+
round trip. However, when a variable and potentially unknown number of
|
| 17 |
+
draws are produced by such a shader, it becomes difficult to know how
|
| 18 |
+
many draws are in the output array(s). Applications must resort to
|
| 19 |
+
techniques such as transform feedback primitive queries, or mapping
|
| 20 |
+
buffers containing the content of atomic counters, which can cause stalls
|
| 21 |
+
or bubbles in the OpenGL pipeline.
|
| 22 |
+
|
| 23 |
+
This extension introduces the concept of the "parameter buffer", which
|
| 24 |
+
is a target allowing buffers to store parameters for certain drawing
|
| 25 |
+
commands. Also in this extension, new variants of MultiDrawArraysIndirect
|
| 26 |
+
and MultiDrawElementsIndirect are introduced that source some of their
|
| 27 |
+
parameters from this buffer. Further commands could potentially be
|
| 28 |
+
introduced that source other parameters from a buffer.
|
| 29 |
+
|
| 30 |
+
The official definition of this extension is available here:
|
| 31 |
+
http://www.opengl.org/registry/specs/ARB/indirect_parameters.txt
|
| 32 |
+
'''
|
| 33 |
+
from OpenGL import platform, constant, arrays
|
| 34 |
+
from OpenGL import extensions, wrapper
|
| 35 |
+
import ctypes
|
| 36 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 37 |
+
from OpenGL.raw.GL.ARB.indirect_parameters import *
|
| 38 |
+
from OpenGL.raw.GL.ARB.indirect_parameters import _EXTENSION_NAME
|
| 39 |
+
|
| 40 |
+
def glInitIndirectParametersARB():
|
| 41 |
+
'''Return boolean indicating whether this extension is available'''
|
| 42 |
+
from OpenGL import extensions
|
| 43 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/map_buffer_alignment.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.map_buffer_alignment
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.map_buffer_alignment to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension adds a requirement to the pointer returned by MapBuffer
|
| 10 |
+
and MapBufferRange that they provide a minimum of 64 byte alignment to
|
| 11 |
+
support processing of the data directly with special CPU instructions
|
| 12 |
+
like SSE and AVX.
|
| 13 |
+
|
| 14 |
+
The official definition of this extension is available here:
|
| 15 |
+
http://www.opengl.org/registry/specs/ARB/map_buffer_alignment.txt
|
| 16 |
+
'''
|
| 17 |
+
from OpenGL import platform, constant, arrays
|
| 18 |
+
from OpenGL import extensions, wrapper
|
| 19 |
+
import ctypes
|
| 20 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 21 |
+
from OpenGL.raw.GL.ARB.map_buffer_alignment import *
|
| 22 |
+
from OpenGL.raw.GL.ARB.map_buffer_alignment import _EXTENSION_NAME
|
| 23 |
+
|
| 24 |
+
def glInitMapBufferAlignmentARB():
|
| 25 |
+
'''Return boolean indicating whether this extension is available'''
|
| 26 |
+
from OpenGL import extensions
|
| 27 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/occlusion_query.py
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.occlusion_query
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.occlusion_query to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension defines a mechanism whereby an application can query
|
| 10 |
+
the number of pixels (or, more precisely, samples) drawn by a
|
| 11 |
+
primitive or group of primitives.
|
| 12 |
+
|
| 13 |
+
The primary purpose of such a query (hereafter referred to as an
|
| 14 |
+
"occlusion query") is to determine the visibility of an object.
|
| 15 |
+
Typically, the application will render the major occluders in the
|
| 16 |
+
scene, then perform an occlusion query for the bounding box of each
|
| 17 |
+
detail object in the scene. Only if said bounding box is visible,
|
| 18 |
+
i.e., if at least one sample is drawn, should the corresponding object
|
| 19 |
+
be drawn.
|
| 20 |
+
|
| 21 |
+
The earlier HP_occlusion_test extension defined a similar mechanism,
|
| 22 |
+
but it had two major shortcomings.
|
| 23 |
+
|
| 24 |
+
- It returned the result as a simple GL_TRUE/GL_FALSE result, when in
|
| 25 |
+
fact it is often useful to know exactly how many samples were
|
| 26 |
+
drawn.
|
| 27 |
+
- It provided only a simple "stop-and-wait" model for using multiple
|
| 28 |
+
queries. The application begins an occlusion test and ends it;
|
| 29 |
+
then, at some later point, it asks for the result, at which point
|
| 30 |
+
the driver must stop and wait until the result from the previous
|
| 31 |
+
test is back before the application can even begin the next one.
|
| 32 |
+
This is a very simple model, but its performance is mediocre when
|
| 33 |
+
an application wishes to perform many queries, and it eliminates
|
| 34 |
+
most of the opportunities for parallelism between the CPU and GPU.
|
| 35 |
+
|
| 36 |
+
This extension solves both of those problems. It returns as its
|
| 37 |
+
result the number of samples that pass the depth and stencil tests,
|
| 38 |
+
and it encapsulates occlusion queries in "query objects" that allow
|
| 39 |
+
applications to issue many queries before asking for the result of
|
| 40 |
+
any one. As a result, they can overlap the time it takes for the
|
| 41 |
+
occlusion query results to be returned with other, more useful work,
|
| 42 |
+
such as rendering other parts of the scene or performing other
|
| 43 |
+
computations on the CPU.
|
| 44 |
+
|
| 45 |
+
There are many situations where a pixel/sample count, rather than a
|
| 46 |
+
boolean result, is useful.
|
| 47 |
+
|
| 48 |
+
- Objects that are visible but cover only a very small number of
|
| 49 |
+
pixels can be skipped at a minimal reduction of image quality.
|
| 50 |
+
- Knowing exactly how many pixels an object might cover may help the
|
| 51 |
+
application decide which level-of-detail model should be used. If
|
| 52 |
+
only a few pixels are visible, a low-detail model may be
|
| 53 |
+
acceptable.
|
| 54 |
+
- "Depth peeling" techniques, such as order-independent transparency,
|
| 55 |
+
need to know when to stop rendering more layers; it is difficult to
|
| 56 |
+
determine a priori how many layers are needed. A boolean result
|
| 57 |
+
allows applications to stop when more layers will not affect the
|
| 58 |
+
image at all, but this will likely result in unacceptable
|
| 59 |
+
performance. Instead, it makes more sense to stop rendering when
|
| 60 |
+
the number of pixels in each layer falls below a given threshold.
|
| 61 |
+
- Occlusion queries can replace glReadPixels of the depth buffer to
|
| 62 |
+
determine whether (for example) a light source is visible for the
|
| 63 |
+
purposes of a lens flare effect or a halo to simulate glare. Pixel
|
| 64 |
+
counts allow you to compute the percentage of the light source that
|
| 65 |
+
is visible, and the brightness of these effects can be modulated
|
| 66 |
+
accordingly.
|
| 67 |
+
|
| 68 |
+
The official definition of this extension is available here:
|
| 69 |
+
http://www.opengl.org/registry/specs/ARB/occlusion_query.txt
|
| 70 |
+
'''
|
| 71 |
+
from OpenGL import platform, constant, arrays
|
| 72 |
+
from OpenGL import extensions, wrapper
|
| 73 |
+
import ctypes
|
| 74 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 75 |
+
from OpenGL.raw.GL.ARB.occlusion_query import *
|
| 76 |
+
from OpenGL.raw.GL.ARB.occlusion_query import _EXTENSION_NAME
|
| 77 |
+
|
| 78 |
+
def glInitOcclusionQueryARB():
|
| 79 |
+
'''Return boolean indicating whether this extension is available'''
|
| 80 |
+
from OpenGL import extensions
|
| 81 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 82 |
+
|
| 83 |
+
glGenQueriesARB=wrapper.wrapper(glGenQueriesARB).setOutput(
|
| 84 |
+
'ids',size=lambda x:(x,),pnameArg='n',orPassIn=True
|
| 85 |
+
)
|
| 86 |
+
# INPUT glDeleteQueriesARB.ids size not checked against n
|
| 87 |
+
glDeleteQueriesARB=wrapper.wrapper(glDeleteQueriesARB).setInputArraySize(
|
| 88 |
+
'ids', None
|
| 89 |
+
)
|
| 90 |
+
glGetQueryivARB=wrapper.wrapper(glGetQueryivARB).setOutput(
|
| 91 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 92 |
+
)
|
| 93 |
+
glGetQueryObjectivARB=wrapper.wrapper(glGetQueryObjectivARB).setOutput(
|
| 94 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 95 |
+
)
|
| 96 |
+
glGetQueryObjectuivARB=wrapper.wrapper(glGetQueryObjectuivARB).setOutput(
|
| 97 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 98 |
+
)
|
| 99 |
+
### END AUTOGENERATED SECTION
|
| 100 |
+
from OpenGL.lazywrapper import lazy as _lazy
|
| 101 |
+
from OpenGL.GL import glget
|
| 102 |
+
from OpenGL import converters
|
| 103 |
+
@_lazy( glDeleteQueriesARB )
|
| 104 |
+
def glDeleteQueriesARB( baseOperation, n, ids=None ):
|
| 105 |
+
"""Delete the given queries
|
| 106 |
+
|
| 107 |
+
n -- either the number of queries to delete, or an array of query values
|
| 108 |
+
ids -- if provided, the array/pointer to the queries to delete
|
| 109 |
+
"""
|
| 110 |
+
if ids is None:
|
| 111 |
+
ids = arrays.GLuintArray.asArray( n )
|
| 112 |
+
n = arrays.GLuintArray.arraySize( ids )
|
| 113 |
+
else:
|
| 114 |
+
ids = arrays.GLuintArray.asArray( ids )
|
| 115 |
+
return baseOperation( n,ids )
|
| 116 |
+
@_lazy( glGenQueriesARB )
|
| 117 |
+
def glGenQueriesARB( baseOperation, n, ids=None ):
|
| 118 |
+
"""Generate n queries, if ids is None, is allocated
|
| 119 |
+
|
| 120 |
+
returns array of ids
|
| 121 |
+
"""
|
| 122 |
+
if ids is None:
|
| 123 |
+
ids = arrays.GLuintArray.zeros( (n,))
|
| 124 |
+
else:
|
| 125 |
+
ids = arrays.GLuintArray.asArray( ids )
|
| 126 |
+
baseOperation( n, ids )
|
| 127 |
+
return ids
|
| 128 |
+
|
| 129 |
+
for func in (
|
| 130 |
+
'glGetQueryivARB','glGetQueryObjectivARB','glGetQueryObjectuivARB',
|
| 131 |
+
):
|
| 132 |
+
globals()[func] = wrapper.wrapper(globals()[func]).setOutput(
|
| 133 |
+
"params", (1,), orPassIn=True
|
| 134 |
+
)
|
| 135 |
+
try:
|
| 136 |
+
del func, glget
|
| 137 |
+
except NameError as err:
|
| 138 |
+
pass
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/program_interface_query.py
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.program_interface_query
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.program_interface_query to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides a single unified set of query commands that can be
|
| 10 |
+
used by applications to determine properties of various interfaces and
|
| 11 |
+
resources used by program objects to communicate with application code,
|
| 12 |
+
fixed-function OpenGL pipeline stages, and other programs. In unextended
|
| 13 |
+
OpenGL 4.2, there is a separate set of query commands for each different
|
| 14 |
+
type of interface or resource used by the program. These different sets
|
| 15 |
+
of queries are structured nearly identically, but the queries for some
|
| 16 |
+
interfaces have limited capability (e.g., there is no ability to enumerate
|
| 17 |
+
fragment shader outputs).
|
| 18 |
+
|
| 19 |
+
With the single set of query commands provided by this extension, a
|
| 20 |
+
consistent set of queries is available for all interfaces, and a new
|
| 21 |
+
interface can be added without having to introduce a completely new set of
|
| 22 |
+
query commands. These queries are intended to provide a superset of the
|
| 23 |
+
capabilities provided by similar queries in OpenGL 4.2, and should allow
|
| 24 |
+
for the deprecation of the existing queries.
|
| 25 |
+
|
| 26 |
+
This extension defines two terms: interfaces and active resources. Each
|
| 27 |
+
interface of a program object provides a way for the program to
|
| 28 |
+
communicate with application code, fixed-function OpenGL pipeline stages,
|
| 29 |
+
and other programs. Examples of interfaces for a program object include
|
| 30 |
+
inputs (receiving values from vertex attributes or outputs of other
|
| 31 |
+
programs), outputs (sending values to other programs or per-fragment
|
| 32 |
+
operations), uniforms (receiving values from API calls), uniform blocks
|
| 33 |
+
(receiving values from bound buffer objects), subroutines and subroutine
|
| 34 |
+
uniforms (receiving API calls to indicate functions to call during program
|
| 35 |
+
execution), and atomic counter buffers (holding values to be manipulated
|
| 36 |
+
by atomic counter shader functions). Each interface of a program has a
|
| 37 |
+
set of active resources used by the program. For example, the resources
|
| 38 |
+
of a program's input interface includes all active input variables used by
|
| 39 |
+
the first stage of the program. The resources of a program's uniform
|
| 40 |
+
block interface consists of the set of uniform blocks with at least one
|
| 41 |
+
member used by any shader in the program.
|
| 42 |
+
|
| 43 |
+
The official definition of this extension is available here:
|
| 44 |
+
http://www.opengl.org/registry/specs/ARB/program_interface_query.txt
|
| 45 |
+
'''
|
| 46 |
+
from OpenGL import platform, constant, arrays
|
| 47 |
+
from OpenGL import extensions, wrapper
|
| 48 |
+
import ctypes
|
| 49 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 50 |
+
from OpenGL.raw.GL.ARB.program_interface_query import *
|
| 51 |
+
from OpenGL.raw.GL.ARB.program_interface_query import _EXTENSION_NAME
|
| 52 |
+
|
| 53 |
+
def glInitProgramInterfaceQueryARB():
|
| 54 |
+
'''Return boolean indicating whether this extension is available'''
|
| 55 |
+
from OpenGL import extensions
|
| 56 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 57 |
+
|
| 58 |
+
# INPUT glGetProgramInterfaceiv.params size not checked against 'pname'
|
| 59 |
+
glGetProgramInterfaceiv=wrapper.wrapper(glGetProgramInterfaceiv).setInputArraySize(
|
| 60 |
+
'params', None
|
| 61 |
+
)
|
| 62 |
+
# INPUT glGetProgramResourceIndex.name size not checked against 'name'
|
| 63 |
+
glGetProgramResourceIndex=wrapper.wrapper(glGetProgramResourceIndex).setInputArraySize(
|
| 64 |
+
'name', None
|
| 65 |
+
)
|
| 66 |
+
# INPUT glGetProgramResourceName.name size not checked against bufSize
|
| 67 |
+
glGetProgramResourceName=wrapper.wrapper(glGetProgramResourceName).setInputArraySize(
|
| 68 |
+
'length', 1
|
| 69 |
+
).setInputArraySize(
|
| 70 |
+
'name', None
|
| 71 |
+
)
|
| 72 |
+
# INPUT glGetProgramResourceiv.params size not checked against bufSize
|
| 73 |
+
# INPUT glGetProgramResourceiv.props size not checked against propCount
|
| 74 |
+
glGetProgramResourceiv=wrapper.wrapper(glGetProgramResourceiv).setInputArraySize(
|
| 75 |
+
'length', 1
|
| 76 |
+
).setInputArraySize(
|
| 77 |
+
'params', None
|
| 78 |
+
).setInputArraySize(
|
| 79 |
+
'props', None
|
| 80 |
+
)
|
| 81 |
+
# INPUT glGetProgramResourceLocation.name size not checked against 'name'
|
| 82 |
+
glGetProgramResourceLocation=wrapper.wrapper(glGetProgramResourceLocation).setInputArraySize(
|
| 83 |
+
'name', None
|
| 84 |
+
)
|
| 85 |
+
# INPUT glGetProgramResourceLocationIndex.name size not checked against 'name'
|
| 86 |
+
glGetProgramResourceLocationIndex=wrapper.wrapper(glGetProgramResourceLocationIndex).setInputArraySize(
|
| 87 |
+
'name', None
|
| 88 |
+
)
|
| 89 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/provoking_vertex.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.provoking_vertex
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.provoking_vertex to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides an alternative provoking vertex convention
|
| 10 |
+
for rendering lines, triangles, and (optionally depending on the
|
| 11 |
+
implementation) quads.
|
| 12 |
+
|
| 13 |
+
The provoking vertex of a primitive is the vertex that determines the
|
| 14 |
+
constant primary and secondary colors when flat shading is enabled.
|
| 15 |
+
|
| 16 |
+
In OpenGL, the provoking vertex for triangle, quad, line, and
|
| 17 |
+
(trivially) point primitives is the last vertex used to assemble
|
| 18 |
+
the primitive. The polygon primitive is an exception in OpenGL where
|
| 19 |
+
the first vertex of a polygon primitive determines the color of the
|
| 20 |
+
polygon, even if actually broken into triangles and/or quads.
|
| 21 |
+
|
| 22 |
+
See section 2.14.7 (Flatshading) of the OpenGL 2.1 specification,
|
| 23 |
+
particularly Table 2.12 for more details.
|
| 24 |
+
|
| 25 |
+
Alternatively the provoking vertex could be the first vertex of
|
| 26 |
+
the primitive. Other APIs with flat-shading functionality such
|
| 27 |
+
as Reality Lab and Direct3D have adopted the "first vertex of the
|
| 28 |
+
primitive" convention to determine the provoking vertex. However,
|
| 29 |
+
these APIs lack quads so do not have a defined provoking vertex
|
| 30 |
+
convention for quads.
|
| 31 |
+
|
| 32 |
+
The motivation for this extension is to allow applications developed
|
| 33 |
+
for APIs with a "first vertex of the primitive" provoking vertex to
|
| 34 |
+
be easily converted to OpenGL.
|
| 35 |
+
|
| 36 |
+
The official definition of this extension is available here:
|
| 37 |
+
http://www.opengl.org/registry/specs/ARB/provoking_vertex.txt
|
| 38 |
+
'''
|
| 39 |
+
from OpenGL import platform, constant, arrays
|
| 40 |
+
from OpenGL import extensions, wrapper
|
| 41 |
+
import ctypes
|
| 42 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 43 |
+
from OpenGL.raw.GL.ARB.provoking_vertex import *
|
| 44 |
+
from OpenGL.raw.GL.ARB.provoking_vertex import _EXTENSION_NAME
|
| 45 |
+
|
| 46 |
+
def glInitProvokingVertexARB():
|
| 47 |
+
'''Return boolean indicating whether this extension is available'''
|
| 48 |
+
from OpenGL import extensions
|
| 49 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/robustness_isolation.py
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.robustness_isolation
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.robustness_isolation to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
GL_ARB_robustness and supporting window system extensions allow
|
| 10 |
+
creating an OpenGL context supporting graphics reset notification
|
| 11 |
+
behavior. GL_ARB_robustness_isolation provides stronger
|
| 12 |
+
guarantees about the possible side-effects of a graphics reset.
|
| 13 |
+
|
| 14 |
+
It is expected that there may be a performance cost associated
|
| 15 |
+
with isolating an application or share group from other contexts
|
| 16 |
+
on the GPU. For this reason, GL_ARB_robustness_isolation is
|
| 17 |
+
phrased as an opt-in mechanism, with a new context creation bit
|
| 18 |
+
defined in the window system bindings. It is expected that
|
| 19 |
+
implementations might only advertise the strings in this extension
|
| 20 |
+
if both the implementation supports the desired isolation
|
| 21 |
+
properties, and the context was created with the appropriate reset
|
| 22 |
+
isolation bit.
|
| 23 |
+
|
| 24 |
+
The official definition of this extension is available here:
|
| 25 |
+
http://www.opengl.org/registry/specs/ARB/robustness_isolation.txt
|
| 26 |
+
'''
|
| 27 |
+
from OpenGL import platform, constant, arrays
|
| 28 |
+
from OpenGL import extensions, wrapper
|
| 29 |
+
import ctypes
|
| 30 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 31 |
+
from OpenGL.raw.GL.ARB.robustness_isolation import *
|
| 32 |
+
from OpenGL.raw.GL.ARB.robustness_isolation import _EXTENSION_NAME
|
| 33 |
+
|
| 34 |
+
def glInitRobustnessIsolationARB():
|
| 35 |
+
'''Return boolean indicating whether this extension is available'''
|
| 36 |
+
from OpenGL import extensions
|
| 37 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sample_shading.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.sample_shading
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.sample_shading to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
In standard multisample rendering, an implementation is allowed to
|
| 10 |
+
assign the same color and texture coordinate values to each sample,
|
| 11 |
+
which then allows the optimization where the shader is only
|
| 12 |
+
evaluated once and then distributed to the samples that have been
|
| 13 |
+
determined to be covered by the primitive currently being
|
| 14 |
+
rasterized. This can cause aliasing where the input color and
|
| 15 |
+
texture coordinates are used to generate a result that doesn't
|
| 16 |
+
antialias itself, for example with alpha-tested transparency.
|
| 17 |
+
|
| 18 |
+
This extension adds the ability to explicitly request that an
|
| 19 |
+
implementation use a minimum number of unique set of fragment
|
| 20 |
+
computation inputs when multisampling a pixel. Specifying such a
|
| 21 |
+
requirement can reduce aliasing that results from evaluating the
|
| 22 |
+
fragment computations too few times per pixel.
|
| 23 |
+
|
| 24 |
+
This extension adds new global state that controls the minimum
|
| 25 |
+
number of samples for which attribute data is independently
|
| 26 |
+
interpolated. When enabled, all operations that were traditionally
|
| 27 |
+
executed per-fragment operate independently on each sample.
|
| 28 |
+
|
| 29 |
+
This also extends the shading language to allow control over the
|
| 30 |
+
sample being processed. This includes built-in fragment input
|
| 31 |
+
variables identifying the sample number and position being processed
|
| 32 |
+
when executing fragment shaders per sample.
|
| 33 |
+
|
| 34 |
+
The official definition of this extension is available here:
|
| 35 |
+
http://www.opengl.org/registry/specs/ARB/sample_shading.txt
|
| 36 |
+
'''
|
| 37 |
+
from OpenGL import platform, constant, arrays
|
| 38 |
+
from OpenGL import extensions, wrapper
|
| 39 |
+
import ctypes
|
| 40 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 41 |
+
from OpenGL.raw.GL.ARB.sample_shading import *
|
| 42 |
+
from OpenGL.raw.GL.ARB.sample_shading import _EXTENSION_NAME
|
| 43 |
+
|
| 44 |
+
def glInitSampleShadingARB():
|
| 45 |
+
'''Return boolean indicating whether this extension is available'''
|
| 46 |
+
from OpenGL import extensions
|
| 47 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/sampler_objects.py
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.sampler_objects
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.sampler_objects to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
In unextended OpenGL textures are considered to be sets of image
|
| 10 |
+
data (mip-chains, arrays, cube-map face sets, etc.) and sampling
|
| 11 |
+
state (sampling mode, mip-mapping state, coordinate wrapping and
|
| 12 |
+
clamping rules, etc.) combined into a single object. It is typical
|
| 13 |
+
for an application to use many textures with a limited set of
|
| 14 |
+
sampling states that are the same between them. In order to use
|
| 15 |
+
textures in this way, an application must generate and configure
|
| 16 |
+
many texture names, adding overhead both to applications and to
|
| 17 |
+
implementations. Furthermore, should an application wish to sample
|
| 18 |
+
from a texture in more than one way (with and without mip-mapping,
|
| 19 |
+
for example) it must either modify the state of the texture or
|
| 20 |
+
create two textures, each with a copy of the same image data. This
|
| 21 |
+
can introduce runtime and memory costs to the application.
|
| 22 |
+
|
| 23 |
+
This extension separates sampler state from texture image data. A
|
| 24 |
+
new object type is introduced, the sampler (representing generic
|
| 25 |
+
sampling parameters). The new sampler objects are represented by a
|
| 26 |
+
new named type encapsulating the sampling parameters of a
|
| 27 |
+
traditional texture object. Sampler objects may be bound to texture
|
| 28 |
+
units to supplant the bound texture's sampling state. A single
|
| 29 |
+
sampler may be bound to more than one texture unit simultaneously,
|
| 30 |
+
allowing different textures to be accessed with a single set of
|
| 31 |
+
shared sampling parameters. Also, by binding different sampler
|
| 32 |
+
objects to texture units to which the same texture has been bound,
|
| 33 |
+
the same texture image data may be sampled with different sampling
|
| 34 |
+
parameters.
|
| 35 |
+
|
| 36 |
+
The official definition of this extension is available here:
|
| 37 |
+
http://www.opengl.org/registry/specs/ARB/sampler_objects.txt
|
| 38 |
+
'''
|
| 39 |
+
from OpenGL import platform, constant, arrays
|
| 40 |
+
from OpenGL import extensions, wrapper
|
| 41 |
+
import ctypes
|
| 42 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 43 |
+
from OpenGL.raw.GL.ARB.sampler_objects import *
|
| 44 |
+
from OpenGL.raw.GL.ARB.sampler_objects import _EXTENSION_NAME
|
| 45 |
+
|
| 46 |
+
def glInitSamplerObjectsARB():
|
| 47 |
+
'''Return boolean indicating whether this extension is available'''
|
| 48 |
+
from OpenGL import extensions
|
| 49 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 50 |
+
|
| 51 |
+
glGenSamplers=wrapper.wrapper(glGenSamplers).setOutput(
|
| 52 |
+
'samplers',size=lambda x:(x,),pnameArg='count',orPassIn=True
|
| 53 |
+
)
|
| 54 |
+
# INPUT glDeleteSamplers.samplers size not checked against count
|
| 55 |
+
glDeleteSamplers=wrapper.wrapper(glDeleteSamplers).setInputArraySize(
|
| 56 |
+
'samplers', None
|
| 57 |
+
)
|
| 58 |
+
# INPUT glSamplerParameteriv.param size not checked against 'pname'
|
| 59 |
+
glSamplerParameteriv=wrapper.wrapper(glSamplerParameteriv).setInputArraySize(
|
| 60 |
+
'param', None
|
| 61 |
+
)
|
| 62 |
+
# INPUT glSamplerParameterfv.param size not checked against 'pname'
|
| 63 |
+
glSamplerParameterfv=wrapper.wrapper(glSamplerParameterfv).setInputArraySize(
|
| 64 |
+
'param', None
|
| 65 |
+
)
|
| 66 |
+
# INPUT glSamplerParameterIiv.param size not checked against 'pname'
|
| 67 |
+
glSamplerParameterIiv=wrapper.wrapper(glSamplerParameterIiv).setInputArraySize(
|
| 68 |
+
'param', None
|
| 69 |
+
)
|
| 70 |
+
# INPUT glSamplerParameterIuiv.param size not checked against 'pname'
|
| 71 |
+
glSamplerParameterIuiv=wrapper.wrapper(glSamplerParameterIuiv).setInputArraySize(
|
| 72 |
+
'param', None
|
| 73 |
+
)
|
| 74 |
+
glGetSamplerParameteriv=wrapper.wrapper(glGetSamplerParameteriv).setOutput(
|
| 75 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 76 |
+
)
|
| 77 |
+
glGetSamplerParameterIiv=wrapper.wrapper(glGetSamplerParameterIiv).setOutput(
|
| 78 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 79 |
+
)
|
| 80 |
+
glGetSamplerParameterfv=wrapper.wrapper(glGetSamplerParameterfv).setOutput(
|
| 81 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 82 |
+
)
|
| 83 |
+
glGetSamplerParameterIuiv=wrapper.wrapper(glGetSamplerParameterIuiv).setOutput(
|
| 84 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 85 |
+
)
|
| 86 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cube_map.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.seamless_cube_map
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.seamless_cube_map to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
When sampling from cube map textures, a three-dimensional texture
|
| 10 |
+
coordinate is used to select one of the cube map faces and generate
|
| 11 |
+
a two dimensional texture coordinate ( s t ), at which a texel is
|
| 12 |
+
sampled from the determined face of the cube map texture. Each face
|
| 13 |
+
of the texture is treated as an independent two-dimensional texture,
|
| 14 |
+
and the generated ( s t ) coordinate is subjected to the same
|
| 15 |
+
clamping and wrapping rules as for any other two dimensional texture
|
| 16 |
+
fetch.
|
| 17 |
+
|
| 18 |
+
Although it is unlikely that the generated ( s t ) coordinate lies
|
| 19 |
+
significantly outside the determined cube map face, it is often the
|
| 20 |
+
case that the locations of the individual elements required during a
|
| 21 |
+
linear sampling do not lie within the determined face, and their
|
| 22 |
+
coordinates will therefore be modified by the selected clamping and
|
| 23 |
+
wrapping rules. This often has the effect of producing seams or
|
| 24 |
+
other discontinuities in the sampled texture.
|
| 25 |
+
|
| 26 |
+
This extension allows implementations to take samples from adjacent
|
| 27 |
+
cube map faces, providing the ability to create seamless cube maps.
|
| 28 |
+
|
| 29 |
+
The official definition of this extension is available here:
|
| 30 |
+
http://www.opengl.org/registry/specs/ARB/seamless_cube_map.txt
|
| 31 |
+
'''
|
| 32 |
+
from OpenGL import platform, constant, arrays
|
| 33 |
+
from OpenGL import extensions, wrapper
|
| 34 |
+
import ctypes
|
| 35 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 36 |
+
from OpenGL.raw.GL.ARB.seamless_cube_map import *
|
| 37 |
+
from OpenGL.raw.GL.ARB.seamless_cube_map import _EXTENSION_NAME
|
| 38 |
+
|
| 39 |
+
def glInitSeamlessCubeMapARB():
|
| 40 |
+
'''Return boolean indicating whether this extension is available'''
|
| 41 |
+
from OpenGL import extensions
|
| 42 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/seamless_cubemap_per_texture.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.seamless_cubemap_per_texture
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.seamless_cubemap_per_texture to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
In unextended OpenGL, cube maps are treated as sets of six, independent
|
| 10 |
+
texture images. Once a face is selected from the set, it is treated exactly
|
| 11 |
+
as any other two-dimensional texture would be. When sampling linearly from
|
| 12 |
+
the texture, all of the individual texels that would be used to to create
|
| 13 |
+
the final, bilinear sample values are taken from the same cube face. The
|
| 14 |
+
normal, two-dimensional texture coordinate wrapping modes are honored.
|
| 15 |
+
This sometimes causes seams to appear in cube maps.
|
| 16 |
+
|
| 17 |
+
ARB_seamless_cube_map (and subsequently, OpenGL 3.2) addresses this issue
|
| 18 |
+
by providing a mechanism whereby an implementation could take each of the
|
| 19 |
+
taps of a bilinear sample from a different face, spanning face boundaries
|
| 20 |
+
and providing seamless filtering from cube map textures. However, in
|
| 21 |
+
ARB_seamless_cube_map, this feature was exposed as a global state,
|
| 22 |
+
affecting all bound cube map textures. It was not possible to mix seamless
|
| 23 |
+
and per-face cube map sampling modes during sampling. Furthermore, if an
|
| 24 |
+
application included cube maps that were meant to be sampled seamlessly
|
| 25 |
+
and non-seamlessly, it would have to track this state and enable or disable
|
| 26 |
+
seamless cube map sampling as needed.
|
| 27 |
+
|
| 28 |
+
This extension addresses this issue and provides an orthogonal method for
|
| 29 |
+
allowing an implementation to provide a per-texture setting for enabling
|
| 30 |
+
seamless sampling from cube maps.
|
| 31 |
+
|
| 32 |
+
The official definition of this extension is available here:
|
| 33 |
+
http://www.opengl.org/registry/specs/ARB/seamless_cubemap_per_texture.txt
|
| 34 |
+
'''
|
| 35 |
+
from OpenGL import platform, constant, arrays
|
| 36 |
+
from OpenGL import extensions, wrapper
|
| 37 |
+
import ctypes
|
| 38 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 39 |
+
from OpenGL.raw.GL.ARB.seamless_cubemap_per_texture import *
|
| 40 |
+
from OpenGL.raw.GL.ARB.seamless_cubemap_per_texture import _EXTENSION_NAME
|
| 41 |
+
|
| 42 |
+
def glInitSeamlessCubemapPerTextureARB():
|
| 43 |
+
'''Return boolean indicating whether this extension is available'''
|
| 44 |
+
from OpenGL import extensions
|
| 45 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/separate_shader_objects.py
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.separate_shader_objects
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.separate_shader_objects to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
Conventional GLSL requires multiple shader stages (vertex,
|
| 10 |
+
fragment, geometry, tessellation control, and tessellation
|
| 11 |
+
evaluation) to be linked into a single monolithic program object to
|
| 12 |
+
specify a GLSL shader for each stage.
|
| 13 |
+
|
| 14 |
+
While GLSL's monolithic approach has some advantages for
|
| 15 |
+
optimizing shaders as a unit that span multiple stages, all
|
| 16 |
+
existing GPU hardware supports the more flexible mix-and-match
|
| 17 |
+
approach.
|
| 18 |
+
|
| 19 |
+
Shaders written for HLSL9, Cg, the prior OpenGL assembly program
|
| 20 |
+
extensions, and game console favor a more flexible "mix-and-match"
|
| 21 |
+
approach to specifying shaders independently for these different
|
| 22 |
+
shader stages. Many developers build their shader content around
|
| 23 |
+
the mix-and-match approach where they can use a single vertex shader
|
| 24 |
+
with multiple fragment shaders (or vice versa).
|
| 25 |
+
|
| 26 |
+
This extension adopts a "mix-and-match" shader stage model for GLSL
|
| 27 |
+
allowing multiple different GLSL program objects to be bound at once
|
| 28 |
+
each to an individual rendering pipeline stage independently of
|
| 29 |
+
other stage bindings. This allows program objects to contain only
|
| 30 |
+
the shader stages that best suit the applications needs.
|
| 31 |
+
|
| 32 |
+
This extension introduces the program pipeline object that serves as
|
| 33 |
+
a container for the program bound to any particular rendering stage.
|
| 34 |
+
It can be bound, unbound, and rebound to simply save and restore the
|
| 35 |
+
complete shader stage to program object bindings. Like framebuffer
|
| 36 |
+
and vertex array objects, program pipeline objects are "container"
|
| 37 |
+
objects that are not shared between contexts.
|
| 38 |
+
|
| 39 |
+
To bind a program object to a specific shader stage or set of
|
| 40 |
+
stages, UseProgramStages is used. The VERTEX_SHADER_BIT,
|
| 41 |
+
GEOMETRY_SHADER_BIT, FRAGMENT_SHADER_BIT, TESS_CONTROL_SHADER_BIT,
|
| 42 |
+
and TESS_EVALUATION_SHADER_BIT tokens refer to the conventional
|
| 43 |
+
vertex, geometry, fragment, tessellation control and tessellation
|
| 44 |
+
evaluation stages respectively. ActiveShaderProgram specifies the
|
| 45 |
+
program that Uniform* commands will update.
|
| 46 |
+
|
| 47 |
+
While ActiveShaderProgram allows the use of conventional Uniform*
|
| 48 |
+
commands to update uniform variable values for separable program
|
| 49 |
+
objects, this extension provides a preferrable interface in a set
|
| 50 |
+
of ProgramUniform* commands that update the same uniform variables
|
| 51 |
+
but take a parameter indicating the program object to be updated,
|
| 52 |
+
rather than updating the currently active program object. These
|
| 53 |
+
commands mirror those introduced in EXT_direct_state_access.
|
| 54 |
+
|
| 55 |
+
While glActiveShaderProgram provides a selector for setting and
|
| 56 |
+
querying uniform values of a program object, the glProgramUniform*
|
| 57 |
+
commands provide a selector-free way to modify uniforms of a GLSL
|
| 58 |
+
program object without an explicit bind. This selector-free model
|
| 59 |
+
reduces API overhead and provides a cleaner interface for
|
| 60 |
+
applications.
|
| 61 |
+
|
| 62 |
+
Separate linking creates the possibility that certain output varyings
|
| 63 |
+
of a shader may go unread by the subsequent shader inputting varyings.
|
| 64 |
+
In this case, the output varyings are simply ignored. It is also
|
| 65 |
+
possible input varyings from a shader may not be written as output
|
| 66 |
+
varyings of a preceding shader. In this case, the unwritten input
|
| 67 |
+
varying values are undefined.
|
| 68 |
+
|
| 69 |
+
This extension builds on the proof-of-concept provided by
|
| 70 |
+
EXT_separate_shader_objects which demonstrated that separate
|
| 71 |
+
shader objects can work for GLSL. EXT_separate_shader_objects
|
| 72 |
+
was a response to repeated requests for this functionality from
|
| 73 |
+
3D developers.
|
| 74 |
+
|
| 75 |
+
This ARB version addresses several "loose ends" in the prior
|
| 76 |
+
EXT extension. In particular, it allows user-defined varyings
|
| 77 |
+
with explicitly defined locations or implicitly assigned locations.
|
| 78 |
+
|
| 79 |
+
This ARB extension extends the GLSL language's use of layout
|
| 80 |
+
qualifiers to provide cross-stage interfacing.
|
| 81 |
+
|
| 82 |
+
The official definition of this extension is available here:
|
| 83 |
+
http://www.opengl.org/registry/specs/ARB/separate_shader_objects.txt
|
| 84 |
+
'''
|
| 85 |
+
from OpenGL import platform, constant, arrays
|
| 86 |
+
from OpenGL import extensions, wrapper
|
| 87 |
+
import ctypes
|
| 88 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 89 |
+
from OpenGL.raw.GL.ARB.separate_shader_objects import *
|
| 90 |
+
from OpenGL.raw.GL.ARB.separate_shader_objects import _EXTENSION_NAME
|
| 91 |
+
|
| 92 |
+
def glInitSeparateShaderObjectsARB():
|
| 93 |
+
'''Return boolean indicating whether this extension is available'''
|
| 94 |
+
from OpenGL import extensions
|
| 95 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 96 |
+
|
| 97 |
+
# INPUT glCreateShaderProgramv.strings size not checked against count
|
| 98 |
+
glCreateShaderProgramv=wrapper.wrapper(glCreateShaderProgramv).setInputArraySize(
|
| 99 |
+
'strings', None
|
| 100 |
+
)
|
| 101 |
+
# INPUT glDeleteProgramPipelines.pipelines size not checked against n
|
| 102 |
+
glDeleteProgramPipelines=wrapper.wrapper(glDeleteProgramPipelines).setInputArraySize(
|
| 103 |
+
'pipelines', None
|
| 104 |
+
)
|
| 105 |
+
glGenProgramPipelines=wrapper.wrapper(glGenProgramPipelines).setOutput(
|
| 106 |
+
'pipelines',size=lambda x:(x,),pnameArg='n',orPassIn=True
|
| 107 |
+
)
|
| 108 |
+
glGetProgramPipelineiv=wrapper.wrapper(glGetProgramPipelineiv).setOutput(
|
| 109 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 110 |
+
)
|
| 111 |
+
glProgramUniform1iv=wrapper.wrapper(glProgramUniform1iv).setInputArraySize(
|
| 112 |
+
'value', 1
|
| 113 |
+
)
|
| 114 |
+
glProgramUniform1fv=wrapper.wrapper(glProgramUniform1fv).setInputArraySize(
|
| 115 |
+
'value', 1
|
| 116 |
+
)
|
| 117 |
+
glProgramUniform1dv=wrapper.wrapper(glProgramUniform1dv).setInputArraySize(
|
| 118 |
+
'value', 1
|
| 119 |
+
)
|
| 120 |
+
glProgramUniform1uiv=wrapper.wrapper(glProgramUniform1uiv).setInputArraySize(
|
| 121 |
+
'value', 1
|
| 122 |
+
)
|
| 123 |
+
glProgramUniform2iv=wrapper.wrapper(glProgramUniform2iv).setInputArraySize(
|
| 124 |
+
'value', 2
|
| 125 |
+
)
|
| 126 |
+
glProgramUniform2fv=wrapper.wrapper(glProgramUniform2fv).setInputArraySize(
|
| 127 |
+
'value', 2
|
| 128 |
+
)
|
| 129 |
+
glProgramUniform2dv=wrapper.wrapper(glProgramUniform2dv).setInputArraySize(
|
| 130 |
+
'value', 2
|
| 131 |
+
)
|
| 132 |
+
glProgramUniform2uiv=wrapper.wrapper(glProgramUniform2uiv).setInputArraySize(
|
| 133 |
+
'value', 2
|
| 134 |
+
)
|
| 135 |
+
glProgramUniform3iv=wrapper.wrapper(glProgramUniform3iv).setInputArraySize(
|
| 136 |
+
'value', 3
|
| 137 |
+
)
|
| 138 |
+
glProgramUniform3fv=wrapper.wrapper(glProgramUniform3fv).setInputArraySize(
|
| 139 |
+
'value', 3
|
| 140 |
+
)
|
| 141 |
+
glProgramUniform3dv=wrapper.wrapper(glProgramUniform3dv).setInputArraySize(
|
| 142 |
+
'value', 3
|
| 143 |
+
)
|
| 144 |
+
glProgramUniform3uiv=wrapper.wrapper(glProgramUniform3uiv).setInputArraySize(
|
| 145 |
+
'value', 3
|
| 146 |
+
)
|
| 147 |
+
glProgramUniform4iv=wrapper.wrapper(glProgramUniform4iv).setInputArraySize(
|
| 148 |
+
'value', 4
|
| 149 |
+
)
|
| 150 |
+
glProgramUniform4fv=wrapper.wrapper(glProgramUniform4fv).setInputArraySize(
|
| 151 |
+
'value', 4
|
| 152 |
+
)
|
| 153 |
+
glProgramUniform4dv=wrapper.wrapper(glProgramUniform4dv).setInputArraySize(
|
| 154 |
+
'value', 4
|
| 155 |
+
)
|
| 156 |
+
glProgramUniform4uiv=wrapper.wrapper(glProgramUniform4uiv).setInputArraySize(
|
| 157 |
+
'value', 4
|
| 158 |
+
)
|
| 159 |
+
glProgramUniformMatrix2fv=wrapper.wrapper(glProgramUniformMatrix2fv).setInputArraySize(
|
| 160 |
+
'value', 2
|
| 161 |
+
)
|
| 162 |
+
glProgramUniformMatrix3fv=wrapper.wrapper(glProgramUniformMatrix3fv).setInputArraySize(
|
| 163 |
+
'value', 3
|
| 164 |
+
)
|
| 165 |
+
glProgramUniformMatrix4fv=wrapper.wrapper(glProgramUniformMatrix4fv).setInputArraySize(
|
| 166 |
+
'value', 4
|
| 167 |
+
)
|
| 168 |
+
glProgramUniformMatrix2dv=wrapper.wrapper(glProgramUniformMatrix2dv).setInputArraySize(
|
| 169 |
+
'value', 2
|
| 170 |
+
)
|
| 171 |
+
glProgramUniformMatrix3dv=wrapper.wrapper(glProgramUniformMatrix3dv).setInputArraySize(
|
| 172 |
+
'value', 3
|
| 173 |
+
)
|
| 174 |
+
glProgramUniformMatrix4dv=wrapper.wrapper(glProgramUniformMatrix4dv).setInputArraySize(
|
| 175 |
+
'value', 4
|
| 176 |
+
)
|
| 177 |
+
# INPUT glProgramUniformMatrix2x3fv.value size not checked against count
|
| 178 |
+
glProgramUniformMatrix2x3fv=wrapper.wrapper(glProgramUniformMatrix2x3fv).setInputArraySize(
|
| 179 |
+
'value', None
|
| 180 |
+
)
|
| 181 |
+
# INPUT glProgramUniformMatrix3x2fv.value size not checked against count
|
| 182 |
+
glProgramUniformMatrix3x2fv=wrapper.wrapper(glProgramUniformMatrix3x2fv).setInputArraySize(
|
| 183 |
+
'value', None
|
| 184 |
+
)
|
| 185 |
+
# INPUT glProgramUniformMatrix2x4fv.value size not checked against count
|
| 186 |
+
glProgramUniformMatrix2x4fv=wrapper.wrapper(glProgramUniformMatrix2x4fv).setInputArraySize(
|
| 187 |
+
'value', None
|
| 188 |
+
)
|
| 189 |
+
# INPUT glProgramUniformMatrix4x2fv.value size not checked against count
|
| 190 |
+
glProgramUniformMatrix4x2fv=wrapper.wrapper(glProgramUniformMatrix4x2fv).setInputArraySize(
|
| 191 |
+
'value', None
|
| 192 |
+
)
|
| 193 |
+
# INPUT glProgramUniformMatrix3x4fv.value size not checked against count
|
| 194 |
+
glProgramUniformMatrix3x4fv=wrapper.wrapper(glProgramUniformMatrix3x4fv).setInputArraySize(
|
| 195 |
+
'value', None
|
| 196 |
+
)
|
| 197 |
+
# INPUT glProgramUniformMatrix4x3fv.value size not checked against count
|
| 198 |
+
glProgramUniformMatrix4x3fv=wrapper.wrapper(glProgramUniformMatrix4x3fv).setInputArraySize(
|
| 199 |
+
'value', None
|
| 200 |
+
)
|
| 201 |
+
# INPUT glProgramUniformMatrix2x3dv.value size not checked against count
|
| 202 |
+
glProgramUniformMatrix2x3dv=wrapper.wrapper(glProgramUniformMatrix2x3dv).setInputArraySize(
|
| 203 |
+
'value', None
|
| 204 |
+
)
|
| 205 |
+
# INPUT glProgramUniformMatrix3x2dv.value size not checked against count
|
| 206 |
+
glProgramUniformMatrix3x2dv=wrapper.wrapper(glProgramUniformMatrix3x2dv).setInputArraySize(
|
| 207 |
+
'value', None
|
| 208 |
+
)
|
| 209 |
+
# INPUT glProgramUniformMatrix2x4dv.value size not checked against count
|
| 210 |
+
glProgramUniformMatrix2x4dv=wrapper.wrapper(glProgramUniformMatrix2x4dv).setInputArraySize(
|
| 211 |
+
'value', None
|
| 212 |
+
)
|
| 213 |
+
# INPUT glProgramUniformMatrix4x2dv.value size not checked against count
|
| 214 |
+
glProgramUniformMatrix4x2dv=wrapper.wrapper(glProgramUniformMatrix4x2dv).setInputArraySize(
|
| 215 |
+
'value', None
|
| 216 |
+
)
|
| 217 |
+
# INPUT glProgramUniformMatrix3x4dv.value size not checked against count
|
| 218 |
+
glProgramUniformMatrix3x4dv=wrapper.wrapper(glProgramUniformMatrix3x4dv).setInputArraySize(
|
| 219 |
+
'value', None
|
| 220 |
+
)
|
| 221 |
+
# INPUT glProgramUniformMatrix4x3dv.value size not checked against count
|
| 222 |
+
glProgramUniformMatrix4x3dv=wrapper.wrapper(glProgramUniformMatrix4x3dv).setInputArraySize(
|
| 223 |
+
'value', None
|
| 224 |
+
)
|
| 225 |
+
glGetProgramPipelineInfoLog=wrapper.wrapper(glGetProgramPipelineInfoLog).setOutput(
|
| 226 |
+
'length',size=(1,),orPassIn=True
|
| 227 |
+
).setOutput(
|
| 228 |
+
'infoLog',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True
|
| 229 |
+
)
|
| 230 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_bit_encoding.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shader_bit_encoding
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shader_bit_encoding to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension trivially adds built-in functions for getting/setting
|
| 10 |
+
the bit encoding for floating-point values in the OpenGL Shading Language.
|
| 11 |
+
|
| 12 |
+
These functions are pulled out of ARB_gpu_shader5, since support for such
|
| 13 |
+
built-in functions exists in current hardware.
|
| 14 |
+
|
| 15 |
+
The official definition of this extension is available here:
|
| 16 |
+
http://www.opengl.org/registry/specs/ARB/shader_bit_encoding.txt
|
| 17 |
+
'''
|
| 18 |
+
from OpenGL import platform, constant, arrays
|
| 19 |
+
from OpenGL import extensions, wrapper
|
| 20 |
+
import ctypes
|
| 21 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 22 |
+
from OpenGL.raw.GL.ARB.shader_bit_encoding import *
|
| 23 |
+
from OpenGL.raw.GL.ARB.shader_bit_encoding import _EXTENSION_NAME
|
| 24 |
+
|
| 25 |
+
def glInitShaderBitEncodingARB():
|
| 26 |
+
'''Return boolean indicating whether this extension is available'''
|
| 27 |
+
from OpenGL import extensions
|
| 28 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_group_vote.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shader_group_vote
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shader_group_vote to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides new built-in functions to compute the composite of
|
| 10 |
+
a set of boolean conditions across a group of shader invocations. These
|
| 11 |
+
composite results may be used to execute shaders more efficiently on a
|
| 12 |
+
single-instruction multiple-data (SIMD) processor. The set of shader
|
| 13 |
+
invocations across which boolean conditions are evaluated is
|
| 14 |
+
implementation-dependent, and this extension provides no guarantee over
|
| 15 |
+
how individual shader invocations are assigned to such sets. In
|
| 16 |
+
particular, the set of shader invocations has no necessary relationship
|
| 17 |
+
with the compute shader local work group -- a pair of shader invocations
|
| 18 |
+
in a single compute shader work group may end up in different sets used by
|
| 19 |
+
these built-ins.
|
| 20 |
+
|
| 21 |
+
Compute shaders operate on an explicitly specified group of threads (a
|
| 22 |
+
local work group), but many implementations of OpenGL 4.3 will even group
|
| 23 |
+
non-compute shader invocations and execute them in a SIMD fashion. When
|
| 24 |
+
executing code like
|
| 25 |
+
|
| 26 |
+
if (condition) {
|
| 27 |
+
result = do_fast_path();
|
| 28 |
+
} else {
|
| 29 |
+
result = do_general_path();
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
where <condition> diverges between invocations, a SIMD implementation
|
| 33 |
+
might first call do_fast_path() for the invocations where <condition> is
|
| 34 |
+
true and leave the other invocations dormant. Once do_fast_path()
|
| 35 |
+
returns, it might call do_general_path() for invocations where <condition>
|
| 36 |
+
is false and leave the other invocations dormant. In this case, the
|
| 37 |
+
shader executes *both* the fast and the general path and might be better
|
| 38 |
+
off just using the general path for all invocations.
|
| 39 |
+
|
| 40 |
+
This extension provides the ability to avoid divergent execution by
|
| 41 |
+
evaluting a condition across an entire SIMD invocation group using code
|
| 42 |
+
like:
|
| 43 |
+
|
| 44 |
+
if (allInvocationsARB(condition)) {
|
| 45 |
+
result = do_fast_path();
|
| 46 |
+
} else {
|
| 47 |
+
result = do_general_path();
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
The built-in function allInvocationsARB() will return the same value for
|
| 51 |
+
all invocations in the group, so the group will either execute
|
| 52 |
+
do_fast_path() or do_general_path(), but never both. For example, shader
|
| 53 |
+
code might want to evaluate a complex function iteratively by starting
|
| 54 |
+
with an approximation of the result and then refining the approximation.
|
| 55 |
+
Some input values may require a small number of iterations to generate an
|
| 56 |
+
accurate result (do_fast_path) while others require a larger number
|
| 57 |
+
(do_general_path). In another example, shader code might want to evaluate
|
| 58 |
+
a complex function (do_general_path) that can be greatly simplified when
|
| 59 |
+
assuming a specific value for one of its inputs (do_fast_path).
|
| 60 |
+
|
| 61 |
+
The official definition of this extension is available here:
|
| 62 |
+
http://www.opengl.org/registry/specs/ARB/shader_group_vote.txt
|
| 63 |
+
'''
|
| 64 |
+
from OpenGL import platform, constant, arrays
|
| 65 |
+
from OpenGL import extensions, wrapper
|
| 66 |
+
import ctypes
|
| 67 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 68 |
+
from OpenGL.raw.GL.ARB.shader_group_vote import *
|
| 69 |
+
from OpenGL.raw.GL.ARB.shader_group_vote import _EXTENSION_NAME
|
| 70 |
+
|
| 71 |
+
def glInitShaderGroupVoteARB():
|
| 72 |
+
'''Return boolean indicating whether this extension is available'''
|
| 73 |
+
from OpenGL import extensions
|
| 74 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_load_store.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shader_image_load_store
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shader_image_load_store to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides GLSL built-in functions allowing shaders to load
|
| 10 |
+
from, store to, and perform atomic read-modify-write operations to a
|
| 11 |
+
single level of a texture object from any shader stage. These built-in
|
| 12 |
+
functions are named imageLoad(), imageStore(), and imageAtomic*(),
|
| 13 |
+
respectively, and accept integer texel coordinates to identify the texel
|
| 14 |
+
accessed. The extension adds the notion of "image units" to the OpenGL
|
| 15 |
+
API, to which texture levels are bound for access by the GLSL built-in
|
| 16 |
+
functions. To allow shaders to specify the image unit to access, GLSL
|
| 17 |
+
provides a new set of data types ("image*") similar to samplers. Each
|
| 18 |
+
image variable is assigned an integer value to identify an image unit to
|
| 19 |
+
access, which is specified using Uniform*() APIs in a manner similar to
|
| 20 |
+
samplers.
|
| 21 |
+
|
| 22 |
+
This extension also provides the capability to explicitly enable "early"
|
| 23 |
+
per-fragment tests, where operations like depth and stencil testing are
|
| 24 |
+
performed prior to fragment shader execution. In unextended OpenGL,
|
| 25 |
+
fragment shaders never have any side effects and implementations can
|
| 26 |
+
sometimes perform per-fragment tests and discard some fragments prior to
|
| 27 |
+
executing the fragment shader. Since this extension allows fragment
|
| 28 |
+
shaders to write to texture and buffer object memory using the built-in
|
| 29 |
+
image functions, such optimizations could lead to non-deterministic
|
| 30 |
+
results. To avoid this, implementations supporting this extension may not
|
| 31 |
+
perform such optimizations on shaders having such side effects. However,
|
| 32 |
+
enabling early per-fragment tests guarantees that such tests will be
|
| 33 |
+
performed prior to fragment shader execution, and ensures that image
|
| 34 |
+
stores and atomics will not be performed by fragment shader invocations
|
| 35 |
+
where these per-fragment tests fail.
|
| 36 |
+
|
| 37 |
+
Finally, this extension provides both a GLSL built-in function and an
|
| 38 |
+
OpenGL API function allowing applications some control over the ordering
|
| 39 |
+
of image loads, stores, and atomics relative to other OpenGL pipeline
|
| 40 |
+
operations accessing the same memory. Because the extension provides the
|
| 41 |
+
ability to perform random accesses to texture or buffer object memory,
|
| 42 |
+
such accesses are not easily tracked by the OpenGL driver. To avoid the
|
| 43 |
+
need for heavy-handed synchronization at the driver level, this extension
|
| 44 |
+
requires manual synchronization. The MemoryBarrier() OpenGL API
|
| 45 |
+
function allows applications to specify a bitfield indicating the set of
|
| 46 |
+
OpenGL API operations to synchronize relative to shader memory access.
|
| 47 |
+
The memoryBarrier() GLSL built-in function provides a synchronization
|
| 48 |
+
point within a given shader invocation to ensure that all memory accesses
|
| 49 |
+
performed prior to the synchronization point complete prior to any started
|
| 50 |
+
after the synchronization point.
|
| 51 |
+
|
| 52 |
+
The official definition of this extension is available here:
|
| 53 |
+
http://www.opengl.org/registry/specs/ARB/shader_image_load_store.txt
|
| 54 |
+
'''
|
| 55 |
+
from OpenGL import platform, constant, arrays
|
| 56 |
+
from OpenGL import extensions, wrapper
|
| 57 |
+
import ctypes
|
| 58 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 59 |
+
from OpenGL.raw.GL.ARB.shader_image_load_store import *
|
| 60 |
+
from OpenGL.raw.GL.ARB.shader_image_load_store import _EXTENSION_NAME
|
| 61 |
+
|
| 62 |
+
def glInitShaderImageLoadStoreARB():
|
| 63 |
+
'''Return boolean indicating whether this extension is available'''
|
| 64 |
+
from OpenGL import extensions
|
| 65 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shader_image_size.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shader_image_size
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shader_image_size to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
This extension provides GLSL built-in functions allowing shaders to query
|
| 9 |
+
the size of an image.
|
| 10 |
+
|
| 11 |
+
The official definition of this extension is available here:
|
| 12 |
+
http://www.opengl.org/registry/specs/ARB/shader_image_size.txt
|
| 13 |
+
'''
|
| 14 |
+
from OpenGL import platform, constant, arrays
|
| 15 |
+
from OpenGL import extensions, wrapper
|
| 16 |
+
import ctypes
|
| 17 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 18 |
+
from OpenGL.raw.GL.ARB.shader_image_size import *
|
| 19 |
+
from OpenGL.raw.GL.ARB.shader_image_size import _EXTENSION_NAME
|
| 20 |
+
|
| 21 |
+
def glInitShaderImageSizeARB():
|
| 22 |
+
'''Return boolean indicating whether this extension is available'''
|
| 23 |
+
from OpenGL import extensions
|
| 24 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_100.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shading_language_100
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shading_language_100 to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension string indicates that the OpenGL Shading Language is
|
| 10 |
+
supported. The Shading Language is defined by a separate specification
|
| 11 |
+
document which can be downloaded from
|
| 12 |
+
|
| 13 |
+
http://www.opengl.org/documentation/oglsl.html
|
| 14 |
+
|
| 15 |
+
The official definition of this extension is available here:
|
| 16 |
+
http://www.opengl.org/registry/specs/ARB/shading_language_100.txt
|
| 17 |
+
'''
|
| 18 |
+
from OpenGL import platform, constant, arrays
|
| 19 |
+
from OpenGL import extensions, wrapper
|
| 20 |
+
import ctypes
|
| 21 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 22 |
+
from OpenGL.raw.GL.ARB.shading_language_100 import *
|
| 23 |
+
from OpenGL.raw.GL.ARB.shading_language_100 import _EXTENSION_NAME
|
| 24 |
+
|
| 25 |
+
def glInitShadingLanguage100ARB():
|
| 26 |
+
'''Return boolean indicating whether this extension is available'''
|
| 27 |
+
from OpenGL import extensions
|
| 28 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_include.py
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shading_language_include
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shading_language_include to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension introduces a #include GLSL directive to allow reusing
|
| 10 |
+
the same shader text in multiple shaders and defines the semantics
|
| 11 |
+
and syntax of the names allowed in #include directives. It also
|
| 12 |
+
defines API mechanisms to define the named string backing a
|
| 13 |
+
#include.
|
| 14 |
+
|
| 15 |
+
The official definition of this extension is available here:
|
| 16 |
+
http://www.opengl.org/registry/specs/ARB/shading_language_include.txt
|
| 17 |
+
'''
|
| 18 |
+
from OpenGL import platform, constant, arrays
|
| 19 |
+
from OpenGL import extensions, wrapper
|
| 20 |
+
import ctypes
|
| 21 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 22 |
+
from OpenGL.raw.GL.ARB.shading_language_include import *
|
| 23 |
+
from OpenGL.raw.GL.ARB.shading_language_include import _EXTENSION_NAME
|
| 24 |
+
|
| 25 |
+
def glInitShadingLanguageIncludeARB():
|
| 26 |
+
'''Return boolean indicating whether this extension is available'''
|
| 27 |
+
from OpenGL import extensions
|
| 28 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 29 |
+
|
| 30 |
+
# INPUT glNamedStringARB.name size not checked against namelen
|
| 31 |
+
# INPUT glNamedStringARB.string size not checked against stringlen
|
| 32 |
+
glNamedStringARB=wrapper.wrapper(glNamedStringARB).setInputArraySize(
|
| 33 |
+
'name', None
|
| 34 |
+
).setInputArraySize(
|
| 35 |
+
'string', None
|
| 36 |
+
)
|
| 37 |
+
# INPUT glDeleteNamedStringARB.name size not checked against namelen
|
| 38 |
+
glDeleteNamedStringARB=wrapper.wrapper(glDeleteNamedStringARB).setInputArraySize(
|
| 39 |
+
'name', None
|
| 40 |
+
)
|
| 41 |
+
# INPUT glCompileShaderIncludeARB.path size not checked against count
|
| 42 |
+
# INPUT glCompileShaderIncludeARB.length size not checked against count
|
| 43 |
+
glCompileShaderIncludeARB=wrapper.wrapper(glCompileShaderIncludeARB).setInputArraySize(
|
| 44 |
+
'path', None
|
| 45 |
+
).setInputArraySize(
|
| 46 |
+
'length', None
|
| 47 |
+
)
|
| 48 |
+
# INPUT glIsNamedStringARB.name size not checked against namelen
|
| 49 |
+
glIsNamedStringARB=wrapper.wrapper(glIsNamedStringARB).setInputArraySize(
|
| 50 |
+
'name', None
|
| 51 |
+
)
|
| 52 |
+
# INPUT glGetNamedStringARB.name size not checked against namelen
|
| 53 |
+
glGetNamedStringARB=wrapper.wrapper(glGetNamedStringARB).setOutput(
|
| 54 |
+
'stringlen',size=(1,),orPassIn=True
|
| 55 |
+
).setOutput(
|
| 56 |
+
'string',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True
|
| 57 |
+
).setInputArraySize(
|
| 58 |
+
'name', None
|
| 59 |
+
)
|
| 60 |
+
# INPUT glGetNamedStringivARB.name size not checked against namelen
|
| 61 |
+
glGetNamedStringivARB=wrapper.wrapper(glGetNamedStringivARB).setOutput(
|
| 62 |
+
'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
|
| 63 |
+
).setInputArraySize(
|
| 64 |
+
'name', None
|
| 65 |
+
)
|
| 66 |
+
### END AUTOGENERATED SECTION
|
vllm/lib/python3.10/site-packages/OpenGL/GL/ARB/shading_language_packing.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'''OpenGL extension ARB.shading_language_packing
|
| 2 |
+
|
| 3 |
+
This module customises the behaviour of the
|
| 4 |
+
OpenGL.raw.GL.ARB.shading_language_packing to provide a more
|
| 5 |
+
Python-friendly API
|
| 6 |
+
|
| 7 |
+
Overview (from the spec)
|
| 8 |
+
|
| 9 |
+
This extension provides the GLSL built-in functions to convert a 32-bit
|
| 10 |
+
unsigned integer holding a pair of 16-bit floating-point values to or from
|
| 11 |
+
a two-component floating-point vector (vec2).
|
| 12 |
+
|
| 13 |
+
This mechanism allows GLSL shaders to read and write 16-bit floating-point
|
| 14 |
+
encodings (via 32-bit unsigned integers) without introducing a full set of
|
| 15 |
+
16-bit floating-point data types.
|
| 16 |
+
|
| 17 |
+
This extension also adds the GLSL built-in packing functions included in
|
| 18 |
+
GLSL version 4.00 and the ARB_gpu_shader5 extension which pack and unpack
|
| 19 |
+
vectors of small fixed-point data types into a larger scalar. By putting
|
| 20 |
+
these packing functions in this separate extension it allows
|
| 21 |
+
implementations to provide these functions in hardware that supports them
|
| 22 |
+
independent of the other ARB_gpu_shader5 features.
|
| 23 |
+
|
| 24 |
+
In addition to the packing functions from ARB_gpu_shader5 this extension
|
| 25 |
+
also adds the missing [un]packSnorm2x16 for completeness.
|
| 26 |
+
|
| 27 |
+
The official definition of this extension is available here:
|
| 28 |
+
http://www.opengl.org/registry/specs/ARB/shading_language_packing.txt
|
| 29 |
+
'''
|
| 30 |
+
from OpenGL import platform, constant, arrays
|
| 31 |
+
from OpenGL import extensions, wrapper
|
| 32 |
+
import ctypes
|
| 33 |
+
from OpenGL.raw.GL import _types, _glgets
|
| 34 |
+
from OpenGL.raw.GL.ARB.shading_language_packing import *
|
| 35 |
+
from OpenGL.raw.GL.ARB.shading_language_packing import _EXTENSION_NAME
|
| 36 |
+
|
| 37 |
+
def glInitShadingLanguagePackingARB():
|
| 38 |
+
'''Return boolean indicating whether this extension is available'''
|
| 39 |
+
from OpenGL import extensions
|
| 40 |
+
return extensions.hasGLExtension( _EXTENSION_NAME )
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
### END AUTOGENERATED SECTION
|