sync code with last improvements from OpenBSD
This commit is contained in:
parent
68fa196282
commit
9c49429a7e
4431 changed files with 2761157 additions and 1135565 deletions
|
@ -182,7 +182,7 @@ Euro Truck Simulator
|
|||
893943 glDrawArrays(mode = GL_TRIANGLES, first = 0, count = 6)
|
||||
|
||||
At the start of this frame, buffer 14 and 15 haven't been used in the previous 2
|
||||
frames, and the ``GL_ARB_sync`` fence has ensured that the GPU has at least started
|
||||
frames, and the :ext:`GL_ARB_sync` fence has ensured that the GPU has at least started
|
||||
frame n-1 as the CPU starts the current frame. The first map is ``offset = 0,
|
||||
INVALIDATE_BUFFER | UNSYNCHRONIZED``, which suggests that the driver should
|
||||
reallocate storage for the mapping even in the ``UNSYNCHRONIZED`` case, except
|
||||
|
@ -237,7 +237,7 @@ Plague Inc
|
|||
1640863 glDrawElementsBaseVertex(mode = GL_TRIANGLES, count = 6, type = GL_UNSIGNED_SHORT, indices = 0x58, basevertex = 4)
|
||||
|
||||
At the start of this frame, the VBOs haven't been used in about 6 frames, and
|
||||
the ``GL_ARB_sync`` fence has ensured that the GPU has started frame n-1.
|
||||
the :ext:`GL_ARB_sync` fence has ensured that the GPU has started frame n-1.
|
||||
|
||||
Note the use of ``glFlushMappedBufferRange()`` on a small fraction of the size
|
||||
of the VBO -- it is important that a blitting driver make use of the flush
|
||||
|
@ -299,7 +299,7 @@ Tabletop Simulator
|
|||
1289068 glDrawArrays(mode = GL_TRIANGLE_STRIP, first = 8, count = 4)
|
||||
1289553 glXSwapBuffers(dpy = 0x3e10810, drawable = 23068692)
|
||||
|
||||
In this app, buffer 480 gets used like this every other frame. The ``GL_ARB_sync``
|
||||
In this app, buffer 480 gets used like this every other frame. The :ext:`GL_ARB_sync`
|
||||
fence ensures that frame n-1 has started on the GPU before CPU work starts on
|
||||
the current frame, so the unsynchronized access to the buffers is safe.
|
||||
|
||||
|
@ -337,7 +337,7 @@ Hollow Knight
|
|||
1873097 glDrawElementsBaseVertex(mode = GL_TRIANGLES, count = 36, type = GL_UNSIGNED_SHORT, indices = 0x2d0, basevertex = 240)
|
||||
|
||||
In this app, buffer 29/30 get used like this starting from offset 0 every other
|
||||
frame. The ``GL_ARB_sync`` fence is used to make sure that the GPU has reached the
|
||||
frame. The :ext:`GL_ARB_sync` fence is used to make sure that the GPU has reached the
|
||||
start of the previous frame before we go unsynchronized writing over the n-2
|
||||
frame's buffer.
|
||||
|
||||
|
@ -363,7 +363,7 @@ Borderlands 2
|
|||
3563064 glBindBufferARB(target = GL_ELEMENT_ARRAY_BUFFER, buffer = 875)
|
||||
3563065 glDrawElementsInstancedARB(mode = GL_TRIANGLES, count = 72, type = GL_UNSIGNED_SHORT, indices = NULL, instancecount = 28)
|
||||
|
||||
The ``GL_ARB_sync`` fence ensures that the GPU has started frame n-1 before the CPU
|
||||
The :ext:`GL_ARB_sync` fence ensures that the GPU has started frame n-1 before the CPU
|
||||
starts on the current frame.
|
||||
|
||||
This sequence of buffer uploads appears in each frame with the same buffer
|
||||
|
|
|
@ -102,7 +102,7 @@ objects. They all follow simple, one-method binding calls, e.g.
|
|||
PIPE_MAX_VIEWPORTS.
|
||||
* ``set_viewport_states``
|
||||
* ``set_window_rectangles`` sets the window rectangles to be used for
|
||||
rendering, as defined by GL_EXT_window_rectangles. There are two
|
||||
rendering, as defined by :ext:`GL_EXT_window_rectangles`. There are two
|
||||
modes - include and exclude, which define whether the supplied
|
||||
rectangles are to be used for including fragments or excluding
|
||||
them. All of the rectangles are ORed together, so in exclude mode,
|
||||
|
@ -122,18 +122,18 @@ objects. They all follow simple, one-method binding calls, e.g.
|
|||
for tessellation.
|
||||
|
||||
* ``set_debug_callback`` sets the callback to be used for reporting
|
||||
various debug messages, eventually reported via KHR_debug and
|
||||
various debug messages, eventually reported via :ext:`GL_KHR_debug` and
|
||||
similar mechanisms.
|
||||
|
||||
Samplers
|
||||
^^^^^^^^
|
||||
|
||||
pipe_sampler_state objects control how textures are sampled
|
||||
(coordinate wrap modes, interpolation modes, etc). Note that unless
|
||||
``PIPE_CAP_TEXTURE_BUFFER_SAMPLER`` is enabled, samplers are not used for
|
||||
texture buffer objects. That is, pipe_context::bind_sampler_views()
|
||||
will not bind a sampler if the corresponding sampler view refers to a
|
||||
PIPE_BUFFER resource.
|
||||
pipe_sampler_state objects control how textures are sampled (coordinate wrap
|
||||
modes, interpolation modes, etc). Samplers are only required for texture
|
||||
instructions for which nir_tex_instr_need_sampler returns true. Drivers must
|
||||
ignore samplers for other texture instructions. Frontends may or may not bind
|
||||
samplers when no texture instruction use them. Notably, frontends may not bind
|
||||
samplers for texture buffer objects, which are never accessed with samplers.
|
||||
|
||||
Sampler Views
|
||||
^^^^^^^^^^^^^
|
||||
|
@ -357,7 +357,7 @@ buffer.
|
|||
In indexed draw, ``min_index`` and ``max_index`` respectively provide a lower
|
||||
and upper bound of the indices contained in the index buffer inside the range
|
||||
between ``start`` to ``start``+``count``-1. This allows the driver to
|
||||
determine which subset of vertices will be referenced during te draw call
|
||||
determine which subset of vertices will be referenced during the draw call
|
||||
without having to scan the index buffer. Providing a over-estimation of the
|
||||
the true bounds, for example, a ``min_index`` and ``max_index`` of 0 and
|
||||
0xffffffff respectively, must give exactly the same rendering, albeit with less
|
||||
|
@ -561,7 +561,7 @@ has completed, drawing will be predicated on the outcome of the query.
|
|||
If ``mode`` is PIPE_RENDER_COND_BY_REGION_WAIT or
|
||||
PIPE_RENDER_COND_BY_REGION_NO_WAIT rendering will be predicated as above
|
||||
for the non-REGION modes but in the case that an occlusion query returns
|
||||
a non-zero result, regions which were occluded may be ommitted by subsequent
|
||||
a non-zero result, regions which were occluded may be omitted by subsequent
|
||||
drawing commands. This can result in better performance with some GPUs.
|
||||
Normally, if the occlusion query returned a non-zero result subsequent
|
||||
drawing happens normally so fragments may be generated, shaded and
|
||||
|
@ -665,8 +665,10 @@ Blitting
|
|||
These methods emulate classic blitter controls.
|
||||
|
||||
These methods operate directly on ``pipe_resource`` objects, and stand
|
||||
apart from any 3D state in the context. Blitting functionality may be
|
||||
moved to a separate abstraction at some point in the future.
|
||||
apart from any 3D state in the context. Each method is assumed to have an
|
||||
implicit memory barrier around itself. They do not need any explicit
|
||||
``memory_barrier``. Blitting functionality may be moved to a separate
|
||||
abstraction at some point in the future.
|
||||
|
||||
``resource_copy_region`` blits a region of a resource to a region of another
|
||||
resource, provided that both resources have the same format, or compatible
|
||||
|
@ -699,6 +701,11 @@ the box region, not the beginning of the resource. If transfer_map fails,
|
|||
the returned pointer to the buffer memory is NULL, and the pointer
|
||||
to the transfer object remains unchanged (i.e. it can be non-NULL).
|
||||
|
||||
When mapping an MSAA surface, the samples are implicitly resolved to
|
||||
single-sampled for reads (returning the first sample for depth/stencil/integer,
|
||||
averaged for others). See u_transfer_helper's U_TRANSFER_HELPER_MSAA_MAP for a
|
||||
way to get that behavior using a resolve blit.
|
||||
|
||||
``transfer_unmap`` remove the memory mapping for and destroy
|
||||
the transfer object. The pointer into the resource should be considered
|
||||
invalid and discarded.
|
||||
|
|
|
@ -30,26 +30,30 @@ performed on all render targets.
|
|||
The blend_enable flag is ignored for all render targets when logical
|
||||
operations are enabled.
|
||||
|
||||
For a source component `s` and destination component `d`, the logical
|
||||
For a source component ``s`` and destination component ``d``, the logical
|
||||
operations are defined as taking the bits of each channel of each component,
|
||||
and performing one of the following operations per-channel:
|
||||
|
||||
* ``CLEAR``: 0
|
||||
* ``NOR``: :math:`\lnot(s \lor d)`
|
||||
* ``AND_INVERTED``: :math:`\lnot s \land d`
|
||||
* ``COPY_INVERTED``: :math:`\lnot s`
|
||||
* ``AND_REVERSE``: :math:`s \land \lnot d`
|
||||
* ``INVERT``: :math:`\lnot d`
|
||||
* ``XOR``: :math:`s \oplus d`
|
||||
* ``NAND``: :math:`\lnot(s \land d)`
|
||||
* ``AND``: :math:`s \land d`
|
||||
* ``EQUIV``: :math:`\lnot(s \oplus d)`
|
||||
* ``NOOP``: :math:`d`
|
||||
* ``OR_INVERTED``: :math:`\lnot s \lor d`
|
||||
* ``COPY``: :math:`s`
|
||||
* ``OR_REVERSE``: :math:`s \lor \lnot d`
|
||||
* ``OR``: :math:`s \lor d`
|
||||
* ``SET``: 1
|
||||
================== =========================
|
||||
Operation Equation
|
||||
================== =========================
|
||||
``CLEAR`` :math:`0`
|
||||
``NOR`` :math:`\lnot(s \lor d)`
|
||||
``AND_INVERTED`` :math:`\lnot s \land d`
|
||||
``COPY_INVERTED`` :math:`\lnot s`
|
||||
``AND_REVERSE`` :math:`s \land \lnot d`
|
||||
``INVERT`` :math:`\lnot d`
|
||||
``XOR`` :math:`s \oplus d`
|
||||
``NAND`` :math:`\lnot(s \land d)`
|
||||
``AND`` :math:`s \land d`
|
||||
``EQUIV`` :math:`\lnot(s \oplus d)`
|
||||
``NOOP`` :math:`d`
|
||||
``OR_INVERTED`` :math:`\lnot s \lor d`
|
||||
``COPY`` :math:`s`
|
||||
``OR_REVERSE`` :math:`s \lor \lnot d`
|
||||
``OR`` :math:`s \lor d`
|
||||
``SET`` :math:`1`
|
||||
================== =========================
|
||||
|
||||
.. note::
|
||||
The logical operation names and definitions match those of the OpenGL API,
|
||||
|
@ -62,25 +66,17 @@ Members
|
|||
These members affect all render targets.
|
||||
|
||||
dither
|
||||
%%%%%%
|
||||
Whether dithering is enabled.
|
||||
|
||||
Whether dithering is enabled.
|
||||
|
||||
.. note::
|
||||
Dithering is completely implementation-dependent. It may be ignored by
|
||||
drivers for any reason, and some render targets may always or never be
|
||||
dithered depending on their format or usage flags.
|
||||
.. note::
|
||||
Dithering is completely implementation-dependent. It may be ignored by
|
||||
drivers for any reason, and some render targets may always or never be
|
||||
dithered depending on their format or usage flags.
|
||||
|
||||
logicop_enable
|
||||
%%%%%%%%%%%%%%
|
||||
|
||||
Whether the blender should perform a logicop instead of blending.
|
||||
|
||||
Whether the blender should perform a logicop instead of blending.
|
||||
logicop_func
|
||||
%%%%%%%%%%%%
|
||||
|
||||
The logicop to use. One of ``PIPE_LOGICOP``.
|
||||
|
||||
The logicop to use. One of ``PIPE_LOGICOP``.
|
||||
independent_blend_enable
|
||||
If enabled, blend state is different for each render target, and
|
||||
for each render target set in the respective member of the rt array.
|
||||
|
|
|
@ -8,91 +8,84 @@ Attributes include polygon culling state, line width, line stipple,
|
|||
multisample state, scissoring and flat/smooth shading.
|
||||
|
||||
Linkage
|
||||
-------
|
||||
|
||||
clamp_vertex_color
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
If set, TGSI_SEMANTIC_COLOR registers are clamped to the [0, 1] range after
|
||||
the execution of the vertex shader, before being passed to the geometry
|
||||
shader or fragment shader.
|
||||
|
||||
If set, TGSI_SEMANTIC_COLOR registers are clamped to the [0, 1] range after
|
||||
the execution of the vertex shader, before being passed to the geometry
|
||||
shader or fragment shader.
|
||||
OpenGL: glClampColor(GL_CLAMP_VERTEX_COLOR) in GL 3.0 or
|
||||
:ext:`GL_ARB_color_buffer_float`
|
||||
|
||||
OpenGL: glClampColor(GL_CLAMP_VERTEX_COLOR) in GL 3.0 or GL_ARB_color_buffer_float
|
||||
D3D11: seems always disabled
|
||||
|
||||
D3D11: seems always disabled
|
||||
|
||||
Note the PIPE_CAP_VERTEX_COLOR_CLAMPED query indicates whether or not the
|
||||
driver supports this control. If it's not supported, gallium frontends may
|
||||
have to insert extra clamping code.
|
||||
Note the PIPE_CAP_VERTEX_COLOR_CLAMPED query indicates whether or not the
|
||||
driver supports this control. If it's not supported, gallium frontends may
|
||||
have to insert extra clamping code.
|
||||
|
||||
|
||||
clamp_fragment_color
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
Controls whether TGSI_SEMANTIC_COLOR outputs of the fragment shader
|
||||
are clamped to [0, 1].
|
||||
|
||||
Controls whether TGSI_SEMANTIC_COLOR outputs of the fragment shader
|
||||
are clamped to [0, 1].
|
||||
OpenGL: glClampColor(GL_CLAMP_FRAGMENT_COLOR) in GL 3.0 or
|
||||
:ext:`GL_ARB_color_buffer_float`
|
||||
|
||||
OpenGL: glClampColor(GL_CLAMP_FRAGMENT_COLOR) in GL 3.0 or ARB_color_buffer_float
|
||||
D3D11: seems always disabled
|
||||
|
||||
D3D11: seems always disabled
|
||||
|
||||
Note the PIPE_CAP_FRAGMENT_COLOR_CLAMPED query indicates whether or not the
|
||||
driver supports this control. If it's not supported, gallium frontends may
|
||||
have to insert extra clamping code.
|
||||
Note the PIPE_CAP_FRAGMENT_COLOR_CLAMPED query indicates whether or not the
|
||||
driver supports this control. If it's not supported, gallium frontends may
|
||||
have to insert extra clamping code.
|
||||
|
||||
|
||||
Shading
|
||||
-------
|
||||
|
||||
flatshade
|
||||
^^^^^^^^^
|
||||
If set, the provoking vertex of each polygon is used to determine the color
|
||||
of the entire polygon. If not set, fragment colors will be interpolated
|
||||
between the vertex colors.
|
||||
|
||||
If set, the provoking vertex of each polygon is used to determine the color
|
||||
of the entire polygon. If not set, fragment colors will be interpolated
|
||||
between the vertex colors.
|
||||
The actual interpolated shading algorithm is obviously
|
||||
implementation-dependent, but will usually be Gouraud for most hardware.
|
||||
|
||||
The actual interpolated shading algorithm is obviously
|
||||
implementation-dependent, but will usually be Gouraud for most hardware.
|
||||
.. note::
|
||||
|
||||
.. note::
|
||||
This is separate from the fragment shader input attributes
|
||||
CONSTANT, LINEAR and PERSPECTIVE. The flatshade state is needed at
|
||||
clipping time to determine how to set the color of new vertices.
|
||||
|
||||
This is separate from the fragment shader input attributes
|
||||
CONSTANT, LINEAR and PERSPECTIVE. The flatshade state is needed at
|
||||
clipping time to determine how to set the color of new vertices.
|
||||
|
||||
:ref:`Draw` can implement flat shading by copying the provoking vertex
|
||||
color to all the other vertices in the primitive.
|
||||
:ref:`Draw` can implement flat shading by copying the provoking vertex
|
||||
color to all the other vertices in the primitive.
|
||||
|
||||
flatshade_first
|
||||
^^^^^^^^^^^^^^^
|
||||
Whether the first vertex should be the provoking vertex, for most primitives.
|
||||
If not set, the last vertex is the provoking vertex.
|
||||
|
||||
Whether the first vertex should be the provoking vertex, for most primitives.
|
||||
If not set, the last vertex is the provoking vertex.
|
||||
There are a few important exceptions to the specification of this rule.
|
||||
|
||||
There are a few important exceptions to the specification of this rule.
|
||||
|
||||
* ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
|
||||
vertex. If the caller wishes to change the provoking vertex, they merely
|
||||
need to rotate the vertices themselves.
|
||||
* ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: The option only has
|
||||
an effect if ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION`` is true.
|
||||
If it is not, the provoking vertex is always the last vertex.
|
||||
* ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
|
||||
second vertex, not the first. This permits each segment of the fan to have
|
||||
a different color.
|
||||
* ``PIPE_PRIMITIVE_POLYGON``: The provoking vertex is always the first
|
||||
vertex. If the caller wishes to change the provoking vertex, they merely
|
||||
need to rotate the vertices themselves.
|
||||
* ``PIPE_PRIMITIVE_QUAD``, ``PIPE_PRIMITIVE_QUAD_STRIP``: The option only has
|
||||
an effect if ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION`` is true.
|
||||
If it is not, the provoking vertex is always the last vertex.
|
||||
* ``PIPE_PRIMITIVE_TRIANGLE_FAN``: When set, the provoking vertex is the
|
||||
second vertex, not the first. This permits each segment of the fan to have
|
||||
a different color.
|
||||
|
||||
Polygons
|
||||
--------
|
||||
|
||||
light_twoside
|
||||
^^^^^^^^^^^^^
|
||||
If set, there are per-vertex back-facing colors. The hardware
|
||||
(perhaps assisted by :ref:`Draw`) should be set up to use this state
|
||||
along with the front/back information to set the final vertex colors
|
||||
prior to rasterization.
|
||||
|
||||
If set, there are per-vertex back-facing colors. The hardware
|
||||
(perhaps assisted by :ref:`Draw`) should be set up to use this state
|
||||
along with the front/back information to set the final vertex colors
|
||||
prior to rasterization.
|
||||
|
||||
The frontface vertex shader color output is marked with TGSI semantic
|
||||
COLOR[0], and backface COLOR[1].
|
||||
The frontface vertex shader color output is marked with TGSI semantic
|
||||
COLOR[0], and backface COLOR[1].
|
||||
|
||||
front_ccw
|
||||
Indicates whether the window order of front-facing polygons is
|
||||
|
@ -164,65 +157,60 @@ Points
|
|||
------
|
||||
|
||||
sprite_coord_enable
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
The effect of this state depends on PIPE_CAP_TGSI_TEXCOORD !
|
||||
The effect of this state depends on PIPE_CAP_TGSI_TEXCOORD !
|
||||
|
||||
Controls automatic texture coordinate generation for rendering sprite points.
|
||||
Controls automatic texture coordinate generation for rendering sprite points.
|
||||
|
||||
If PIPE_CAP_TGSI_TEXCOORD is false:
|
||||
When bit k in the sprite_coord_enable bitfield is set, then generic
|
||||
input k to the fragment shader will get an automatically computed
|
||||
texture coordinate.
|
||||
If PIPE_CAP_TGSI_TEXCOORD is false:
|
||||
When bit k in the sprite_coord_enable bitfield is set, then generic
|
||||
input k to the fragment shader will get an automatically computed
|
||||
texture coordinate.
|
||||
|
||||
If PIPE_CAP_TGSI_TEXCOORD is true:
|
||||
The bitfield refers to inputs with TEXCOORD semantic instead of generic inputs.
|
||||
If PIPE_CAP_TGSI_TEXCOORD is true:
|
||||
The bitfield refers to inputs with TEXCOORD semantic instead of generic inputs.
|
||||
|
||||
The texture coordinate will be of the form (s, t, 0, 1) where s varies
|
||||
from 0 to 1 from left to right while t varies from 0 to 1 according to
|
||||
the state of 'sprite_coord_mode' (see below).
|
||||
The texture coordinate will be of the form (s, t, 0, 1) where s varies
|
||||
from 0 to 1 from left to right while t varies from 0 to 1 according to
|
||||
the state of 'sprite_coord_mode' (see below).
|
||||
|
||||
If any bit is set, then point_smooth MUST be disabled (there are no
|
||||
round sprites) and point_quad_rasterization MUST be true (sprites are
|
||||
always rasterized as quads). Any mismatch between these states should
|
||||
be considered a bug in the gallium frontend.
|
||||
If any bit is set, then point_smooth MUST be disabled (there are no
|
||||
round sprites) and point_quad_rasterization MUST be true (sprites are
|
||||
always rasterized as quads). Any mismatch between these states should
|
||||
be considered a bug in the gallium frontend.
|
||||
|
||||
This feature is implemented in the :ref:`Draw` module but may also be
|
||||
implemented natively by GPUs or implemented with a geometry shader.
|
||||
This feature is implemented in the :ref:`Draw` module but may also be
|
||||
implemented natively by GPUs or implemented with a geometry shader.
|
||||
|
||||
|
||||
sprite_coord_mode
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
Specifies how the value for each shader output should be computed when drawing
|
||||
point sprites. For PIPE_SPRITE_COORD_LOWER_LEFT, the lower-left vertex will
|
||||
have coordinates (0,0,0,1). For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left
|
||||
vertex will have coordinates (0,0,0,1).
|
||||
This state is used by :ref:`Draw` to generate texcoords.
|
||||
Specifies how the value for each shader output should be computed when drawing
|
||||
point sprites. For PIPE_SPRITE_COORD_LOWER_LEFT, the lower-left vertex will
|
||||
have coordinates (0,0,0,1). For PIPE_SPRITE_COORD_UPPER_LEFT, the upper-left
|
||||
vertex will have coordinates (0,0,0,1).
|
||||
This state is used by :ref:`Draw` to generate texcoords.
|
||||
|
||||
|
||||
point_quad_rasterization
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Determines if points should be rasterized according to quad or point
|
||||
rasterization rules.
|
||||
|
||||
Determines if points should be rasterized according to quad or point
|
||||
rasterization rules.
|
||||
(Legacy-only) OpenGL actually has quite different rasterization rules
|
||||
for points and point sprites - hence this indicates if points should be
|
||||
rasterized as points or according to point sprite (which decomposes them
|
||||
into quads, basically) rules. Newer GL versions no longer support the old
|
||||
point rules at all.
|
||||
|
||||
(Legacy-only) OpenGL actually has quite different rasterization rules
|
||||
for points and point sprites - hence this indicates if points should be
|
||||
rasterized as points or according to point sprite (which decomposes them
|
||||
into quads, basically) rules. Newer GL versions no longer support the old
|
||||
point rules at all.
|
||||
Additionally Direct3D will always use quad rasterization rules for
|
||||
points, regardless of whether point sprites are enabled or not.
|
||||
|
||||
Additionally Direct3D will always use quad rasterization rules for
|
||||
points, regardless of whether point sprites are enabled or not.
|
||||
If this state is enabled, point smoothing and antialiasing are
|
||||
disabled. If it is disabled, point sprite coordinates are not
|
||||
generated.
|
||||
|
||||
If this state is enabled, point smoothing and antialiasing are
|
||||
disabled. If it is disabled, point sprite coordinates are not
|
||||
generated.
|
||||
.. note::
|
||||
|
||||
.. note::
|
||||
|
||||
Some renderers always internally translate points into quads; this state
|
||||
still affects those renderers by overriding other rasterization state.
|
||||
Some renderers always internally translate points into quads; this state
|
||||
still affects those renderers by overriding other rasterization state.
|
||||
|
||||
point_tri_clip
|
||||
Determines if clipping of points should happen after they are converted
|
||||
|
@ -263,7 +251,7 @@ half_pixel_center
|
|||
1 +-----+
|
||||
|
||||
When false, the rasterizer should use (0, 0) pixel centers for determining
|
||||
pixel ownership (e.g., D3D9 or ealier)::
|
||||
pixel ownership (e.g., D3D9 or earlier)::
|
||||
|
||||
-0.5 0 0.5
|
||||
-0.5 +-----+
|
||||
|
@ -319,8 +307,8 @@ bottom_edge_rule
|
|||
assumes that top is always at y=0.
|
||||
|
||||
See also:
|
||||
- http://msdn.microsoft.com/en-us/library/windows/desktop/cc627092.aspx
|
||||
- http://msdn.microsoft.com/en-us/library/windows/desktop/bb147314.aspx
|
||||
- https://learn.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-rasterizer-stage-rules
|
||||
- https://learn.microsoft.com/en-us/windows/win32/direct3d9/rasterization-rules
|
||||
|
||||
clip_halfz
|
||||
When true clip space in the z axis goes from [0..1] (D3D). When false
|
||||
|
@ -348,7 +336,7 @@ clip_plane_enable
|
|||
|
||||
conservative_raster_mode
|
||||
The conservative rasterization mode. For PIPE_CONSERVATIVE_RASTER_OFF,
|
||||
conservative rasterization is disabled. For IPE_CONSERVATIVE_RASTER_POST_SNAP
|
||||
conservative rasterization is disabled. For PIPE_CONSERVATIVE_RASTER_POST_SNAP
|
||||
or PIPE_CONSERVATIVE_RASTER_PRE_SNAP, conservative rasterization is nabled.
|
||||
When conservative rasterization is enabled, the polygon smooth, line mooth,
|
||||
point smooth and line stipple settings are ignored.
|
||||
|
|
|
@ -12,91 +12,4 @@ the platform or operating system you are running. For example, for Linux this
|
|||
can be done by typing "export var=value" into a console and then running the
|
||||
program from that console.
|
||||
|
||||
Common
|
||||
""""""
|
||||
|
||||
.. envvar:: GALLIUM_PRINT_OPTIONS <bool> (false)
|
||||
|
||||
This option controls if the debug variables should be printed to stderr. This
|
||||
is probably the most useful variable, since it allows you to find which
|
||||
variables a driver uses.
|
||||
|
||||
.. envvar:: GALLIUM_TRACE <string> ("")
|
||||
|
||||
If set, this variable will cause the :ref:`trace` output to be written to the
|
||||
specified file. Paths may be relative or absolute; relative paths are relative
|
||||
to the working directory. For example, setting it to "trace.xml" will cause
|
||||
the trace to be written to a file of the same name in the working directory.
|
||||
|
||||
.. envvar:: GALLIUM_TRACE_TC <bool> (false)
|
||||
|
||||
If enabled while :ref:`trace` is active, this variable specifies that the threaded context
|
||||
should be traced for drivers which implement it. By default, the driver thread is traced,
|
||||
which will include any reordering of the command stream from threaded context.
|
||||
|
||||
.. envvar:: GALLIUM_TRACE_TRIGGER <string> ("")
|
||||
|
||||
If set while :ref:`trace` is active, this variable specifies a filename to monitor.
|
||||
Once the file exists (e.g., from the user running 'touch /path/to/file'), a single
|
||||
frame will be recorded into the trace output.
|
||||
Paths may be relative or absolute; relative paths are relative to the working directory.
|
||||
|
||||
.. envvar:: GALLIUM_DUMP_CPU <bool> (false)
|
||||
|
||||
Dump information about the current CPU that the driver is running on.
|
||||
|
||||
.. envvar:: TGSI_PRINT_SANITY <bool> (false)
|
||||
|
||||
Gallium has a built-in shader sanity checker. This option controls whether
|
||||
the shader sanity checker prints its warnings and errors to stderr.
|
||||
|
||||
.. envvar:: DRAW_USE_LLVM <bool> (false)
|
||||
|
||||
Whether the :ref:`Draw` module will attempt to use LLVM for vertex and geometry shaders.
|
||||
|
||||
|
||||
GL State tracker-specific
|
||||
"""""""""""""""""""""""""
|
||||
|
||||
.. envvar:: ST_DEBUG <flags> (0x0)
|
||||
|
||||
Debug :ref:`flags` for the GL state tracker.
|
||||
|
||||
|
||||
Driver-specific
|
||||
"""""""""""""""
|
||||
|
||||
.. envvar:: I915_DEBUG <flags> (0x0)
|
||||
|
||||
Debug :ref:`flags` for the i915 driver.
|
||||
|
||||
.. envvar:: I915_NO_HW <bool> (false)
|
||||
|
||||
Stop the i915 driver from submitting commands to the hardware.
|
||||
|
||||
.. envvar:: I915_DUMP_CMD <bool> (false)
|
||||
|
||||
Dump all commands going to the hardware.
|
||||
|
||||
.. envvar:: LP_DEBUG <flags> (0x0)
|
||||
|
||||
Debug :ref:`flags` for the LLVMpipe driver.
|
||||
|
||||
.. envvar:: LP_NUM_THREADS <int> (number of CPUs)
|
||||
|
||||
Number of threads that the LLVMpipe driver should use.
|
||||
|
||||
.. envvar:: FD_MESA_DEBUG <flags> (0x0)
|
||||
|
||||
Debug :ref:`flags` for the Freedreno driver.
|
||||
|
||||
|
||||
.. _flags:
|
||||
|
||||
Flags
|
||||
"""""
|
||||
|
||||
The variables of type "flags" all take a string with comma-separated flags to
|
||||
enable different debugging for different parts of the drivers or state
|
||||
tracker. If set to "help", the driver will print a list of flags which the
|
||||
variable accepts. Order does not matter.
|
||||
See :doc:`../envvars` for details.
|
||||
|
|
|
@ -60,7 +60,7 @@ References
|
|||
----------
|
||||
|
||||
DirectX Graphics Infrastructure documentation on DXGI_FORMAT enum:
|
||||
http://msdn.microsoft.com/en-us/library/windows/desktop/bb173059%28v=vs.85%29.aspx
|
||||
https://learn.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format
|
||||
|
||||
FOURCC codes for YUV formats:
|
||||
http://www.fourcc.org/yuv.php
|
||||
http://web.archive.org/web/20220523043110/https://www.fourcc.org/yuv/
|
||||
|
|
|
@ -19,7 +19,7 @@ Glossary
|
|||
dimension which is not a power of two.
|
||||
|
||||
LOD
|
||||
Level of Detail. Also spelled "LoD." The value that determines when the
|
||||
Level of Detail. Also spelled "LoD". The value that determines when the
|
||||
switches between mipmaps occur during texture sampling.
|
||||
|
||||
layer
|
||||
|
|
|
@ -23,5 +23,4 @@ Indices and tables
|
|||
------------------
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
|
|
@ -23,7 +23,7 @@ Current filters
|
|||
corresponding color channel. These are basic filters for easy testing
|
||||
of the PP queue.
|
||||
- pp_jimenezmlaa, pp_jimenezmlaa_color - `Jimenez's
|
||||
MLAA <https://www.iryokufx.com/mlaa/>`__ is a morphological
|
||||
MLAA <http://www.iryoku.com/mlaa/>`__ is a morphological
|
||||
antialiasing filter. The two versions use depth and color data,
|
||||
respectively. Which works better depends on the app - depth will not
|
||||
blur text, but it will miss transparent textures for example. Set to
|
||||
|
|
|
@ -69,11 +69,11 @@ TODO there's no CAP bit currently for this, there's also unspecified size etc. l
|
|||
TODO: is there any chance of supporting GL pixel buffer object acceleration with this?
|
||||
|
||||
|
||||
OpenGL: vertex buffers in GL 1.5 or GL_ARB_vertex_buffer_object
|
||||
OpenGL: vertex buffers in GL 1.5 or :ext:`GL_ARB_vertex_buffer_object`
|
||||
|
||||
- Binding to stream out requires GL 3.0 or GL_NV_transform_feedback
|
||||
- Binding as constant buffers requires GL 3.1 or GL_ARB_uniform_buffer_object
|
||||
- Binding to a sampling stage requires GL 3.1 or GL_ARB_texture_buffer_object
|
||||
- Binding to stream out requires GL 3.0 or :ext:`GL_NV_transform_feedback`
|
||||
- Binding as constant buffers requires GL 3.1 or :ext:`GL_ARB_uniform_buffer_object`
|
||||
- Binding to a sampling stage requires GL 3.1 or :ext:`GL_ARB_texture_buffer_object`
|
||||
|
||||
D3D11: buffer resources
|
||||
- Binding to a render target requires D3D_FEATURE_LEVEL_10_0
|
||||
|
@ -93,7 +93,7 @@ PIPE_TEXTURE_1D / PIPE_TEXTURE_1D_ARRAY
|
|||
|
||||
OpenGL: GL_TEXTURE_1D in GL 1.0
|
||||
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or GL_ARB_texture_non_power_of_two
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or :ext:`GL_ARB_texture_non_power_of_two`
|
||||
|
||||
D3D11: 1D textures in D3D_FEATURE_LEVEL_10_0
|
||||
|
||||
|
@ -107,7 +107,8 @@ PIPE_TEXTURE_RECT
|
|||
- Must use unnormalized coordinates
|
||||
- Must use a clamp wrap mode
|
||||
|
||||
OpenGL: GL_TEXTURE_RECTANGLE in GL 3.1 or GL_ARB_texture_rectangle or GL_NV_texture_rectangle
|
||||
OpenGL: GL_TEXTURE_RECTANGLE in GL 3.1 or :ext:`GL_ARB_texture_rectangle` or
|
||||
:ext:`GL_NV_texture_rectangle`
|
||||
|
||||
OpenCL: can create OpenCL images based on this, that can then be sampled arbitrarily
|
||||
|
||||
|
@ -128,7 +129,7 @@ PIPE_TEXTURE_2D / PIPE_TEXTURE_2D_ARRAY
|
|||
|
||||
OpenGL: GL_TEXTURE_2D in GL 1.0
|
||||
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or GL_ARB_texture_non_power_of_two
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or :ext:`GL_ARB_texture_non_power_of_two`
|
||||
|
||||
OpenCL: can create OpenCL images based on this, that can then be sampled arbitrarily
|
||||
|
||||
|
@ -147,9 +148,9 @@ Mipmap dimensions are reduced in all 3 coordinates.
|
|||
- array_size must be 1
|
||||
- Must use normalized coordinates
|
||||
|
||||
OpenGL: GL_TEXTURE_3D in GL 1.2 or GL_EXT_texture3D
|
||||
OpenGL: GL_TEXTURE_3D in GL 1.2 or :ext:`GL_EXT_texture3D`
|
||||
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or GL_ARB_texture_non_power_of_two
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or :ext:`GL_ARB_texture_non_power_of_two`
|
||||
|
||||
D3D11: 3D textures
|
||||
|
||||
|
@ -173,11 +174,11 @@ resulting in filtering taking samples from multiple surfaces near to the edge.
|
|||
width and height must be powers of two
|
||||
- Must use normalized coordinates
|
||||
|
||||
OpenGL: GL_TEXTURE_CUBE_MAP in GL 1.3 or EXT_texture_cube_map
|
||||
OpenGL: GL_TEXTURE_CUBE_MAP in GL 1.3 or :ext:`GL_EXT_texture_cube_map`
|
||||
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or GL_ARB_texture_non_power_of_two
|
||||
- Seamless cube maps require GL 3.2 or GL_ARB_seamless_cube_map or GL_AMD_seamless_cubemap_per_texture
|
||||
- Cube map arrays require GL 4.0 or GL_ARB_texture_cube_map_array
|
||||
- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or :ext:`GL_ARB_texture_non_power_of_two`
|
||||
- Seamless cube maps require GL 3.2 or :ext:`GL_ARB_seamless_cube_map` or :ext:`GL_AMD_seamless_cubemap_per_texture`
|
||||
- Cube map arrays require GL 4.0 or :ext:`GL_ARB_texture_cube_map_array`
|
||||
|
||||
D3D11: 2D array textures with the D3D11_RESOURCE_MISC_TEXTURECUBE flag
|
||||
|
||||
|
@ -191,7 +192,7 @@ Surfaces are views of a resource that can be bound as a framebuffer to serve as
|
|||
|
||||
TODO: write much more on surfaces
|
||||
|
||||
OpenGL: FBOs are collections of surfaces in GL 3.0 or GL_ARB_framebuffer_object
|
||||
OpenGL: FBOs are collections of surfaces in GL 3.0 or :ext:`GL_ARB_framebuffer_object`
|
||||
|
||||
D3D11: render target views and depth/stencil views
|
||||
|
||||
|
|
|
@ -119,8 +119,9 @@ The integer capabilities:
|
|||
is allowed to return ``0`` in which case ``PIPE_CAP_GLSL_FEATURE_LEVEL`` is
|
||||
used.
|
||||
Note that simply returning the same value as the GLSL feature level cap is
|
||||
incorrect. For example, GLSL version 3.30 does not require ``ARB_gpu_shader5``,
|
||||
but ESSL version 3.20 es does require ``EXT_gpu_shader5``
|
||||
incorrect. For example, GLSL version 3.30 does not require
|
||||
:ext:`GL_EXT_gpu_shader5`, but ESSL version 3.20 es does require
|
||||
:ext:`GL_EXT_gpu_shader5`
|
||||
* ``PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION``: Whether quads adhere to
|
||||
the flatshade_first setting in ``pipe_rasterizer_state``.
|
||||
* ``PIPE_CAP_USER_VERTEX_BUFFERS``: Whether the driver supports user vertex
|
||||
|
@ -161,6 +162,12 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT``: Describes the required
|
||||
alignment for pipe_sampler_view::u.buf.offset, in bytes.
|
||||
If a driver does not support offset/size, it should return 0.
|
||||
* ``PIPE_CAP_LINEAR_IMAGE_PITCH_ALIGNMENT``: Describes the row pitch alignment
|
||||
size that pipe_sampler_view::u.tex2d_from_buf must be multiple of, in pixels.
|
||||
If a driver does not support images created from buffers, it should return 0.
|
||||
* ``PIPE_CAP_LINEAR_IMAGE_BASE_ADDRESS_ALIGNMENT``: Describes the minimum alignment
|
||||
in pixels of the offset of a host pointer for images created from buffers.
|
||||
If a driver does not support images created from buffers, it should return 0.
|
||||
* ``PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY``: Whether the driver only
|
||||
supports R, RG, RGB and RGBA formats for PIPE_BUFFER sampler views.
|
||||
When this is the case it should be assumed that the swizzle parameters
|
||||
|
@ -173,9 +180,6 @@ The integer capabilities:
|
|||
TEXCOORD semantic.
|
||||
Also, TGSI_SEMANTIC_PCOORD becomes available, which labels a fragment shader
|
||||
input that will always be replaced with sprite coordinates.
|
||||
* ``PIPE_CAP_TEXTURE_BUFFER_SAMPLER``: Whether a sampler should still
|
||||
be used for PIPE_BUFFER resources (normally a sampler is only used
|
||||
if the texture target is PIPE_TEXTURE_*).
|
||||
* ``PIPE_CAP_TEXTURE_TRANSFER_MODES``: The ``pipe_texture_transfer_mode`` modes
|
||||
that are supported for implementing a texture transfer which needs format conversions
|
||||
and swizzling in gallium frontends. Generally, all hardware drivers with
|
||||
|
@ -207,7 +211,7 @@ The integer capabilities:
|
|||
PIPE_ENDIAN_BIG or PIPE_ENDIAN_LITTLE.
|
||||
* ``PIPE_CAP_MIXED_FRAMEBUFFER_SIZES``: Whether it is allowed to have
|
||||
different sizes for fb color/zs attachments. This controls whether
|
||||
ARB_framebuffer_object is provided.
|
||||
:ext:`GL_ARB_framebuffer_object` is provided.
|
||||
* ``PIPE_CAP_VS_LAYER_VIEWPORT``: Whether ``VARYING_SLOT_LAYER`` and
|
||||
``VARYING_SLOT_VIEWPORT`` are supported as vertex shader outputs. Note that
|
||||
the viewport will only be used if multiple viewports are exposed.
|
||||
|
@ -270,11 +274,11 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE``: The maximum supported vertex stride.
|
||||
* ``PIPE_CAP_SAMPLER_VIEW_TARGET``: Whether the sampler view's target can be
|
||||
different than the underlying resource's, as permitted by
|
||||
ARB_texture_view. For example a 2d array texture may be reinterpreted as a
|
||||
:ext:`GL_ARB_texture_view`. For example a 2d array texture may be reinterpreted as a
|
||||
cube (array) texture and vice-versa.
|
||||
* ``PIPE_CAP_CLIP_HALFZ``: Whether the driver supports the
|
||||
pipe_rasterizer_state::clip_halfz being set to true. This is required
|
||||
for enabling ARB_clip_control.
|
||||
for enabling :ext:`GL_ARB_clip_control`.
|
||||
* ``PIPE_CAP_POLYGON_OFFSET_CLAMP``: If true, the driver implements support
|
||||
for ``pipe_rasterizer_state::offset_clamp``.
|
||||
* ``PIPE_CAP_MULTISAMPLE_Z_RESOLVE``: Whether the driver supports blitting
|
||||
|
@ -303,25 +307,25 @@ The integer capabilities:
|
|||
textures.
|
||||
* ``PIPE_CAP_DEPTH_BOUNDS_TEST``: Whether bounds_test, bounds_min, and
|
||||
bounds_max states of pipe_depth_stencil_alpha_state behave according
|
||||
to the GL_EXT_depth_bounds_test specification.
|
||||
* ``PIPE_CAP_TEXTURE_QUERY_SAMPLES``: Whether the `TXQS` opcode is supported
|
||||
to the :ext:`GL_EXT_depth_bounds_test` specification.
|
||||
* ``PIPE_CAP_TEXTURE_QUERY_SAMPLES``: Whether the ``TXQS`` opcode is supported
|
||||
* ``PIPE_CAP_FORCE_PERSAMPLE_INTERP``: If the driver can force per-sample
|
||||
interpolation for all fragment shader inputs if
|
||||
pipe_rasterizer_state::force_persample_interp is set. This is only used
|
||||
by GL3-level sample shading (ARB_sample_shading). GL4-level sample shading
|
||||
(ARB_gpu_shader5) doesn't use this. While GL3 hardware has a state for it,
|
||||
GL4 hardware will likely need to emulate it with a shader variant, or by
|
||||
selecting the interpolation weights with a conditional assignment
|
||||
in the shader.
|
||||
by GL3-level sample shading (:ext:`GL_ARB_sample_shading`). GL4-level sample
|
||||
shading (:ext:`GL_ARB_gpu_shader5`) doesn't use this. While GL3 hardware has a
|
||||
state for it, GL4 hardware will likely need to emulate it with a shader
|
||||
variant, or by selecting the interpolation weights with a conditional
|
||||
assignment in the shader.
|
||||
* ``PIPE_CAP_SHAREABLE_SHADERS``: Whether shader CSOs can be used by any
|
||||
pipe_context. Important for reducing jank at draw time by letting GL shaders
|
||||
linked in one thread be used in another thread without recompiling.
|
||||
* ``PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS``:
|
||||
Whether copying between compressed and plain formats is supported where
|
||||
a compressed block is copied to/from a plain pixel of the same size.
|
||||
* ``PIPE_CAP_CLEAR_TEXTURE``: Whether `clear_texture` will be
|
||||
* ``PIPE_CAP_CLEAR_TEXTURE``: Whether ``clear_texture`` will be
|
||||
available in contexts.
|
||||
* ``PIPE_CAP_CLEAR_SCISSORED``: Whether `clear` can accept a scissored
|
||||
* ``PIPE_CAP_CLEAR_SCISSORED``: Whether ``clear`` can accept a scissored
|
||||
bounding box.
|
||||
* ``PIPE_CAP_DRAW_PARAMETERS``: Whether ``TGSI_SEMANTIC_BASEVERTEX``,
|
||||
``TGSI_SEMANTIC_BASEINSTANCE``, and ``TGSI_SEMANTIC_DRAWID`` are
|
||||
|
@ -360,20 +364,22 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT``:
|
||||
If non-zero, rendering to framebuffers with no surface attachments
|
||||
is supported. The context->is_format_supported function will be expected
|
||||
to be implemented with PIPE_FORMAT_NONE yeilding the MSAA modes the hardware
|
||||
to be implemented with PIPE_FORMAT_NONE yielding the MSAA modes the hardware
|
||||
supports. N.B., The maximum number of layers supported for rasterizing a
|
||||
primitive on a layer is obtained from ``PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS``
|
||||
even though it can be larger than the number of layers supported by either
|
||||
rendering or textures.
|
||||
* ``PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR``: Implementation uses bounds
|
||||
checking on resource accesses by shader if the context is created with
|
||||
PIPE_CONTEXT_ROBUST_BUFFER_ACCESS. See the ARB_robust_buffer_access_behavior
|
||||
extension for information on the required behavior for out of bounds accesses
|
||||
and accesses to unbound resources.
|
||||
* ``PIPE_CAP_CULL_DISTANCE``: Whether the driver supports the arb_cull_distance
|
||||
extension and thus implements proper support for culling planes.
|
||||
PIPE_CONTEXT_ROBUST_BUFFER_ACCESS. See the
|
||||
:ext:`GL_ARB_robust_buffer_access_behavior` extension for information on the
|
||||
required behavior for out of bounds accesses and accesses to unbound
|
||||
resources.
|
||||
* ``PIPE_CAP_CULL_DISTANCE``: Whether the driver supports the
|
||||
:ext:`GL_ARB_cull_distance` extension and thus implements proper support for
|
||||
culling planes.
|
||||
* ``PIPE_CAP_CULL_DISTANCE_NOCOMBINE``: Whether the driver wants to skip
|
||||
running the `nir_lower_clip_cull_distance_arrays` pass in order to get
|
||||
running the ``nir_lower_clip_cull_distance_arrays`` pass in order to get
|
||||
VARYING_SLOT_CULL_DIST0 slot variables.
|
||||
* ``PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES``: Whether primitive restart is
|
||||
supported for patch primitives.
|
||||
|
@ -401,13 +407,13 @@ The integer capabilities:
|
|||
equal interpolation qualifiers.
|
||||
Components may overlap, notably when the gaps in an array of dvec3 are
|
||||
filled in.
|
||||
* ``PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME``: Whether GL_ARB_transform_feeddback2
|
||||
is supported, including pausing/resuming queries and having
|
||||
`count_from_stream_output` set on indirect draws to implement
|
||||
glDrawTransformFeedback. Required for OpenGL 4.0.
|
||||
* ``PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME``: Whether
|
||||
:ext:`GL_ARB_transform_feedback2` is supported, including pausing/resuming
|
||||
queries and having ``count_from_stream_output`` set on indirect draws to
|
||||
implement glDrawTransformFeedback. Required for OpenGL 4.0.
|
||||
* ``PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS``: Whether interleaved stream
|
||||
output mode is able to interleave across buffers. This is required for
|
||||
ARB_transform_feedback3.
|
||||
:ext:`GL_ARB_transform_feedback3`.
|
||||
* ``PIPE_CAP_SHADER_CAN_READ_OUTPUTS``: Whether every TGSI shader stage can read
|
||||
from the output file.
|
||||
* ``PIPE_CAP_FBFETCH``: The number of render targets whose value in the
|
||||
|
@ -459,7 +465,7 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_LOAD_CONSTBUF``: True if the driver supports ``TGSI_OPCODE_LOAD`` use
|
||||
with constant buffers.
|
||||
* ``PIPE_CAP_TILE_RASTER_ORDER``: Whether the driver supports
|
||||
GL_MESA_tile_raster_order, using the tile_raster_order_* fields in
|
||||
:ext:`GL_MESA_tile_raster_order`, using the tile_raster_order_* fields in
|
||||
pipe_rasterizer_state.
|
||||
* ``PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES``: Limit on combined shader
|
||||
output resources (images + buffers + fragment outputs). If 0 the state
|
||||
|
@ -509,7 +515,7 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE``: Whether
|
||||
``PIPE_CAP_POST_DEPTH_COVERAGE`` works with conservative rasterization.
|
||||
* ``PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE``: Whether
|
||||
inner_coverage from GL_INTEL_conservative_rasterization is supported.
|
||||
inner_coverage from :ext:`GL_INTEL_conservative_rasterization` is supported.
|
||||
* ``PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS``: The maximum
|
||||
subpixel precision bias in bits during conservative rasterization.
|
||||
* ``PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS``: True is the driver supports
|
||||
|
@ -534,7 +540,7 @@ The integer capabilities:
|
|||
of pipe_vertex_element::src_offset.
|
||||
* ``PIPE_CAP_SURFACE_SAMPLE_COUNT``: Whether the driver
|
||||
supports pipe_surface overrides of resource nr_samples. If set, will
|
||||
enable EXT_multisampled_render_to_texture.
|
||||
enable :ext:`GL_EXT_multisampled_render_to_texture`.
|
||||
* ``PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD``: Atomic floating point adds are
|
||||
supported on images, buffers, and shared memory.
|
||||
* ``PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND``: True if the driver needs blend state to use zero/one instead of destination alpha for RGB/XRGB formats.
|
||||
|
@ -556,6 +562,11 @@ The integer capabilities:
|
|||
execution. 0 = throttling is disabled.
|
||||
* ``PIPE_CAP_DMABUF``: Whether Linux DMABUF handles are supported by
|
||||
resource_from_handle and resource_get_handle.
|
||||
Possible bit field values:
|
||||
|
||||
1. ``DRM_PRIME_CAP_IMPORT``: resource_from_handle is supported
|
||||
2. ``DRM_PRIME_CAP_EXPORT``: resource_get_handle is supported
|
||||
|
||||
* ``PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA``: Whether VDPAU, VAAPI, and
|
||||
OpenMAX should use a compute-based blit instead of pipe_context::blit and compute pipeline for compositing images.
|
||||
* ``PIPE_CAP_FRAGMENT_SHADER_INTERLOCK``: True if fragment shader interlock
|
||||
|
@ -577,7 +588,7 @@ The integer capabilities:
|
|||
turn arrays whose contents can be deduced at compile time into constant
|
||||
buffer loads, or false if the driver can handle such arrays itself in a more
|
||||
efficient manner (such as through nir_opt_large_constants() and nir->constant_data).
|
||||
* ``PIPE_CAP_GL_SPIRV``: True if the driver supports ARB_gl_spirv extension.
|
||||
* ``PIPE_CAP_GL_SPIRV``: True if the driver supports :ext:`GL_ARB_gl_spirv` extension.
|
||||
* ``PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS``: True if the driver supports Variable Pointers in SPIR-V shaders.
|
||||
* ``PIPE_CAP_DEMOTE_TO_HELPER_INVOCATION``: True if driver supports demote keyword in GLSL programs.
|
||||
* ``PIPE_CAP_TGSI_TG4_COMPONENT_IN_SWIZZLE``: True if driver wants the TG4 component encoded in sampler swizzle rather than as a separate source.
|
||||
|
@ -604,37 +615,41 @@ The integer capabilities:
|
|||
* ``PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED``: Driver needs the nir_lower_viewport_transform pass to be enabled. This also means that the gl_Position value is modified and should be lowered for transform feedback, if needed. Defaults to false.
|
||||
* ``PIPE_CAP_PSIZ_CLAMPED``: Driver needs for the point size to be clamped. Additionally, the gl_PointSize has been modified and its value should be lowered for transform feedback, if needed. Defaults to false.
|
||||
* ``PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE``: Buffer size used to upload vertices for glBegin/glEnd.
|
||||
* ``PIPE_CAP_VIEWPORT_SWIZZLE``: Whether pipe_viewport_state::swizzle can be used to specify pre-clipping swizzling of coordinates (see GL_NV_viewport_swizzle).
|
||||
* ``PIPE_CAP_VIEWPORT_SWIZZLE``: Whether pipe_viewport_state::swizzle can be used to specify pre-clipping swizzling of coordinates (see :ext:`GL_NV_viewport_swizzle`).
|
||||
* ``PIPE_CAP_SYSTEM_SVM``: True if all application memory can be shared with the GPU without explicit mapping.
|
||||
* ``PIPE_CAP_VIEWPORT_MASK``: Whether ``TGSI_SEMANTIC_VIEWPORT_MASK`` and ``TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE`` are supported (see GL_NV_viewport_array2).
|
||||
* ``PIPE_CAP_VIEWPORT_MASK``: Whether ``TGSI_SEMANTIC_VIEWPORT_MASK`` and ``TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE`` are supported (see :ext:`GL_NV_viewport_array2`).
|
||||
* ``PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE``: Whether mapping a buffer as unsynchronized from any thread is safe.
|
||||
* ``PIPE_CAP_GLSL_ZERO_INIT``: Choose a default zero initialization some glsl variables. If `1`, then all glsl shader variables and gl_FragColor are initialized to zero. If `2`, then shader out variables are not initialized but function out variables are.
|
||||
* ``PIPE_CAP_GLSL_ZERO_INIT``: Choose a default zero initialization some GLSL variables. If ``1``, then all GLSL shader variables and gl_FragColor are initialized to zero. If ``2``, then shader out variables are not initialized but function out variables are.
|
||||
* ``PIPE_CAP_BLEND_EQUATION_ADVANCED``: Driver supports blend equation advanced without necessarily supporting FBFETCH.
|
||||
* ``PIPE_CAP_NIR_ATOMICS_AS_DEREF``: Whether NIR atomics instructions should reference atomics as NIR derefs instead of by indices.
|
||||
* ``PIPE_CAP_NO_CLIP_ON_COPY_TEX``: Driver doesn't want x/y/width/height clipped based on src size when doing a copy texture operation (eg: may want out-of-bounds reads that produce 0 instead of leaving the texture content undefined)
|
||||
* ``PIPE_CAP_NO_CLIP_ON_COPY_TEX``: Driver doesn't want x/y/width/height clipped based on src size when doing a copy texture operation (e.g.: may want out-of-bounds reads that produce 0 instead of leaving the texture content undefined)
|
||||
* ``PIPE_CAP_MAX_TEXTURE_MB``: Maximum texture size in MB (default is 1024)
|
||||
* ``PIPE_CAP_DEVICE_PROTECTED_SURFACE``: Whether the device support protected / encrypted content.
|
||||
* ``PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0``: The state tracker is encouraged to upload constants into a real buffer and bind it into constant buffer 0 instead of binding a user pointer. This may enable a faster codepath in a gallium frontend for drivers that really prefer a real buffer.
|
||||
* ``PIPE_CAP_GL_CLAMP``: Driver natively supports GL_CLAMP. Required for non-NIR drivers with the GL frontend. NIR drivers with the cap unavailable will have GL_CLAMP lowered to txd/txl with a saturate on the coordinates.
|
||||
* ``PIPE_CAP_TEXRECT``: Driver supports rectangle textures. Required for OpenGL on `!prefers_nir` drivers. If this cap is not present, st/mesa will lower the NIR to use normal 2D texture sampling by using either `txs` or `nir_intrinsic_load_texture_scaling` to normalize the texture coordinates.
|
||||
* ``PIPE_CAP_TEXRECT``: Driver supports rectangle textures. Required for OpenGL on ``!prefers_nir`` drivers. If this cap is not present, st/mesa will lower the NIR to use normal 2D texture sampling by using either ``txs`` or ``nir_intrinsic_load_texture_scaling`` to normalize the texture coordinates.
|
||||
* ``PIPE_CAP_SAMPLER_REDUCTION_MINMAX``: Driver supports EXT min/max sampler reduction.
|
||||
* ``PIPE_CAP_SAMPLER_REDUCTION_MINMAX_ARB``: Driver supports ARB min/max sampler reduction with format queries.
|
||||
* ``PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART``: Driver requests all draws using a non-fixed restart index to be rewritten to use a fixed restart index.
|
||||
* ``PIPE_CAP_SUPPORTED_PRIM_MODES``: A bitmask of the ``pipe_prim_type`` enum values that the driver can natively support.
|
||||
* ``PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART``: A bitmask of the ``pipe_prim_type`` enum values that the driver can natively support for primitive restart. Only useful if ``PIPE_CAP_PRIMITIVE_RESTART`` is also exported.
|
||||
* ``PIPE_CAP_PREFER_BACK_BUFFER_REUSE``: Only applies to DRI_PRIME. If 1, the driver prefers that DRI3 tries to use the same back buffer each frame. If 0, this means DRI3 will at least use 2 back buffers and ping-pong between them to allow the tiled->linear copy to run in parallel.
|
||||
* ``PIPE_CAP_DRAW_VERTEX_STATE``: Driver supports `pipe_screen::create_vertex_state/vertex_state_destroy` and `pipe_context::draw_vertex_state`. Only used by display lists and designed to serve vbo_save.
|
||||
* ``PIPE_CAP_DRAW_VERTEX_STATE``: Driver supports ``pipe_screen::create_vertex_state/vertex_state_destroy`` and ``pipe_context::draw_vertex_state``. Only used by display lists and designed to serve vbo_save.
|
||||
* ``PIPE_CAP_PREFER_POT_ALIGNED_VARYINGS``: Driver prefers varyings to be aligned to power of two in a slot. If this cap is enabled, vec4 varying will be placed in .xyzw components of the varying slot, vec3 in .xyz and vec2 in .xy or .zw
|
||||
* ``PIPE_CAP_MAX_SPARSE_TEXTURE_SIZE``: Maximum 1D/2D/rectangle texture image dimension for a sparse texture.
|
||||
* ``PIPE_CAP_MAX_SPARSE_3D_TEXTURE_SIZE``: Maximum 3D texture image dimension for a sparse texture.
|
||||
* ``PIPE_CAP_MAX_SPARSE_ARRAY_TEXTURE_LAYERS``: Maximum number of layers in a sparse array texture.
|
||||
* ``PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS``: TRUE if there are no restrictions on the allocation of mipmaps in sparse textures and FALSE otherwise. See SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB description in ARB_sparse_texture extension spec.
|
||||
* ``PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS``: TRUE if there are no restrictions on the allocation of mipmaps in sparse textures and FALSE otherwise. See SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB description in :ext:`GL_ARB_sparse_texture` extension spec.
|
||||
* ``PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY``: TRUE if shader sparse texture sample instruction could also return the residency information.
|
||||
* ``PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD``: TRUE if shader sparse texture sample instruction support clamp the minimal lod to prevent read from un-committed pages.
|
||||
* ``PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD``: TRUE if shader sparse texture sample instruction support clamp the minimal lod to prevent read from uncommitted pages.
|
||||
* ``PIPE_CAP_ALLOW_DRAW_OUT_OF_ORDER``: TRUE if the driver allows the "draw out of order" optimization to be enabled. See _mesa_update_allow_draw_out_of_order for more details.
|
||||
* ``PIPE_CAP_MAX_CONSTANT_BUFFER_SIZE_UINT``: Maximum bound constant buffer size in bytes. This is unsigned integer with the maximum of 4GB - 1. This applies to all constant buffers used by UBOs, unlike `PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE`, which is specifically for GLSL uniforms.
|
||||
* ``PIPE_CAP_MAX_CONSTANT_BUFFER_SIZE_UINT``: Maximum bound constant buffer size in bytes. This is unsigned integer with the maximum of 4GB - 1. This applies to all constant buffers used by UBOs, unlike ``PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE``, which is specifically for GLSL uniforms.
|
||||
* ``PIPE_CAP_HARDWARE_GL_SELECT``: Enable hardware accelerated GL_SELECT for this driver.
|
||||
* ``PIPE_CAP_DEVICE_PROTECTED_CONTEXT``: Whether the device supports protected / encrypted context which can manipulate protected / encrypted content (some devices might need protected contexts to access protected content, whereas ``PIPE_CAP_DEVICE_PROTECTED_SURFACE`` does not require any particular context to do so).
|
||||
* ``PIPE_CAP_ALLOW_GLTHREAD_BUFFER_SUBDATA_OPT``: Whether to allow glthread to convert glBufferSubData to glCopyBufferSubData. This may improve or worsen performance depending on your driver.
|
||||
* ``PIPE_CAP_VALIDATE_ALL_DIRTY_STATES`` : Whether state validation must also validate the state changes for resources types used in the previous shader but not in the current shader.
|
||||
* ``PIPE_CAP_NULL_TEXTURES`` : Whether the driver supports sampling from NULL textures.
|
||||
* ``PIPE_CAP_ASTC_VOID_EXTENTS_NEED_DENORM_FLUSH`` : True if the driver/hardware needs denormalized values in ASTC void extent blocks flushed to zero.
|
||||
|
||||
.. _pipe_capf:
|
||||
|
||||
|
@ -686,13 +701,15 @@ support different features.
|
|||
to any shader stage using ``set_constant_buffer``. If 0 or 1, the pipe will
|
||||
only permit binding one constant buffer per shader.
|
||||
|
||||
If a value greater than 0 is returned, the driver can have multiple
|
||||
constant buffers bound to shader stages. The CONST register file is
|
||||
accessed with two-dimensional indices, like in the example below.
|
||||
If a value greater than 0 is returned, the driver can have multiple
|
||||
constant buffers bound to shader stages. The CONST register file is
|
||||
accessed with two-dimensional indices, like in the example below.
|
||||
|
||||
DCL CONST[0][0..7] # declare first 8 vectors of constbuf 0
|
||||
DCL CONST[3][0] # declare first vector of constbuf 3
|
||||
MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0
|
||||
::
|
||||
|
||||
DCL CONST[0][0..7] # declare first 8 vectors of constbuf 0
|
||||
DCL CONST[3][0] # declare first vector of constbuf 3
|
||||
MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0
|
||||
|
||||
* ``PIPE_SHADER_CAP_MAX_TEMPS``: The maximum number of temporary registers.
|
||||
* ``PIPE_SHADER_CAP_CONT_SUPPORTED``: Whether continue is supported.
|
||||
|
@ -730,9 +747,6 @@ MOV OUT[0], CONST[0][3] # copy vector 3 of constbuf 0
|
|||
sampler views. Must not be lower than PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS.
|
||||
* ``PIPE_SHADER_CAP_DROUND_SUPPORTED``: Whether double precision rounding
|
||||
is supported. If it is, DTRUNC/DCEIL/DFLR/DROUND opcodes may be used.
|
||||
* ``PIPE_SHADER_CAP_DFRACEXP_DLDEXP_SUPPORTED``: Whether DFRACEXP and
|
||||
DLDEXP are supported.
|
||||
* ``PIPE_SHADER_CAP_LDEXP_SUPPORTED``: Whether LDEXP is supported.
|
||||
* ``PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE``: Whether the driver doesn't
|
||||
ignore tgsi_declaration_range::Last for shader inputs and outputs.
|
||||
* ``PIPE_SHADER_CAP_MAX_SHADER_BUFFERS``: Maximum number of memory buffers
|
||||
|
@ -803,7 +817,7 @@ PIPE_BIND_*
|
|||
|
||||
These flags indicate how a resource will be used and are specified at resource
|
||||
creation time. Resources may be used in different roles
|
||||
during their lifecycle. Bind flags are cumulative and may be combined to create
|
||||
during their life cycle. Bind flags are cumulative and may be combined to create
|
||||
a resource which can be used for multiple things.
|
||||
Depending on the pipe driver's memory management and these bind flags,
|
||||
resources might be created and handled quite differently.
|
||||
|
|
|
@ -102,7 +102,7 @@ This instruction replicates its result.
|
|||
|
||||
.. opcode:: RSQ - Reciprocal Square Root
|
||||
|
||||
This instruction replicates its result. The results are undefined for src <= 0.
|
||||
This instruction replicates its result. The results are undefined for *src* <= 0.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -111,7 +111,7 @@ This instruction replicates its result. The results are undefined for src <= 0.
|
|||
|
||||
.. opcode:: SQRT - Square Root
|
||||
|
||||
This instruction replicates its result. The results are undefined for src < 0.
|
||||
This instruction replicates its result. The results are undefined for *src* < 0.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -356,7 +356,7 @@ This instruction replicates its result.
|
|||
|
||||
.. opcode:: LDEXP - Multiply Number by Integral Power of 2
|
||||
|
||||
src1 is an integer.
|
||||
*src1* is an integer.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -514,18 +514,18 @@ This instruction replicates its result.
|
|||
|
||||
.. opcode:: TEX - Texture Lookup
|
||||
|
||||
for array textures src0.y contains the slice for 1D,
|
||||
and src0.z contain the slice for 2D.
|
||||
for array textures *src0.y* contains the slice for 1D,
|
||||
and *src0.z* contain the slice for 2D.
|
||||
|
||||
for shadow textures with no arrays (and not cube map),
|
||||
src0.z contains the reference value.
|
||||
*src0.z* contains the reference value.
|
||||
|
||||
for shadow textures with arrays, src0.z contains
|
||||
the reference value for 1D arrays, and src0.w contains
|
||||
for shadow textures with arrays, *src0.z* contains
|
||||
the reference value for 1D arrays, and *src0.w* contains
|
||||
the reference value for 2D arrays and cube maps.
|
||||
|
||||
for cube map array shadow textures, the reference value
|
||||
cannot be passed in src0.w, and TEX2 must be used instead.
|
||||
cannot be passed in *src0.w*, and TEX2 must be used instead.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -708,10 +708,10 @@ This instruction replicates its result.
|
|||
.. opcode:: TXB - Texture Lookup With Bias
|
||||
|
||||
for cube map array textures and shadow cube maps, the bias value
|
||||
cannot be passed in src0.w, and TXB2 must be used instead.
|
||||
cannot be passed in *src0.w*, and TXB2 must be used instead.
|
||||
|
||||
if the target is a shadow texture, the reference value is always
|
||||
in src.z (this prevents shadow 3d and shadow 2d arrays from
|
||||
in *src.z* (this prevents shadow 3d and shadow 2d arrays from
|
||||
using this instruction, but this is not needed).
|
||||
|
||||
.. math::
|
||||
|
@ -739,7 +739,7 @@ This instruction replicates its result.
|
|||
this encoding too, but this is not legal.
|
||||
|
||||
if the target is a shadow cube map array, the reference value is in
|
||||
src1.y.
|
||||
*src1.y*.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -800,10 +800,10 @@ This instruction replicates its result.
|
|||
.. opcode:: TXL - Texture Lookup With explicit LOD
|
||||
|
||||
for cube map array textures, the explicit LOD value
|
||||
cannot be passed in src0.w, and TXL2 must be used instead.
|
||||
cannot be passed in *src0.w*, and TXL2 must be used instead.
|
||||
|
||||
if the target is a shadow texture, the reference value is always
|
||||
in src.z (this prevents shadow 3d / 2d array / cube targets from
|
||||
in *src.z* (this prevents shadow 3d / 2d array / cube targets from
|
||||
using this instruction, but this is not needed).
|
||||
|
||||
.. math::
|
||||
|
@ -831,7 +831,7 @@ This instruction replicates its result.
|
|||
this encoding too, but this is not legal.
|
||||
|
||||
if the target is a shadow cube map array, the reference value is in
|
||||
src1.y.
|
||||
*src1.y*.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -899,9 +899,9 @@ XXX doesn't look like most of the opcodes really belong here.
|
|||
|
||||
.. opcode:: TXF - Texel Fetch
|
||||
|
||||
As per NV_gpu_shader4, extract a single texel from a specified texture
|
||||
image or PIPE_BUFFER resource. The source sampler may not be a CUBE or
|
||||
SHADOW. src 0 is a
|
||||
As per :ext:`GL_NV_gpu_program4`, extract a single texel from a specified
|
||||
texture image or PIPE_BUFFER resource. The source sampler may not be a
|
||||
CUBE or SHADOW. *src0* is a
|
||||
four-component signed integer vector used to identify the single texel
|
||||
accessed. 3 components + level. If the texture is multisampled, then
|
||||
the fourth component indicates the sample, not the mipmap level.
|
||||
|
@ -915,11 +915,11 @@ XXX doesn't look like most of the opcodes really belong here.
|
|||
|
||||
.. opcode:: TXQ - Texture Size Query
|
||||
|
||||
As per NV_gpu_program4, retrieve the dimensions of the texture depending on
|
||||
the target. For 1D (width), 2D/RECT/CUBE (width, height), 3D (width, height,
|
||||
depth), 1D array (width, layers), 2D array (width, height, layers).
|
||||
Also return the number of accessible levels (last_level - first_level + 1)
|
||||
in W.
|
||||
As per :ext:`GL_NV_gpu_program4`, retrieve the dimensions of the texture
|
||||
depending on the target. For 1D (width), 2D/RECT/CUBE (width, height),
|
||||
3D (width, height, depth), 1D array (width, layers), 2D array (width,
|
||||
height, layers). Also return the number of accessible levels
|
||||
(last_level - first_level + 1) in W.
|
||||
|
||||
For components which don't return a resource dimension, their value
|
||||
is undefined.
|
||||
|
@ -951,15 +951,15 @@ XXX doesn't look like most of the opcodes really belong here.
|
|||
|
||||
.. opcode:: TG4 - Texture Gather
|
||||
|
||||
As per ARB_texture_gather, gathers the four texels to be used in a bi-linear
|
||||
filtering operation and packs them into a single register. Only works with
|
||||
2D, 2D array, cubemaps, and cubemaps arrays. For 2D textures, only the
|
||||
addressing modes of the sampler and the top level of any mip pyramid are
|
||||
used. Set W to zero. It behaves like the TEX instruction, but a filtered
|
||||
sample is not generated. The four samples that contribute to filtering are
|
||||
placed into XYZW in clockwise order, starting with the (u,v) texture
|
||||
coordinate delta at the following locations (-, +), (+, +), (+, -), (-, -),
|
||||
where the magnitude of the deltas are half a texel.
|
||||
As per :ext:`GL_ARB_texture_gather`, gathers the four texels to be used in a
|
||||
bi-linear filtering operation and packs them into a single register.
|
||||
Only works with 2D, 2D array, cubemaps, and cubemaps arrays. For 2D
|
||||
textures, only the addressing modes of the sampler and the top level of any
|
||||
mip pyramid are used. Set W to zero. It behaves like the TEX instruction,
|
||||
but a filtered sample is not generated. The four samples that contribute to
|
||||
filtering are placed into XYZW in clockwise order, starting with the (u,v)
|
||||
texture coordinate delta at the following locations (-, +), (+, +), (+, -),
|
||||
(-, -), where the magnitude of the deltas are half a texel.
|
||||
|
||||
PIPE_CAP_TEXTURE_SM5 enhances this instruction to support shadow per-sample
|
||||
depth compares, single component selection, and a non-constant offset. It
|
||||
|
@ -1183,7 +1183,7 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
|
|||
|
||||
.. opcode:: UDIV - Unsigned Integer Division
|
||||
|
||||
For division by zero, 0xffffffff is returned.
|
||||
For division by zero, ``0xffffffff`` is returned.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -1198,7 +1198,7 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
|
|||
|
||||
.. opcode:: UMOD - Unsigned Integer Remainder
|
||||
|
||||
If second arg is zero, 0xffffffff is returned.
|
||||
If *src1* is zero, ``0xffffffff`` is returned.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -1317,7 +1317,7 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
|
|||
|
||||
.. opcode:: SHL - Shift Left
|
||||
|
||||
The shift count is masked with 0x1f before the shift is applied.
|
||||
The shift count is masked with ``0x1f`` before the shift is applied.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -1332,7 +1332,7 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
|
|||
|
||||
.. opcode:: ISHR - Arithmetic Shift Right (of Signed Integer)
|
||||
|
||||
The shift count is masked with 0x1f before the shift is applied.
|
||||
The shift count is masked with ``0x1f`` before the shift is applied.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -1347,7 +1347,7 @@ Support for these opcodes indicated by PIPE_SHADER_CAP_INTEGERS (all of them?)
|
|||
|
||||
.. opcode:: USHR - Logical Shift Right
|
||||
|
||||
The shift count is masked with 0x1f before the shift is applied.
|
||||
The shift count is masked with ``0x1f`` before the shift is applied.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -1651,19 +1651,23 @@ Some require glsl version 1.30 (UIF/SWITCH/CASE/DEFAULT/ENDSWITCH).
|
|||
|
||||
.. opcode:: CAL - Subroutine Call
|
||||
|
||||
push(pc)
|
||||
pc = target
|
||||
Pseudocode::
|
||||
|
||||
push(pc)
|
||||
pc = target
|
||||
|
||||
|
||||
.. opcode:: RET - Subroutine Call Return
|
||||
|
||||
pc = pop()
|
||||
Pseudocode::
|
||||
|
||||
pc = pop()
|
||||
|
||||
|
||||
.. opcode:: CONT - Continue
|
||||
|
||||
Unconditionally moves the point of execution to the instruction after the
|
||||
last bgnloop. The instruction must appear within a bgnloop/endloop.
|
||||
last BGNLOOP. The instruction must appear within a BGNLOOP/ENDLOOP.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -1673,17 +1677,17 @@ Some require glsl version 1.30 (UIF/SWITCH/CASE/DEFAULT/ENDSWITCH).
|
|||
|
||||
.. opcode:: BGNLOOP - Begin a Loop
|
||||
|
||||
Start a loop. Must have a matching endloop.
|
||||
Start a loop. Must have a matching ENDLOOP.
|
||||
|
||||
|
||||
.. opcode:: BGNSUB - Begin Subroutine
|
||||
|
||||
Starts definition of a subroutine. Must have a matching endsub.
|
||||
Starts definition of a subroutine. Must have a matching ENDSUB.
|
||||
|
||||
|
||||
.. opcode:: ENDLOOP - End a Loop
|
||||
|
||||
End a loop started with bgnloop.
|
||||
End a loop started with BGNLOOP.
|
||||
|
||||
|
||||
.. opcode:: ENDSUB - End Subroutine
|
||||
|
@ -1699,26 +1703,26 @@ Some require glsl version 1.30 (UIF/SWITCH/CASE/DEFAULT/ENDSWITCH).
|
|||
.. opcode:: BRK - Break
|
||||
|
||||
Unconditionally moves the point of execution to the instruction after the
|
||||
next endloop or endswitch. The instruction must appear within a loop/endloop
|
||||
or switch/endswitch.
|
||||
next ENDLOOP or ENDSWITCH. The instruction must appear within a
|
||||
BGNLOOP/ENDLOOP or SWITCH/ENDSWITCH.
|
||||
|
||||
|
||||
.. opcode:: IF - Float If
|
||||
|
||||
Start an IF ... ELSE .. ENDIF block. Condition evaluates to true if
|
||||
|
||||
src0.x != 0.0
|
||||
*src0.x* != 0.0
|
||||
|
||||
where src0.x is interpreted as a floating point register.
|
||||
where *src0.x* is interpreted as a floating point register.
|
||||
|
||||
|
||||
.. opcode:: UIF - Bitwise If
|
||||
|
||||
Start an UIF ... ELSE .. ENDIF block. Condition evaluates to true if
|
||||
|
||||
src0.x != 0
|
||||
*src0.x* != 0
|
||||
|
||||
where src0.x is interpreted as an integer register.
|
||||
where *src0.x* is interpreted as an integer register.
|
||||
|
||||
|
||||
.. opcode:: ELSE - Else
|
||||
|
@ -1738,7 +1742,7 @@ Some require glsl version 1.30 (UIF/SWITCH/CASE/DEFAULT/ENDSWITCH).
|
|||
ends when a BRK is hit, but just like in C falling through to other cases
|
||||
without a break is allowed. Similarly, DEFAULT label is allowed anywhere not
|
||||
just as last statement, and fallthrough is allowed into/from it.
|
||||
CASE src arguments are evaluated at bit level against the SWITCH src argument.
|
||||
CASE *src* arguments are evaluated at bit level against the SWITCH *src* argument.
|
||||
|
||||
Example::
|
||||
|
||||
|
@ -1757,7 +1761,7 @@ Some require glsl version 1.30 (UIF/SWITCH/CASE/DEFAULT/ENDSWITCH).
|
|||
|
||||
.. opcode:: CASE - Switch case
|
||||
|
||||
This represents a switch case label. The src arg must be an integer immediate.
|
||||
This represents a switch case label. The *src* arg must be an integer immediate.
|
||||
|
||||
|
||||
.. opcode:: DEFAULT - Switch default
|
||||
|
@ -1781,17 +1785,17 @@ interpolateAt* functions. The first argument of each of these must come from
|
|||
|
||||
.. opcode:: INTERP_CENTROID - Interpolate at the centroid
|
||||
|
||||
Interpolates the varying specified by src0 at the centroid
|
||||
Interpolates the varying specified by *src0* at the centroid
|
||||
|
||||
.. opcode:: INTERP_SAMPLE - Interpolate at the specified sample
|
||||
|
||||
Interpolates the varying specified by src0 at the sample id specified by
|
||||
src1.x (interpreted as an integer)
|
||||
Interpolates the varying specified by *src0* at the sample id
|
||||
specified by *src1.x* (interpreted as an integer)
|
||||
|
||||
.. opcode:: INTERP_OFFSET - Interpolate at the specified offset
|
||||
|
||||
Interpolates the varying specified by src0 at the offset src1.xy from the
|
||||
pixel center (interpreted as floats)
|
||||
Interpolates the varying specified by *src0* at the offset *src1.xy*
|
||||
from the pixel center (interpreted as floats)
|
||||
|
||||
|
||||
.. _doubleopcodes:
|
||||
|
@ -1898,23 +1902,9 @@ two-component vectors with doubled precision in each component.
|
|||
|
||||
dst.zw = (src.zw > 0) ? 1.0 : (src.zw < 0) ? -1.0 : 0.0
|
||||
|
||||
.. opcode:: DFRACEXP - Convert Number to Fractional and Integral Components
|
||||
|
||||
Like the ``frexp()`` routine in many math libraries, this opcode stores the
|
||||
exponent of its source to ``dst0``, and the significand to ``dst1``, such that
|
||||
:math:`dst1 \times 2^{dst0} = src` . The results are replicated across
|
||||
channels.
|
||||
|
||||
.. math::
|
||||
|
||||
dst0.xy = dst.zw = frac(src.xy)
|
||||
|
||||
dst1 = frac(src.xy)
|
||||
|
||||
|
||||
.. opcode:: DLDEXP - Multiply Number by Integral Power of 2
|
||||
|
||||
This opcode is the inverse of :opcode:`DFRACEXP`. The second
|
||||
This opcode is the inverse of frexp. The second
|
||||
source is an integer.
|
||||
|
||||
.. math::
|
||||
|
@ -2179,7 +2169,7 @@ two-component vectors with 64-bits in each component.
|
|||
|
||||
.. opcode:: U64SHL - Shift Left 64-bit Unsigned Integer
|
||||
|
||||
The shift count is masked with 0x3f before the shift is applied.
|
||||
The shift count is masked with ``0x3f`` before the shift is applied.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -2189,7 +2179,7 @@ two-component vectors with 64-bits in each component.
|
|||
|
||||
.. opcode:: I64SHR - Arithmetic Shift Right (of 64-bit Signed Integer)
|
||||
|
||||
The shift count is masked with 0x3f before the shift is applied.
|
||||
The shift count is masked with ``0x3f`` before the shift is applied.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -2199,7 +2189,7 @@ two-component vectors with 64-bits in each component.
|
|||
|
||||
.. opcode:: U64SHR - Logical Shift Right (of 64-bit Unsigned Integer)
|
||||
|
||||
The shift count is masked with 0x3f before the shift is applied.
|
||||
The shift count is masked with ``0x3f`` before the shift is applied.
|
||||
|
||||
.. math::
|
||||
|
||||
|
@ -2970,16 +2960,16 @@ Functions
|
|||
^^^^^^^^^^^^^^
|
||||
|
||||
|
||||
:math:`|x|` Absolute value of `x`.
|
||||
:math:`|x|` Absolute value of ``x``.
|
||||
|
||||
:math:`\lceil x \rceil` Ceiling of `x`.
|
||||
:math:`\lceil x \rceil` Ceiling of ``x``.
|
||||
|
||||
clamp(x,y,z) Clamp x between y and z.
|
||||
(x < y) ? y : (x > z) ? z : x
|
||||
|
||||
:math:`\lfloor x\rfloor` Floor of `x`.
|
||||
:math:`\lfloor x\rfloor` Floor of ``x``.
|
||||
|
||||
:math:`\log_2{x}` Logarithm of `x`, base 2.
|
||||
:math:`\log_2{x}` Logarithm of ``x``, base 2.
|
||||
|
||||
max(x,y) Maximum of x and y.
|
||||
(x > y) ? x : y
|
||||
|
@ -2993,7 +2983,7 @@ Functions
|
|||
|
||||
pop() Pop from stack.
|
||||
|
||||
:math:`x^y` `x` to the power `y`.
|
||||
:math:`x^y` ``x`` to the power ``y``.
|
||||
|
||||
push(x) Push x on stack.
|
||||
|
||||
|
@ -3217,8 +3207,8 @@ where F will be positive when the fragment belongs to a front-facing polygon,
|
|||
and negative when the fragment belongs to a back-facing polygon.
|
||||
|
||||
If it is a system value, it will be an integer vector in the form (F, 0, 0, 1),
|
||||
where F is 0xffffffff when the fragment belongs to a front-facing polygon and
|
||||
0 when the fragment belongs to a back-facing polygon.
|
||||
where F is ``0xffffffff`` when the fragment belongs to a front-facing polygon
|
||||
and ``0`` when the fragment belongs to a back-facing polygon.
|
||||
|
||||
|
||||
TGSI_SEMANTIC_EDGEFLAG
|
||||
|
@ -3533,7 +3523,7 @@ TGSI_SEMANTIC_VIEWPORT_MASK
|
|||
"""""""""""""""""""""""""""
|
||||
|
||||
A bit mask of viewports to broadcast the current primitive to. See
|
||||
GL_NV_viewport_array2 for more details.
|
||||
:ext:`GL_NV_viewport_array2` for more details.
|
||||
|
||||
|
||||
TGSI_SEMANTIC_TESS_DEFAULT_OUTER_LEVEL
|
||||
|
@ -3572,7 +3562,7 @@ DCL SVIEW[#], resource, type(s)
|
|||
Declares a shader input sampler view and assigns it to a SVIEW[#]
|
||||
register.
|
||||
|
||||
resource can be one of BUFFER, 1D, 2D, 3D, 1DArray and 2DArray.
|
||||
resource can be one of BUFFER, 1D, 2D, 3D, 1D_ARRAY and 2D_ARRAY.
|
||||
|
||||
type must be 1 or 4 entries (if specifying on a per-component
|
||||
level) out of UNORM, SNORM, SINT, UINT and FLOAT.
|
||||
|
@ -3600,8 +3590,8 @@ DCL RES[#], resource [, WR] [, RAW]
|
|||
Declares a shader input resource and assigns it to a RES[#]
|
||||
register.
|
||||
|
||||
resource can be one of BUFFER, 1D, 2D, 3D, CUBE, 1DArray and
|
||||
2DArray.
|
||||
resource can be one of BUFFER, 1D, 2D, 3D, CUBE, 1D_ARRAY and
|
||||
2D_ARRAY.
|
||||
|
||||
If the RAW keyword is not specified, the texture data will be
|
||||
subject to conversion, swizzling and scaling as required to yield
|
||||
|
@ -3662,7 +3652,7 @@ If LOWER_LEFT, the position will be (0,0) at the lower left corner and
|
|||
increase upward and rightward.
|
||||
|
||||
OpenGL defaults to LOWER_LEFT, and is configurable with the
|
||||
GL_ARB_fragment_coord_conventions extension.
|
||||
:ext:`GL_ARB_fragment_coord_conventions` extension.
|
||||
|
||||
DirectX 9/10 use UPPER_LEFT.
|
||||
|
||||
|
@ -3680,7 +3670,7 @@ rasterization, which is instead controlled by half_pixel_center in the
|
|||
rasterizer.
|
||||
|
||||
OpenGL defaults to HALF_INTEGER, and is configurable with the
|
||||
GL_ARB_fragment_coord_conventions extension.
|
||||
:ext:`GL_ARB_fragment_coord_conventions` extension.
|
||||
|
||||
DirectX 9 uses INTEGER.
|
||||
DirectX 10 uses HALF_INTEGER.
|
||||
|
@ -3846,6 +3836,6 @@ well.
|
|||
| S | (s, s, s, s) | unknown | unknown |
|
||||
+--------------------+--------------+--------------------+--------------+
|
||||
|
||||
.. [#envmap-bumpmap] http://www.opengl.org/registry/specs/ATI/envmap_bumpmap.txt
|
||||
.. [#envmap-bumpmap] https://registry.khronos.org/OpenGL/extensions/ATI/ATI_envmap_bumpmap.txt
|
||||
.. [#depth-tex-mode] the default is (z, z, z, 1) but may also be (0, 0, 0, z)
|
||||
or (z, z, z, z) depending on the value of GL_DEPTH_TEXTURE_MODE.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue