diff --git a/docs/gallium/buffermapping.rst b/docs/gallium/buffermapping.rst index 5299ec39a22..5c007d05ed0 100644 --- a/docs/gallium/buffermapping.rst +++ b/docs/gallium/buffermapping.rst @@ -386,7 +386,7 @@ Buffer mapping conclusions * Non-blitting drivers must reallocate storage on ``glBufferData(NULL)`` so that the following ``glBufferSubData()`` won't stall. That ``glBufferData(NULL)`` call will appear in the driver as an ``invalidate_resource()`` call if - ``PIPE_CAP_INVALIDATE_BUFFER`` is available. (If that flag is not set, then + ``pipe_caps.invalidate_buffer`` is available. (If that flag is not set, then mesa/st will create a new pipe_resource for you). Storage reallocation may be skipped if you for some reason know that the buffer is idle, in which case you can just empty the valid region. @@ -409,7 +409,7 @@ Buffer mapping conclusions * Buffer binding points are not useful for tuning buffer placement (See all the ``PIPE_COPY_WRITE_BUFFER`` instances), you have to track the actual usage history of a GL BO name. mesa/st does this for optimizing its state updates - on reallocation in the ``!PIPE_CAP_INVALIDATE_BUFFER`` case, and if you set - ``PIPE_CAP_INVALIDATE_BUFFER`` then you have to flag your own internal state + on reallocation in the ``!pipe_caps.invalidate_buffer`` case, and if you set + ``pipe_caps.invalidate_buffer`` then you have to flag your own internal state updates (VBO addresses, XFB addresses, texture buffer addresses, etc.) on reallocation based on usage history. diff --git a/docs/gallium/context.rst b/docs/gallium/context.rst index a4c521e0816..43ec2ae02f0 100644 --- a/docs/gallium/context.rst +++ b/docs/gallium/context.rst @@ -686,7 +686,7 @@ anything to queries currently gathering data). As opposed to manually drawing a textured quad, this lets the pipe driver choose the optimal method for blitting (like using a special 2D engine), and usually offers, for example, accelerated stencil-only copies even where -PIPE_CAP_SHADER_STENCIL_EXPORT is not available. +pipe_caps.shader_stencil_export is not available. Transfers @@ -780,7 +780,7 @@ content unchanged. Similarly, calling this function to uncommit an already uncommitted memory region is allowed. For buffers, the given box must be aligned to multiples of -``PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE``. As an exception to this rule, if the size +``pipe_caps.sparse_buffer_page_size``. As an exception to this rule, if the size of the buffer is not a multiple of the page size, changing the commit state of the last (partial) page requires a box that ends at the end of the buffer (i.e., box->x + box->width == buffer->width0). @@ -901,7 +901,7 @@ only one size is reported through ``PIPE_COMPUTE_CAP_SUBGROUP_SIZES`` or Mipmap generation ^^^^^^^^^^^^^^^^^ -If PIPE_CAP_GENERATE_MIPMAP is true, ``generate_mipmap`` can be used +If pipe_caps.generate_mipmap is true, ``generate_mipmap`` can be used to generate mipmaps for the specified texture resource. It replaces texel image levels base_level+1 through last_level for layers range from first_layer through last_layer. @@ -927,7 +927,7 @@ notifications are single-shot, i.e. subsequent calls to Bindless ^^^^^^^^ -If PIPE_CAP_BINDLESS_TEXTURE is TRUE, the following ``pipe_context`` functions +If pipe_caps.bindless_texture is TRUE, the following ``pipe_context`` functions are used to create/delete bindless handles, and to make them resident in the current context when they are going to be used by shaders. diff --git a/docs/gallium/cso/rasterizer.rst b/docs/gallium/cso/rasterizer.rst index b3cd331cea0..62e5a843bb1 100644 --- a/docs/gallium/cso/rasterizer.rst +++ b/docs/gallium/cso/rasterizer.rst @@ -20,7 +20,7 @@ clamp_vertex_color D3D11: seems always disabled - Note the PIPE_CAP_VERTEX_COLOR_CLAMPED query indicates whether or not the + Note pipe_caps.vertex_color_clamped indicates whether or not the driver supports this control. If it's not supported, gallium frontends may have to insert extra clamping code. @@ -34,7 +34,7 @@ clamp_fragment_color D3D11: seems always disabled - Note the PIPE_CAP_FRAGMENT_COLOR_CLAMPED query indicates whether or not the + Note pipe_caps.fragment_color_clamped indicates whether or not the driver supports this control. If it's not supported, gallium frontends may have to insert extra clamping code. @@ -69,7 +69,7 @@ flatshade_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. + an effect if ``pipe_caps.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 @@ -157,16 +157,16 @@ Points ------ sprite_coord_enable - The effect of this state depends on PIPE_CAP_TGSI_TEXCOORD ! + The effect of this state depends on pipe_caps.tgsi_texcoord ! Controls automatic texture coordinate generation for rendering sprite points. - If PIPE_CAP_TGSI_TEXCOORD is false: + If pipe_caps.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: + If pipe_caps.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 diff --git a/docs/gallium/cso/sampler.rst b/docs/gallium/cso/sampler.rst index 33b62520009..a51d5ea429b 100644 --- a/docs/gallium/cso/sampler.rst +++ b/docs/gallium/cso/sampler.rst @@ -102,7 +102,7 @@ border_color Color union used for texel coordinates that are outside the [0,width-1], [0, height-1] or [0, depth-1] ranges. Interpreted according to sampler view format, unless the driver reports - PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK, in which case special care has to be + pipe_caps.texture_border_color_quirk, in which case special care has to be taken (see description of the cap). max_anisotropy Maximum anisotropy ratio to use when sampling from textures. For example, diff --git a/docs/gallium/resources.rst b/docs/gallium/resources.rst index 87fca544b63..f2c7368ee9d 100644 --- a/docs/gallium/resources.rst +++ b/docs/gallium/resources.rst @@ -55,7 +55,7 @@ They can be bound to stream output if supported. TODO: what about the restrictions lifted by the several later GL transform feedback extensions? How does one advertise that in Gallium? They can be also be bound to a shader stage (for sampling) as usual by -creating an appropriate sampler view, if the driver supports PIPE_CAP_TEXTURE_BUFFER_OBJECTS. +creating an appropriate sampler view, if the driver supports pipe_caps.texture_buffer_objects. This supports larger width than a 1d texture would (TODO limit currently unspecified, minimum must be at least 65536). Only the "direct fetch" sample opcodes are supported (TGSI_OPCODE_TXF, @@ -81,9 +81,9 @@ D3D11: buffer resources PIPE_TEXTURE_1D / PIPE_TEXTURE_1D_ARRAY ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 1D surface accessed with normalized coordinates. -1D array textures are supported depending on PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS. +1D array textures are supported depending on pipe_caps.max_texture_array_layers. -- If PIPE_CAP_NPOT_TEXTURES is not supported, +- If pipe_caps.npot_textures is not supported, width must be a power of two - height0 must be 1 - depth0 must be 1 @@ -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 :ext:`GL_ARB_texture_non_power_of_two` +- pipe_caps.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 @@ -117,9 +117,9 @@ D3D11: not supported (only PIPE_TEXTURE_2D with normalized coordinates is suppor PIPE_TEXTURE_2D / PIPE_TEXTURE_2D_ARRAY ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2D surface accessed with normalized coordinates. -2D array textures are supported depending on PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS. +2D array textures are supported depending on pipe_caps.max_texture_array_layers. -- If PIPE_CAP_NPOT_TEXTURES is not supported, +- If pipe_caps.npot_textures is not supported, width and height must be powers of two - depth0 must be 1 - array_size must be 1 for PIPE_TEXTURE_2D @@ -129,13 +129,13 @@ 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 :ext:`GL_ARB_texture_non_power_of_two` +- pipe_caps.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 D3D11: 2D textures -- PIPE_CAP_NPOT_TEXTURES is equivalent to D3D_FEATURE_LEVEL_9_3 +- pipe_caps.npot_textures is equivalent to D3D_FEATURE_LEVEL_9_3 PIPE_TEXTURE_3D ^^^^^^^^^^^^^^^ @@ -143,18 +143,18 @@ PIPE_TEXTURE_3D 3-dimensional array of texels. Mipmap dimensions are reduced in all 3 coordinates. -- If PIPE_CAP_NPOT_TEXTURES is not supported, +- If pipe_caps.npot_textures is not supported, width, height and depth must be powers of two - array_size must be 1 - Must use normalized coordinates OpenGL: GL_TEXTURE_3D in GL 1.2 or :ext:`GL_EXT_texture3D` -- PIPE_CAP_NPOT_TEXTURES is equivalent to GL 2.0 or :ext:`GL_ARB_texture_non_power_of_two` +- pipe_caps.npot_textures is equivalent to GL 2.0 or :ext:`GL_ARB_texture_non_power_of_two` D3D11: 3D textures -- PIPE_CAP_NPOT_TEXTURES is equivalent to D3D_FEATURE_LEVEL_10_0 +- pipe_caps.npot_textures is equivalent to D3D_FEATURE_LEVEL_10_0 PIPE_TEXTURE_CUBE / PIPE_TEXTURE_CUBE_ARRAY ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -162,27 +162,27 @@ PIPE_TEXTURE_CUBE / PIPE_TEXTURE_CUBE_ARRAY Cube maps consist of 6 2D faces. The 6 surfaces form an imaginary cube, and sampling happens by mapping an input 3-vector to the point of the cube surface in that direction. -Cube map arrays are supported depending on PIPE_CAP_CUBE_MAP_ARRAY. +Cube map arrays are supported depending on pipe_caps.cube_map_array. -Sampling may be optionally seamless if a driver supports it (PIPE_CAP_SEAMLESS_CUBE_MAP), +Sampling may be optionally seamless if a driver supports it (pipe_caps.seamless_cube_map), resulting in filtering taking samples from multiple surfaces near to the edge. - Width and height must be equal - depth0 must be 1 - array_size must be a multiple of 6 -- If PIPE_CAP_NPOT_TEXTURES is not supported, +- If pipe_caps.npot_textures is not supported, width and height must be powers of two - Must use normalized coordinates 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 :ext:`GL_ARB_texture_non_power_of_two` +- pipe_caps.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 -- PIPE_CAP_NPOT_TEXTURES is equivalent to D3D_FEATURE_LEVEL_10_0 +- pipe_caps.npot_textures is equivalent to D3D_FEATURE_LEVEL_10_0 - Cube map arrays require D3D_FEATURE_LEVEL_10_1 Surfaces diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst index e576b790fbf..c52abd7bf7b 100644 --- a/docs/gallium/screen.rst +++ b/docs/gallium/screen.rst @@ -11,92 +11,88 @@ Flags and enumerations XXX some of these don't belong in this section. -.. _pipe_cap: +.. _pipe_caps: -PIPE_CAP_* +pipe_caps ^^^^^^^^^^ -Capability queries return information about the features and limits of the -driver/GPU. For floating-point values, use :ref:`get_paramf`, and for boolean -or integer values, use :ref:`get_param`. +Capability about the features and limits of the driver/GPU. -The integer capabilities: - -* ``PIPE_CAP_GRAPHICS``: Whether graphics is supported. If not, contexts can +* ``pipe_caps.graphics``: Whether graphics is supported. If not, contexts can only be created with PIPE_CONTEXT_COMPUTE_ONLY. -* ``PIPE_CAP_NPOT_TEXTURES``: Whether :term:`NPOT` textures may have repeat modes, +* ``pipe_caps.npot_textures``: Whether :term:`NPOT` textures may have repeat modes, normalized coordinates, and mipmaps. -* ``PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS``: How many dual-source blend RTs are support. +* ``pipe_caps.max_dual_source_render_targets``: How many dual-source blend RTs are support. :ref:`Blend` for more information. -* ``PIPE_CAP_ANISOTROPIC_FILTER``: Whether textures can be filtered anisotropically. -* ``PIPE_CAP_MAX_RENDER_TARGETS``: The maximum number of render targets that may be +* ``pipe_caps.anisotropic_filter``: Whether textures can be filtered anisotropically. +* ``pipe_caps.max_render_targets``: The maximum number of render targets that may be bound. -* ``PIPE_CAP_OCCLUSION_QUERY``: Whether occlusion queries are available. -* ``PIPE_CAP_QUERY_TIME_ELAPSED``: Whether PIPE_QUERY_TIME_ELAPSED queries are available. -* ``PIPE_CAP_TEXTURE_SHADOW_MAP``: indicates whether the fragment shader hardware +* ``pipe_caps.occlusion_query``: Whether occlusion queries are available. +* ``pipe_caps.query_time_elapsed``: Whether PIPE_QUERY_TIME_ELAPSED queries are available. +* ``pipe_caps.texture_shadow_map``: indicates whether the fragment shader hardware can do the depth texture / Z comparison operation in TEX instructions for shadow testing. -* ``PIPE_CAP_TEXTURE_SWIZZLE``: Whether swizzling through sampler views is +* ``pipe_caps.texture_swizzle``: Whether swizzling through sampler views is supported. -* ``PIPE_CAP_MAX_TEXTURE_2D_SIZE``: The maximum size of 2D (and 1D) textures. -* ``PIPE_CAP_MAX_TEXTURE_3D_LEVELS``: The maximum number of mipmap levels available +* ``pipe_caps.max_texture_2d_size``: The maximum size of 2D (and 1D) textures. +* ``pipe_caps.max_texture_3d_levels``: The maximum number of mipmap levels available for a 3D texture. -* ``PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS``: The maximum number of mipmap levels available +* ``pipe_caps.max_texture_cube_levels``: The maximum number of mipmap levels available for a cubemap. -* ``PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE``: Whether mirrored texture coordinates are +* ``pipe_caps.texture_mirror_clamp_to_edge``: Whether mirrored texture coordinates are supported with the clamp-to-edge wrap mode. -* ``PIPE_CAP_TEXTURE_MIRROR_CLAMP``: Whether mirrored texture coordinates are supported +* ``pipe_caps.texture_mirror_clamp``: Whether mirrored texture coordinates are supported with clamp or clamp-to-border wrap modes. -* ``PIPE_CAP_BLEND_EQUATION_SEPARATE``: Whether alpha blend equations may be different +* ``pipe_caps.blend_equation_separate``: Whether alpha blend equations may be different from color blend equations, in :ref:`Blend` state. -* ``PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS``: The maximum number of stream buffers. -* ``PIPE_CAP_PRIMITIVE_RESTART``: Whether primitive restart is supported. -* ``PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX``: Subset of +* ``pipe_caps.max_stream_output_buffers``: The maximum number of stream buffers. +* ``pipe_caps.primitive_restart``: Whether primitive restart is supported. +* ``pipe_caps.primitive_restart_fixed_index``: Subset of PRIMITIVE_RESTART where the restart index is always the fixed maximum value for the index type. -* ``PIPE_CAP_INDEP_BLEND_ENABLE``: Whether per-rendertarget blend enabling and channel +* ``pipe_caps.indep_blend_enable``: Whether per-rendertarget blend enabling and channel masks are supported. If 0, then the first rendertarget's blend mask is replicated across all MRTs. -* ``PIPE_CAP_INDEP_BLEND_FUNC``: Whether per-rendertarget blend functions are +* ``pipe_caps.indep_blend_func``: Whether per-rendertarget blend functions are available. If 0, then the first rendertarget's blend functions affect all MRTs. -* ``PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS``: The maximum number of texture array +* ``pipe_caps.max_texture_array_layers``: The maximum number of texture array layers supported. If 0, the array textures are not supported at all and the ARRAY texture targets are invalid. -* ``PIPE_CAP_FS_COORD_ORIGIN_UPPER_LEFT``: Whether the upper-left origin +* ``pipe_caps.fs_coord_origin_upper_left``: Whether the upper-left origin fragment convention is supported. -* ``PIPE_CAP_FS_COORD_ORIGIN_LOWER_LEFT``: Whether the lower-left origin +* ``pipe_caps.fs_coord_origin_lower_left``: Whether the lower-left origin fragment convention is supported. -* ``PIPE_CAP_FS_COORD_PIXEL_CENTER_HALF_INTEGER``: Whether the half-integer +* ``pipe_caps.fs_coord_pixel_center_half_integer``: Whether the half-integer pixel-center fragment convention is supported. -* ``PIPE_CAP_FS_COORD_PIXEL_CENTER_INTEGER``: Whether the integer +* ``pipe_caps.fs_coord_pixel_center_integer``: Whether the integer pixel-center fragment convention is supported. -* ``PIPE_CAP_DEPTH_CLIP_DISABLE``: Whether the driver is capable of disabling +* ``pipe_caps.depth_clip_disable``: Whether the driver is capable of disabling depth clipping (through pipe_rasterizer_state). -* ``PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE``: Whether the driver is capable of +* ``pipe_caps.depth_clip_disable_separate``: Whether the driver is capable of disabling depth clipping (through pipe_rasterizer_state) separately for the near and far plane. If not, depth_clip_near and depth_clip_far will be equal. - ``PIPE_CAP_DEPTH_CLAMP_ENABLE``: Whether the driver is capable of + ``pipe_caps.depth_clamp_enable``: Whether the driver is capable of enabling depth clamping (through pipe_rasterizer_state) separately from depth clipping. If not, depth_clamp will be the inverse of depth_clip_far. -* ``PIPE_CAP_SHADER_STENCIL_EXPORT``: Whether a stencil reference value can be +* ``pipe_caps.shader_stencil_export``: Whether a stencil reference value can be written from a fragment shader. -* ``PIPE_CAP_VS_INSTANCEID``: Whether ``SYSTEM_VALUE_INSTANCE_ID`` is +* ``pipe_caps.vs_instanceid``: Whether ``SYSTEM_VALUE_INSTANCE_ID`` is supported in the vertex shader. -* ``PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR``: Whether the driver supports +* ``pipe_caps.vertex_element_instance_divisor``: Whether the driver supports per-instance vertex attribs. -* ``PIPE_CAP_FRAGMENT_COLOR_CLAMPED``: Whether fragment color clamping is +* ``pipe_caps.fragment_color_clamped``: Whether fragment color clamping is supported. That is, is the pipe_rasterizer_state::clamp_fragment_color flag supported by the driver? If not, gallium frontends will insert clamping code into the fragment shaders when needed. -* ``PIPE_CAP_MIXED_COLORBUFFER_FORMATS``: Whether mixed colorbuffer formats are +* ``pipe_caps.mixed_colorbuffer_formats``: Whether mixed colorbuffer formats are supported, e.g. RGBA8 and RGBA32F as the first and second colorbuffer, resp. -* ``PIPE_CAP_VERTEX_COLOR_UNCLAMPED``: Whether the driver is capable of +* ``pipe_caps.vertex_color_unclamped``: Whether the driver is capable of outputting unclamped vertex colors from a vertex shader. If unsupported, the vertex colors are always clamped. This is the default for DX9 hardware. -* ``PIPE_CAP_VERTEX_COLOR_CLAMPED``: Whether the driver is capable of +* ``pipe_caps.vertex_color_clamped``: Whether the driver is capable of clamping vertex colors when they come out of a vertex shader, as specified by the pipe_rasterizer_state::clamp_vertex_color flag. If unsupported, the vertex colors are never clamped. This is the default for DX10 hardware. @@ -104,31 +100,31 @@ The integer capabilities: controlled through pipe_rasterizer_state. If the driver cannot do vertex color clamping, gallium frontends may insert clamping code into the vertex shader. -* ``PIPE_CAP_GLSL_FEATURE_LEVEL``: Whether the driver supports features +* ``pipe_caps.glsl_feature_level``: Whether the driver supports features equivalent to a specific GLSL version. E.g. for GLSL 1.3, report 130. -* ``PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY``: Whether the driver supports +* ``pipe_caps.glsl_feature_level_compatibility``: Whether the driver supports features equivalent to a specific GLSL version including all legacy OpenGL features only present in the OpenGL compatibility profile. The only legacy features that Gallium drivers must implement are the legacy shader inputs and outputs (colors, texcoords, fog, clipvertex, edge flag). -* ``PIPE_CAP_ESSL_FEATURE_LEVEL``: An optional cap to allow drivers to +* ``pipe_caps.essl_feature_level``: An optional cap to allow drivers to report a higher GLSL version for GLES contexts. This is useful when a driver does not support all the required features for a higher GL version, but does support the required features for a higher GLES version. A driver - is allowed to return ``0`` in which case ``PIPE_CAP_GLSL_FEATURE_LEVEL`` is + is allowed to return ``0`` in which case ``pipe_caps.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 :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 +* ``pipe_caps.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 +* ``pipe_caps.user_vertex_buffers``: Whether the driver supports user vertex buffers. If not, gallium frontends must upload all data which is not in HW resources. If user-space buffers are supported, the driver must also still accept HW resource buffers. -* ``PIPE_CAP_VERTEX_INPUT_ALIGNMENT``: This CAP describes a HW +* ``pipe_caps.vertex_input_alignment``: This CAP describes a HW limitation. If ``PIPE_VERTEX_INPUT_ALIGNMENT_4BYTE```, pipe_vertex_buffer::buffer_offset must always be aligned @@ -141,37 +137,37 @@ The integer capabilities: must always be aligned to the component size for the vertex attributes which access that buffer. If ``PIPE_VERTEX_INPUT_ALIGNMENT_NONE``, there are no restrictions on these values. -* ``PIPE_CAP_COMPUTE``: Whether the implementation supports the +* ``pipe_caps.compute``: Whether the implementation supports the compute entry points defined in pipe_context and pipe_screen. -* ``PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT``: Describes the required +* ``pipe_caps.constant_buffer_offset_alignment``: Describes the required alignment of pipe_constant_buffer::buffer_offset. -* ``PIPE_CAP_START_INSTANCE``: Whether the driver supports +* ``pipe_caps.start_instance``: Whether the driver supports pipe_draw_info::start_instance. -* ``PIPE_CAP_QUERY_TIMESTAMP``: Whether PIPE_QUERY_TIMESTAMP and +* ``pipe_caps.query_timestamp``: Whether PIPE_QUERY_TIMESTAMP and the pipe_screen::get_timestamp hook are implemented. -* ``PIPE_CAP_QUERY_TIMESTAMP_BITS``: How many bits the driver uses for the +* ``pipe_caps.query_timestamp_bits``: How many bits the driver uses for the results of GL_TIMESTAMP queries. -* ``PIPE_CAP_TIMER_RESOLUTION``: The resolution of the timer in nanos. -* ``PIPE_CAP_TEXTURE_MULTISAMPLE``: Whether all MSAA resources supported +* ``pipe_caps.timer_resolution``: The resolution of the timer in nanos. +* ``pipe_caps.texture_multisample``: Whether all MSAA resources supported for rendering are also supported for texturing. -* ``PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT``: The minimum alignment that should be +* ``pipe_caps.min_map_buffer_alignment``: The minimum alignment that should be expected for a pointer returned by transfer_map if the resource is PIPE_BUFFER. In other words, the pointer returned by transfer_map is always aligned to this value. -* ``PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT``: Describes the required +* ``pipe_caps.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 +* ``pipe_caps.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 +* ``pipe_caps.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 +* ``pipe_caps.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 in the sampler view have no effect. -* ``PIPE_CAP_TGSI_TEXCOORD``: This CAP describes a HW limitation. +* ``pipe_caps.tgsi_texcoord``: This CAP describes a HW limitation. If true, the hardware cannot replace arbitrary shader inputs with sprite coordinates and hence the inputs that are desired to be replaceable must be declared with TGSI_SEMANTIC_TEXCOORD instead of TGSI_SEMANTIC_GENERIC. @@ -179,16 +175,16 @@ 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_TRANSFER_MODES``: The ``pipe_texture_transfer_mode`` modes +* ``pipe_caps.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 dedicated memory should return PIPE_TEXTURE_TRANSFER_BLIT and all software rasterizers should return PIPE_TEXTURE_TRANSFER_DEFAULT. PIPE_TEXTURE_TRANSFER_COMPUTE requires drivers to support 8bit and 16bit shader storage buffer writes and to implement pipe_screen::is_compute_copy_faster. -* ``PIPE_CAP_QUERY_PIPELINE_STATISTICS``: Whether PIPE_QUERY_PIPELINE_STATISTICS +* ``pipe_caps.query_pipeline_statistics``: Whether PIPE_QUERY_PIPELINE_STATISTICS is supported. -* ``PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK``: Bitmask indicating whether special +* ``pipe_caps.texture_border_color_quirk``: Bitmask indicating whether special considerations have to be given to the interaction between the border color in the sampler object and the sampler view used with it. If PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 is set, the border color @@ -199,116 +195,116 @@ The integer capabilities: state should be swizzled manually according to the swizzle in the sampler view it is intended to be used with, or herein undefined results may occur for permutational swizzles. -* ``PIPE_CAP_MAX_TEXEL_BUFFER_ELEMENTS_UINT``: The maximum accessible number of +* ``pipe_caps.max_texel_buffer_elements_uint``: The maximum accessible number of elements within a sampler buffer view and image buffer view. This is unsigned integer with the maximum of 4G - 1. -* ``PIPE_CAP_MAX_VIEWPORTS``: The maximum number of viewports (and scissors +* ``pipe_caps.max_viewports``: The maximum number of viewports (and scissors since they are linked) a driver can support. Returning 0 is equivalent to returning 1 because every driver has to support at least a single viewport/scissor combination. -* ``PIPE_CAP_ENDIANNESS``:: The endianness of the device. Either +* ``pipe_caps.endianness``:: The endianness of the device. Either PIPE_ENDIAN_BIG or PIPE_ENDIAN_LITTLE. -* ``PIPE_CAP_MIXED_FRAMEBUFFER_SIZES``: Whether it is allowed to have +* ``pipe_caps.mixed_framebuffer_sizes``: Whether it is allowed to have different sizes for fb color/zs attachments. This controls whether :ext:`GL_ARB_framebuffer_object` is provided. -* ``PIPE_CAP_VS_LAYER_VIEWPORT``: Whether ``VARYING_SLOT_LAYER`` and +* ``pipe_caps.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. -* ``PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES``: The maximum number of vertices +* ``pipe_caps.max_geometry_output_vertices``: The maximum number of vertices output by a single invocation of a geometry shader. -* ``PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS``: The maximum number of +* ``pipe_caps.max_geometry_total_output_components``: The maximum number of vertex components output by a single invocation of a geometry shader. This is the product of the number of attribute components per vertex and the number of output vertices. -* ``PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS``: Max number of components +* ``pipe_caps.max_texture_gather_components``: Max number of components in format that texture gather can operate on. 1 == RED, ALPHA etc, 4 == All formats. -* ``PIPE_CAP_TEXTURE_GATHER_SM5``: Whether the texture gather +* ``pipe_caps.texture_gather_sm5``: Whether the texture gather hardware implements the SM5 features, component selection, shadow comparison, and run-time offsets. -* ``PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT``: Whether +* ``pipe_caps.buffer_map_persistent_coherent``: Whether PIPE_MAP_PERSISTENT and PIPE_MAP_COHERENT are supported for buffers. -* ``PIPE_CAP_TEXTURE_QUERY_LOD``: Whether the ``LODQ`` instruction is +* ``pipe_caps.texture_query_lod``: Whether the ``LODQ`` instruction is supported. -* ``PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET``: The minimum offset that can be used +* ``pipe_caps.min_texture_gather_offset``: The minimum offset that can be used in conjunction with a texture gather opcode. -* ``PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET``: The maximum offset that can be used +* ``pipe_caps.max_texture_gather_offset``: The maximum offset that can be used in conjunction with a texture gather opcode. -* ``PIPE_CAP_SAMPLE_SHADING``: Whether there is support for per-sample +* ``pipe_caps.sample_shading``: Whether there is support for per-sample shading. The context->set_min_samples function will be expected to be implemented. -* ``PIPE_CAP_TEXTURE_GATHER_OFFSETS``: Whether the ``TG4`` instruction can +* ``pipe_caps.texture_gather_offsets``: Whether the ``TG4`` instruction can accept 4 offsets. -* ``PIPE_CAP_VS_WINDOW_SPACE_POSITION``: Whether window-space position is +* ``pipe_caps.vs_window_space_position``: Whether window-space position is supported, which disables clipping and viewport transformation. -* ``PIPE_CAP_MAX_VERTEX_STREAMS``: The maximum number of vertex streams +* ``pipe_caps.max_vertex_streams``: The maximum number of vertex streams supported by the geometry shader. If stream-out is supported, this should be at least 1. If stream-out is not supported, this should be 0. -* ``PIPE_CAP_DRAW_INDIRECT``: Whether the driver supports taking draw arguments +* ``pipe_caps.draw_indirect``: Whether the driver supports taking draw arguments { count, instance_count, start, index_bias } from a PIPE_BUFFER resource. See pipe_draw_info. -* ``PIPE_CAP_MULTI_DRAW_INDIRECT``: Whether the driver supports +* ``pipe_caps.multi_draw_indirect``: Whether the driver supports pipe_draw_info::indirect_stride and ::indirect_count -* ``PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS``: Whether the driver supports +* ``pipe_caps.multi_draw_indirect_params``: Whether the driver supports taking the number of indirect draws from a separate parameter buffer, see pipe_draw_indirect_info::indirect_draw_count. -* ``PIPE_CAP_MULTI_DRAW_INDIRECT_PARTIAL_STRIDE``: Whether the driver supports +* ``pipe_caps.multi_draw_indirect_partial_stride``: Whether the driver supports indirect draws with an arbitrary stride. -* ``PIPE_CAP_FS_FINE_DERIVATIVE``: Whether the fragment shader supports +* ``pipe_caps.fs_fine_derivative``: Whether the fragment shader supports the FINE versions of DDX/DDY. -* ``PIPE_CAP_VENDOR_ID``: The vendor ID of the underlying hardware. If it's +* ``pipe_caps.vendor_id``: The vendor ID of the underlying hardware. If it's not available one should return 0xFFFFFFFF. -* ``PIPE_CAP_DEVICE_ID``: The device ID (PCI ID) of the underlying hardware. +* ``pipe_caps.device_id``: The device ID (PCI ID) of the underlying hardware. 0xFFFFFFFF if not available. -* ``PIPE_CAP_ACCELERATED``: Whether the renderer is hardware accelerated. 0 means +* ``pipe_caps.accelerated``: Whether the renderer is hardware accelerated. 0 means not accelerated (i.e. CPU rendering), 1 means accelerated (i.e. GPU rendering), -1 means unknown (i.e. an API translation driver which doesn't known what kind of hardware it's running above). -* ``PIPE_CAP_VIDEO_MEMORY``: The amount of video memory in megabytes. -* ``PIPE_CAP_UMA``: If the device has a unified memory architecture or on-card +* ``pipe_caps.video_memory``: The amount of video memory in megabytes. +* ``pipe_caps.uma``: If the device has a unified memory architecture or on-card memory and GART. -* ``PIPE_CAP_CONDITIONAL_RENDER_INVERTED``: Whether the driver supports inverted +* ``pipe_caps.conditional_render_inverted``: Whether the driver supports inverted condition for conditional rendering. -* ``PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE``: The maximum supported vertex stride. -* ``PIPE_CAP_SAMPLER_VIEW_TARGET``: Whether the sampler view's target can be +* ``pipe_caps.max_vertex_attrib_stride``: The maximum supported vertex stride. +* ``pipe_caps.sampler_view_target``: Whether the sampler view's target can be different than the underlying resource's, as permitted by :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_caps.clip_halfz``: Whether the driver supports the pipe_rasterizer_state::clip_halfz being set to true. This is required for enabling :ext:`GL_ARB_clip_control`. -* ``PIPE_CAP_POLYGON_OFFSET_CLAMP``: If true, the driver implements support +* ``pipe_caps.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 +* ``pipe_caps.multisample_z_resolve``: Whether the driver supports blitting a multisampled depth buffer into a single-sampled texture (or depth buffer). Only the first sampled should be copied. -* ``PIPE_CAP_RESOURCE_FROM_USER_MEMORY``: Whether the driver can create +* ``pipe_caps.resource_from_user_memory``: Whether the driver can create a pipe_resource where an already-existing piece of (malloc'd) user memory is used as its backing storage. In other words, whether the driver can map existing user memory into the device address space for direct device access. The create function is pipe_screen::resource_from_user_memory. The address and size must be page-aligned. -* ``PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY``: Same as - ``PIPE_CAP_RESOURCE_FROM_USER_MEMORY`` but indicates it is only supported from +* ``pipe_caps.resource_from_user_memory_compute_only``: Same as + ``pipe_caps.resource_from_user_memory`` but indicates it is only supported from the compute engines. -* ``PIPE_CAP_DEVICE_RESET_STATUS_QUERY``: +* ``pipe_caps.device_reset_status_query``: Whether pipe_context::get_device_reset_status is implemented. -* ``PIPE_CAP_MAX_SHADER_PATCH_VARYINGS``: +* ``pipe_caps.max_shader_patch_varyings``: How many per-patch outputs and inputs are supported between tessellation control and tessellation evaluation shaders, not counting in TESSINNER and TESSOUTER. The minimum allowed value for OpenGL is 30. -* ``PIPE_CAP_TEXTURE_FLOAT_LINEAR``: Whether the linear minification and +* ``pipe_caps.texture_float_linear``: Whether the linear minification and magnification filters are supported with single-precision floating-point textures. -* ``PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR``: Whether the linear minification and +* ``pipe_caps.texture_half_float_linear``: Whether the linear minification and magnification filters are supported with half-precision floating-point textures. -* ``PIPE_CAP_DEPTH_BOUNDS_TEST``: Whether bounds_test, bounds_min, and +* ``pipe_caps.depth_bounds_test``: Whether bounds_test, bounds_min, and bounds_max states of pipe_depth_stencil_alpha_state behave according 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 +* ``pipe_caps.texture_query_samples``: Whether the ``TXQS`` opcode is supported +* ``pipe_caps.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 (:ext:`GL_ARB_sample_shading`). GL4-level sample @@ -316,84 +312,84 @@ The integer capabilities: 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_caps.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``: +* ``pipe_caps.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_SCISSORED``: Whether ``clear`` can accept a scissored +* ``pipe_caps.clear_scissored``: Whether ``clear`` can accept a scissored bounding box. -* ``PIPE_CAP_DRAW_PARAMETERS``: Whether ``TGSI_SEMANTIC_BASEVERTEX``, +* ``pipe_caps.draw_parameters``: Whether ``TGSI_SEMANTIC_BASEVERTEX``, ``TGSI_SEMANTIC_BASEINSTANCE``, and ``TGSI_SEMANTIC_DRAWID`` are supported in vertex shaders. -* ``PIPE_CAP_SHADER_PACK_HALF_FLOAT``: Whether packed 16-bit float +* ``pipe_caps.shader_pack_half_float``: Whether packed 16-bit float packing/unpacking opcodes are supported. -* ``PIPE_CAP_FS_POSITION_IS_SYSVAL``: If gallium frontends should use a +* ``pipe_caps.fs_position_is_sysval``: If gallium frontends should use a system value for the POSITION fragment shader input. -* ``PIPE_CAP_FS_POINT_IS_SYSVAL``: If gallium frontends should use a system +* ``pipe_caps.fs_point_is_sysval``: If gallium frontends should use a system value for the POINT fragment shader input. -* ``PIPE_CAP_FS_FACE_IS_INTEGER_SYSVAL``: If gallium frontends should use +* ``pipe_caps.fs_face_is_integer_sysval``: If gallium frontends should use a system value for the FACE fragment shader input. Also, the FACE system value is integer, not float. -* ``PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT``: Describes the required +* ``pipe_caps.shader_buffer_offset_alignment``: Describes the required alignment for pipe_shader_buffer::buffer_offset, in bytes. Maximum value allowed is 256 (for GL conformance). 0 is only allowed if shader buffers are not supported. -* ``PIPE_CAP_INVALIDATE_BUFFER``: Whether the use of ``invalidate_resource`` +* ``pipe_caps.invalidate_buffer``: Whether the use of ``invalidate_resource`` for buffers is supported. -* ``PIPE_CAP_GENERATE_MIPMAP``: Indicates whether pipe_context::generate_mipmap +* ``pipe_caps.generate_mipmap``: Indicates whether pipe_context::generate_mipmap is supported. -* ``PIPE_CAP_STRING_MARKER``: Whether pipe->emit_string_marker() is supported. -* ``PIPE_CAP_SURFACE_REINTERPRET_BLOCKS``: Indicates whether +* ``pipe_caps.string_marker``: Whether pipe->emit_string_marker() is supported. +* ``pipe_caps.surface_reinterpret_blocks``: Indicates whether pipe_context::create_surface supports reinterpreting a texture as a surface of a format with different block width/height (but same block size in bits). For example, a compressed texture image can be interpreted as a non-compressed surface whose texels are the same number of bits as the compressed blocks, and vice versa. The width and height of the surface is adjusted appropriately. -* ``PIPE_CAP_QUERY_BUFFER_OBJECT``: Driver supports +* ``pipe_caps.query_buffer_object``: Driver supports context::get_query_result_resource callback. -* ``PIPE_CAP_PCI_GROUP``: Return the PCI segment group number. -* ``PIPE_CAP_PCI_BUS``: Return the PCI bus number. -* ``PIPE_CAP_PCI_DEVICE``: Return the PCI device number. -* ``PIPE_CAP_PCI_FUNCTION``: Return the PCI function number. -* ``PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT``: +* ``pipe_caps.pci_group``: Return the PCI segment group number. +* ``pipe_caps.pci_bus``: Return the PCI bus number. +* ``pipe_caps.pci_device``: Return the PCI device number. +* ``pipe_caps.pci_function``: Return the PCI function number. +* ``pipe_caps.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 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`` + primitive on a layer is obtained from ``pipe_caps.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 +* ``pipe_caps.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 :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 +* ``pipe_caps.cull_distance``: Whether the driver supports the :ext:`GL_ARB_cull_distance` extension and thus implements proper support for culling planes. -* ``PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES``: Whether primitive restart is +* ``pipe_caps.primitive_restart_for_patches``: Whether primitive restart is supported for patch primitives. -* ``PIPE_CAP_SHADER_GROUP_VOTE``: Whether the ``VOTE_*`` ops can be used in +* ``pipe_caps.shader_group_vote``: Whether the ``VOTE_*`` ops can be used in shaders. -* ``PIPE_CAP_MAX_WINDOW_RECTANGLES``: The maximum number of window rectangles +* ``pipe_caps.max_window_rectangles``: The maximum number of window rectangles supported in ``set_window_rectangles``. -* ``PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED``: If true, the driver implements support +* ``pipe_caps.polygon_offset_units_unscaled``: If true, the driver implements support for ``pipe_rasterizer_state::offset_units_unscaled``. -* ``PIPE_CAP_VIEWPORT_SUBPIXEL_BITS``: Number of bits of subpixel precision for +* ``pipe_caps.viewport_subpixel_bits``: Number of bits of subpixel precision for floating point viewport bounds. -* ``PIPE_CAP_RASTERIZER_SUBPIXEL_BITS``: Number of bits of subpixel precision used +* ``pipe_caps.rasterizer_subpixel_bits``: Number of bits of subpixel precision used by the rasterizer. -* ``PIPE_CAP_MIXED_COLOR_DEPTH_BITS``: Whether there is non-fallback +* ``pipe_caps.mixed_color_depth_bits``: Whether there is non-fallback support for color/depth format combinations that use a different number of bits. For the purpose of this cap, Z24 is treated as 32-bit. If set to off, that means that a B5G6R5 + Z24 or RGBA8 + Z16 combination will require a driver fallback, and should not be advertised in the GLX/EGL config list. -* ``PIPE_CAP_SHADER_ARRAY_COMPONENTS``: If true, the driver interprets the +* ``pipe_caps.shader_array_components``: If true, the driver interprets the UsageMask of input and output declarations and allows declaring arrays in overlapping ranges. The components must be a contiguous range, e.g. a UsageMask of xy or yzw is allowed, but xz or yw isn't. Declarations with @@ -401,67 +397,67 @@ 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 +* ``pipe_caps.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 +* ``pipe_caps.stream_output_interleave_buffers``: Whether interleaved stream output mode is able to interleave across buffers. This is required for :ext:`GL_ARB_transform_feedback3`. -* ``PIPE_CAP_FBFETCH``: The number of render targets whose value in the +* ``pipe_caps.fbfetch``: The number of render targets whose value in the current framebuffer can be read in the shader. 0 means framebuffer fetch is not supported. 1 means that only the first render target can be read, and a larger value would mean that multiple render targets are supported. -* ``PIPE_CAP_FBFETCH_COHERENT``: Whether framebuffer fetches from the fragment +* ``pipe_caps.fbfetch_coherent``: Whether framebuffer fetches from the fragment shader can be guaranteed to be coherent with framebuffer writes. -* ``PIPE_CAP_FBFETCH_ZS``: Whether fragment shader can fetch current values of +* ``pipe_caps.fbfetch_zs``: Whether fragment shader can fetch current values of Z/S attachments. These fetches are always coherent with framebuffer writes. -* ``PIPE_CAP_LEGACY_MATH_RULES``: Whether NIR shaders support the +* ``pipe_caps.legacy_math_rules``: Whether NIR shaders support the ``shader_info.use_legacy_math_rules`` flag (see documentation there), and TGSI shaders support the corresponding ``TGSI_PROPERTY_LEGACY_MATH_RULES``. -* ``PIPE_CAP_FP16``: Whether 16-bit float operations are supported. -* ``PIPE_CAP_DOUBLES``: Whether double precision floating-point operations +* ``pipe_caps.fp16``: Whether 16-bit float operations are supported. +* ``pipe_caps.doubles``: Whether double precision floating-point operations are supported. -* ``PIPE_CAP_INT64``: Whether 64-bit integer operations are supported. -* ``PIPE_CAP_TGSI_TEX_TXF_LZ``: Whether TEX_LZ and TXF_LZ opcodes are +* ``pipe_caps.int64``: Whether 64-bit integer operations are supported. +* ``pipe_caps.tgsi_tex_txf_lz``: Whether TEX_LZ and TXF_LZ opcodes are supported. -* ``PIPE_CAP_SHADER_CLOCK``: Whether the CLOCK opcode is supported. -* ``PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE``: Whether the +* ``pipe_caps.shader_clock``: Whether the CLOCK opcode is supported. +* ``pipe_caps.polygon_mode_fill_rectangle``: Whether the PIPE_POLYGON_MODE_FILL_RECTANGLE mode is supported for ``pipe_rasterizer_state::fill_front`` and ``pipe_rasterizer_state::fill_back``. -* ``PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE``: The page size of sparse buffers in +* ``pipe_caps.sparse_buffer_page_size``: The page size of sparse buffers in bytes, or 0 if sparse buffers are not supported. The page size must be at most 64KB. -* ``PIPE_CAP_SHADER_BALLOT``: Whether the BALLOT and READ_* opcodes as well as +* ``pipe_caps.shader_ballot``: Whether the BALLOT and READ_* opcodes as well as the SUBGROUP_* semantics are supported. -* ``PIPE_CAP_TES_LAYER_VIEWPORT``: Whether ``VARYING_SLOT_LAYER`` and +* ``pipe_caps.tes_layer_viewport``: Whether ``VARYING_SLOT_LAYER`` and ``VARYING_SLOT_VIEWPORT`` are supported as tessellation evaluation shader outputs. -* ``PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX``: Whether a buffer with just +* ``pipe_caps.can_bind_const_buffer_as_vertex``: Whether a buffer with just PIPE_BIND_CONSTANT_BUFFER can be legally passed to set_vertex_buffers. -* ``PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION``: As the name says. -* ``PIPE_CAP_POST_DEPTH_COVERAGE``: whether +* ``pipe_caps.allow_mapped_buffers_during_execution``: As the name says. +* ``pipe_caps.post_depth_coverage``: whether ``TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE`` is supported. -* ``PIPE_CAP_BINDLESS_TEXTURE``: Whether bindless texture operations are +* ``pipe_caps.bindless_texture``: Whether bindless texture operations are supported. -* ``PIPE_CAP_NIR_SAMPLERS_AS_DEREF``: Whether NIR tex instructions should +* ``pipe_caps.nir_samplers_as_deref``: Whether NIR tex instructions should reference texture and sampler as NIR derefs instead of by indices. -* ``PIPE_CAP_QUERY_SO_OVERFLOW``: Whether the +* ``pipe_caps.query_so_overflow``: Whether the ``PIPE_QUERY_SO_OVERFLOW_PREDICATE`` and ``PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE`` query types are supported. Note that for a driver that does not support multiple output streams (i.e., - ``PIPE_CAP_MAX_VERTEX_STREAMS`` is 1), both query types are identical. -* ``PIPE_CAP_MEMOBJ``: Whether operations on memory objects are supported. -* ``PIPE_CAP_LOAD_CONSTBUF``: True if the driver supports ``TGSI_OPCODE_LOAD`` use + ``pipe_caps.max_vertex_streams`` is 1), both query types are identical. +* ``pipe_caps.memobj``: Whether operations on memory objects are supported. +* ``pipe_caps.load_constbuf``: True if the driver supports ``TGSI_OPCODE_LOAD`` use with constant buffers. -* ``PIPE_CAP_TILE_RASTER_ORDER``: Whether the driver supports +* ``pipe_caps.tile_raster_order``: Whether the driver supports :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 +* ``pipe_caps.max_combined_shader_output_resources``: Limit on combined shader output resources (images + buffers + fragment outputs). If 0 the state tracker works it out. -* ``PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS``: This determines limitations +* ``pipe_caps.framebuffer_msaa_constraints``: This determines limitations on the number of samples that framebuffer attachments can have. Possible values: @@ -474,211 +470,202 @@ The integer capabilities: All color attachments must have the same number of samples and the same number of storage samples. -* ``PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET``: +* ``pipe_caps.signed_vertex_buffer_offset``: Whether pipe_vertex_buffer::buffer_offset is treated as signed. The u_vbuf module needs this for optimal performance in workstation applications. -* ``PIPE_CAP_CONTEXT_PRIORITY_MASK``: For drivers that support per-context +* ``pipe_caps.context_priority_mask``: For drivers that support per-context priorities, this returns a bitmask of ``PIPE_CONTEXT_PRIORITY_x`` for the supported priority levels. A driver that does not support prioritized contexts can return 0. -* ``PIPE_CAP_FENCE_SIGNAL``: True if the driver supports signaling semaphores +* ``pipe_caps.fence_signal``: True if the driver supports signaling semaphores using fence_server_signal(). -* ``PIPE_CAP_CONSTBUF0_FLAGS``: The bits of pipe_resource::flags that must be +* ``pipe_caps.constbuf0_flags``: The bits of pipe_resource::flags that must be set when binding that buffer as constant buffer 0. If the buffer doesn't have those bits set, pipe_context::set_constant_buffer(.., 0, ..) is ignored by the driver, and the driver can throw assertion failures. -* ``PIPE_CAP_PACKED_UNIFORMS``: True if the driver supports packed uniforms +* ``pipe_caps.packed_uniforms``: True if the driver supports packed uniforms as opposed to padding to vec4s. Requires ``PIPE_SHADER_CAP_INTEGERS`` if ``lower_uniforms_to_ubo`` is set. -* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES``: Whether the +* ``pipe_caps.conservative_raster_post_snap_triangles``: Whether the ``PIPE_CONSERVATIVE_RASTER_POST_SNAP`` mode is supported for triangles. The post-snap mode means the conservative rasterization occurs after the conversion from floating-point to fixed-point coordinates on the subpixel grid. -* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES``: Whether the +* ``pipe_caps.conservative_raster_post_snap_points_lines``: Whether the ``PIPE_CONSERVATIVE_RASTER_POST_SNAP`` mode is supported for points and lines. -* ``PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES``: Whether the +* ``pipe_caps.conservative_raster_pre_snap_triangles``: Whether the ``PIPE_CONSERVATIVE_RASTER_PRE_SNAP`` mode is supported for triangles. The pre-snap mode means the conservative rasterization occurs before the conversion from floating-point to fixed-point coordinates. -* ``PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES``: Whether the +* ``pipe_caps.conservative_raster_pre_snap_points_lines``: Whether the ``PIPE_CONSERVATIVE_RASTER_PRE_SNAP`` mode is supported for points and lines. -* ``PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE``: Whether - ``PIPE_CAP_POST_DEPTH_COVERAGE`` works with conservative rasterization. -* ``PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE``: Whether +* ``pipe_caps.conservative_raster_post_depth_coverage``: Whether + ``pipe_caps.post_depth_coverage`` works with conservative rasterization. +* ``pipe_caps.conservative_raster_inner_coverage``: Whether inner_coverage from :ext:`GL_INTEL_conservative_rasterization` is supported. -* ``PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS``: The maximum +* ``pipe_caps.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 +* ``pipe_caps.programmable_sample_locations``: True is the driver supports programmable sample location through ```get_sample_pixel_grid``` and ```set_sample_locations```. -* ``PIPE_CAP_MAX_GS_INVOCATIONS``: Maximum supported value of +* ``pipe_caps.max_gs_invocations``: Maximum supported value of TGSI_PROPERTY_GS_INVOCATIONS. -* ``PIPE_CAP_MAX_SHADER_BUFFER_SIZE_UINT``: Maximum supported size for binding +* ``pipe_caps.max_shader_buffer_size_uint``: Maximum supported size for binding with set_shader_buffers. This is unsigned integer with the maximum of 4GB - 1. -* ``PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS``: Maximum total number of shader +* ``pipe_caps.max_combined_shader_buffers``: Maximum total number of shader buffers. A value of 0 means the sum of all per-shader stage maximums (see ``PIPE_SHADER_CAP_MAX_SHADER_BUFFERS``). -* ``PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS``: Maximum total number of atomic +* ``pipe_caps.max_combined_hw_atomic_counters``: Maximum total number of atomic counters. A value of 0 means the default value (MAX_ATOMIC_COUNTERS = 4096). -* ``PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS``: Maximum total number of +* ``pipe_caps.max_combined_hw_atomic_counter_buffers``: Maximum total number of atomic counter buffers. A value of 0 means the sum of all per-shader stage maximums (see ``PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS``). -* ``PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET``: Maximum recommend memory size +* ``pipe_caps.max_texture_upload_memory_budget``: Maximum recommend memory size for all active texture uploads combined. This is a performance hint. 0 means no limit. -* ``PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET``: The maximum supported value for +* ``pipe_caps.max_vertex_element_src_offset``: The maximum supported value for of pipe_vertex_element::src_offset. -* ``PIPE_CAP_SURFACE_SAMPLE_COUNT``: Whether the driver +* ``pipe_caps.surface_sample_count``: Whether the driver supports pipe_surface overrides of resource nr_samples. If set, will enable :ext:`GL_EXT_multisampled_render_to_texture`. -* ``PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD``: Atomic floating point adds are +* ``pipe_caps.image_atomic_float_add``: Atomic floating point adds are supported on images, buffers, and shared memory. -* ``PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS``: True if the driver wants TESSINNER and TESSOUTER to be inputs (rather than system values) for tessellation evaluation shaders. -* ``PIPE_CAP_DEST_SURFACE_SRGB_CONTROL``: Indicates whether the drivers +* ``pipe_caps.glsl_tess_levels_as_inputs``: True if the driver wants TESSINNER and TESSOUTER to be inputs (rather than system values) for tessellation evaluation shaders. +* ``pipe_caps.dest_surface_srgb_control``: Indicates whether the drivers supports switching the format between sRGB and linear for a surface that is used as destination in draw and blit calls. -* ``PIPE_CAP_MAX_VARYINGS``: The maximum number of fragment shader +* ``pipe_caps.max_varyings``: The maximum number of fragment shader varyings. This will generally correspond to ``PIPE_SHADER_CAP_MAX_INPUTS`` for the fragment shader, but in some cases may be a smaller number. -* ``PIPE_CAP_COMPUTE_GRID_INFO_LAST_BLOCK``: Whether pipe_grid_info::last_block +* ``pipe_caps.compute_grid_info_last_block``: Whether pipe_grid_info::last_block is implemented by the driver. See struct pipe_grid_info for more details. -* ``PIPE_CAP_COMPUTE_SHADER_DERIVATIVE``: True if the driver supports derivatives (and texture lookups with implicit derivatives) in compute shaders. -* ``PIPE_CAP_IMAGE_LOAD_FORMATTED``: True if a format for image loads does not need to be specified in the shader IR -* ``PIPE_CAP_IMAGE_STORE_FORMATTED``: True if a format for image stores does not need to be specified in the shader IR -* ``PIPE_CAP_THROTTLE``: Whether or not gallium frontends should throttle pipe_context +* ``pipe_caps.compute_shader_derivative``: True if the driver supports derivatives (and texture lookups with implicit derivatives) in compute shaders. +* ``pipe_caps.image_load_formatted``: True if a format for image loads does not need to be specified in the shader IR +* ``pipe_caps.image_store_formatted``: True if a format for image stores does not need to be specified in the shader IR +* ``pipe_caps.throttle``: Whether or not gallium frontends should throttle pipe_context execution. 0 = throttling is disabled. -* ``PIPE_CAP_DMABUF``: Whether Linux DMABUF handles are supported by +* ``pipe_caps.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_CL_GL_SHARING``: True if driver supports everything required by a frontend implementing the CL extension, and +* ``pipe_caps.cl_gl_sharing``: True if driver supports everything required by a frontend implementing the CL extension, and also supports importing/exporting all of pipe_texture_target via dma buffers. -* ``PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA``: Whether VDPAU and VAAPI +* ``pipe_caps.prefer_compute_for_multimedia``: Whether VDPAU and VAAPI 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 +* ``pipe_caps.fragment_shader_interlock``: True if fragment shader interlock functionality is supported. -* ``PIPE_CAP_ATOMIC_FLOAT_MINMAX``: Atomic float point minimum, +* ``pipe_caps.atomic_float_minmax``: Atomic float point minimum, maximum, exchange and compare-and-swap support to buffer and shared variables. -* ``PIPE_CAP_TGSI_DIV``: Whether opcode DIV is supported -* ``PIPE_CAP_DITHERING``: Whether dithering is supported -* ``PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD``: Whether texture lookups with +* ``pipe_caps.tgsi_div``: Whether opcode DIV is supported +* ``pipe_caps.dithering``: Whether dithering is supported +* ``pipe_caps.fragment_shader_texture_lod``: Whether texture lookups with explicit LOD is supported in the fragment shader. -* ``PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES``: True if the driver supports +* ``pipe_caps.fragment_shader_derivatives``: True if the driver supports derivatives in fragment shaders. -* ``PIPE_CAP_TEXTURE_SHADOW_LOD``: True if the driver supports shadow sampler +* ``pipe_caps.texture_shadow_lod``: True if the driver supports shadow sampler types with texture functions having interaction with LOD of texture lookup. -* ``PIPE_CAP_SHADER_SAMPLES_IDENTICAL``: True if the driver supports a shader query to tell whether all samples of a multisampled surface are definitely identical. -* ``PIPE_CAP_IMAGE_ATOMIC_INC_WRAP``: Atomic increment/decrement + wrap around +* ``pipe_caps.shader_samples_identical``: True if the driver supports a shader query to tell whether all samples of a multisampled surface are definitely identical. +* ``pipe_caps.image_atomic_inc_wrap``: Atomic increment/decrement + wrap around are supported. -* ``PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF``: True if gallium frontends should +* ``pipe_caps.prefer_imm_arrays_as_constbuf``: True if gallium frontends should 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 :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. -* ``PIPE_CAP_FLATSHADE``: Driver supports pipe_rasterizer_state::flatshade. Must be 1 +* ``pipe_caps.gl_spirv``: True if the driver supports :ext:`GL_ARB_gl_spirv` extension. +* ``pipe_caps.gl_spirv_variable_pointers``: True if the driver supports Variable Pointers in SPIR-V shaders. +* ``pipe_caps.demote_to_helper_invocation``: True if driver supports demote keyword in GLSL programs. +* ``pipe_caps.tgsi_tg4_component_in_swizzle``: True if driver wants the TG4 component encoded in sampler swizzle rather than as a separate source. +* ``pipe_caps.flatshade``: Driver supports pipe_rasterizer_state::flatshade. Must be 1 for non-NIR drivers or gallium nine. -* ``PIPE_CAP_ALPHA_TEST``: Driver supports alpha-testing. Must be 1 +* ``pipe_caps.alpha_test``: Driver supports alpha-testing. Must be 1 for non-NIR drivers or gallium nine. If set, frontend may set ``pipe_depth_stencil_alpha_state->alpha_enabled`` and ``alpha_func``. Otherwise, alpha test will be lowered to a comparison and discard_if in the fragment shader. -* ``PIPE_CAP_POINT_SIZE_FIXED``: Driver supports point-sizes that are fixed, +* ``pipe_caps.point_size_fixed``: Driver supports point-sizes that are fixed, as opposed to writing gl_PointSize for every point. -* ``PIPE_CAP_TWO_SIDED_COLOR``: Driver supports two-sided coloring. Must be 1 +* ``pipe_caps.two_sided_color``: Driver supports two-sided coloring. Must be 1 for non-NIR drivers. If set, pipe_rasterizer_state may be set to indicate that back-facing primitives should use the back-side color as the FS input color. If unset, mesa/st will lower it to gl_FrontFacing reads in the fragment shader. -* ``PIPE_CAP_CLIP_PLANES``: Driver supports user-defined clip-planes. 0 denotes none, 1 denotes MAX_CLIP_PLANES. > 1 overrides MAX. When is 0, pipe_rasterizer_state::clip_plane_enable is unused. -* ``PIPE_CAP_MAX_VERTEX_BUFFERS``: Number of supported vertex buffers. -* ``PIPE_CAP_OPENCL_INTEGER_FUNCTIONS``: Driver supports extended OpenCL-style integer functions. This includes average, saturating addition, saturating subtraction, absolute difference, count leading zeros, and count trailing zeros. -* ``PIPE_CAP_INTEGER_MULTIPLY_32X16``: Driver supports integer multiplication between a 32-bit integer and a 16-bit integer. If the second operand is 32-bits, the upper 16-bits are ignored, and the low 16-bits are possibly sign extended as necessary. -* ``PIPE_CAP_NIR_IMAGES_AS_DEREF``: Whether NIR image load/store intrinsics should be nir_intrinsic_image_deref_* instead of nir_intrinsic_image_*. Defaults to true. -* ``PIPE_CAP_PACKED_STREAM_OUTPUT``: Driver supports packing optimization for stream output (e.g. GL transform feedback captured variables). Defaults to true. -* ``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 :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 :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_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 (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 code-path 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_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 ``mesa_prim`` enum values that the driver can natively support. -* ``PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART``: A bitmask of the ``mesa_prim`` 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_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 :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 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_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_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_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_HAS_CONST_BW``: Whether the driver only supports non-data-dependent layouts (ie. not bandwidth compressed formats like AFBC, UBWC, etc), or supports ``PIPE_BIND_CONST_BW`` to disable data-dependent layouts on requested resources. -* ``PIPE_CAP_PERFORMANCE_MONITOR``: Whether GL_AMD_performance_monitor should be exposed. -* ``PIPE_CAP_TEXTURE_SAMPLER_INDEPENDENT``: Whether sampler views and sampler states are independent objects, meaning both can be freely mixed and matched by the frontend. This isn't required for OpenGL where on the shader level those are the same object. However for proper gallium nine and OpenCL support this is required. -* ``PIPE_CAP_ASTC_DECODE_MODE``: Whether the driver supports ASTC decode precision. The :ext:`GL_EXT_texture_compression_astc_decode_mode` extension will only get exposed if :ext:`GL_KHR_texture_compression_astc_ldr` is also supported. -* ``PIPE_CAP_SHADER_SUBGROUP_SIZE``: A fixed subgroup size shader runs on GPU when GLSL GL_KHR_shader_subgroup_* extensions are enabled. -* ``PIPE_CAP_SHADER_SUBGROUP_SUPPORTED_STAGES``: Bitmask of shader stages which support GL_KHR_shader_subgroup_* intrinsics. -* ``PIPE_CAP_SHADER_SUBGROUP_SUPPORTED_FEATURES``: Bitmask of shader subgroup features listed in :ext:`GL_KHR_shader_subgroup`. -* ``PIPE_CAP_SHADER_SUBGROUP_QUAD_ALL_STAGES``: Whether shader subgroup quad operations are supported by shader stages other than fragment shader. -* ``PIPE_CAP_MULTIVIEW``: Whether multiview rendering of array textures is supported. A return of ``1`` indicates support for OVR_multiview, and ``2`` additionally supports OVR_multiview2. -* ``PIPE_CAP_CALL_FINALIZE_NIR_IN_LINKER``: Whether ``pipe_screen::finalize_nir`` can be called in the GLSL linker before the NIR is stored in the shader cache. It's always called again after st/mesa adds code for shader variants. It must be 1 if the driver wants to report compile failures to the GLSL linker. It must be 0 if two consecutive ``finalize_nir`` calls on the same shader can break it, or if ``finalize_nir`` can't handle NIR that isn't fully lowered for the driver, or if ``finalize_nir`` breaks passes that st/mesa runs after it. Setting it to 1 is generally safe for drivers that expose nir_io_has_intrinsics and that don't enable any optional shader variants in st/mesa. Since it's difficult to support, any future refactoring can change it to 0. - - -.. _pipe_capf: - -PIPE_CAPF_* -^^^^^^^^^^^^^^^^ - -The floating-point capabilities are: - -* ``PIPE_CAPF_MIN_LINE_WIDTH``: The minimum width of a regular line. -* ``PIPE_CAPF_MIN_LINE_WIDTH_AA``: The minimum width of a smoothed line. -* ``PIPE_CAPF_MAX_LINE_WIDTH``: The maximum width of a regular line. -* ``PIPE_CAPF_MAX_LINE_WIDTH_AA``: The maximum width of a smoothed line. -* ``PIPE_CAPF_LINE_WIDTH_GRANULARITY``: The line width is rounded to a multiple of this number. -* ``PIPE_CAPF_MIN_POINT_SIZE``: The minimum width and height of a point. -* ``PIPE_CAPF_MIN_POINT_SIZE_AA``: The minimum width and height of a smoothed point. -* ``PIPE_CAPF_MAX_POINT_SIZE``: The maximum width and height of a point. -* ``PIPE_CAPF_MAX_POINT_SIZE_AA``: The maximum width and height of a smoothed point. -* ``PIPE_CAPF_POINT_SIZE_GRANULARITY``: The point size is rounded to a multiple of this number. -* ``PIPE_CAPF_MAX_TEXTURE_ANISOTROPY``: The maximum level of anisotropy that can be +* ``pipe_caps.clip_planes``: Driver supports user-defined clip-planes. 0 denotes none, 1 denotes MAX_CLIP_PLANES. > 1 overrides MAX. When is 0, pipe_rasterizer_state::clip_plane_enable is unused. +* ``pipe_caps.max_vertex_buffers``: Number of supported vertex buffers. +* ``pipe_caps.opencl_integer_functions``: Driver supports extended OpenCL-style integer functions. This includes average, saturating addition, saturating subtraction, absolute difference, count leading zeros, and count trailing zeros. +* ``pipe_caps.integer_multiply_32x16``: Driver supports integer multiplication between a 32-bit integer and a 16-bit integer. If the second operand is 32-bits, the upper 16-bits are ignored, and the low 16-bits are possibly sign extended as necessary. +* ``pipe_caps.nir_images_as_deref``: Whether NIR image load/store intrinsics should be nir_intrinsic_image_deref_* instead of nir_intrinsic_image_*. Defaults to true. +* ``pipe_caps.packed_stream_output``: Driver supports packing optimization for stream output (e.g. GL transform feedback captured variables). Defaults to true. +* ``pipe_caps.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_caps.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_caps.gl_begin_end_buffer_size``: Buffer size used to upload vertices for glBegin/glEnd. +* ``pipe_caps.viewport_swizzle``: Whether pipe_viewport_state::swizzle can be used to specify pre-clipping swizzling of coordinates (see :ext:`GL_NV_viewport_swizzle`). +* ``pipe_caps.system_svm``: True if all application memory can be shared with the GPU without explicit mapping. +* ``pipe_caps.viewport_mask``: Whether ``TGSI_SEMANTIC_VIEWPORT_MASK`` and ``TGSI_PROPERTY_LAYER_VIEWPORT_RELATIVE`` are supported (see :ext:`GL_NV_viewport_array2`). +* ``pipe_caps.map_unsynchronized_thread_safe``: Whether mapping a buffer as unsynchronized from any thread is safe. +* ``pipe_caps.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_caps.blend_equation_advanced``: Driver supports blend equation advanced without necessarily supporting FBFETCH. +* ``pipe_caps.nir_atomics_as_deref``: Whether NIR atomics instructions should reference atomics as NIR derefs instead of by indices. +* ``pipe_caps.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_caps.max_texture_mb``: Maximum texture size in MB (default is 1024) +* ``pipe_caps.device_protected_surface``: Whether the device support protected / encrypted content. +* ``pipe_caps.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 code-path in a gallium frontend for drivers that really prefer a real buffer. +* ``pipe_caps.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_caps.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_caps.sampler_reduction_minmax``: Driver supports EXT min/max sampler reduction. +* ``pipe_caps.sampler_reduction_minmax_arb``: Driver supports ARB min/max sampler reduction with format queries. +* ``pipe_caps.emulate_nonfixed_primitive_restart``: Driver requests all draws using a non-fixed restart index to be rewritten to use a fixed restart index. +* ``pipe_caps.supported_prim_modes``: A bitmask of the ``mesa_prim`` enum values that the driver can natively support. +* ``pipe_caps.supported_prim_modes_with_restart``: A bitmask of the ``mesa_prim`` enum values that the driver can natively support for primitive restart. Only useful if ``pipe_caps.primitive_restart`` is also exported. +* ``pipe_caps.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_caps.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_caps.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_caps.max_sparse_texture_size``: Maximum 1D/2D/rectangle texture image dimension for a sparse texture. +* ``pipe_caps.max_sparse_3d_texture_size``: Maximum 3D texture image dimension for a sparse texture. +* ``pipe_caps.max_sparse_array_texture_layers``: Maximum number of layers in a sparse array texture. +* ``pipe_caps.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_caps.query_sparse_texture_residency``: TRUE if shader sparse texture sample instruction could also return the residency information. +* ``pipe_caps.clamp_sparse_texture_lod``: TRUE if shader sparse texture sample instruction support clamp the minimal lod to prevent read from uncommitted pages. +* ``pipe_caps.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_caps.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_caps.hardware_gl_select``: Enable hardware accelerated GL_SELECT for this driver. +* ``pipe_caps.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_caps.device_protected_surface`` does not require any particular context to do so). +* ``pipe_caps.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_caps.null_textures`` : Whether the driver supports sampling from NULL textures. +* ``pipe_caps.astc_void_extents_need_denorm_flush`` : True if the driver/hardware needs denormalized values in ASTC void extent blocks flushed to zero. +* ``pipe_caps.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_caps.has_const_bw``: Whether the driver only supports non-data-dependent layouts (ie. not bandwidth compressed formats like AFBC, UBWC, etc), or supports ``PIPE_BIND_CONST_BW`` to disable data-dependent layouts on requested resources. +* ``pipe_caps.performance_monitor``: Whether GL_AMD_performance_monitor should be exposed. +* ``pipe_caps.texture_sampler_independent``: Whether sampler views and sampler states are independent objects, meaning both can be freely mixed and matched by the frontend. This isn't required for OpenGL where on the shader level those are the same object. However for proper gallium nine and OpenCL support this is required. +* ``pipe_caps.astc_decode_mode``: Whether the driver supports ASTC decode precision. The :ext:`GL_EXT_texture_compression_astc_decode_mode` extension will only get exposed if :ext:`GL_KHR_texture_compression_astc_ldr` is also supported. +* ``pipe_caps.shader_subgroup_size``: A fixed subgroup size shader runs on GPU when GLSL GL_KHR_shader_subgroup_* extensions are enabled. +* ``pipe_caps.shader_subgroup_supported_stages``: Bitmask of shader stages which support GL_KHR_shader_subgroup_* intrinsics. +* ``pipe_caps.shader_subgroup_supported_features``: Bitmask of shader subgroup features listed in :ext:`GL_KHR_shader_subgroup`. +* ``pipe_caps.shader_subgroup_quad_all_stages``: Whether shader subgroup quad operations are supported by shader stages other than fragment shader. +* ``pipe_caps.multiview``: Whether multiview rendering of array textures is supported. A return of ``1`` indicates support for OVR_multiview, and ``2`` additionally supports OVR_multiview2. +* ``pipe_caps.call_finalize_nir_in_linker``: Whether ``pipe_screen::finalize_nir`` can be called in the GLSL linker before the NIR is stored in the shader cache. It's always called again after st/mesa adds code for shader variants. It must be 1 if the driver wants to report compile failures to the GLSL linker. It must be 0 if two consecutive ``finalize_nir`` calls on the same shader can break it, or if ``finalize_nir`` can't handle NIR that isn't fully lowered for the driver, or if ``finalize_nir`` breaks passes that st/mesa runs after it. Setting it to 1 is generally safe for drivers that expose nir_io_has_intrinsics and that don't enable any optional shader variants in st/mesa. Since it's difficult to support, any future refactoring can change it to 0. +* ``pipe_caps.min_line_width``: The minimum width of a regular line. +* ``pipe_caps.min_line_width_aa``: The minimum width of a smoothed line. +* ``pipe_caps.max_line_width``: The maximum width of a regular line. +* ``pipe_caps.max_line_width_aa``: The maximum width of a smoothed line. +* ``pipe_caps.line_width_granularity``: The line width is rounded to a multiple of this number. +* ``pipe_caps.min_point_size``: The minimum width and height of a point. +* ``pipe_caps.min_point_size_aa``: The minimum width and height of a smoothed point. +* ``pipe_caps.max_point_size``: The maximum width and height of a point. +* ``pipe_caps.max_point_size_aa``: The maximum width and height of a smoothed point. +* ``pipe_caps.point_size_granularity``: The point size is rounded to a multiple of this number. +* ``pipe_caps.max_texture_anisotropy``: The maximum level of anisotropy that can be applied to anisotropically filtered textures. -* ``PIPE_CAPF_MAX_TEXTURE_LOD_BIAS``: The maximum :term:`LOD` bias that may be applied +* ``pipe_caps.max_texture_lod_bias``: The maximum :term:`LOD` bias that may be applied to filtered textures. -* ``PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE``: The minimum conservative rasterization +* ``pipe_caps.min_conservative_raster_dilate``: The minimum conservative rasterization dilation. -* ``PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE``: The maximum conservative rasterization +* ``pipe_caps.max_conservative_raster_dilate``: The maximum conservative rasterization dilation. -* ``PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY``: The conservative rasterization +* ``pipe_caps.conservative_raster_dilate_granularity``: The conservative rasterization dilation granularity for values relative to the minimum dilation. @@ -905,24 +892,6 @@ Returns the actual vendor of the device driving the screen The returned string should remain valid and immutable for the lifetime of pipe_screen. -.. _get_param: - -get_param -^^^^^^^^^ - -Get an integer/boolean screen parameter. - -**param** is one of the :ref:`PIPE_CAP` names. - -.. _get_paramf: - -get_paramf -^^^^^^^^^^ - -Get a floating-point screen parameter. - -**param** is one of the :ref:`PIPE_CAPF` names. - context_create ^^^^^^^^^^^^^^ diff --git a/docs/gallium/tgsi.rst b/docs/gallium/tgsi.rst index 24b023eb8bc..3179aa28499 100644 --- a/docs/gallium/tgsi.rst +++ b/docs/gallium/tgsi.rst @@ -398,7 +398,7 @@ used. .. opcode:: DDX, DDX_FINE - Derivative Relative To X - The fine variant is only used when ``PIPE_CAP_FS_FINE_DERIVATIVE`` is + The fine variant is only used when ``pipe_caps.fs_fine_derivative`` is advertised. When it is, the fine version guarantees one derivative per row while DDX is allowed to be the same for the entire 2x2 quad. @@ -415,7 +415,7 @@ used. .. opcode:: DDY, DDY_FINE - Derivative Relative To Y - The fine variant is only used when ``PIPE_CAP_FS_FINE_DERIVATIVE`` is + The fine variant is only used when ``pipe_caps.fs_fine_derivative`` is advertised. When it is, the fine version guarantees one derivative per column while DDY is allowed to be the same for the entire 2x2 quad. @@ -991,13 +991,13 @@ XXX doesn't look like most of the opcodes really belong here. 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 + pipe_caps.texture_sm5 enhances this instruction to support shadow per-sample depth compares, single component selection, and a non-constant offset. It doesn't allow support for the GL independent offset to get i0,j0. This would require another CAP is HW can do it natively. For now we lower that before TGSI. - PIPE_CAP_TGSI_TG4_COMPONENT_IN_SWIZZLE changes the encoding so that component + pipe_caps.tgsi_tg4_component_in_swizzle changes the encoding so that component is stored in the sampler source swizzle x. (without TGSI_TG4_COMPONENT_IN_SWIZZLE) @@ -2653,7 +2653,7 @@ Bindless Opcodes ^^^^^^^^^^^^^^^^ These opcodes are for working with bindless sampler or image handles and -require PIPE_CAP_BINDLESS_TEXTURE. +require pipe_caps.bindless_texture. .. opcode:: IMG2HND - Get a bindless handle for a image @@ -3190,7 +3190,7 @@ When using this semantic, be sure to set the appropriate state in the TGSI_SEMANTIC_TEXCOORD """""""""""""""""""""" -Only available if PIPE_CAP_TGSI_TEXCOORD is exposed ! +Only available if pipe_caps.tgsi_texcoord is exposed ! Vertex shader outputs and fragment shader inputs may be labeled with this semantic to make them replaceable by sprite coordinates via the @@ -3206,7 +3206,7 @@ The intended use case for this semantic is gl_TexCoord. TGSI_SEMANTIC_PCOORD """""""""""""""""""" -Only available if PIPE_CAP_TGSI_TEXCOORD is exposed ! +Only available if pipe_caps.tgsi_texcoord is exposed ! Fragment shader inputs may be labeled with TGSI_SEMANTIC_PCOORD to indicate that the register contains sprite coordinates in the form (x, y, 0, 1), if @@ -3276,7 +3276,7 @@ For geometry shaders, this semantic label indicates that an output contains the index of the viewport (and scissor) to use. This is an integer value, and only the X component is used. -If PIPE_CAP_VS_LAYER_VIEWPORT or PIPE_CAP_TES_LAYER_VIEWPORT is +If pipe_caps.vs_layer_viewport or pipe_caps.tes_layer_viewport is supported, then this semantic label can also be used in vertex or tessellation evaluation shaders, respectively. Only the value written in the last vertex processing stage is used. @@ -3290,7 +3290,7 @@ contains the layer value to use for the color and depth/stencil surfaces. This is an integer value, and only the X component is used. (Also known as rendertarget array index.) -If PIPE_CAP_VS_LAYER_VIEWPORT or PIPE_CAP_TES_LAYER_VIEWPORT is +If pipe_caps.vs_layer_viewport or pipe_caps.tes_layer_viewport is supported, then this semantic label can also be used in vertex or tessellation evaluation shaders, respectively. Only the value written in the last vertex processing stage is used. diff --git a/docs/submittingpatches.rst b/docs/submittingpatches.rst index cf2739139b3..b5346303773 100644 --- a/docs/submittingpatches.rst +++ b/docs/submittingpatches.rst @@ -35,7 +35,7 @@ Patch formatting mesa: Add support for querying GL_VERTEX_ATTRIB_ARRAY_LONG - gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERY + gallium: add pipe_caps.device_reset_status_query i965: Fix missing type in local variable declaration. diff --git a/src/compiler/glsl/gl_nir_linker.c b/src/compiler/glsl/gl_nir_linker.c index 3a6cd376528..83f589c2e1d 100644 --- a/src/compiler/glsl/gl_nir_linker.c +++ b/src/compiler/glsl/gl_nir_linker.c @@ -1414,7 +1414,7 @@ prelink_lowering(const struct gl_constants *consts, struct gl_program *prog = shader->Program; /* NIR drivers that support tess shaders and compact arrays need to use - * GLSLTessLevelsAsInputs / PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS. The NIR + * GLSLTessLevelsAsInputs / pipe_caps.glsl_tess_levels_as_inputs. The NIR * linker doesn't support linking these as compat arrays of sysvals. */ assert(consts->GLSLTessLevelsAsInputs || !options->compact_arrays || diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h index ee80e8db5b4..f518ae9e394 100644 --- a/src/compiler/glsl_types.h +++ b/src/compiler/glsl_types.h @@ -1166,7 +1166,7 @@ unsigned glsl_type_get_image_count(const glsl_type *t); * * This is the underlying recursive type_size function for * count_attribute_slots() (vertex inputs and varyings) but also for - * gallium's !PIPE_CAP_PACKED_UNIFORMS case. + * gallium's !pipe_caps.packed_uniforms case. */ unsigned glsl_count_vec4_slots(const glsl_type *t, bool is_gl_vertex_input, bool is_bindless); @@ -1174,7 +1174,7 @@ unsigned glsl_count_vec4_slots(const glsl_type *t, bool is_gl_vertex_input, bool * Calculate the number of vec4 slots required to hold this type. * * This is the underlying recursive type_size function for - * gallium's PIPE_CAP_PACKED_UNIFORMS case. + * gallium's pipe_caps.packed_uniforms case. */ unsigned glsl_count_dword_slots(const glsl_type *t, bool is_bindless); diff --git a/src/compiler/nir/nir_lower_frag_coord_to_pixel_coord.c b/src/compiler/nir/nir_lower_frag_coord_to_pixel_coord.c index fea6a670b7d..870385862da 100644 --- a/src/compiler/nir/nir_lower_frag_coord_to_pixel_coord.c +++ b/src/compiler/nir/nir_lower_frag_coord_to_pixel_coord.c @@ -14,7 +14,7 @@ lower(nir_builder *b, nir_intrinsic_instr *intr, UNUSED void *data) return false; /* Note: frag_coord should already have pixel-center lowering applied with - * nir_lower_wpos_center for VK, or PIPE_CAP_PIXEL_CENTER_INTEGER for GL. + * nir_lower_wpos_center for VK, or pipe_caps.pixel_center_integer for GL. */ b->cursor = nir_before_instr(&intr->instr); nir_def *xy = nir_u2f32(b, nir_load_pixel_coord(b)); diff --git a/src/compiler/nir/nir_lower_ubo_vec4.c b/src/compiler/nir/nir_lower_ubo_vec4.c index 5b81fdd53e5..6d387955e11 100644 --- a/src/compiler/nir/nir_lower_ubo_vec4.c +++ b/src/compiler/nir/nir_lower_ubo_vec4.c @@ -35,10 +35,10 @@ * * but not: * - * - GLSL 4.30's new packed mode (enabled by PIPE_CAP_LOAD_CONSTBUF) where + * - GLSL 4.30's new packed mode (enabled by pipe_caps.load_constbuf) where * vec3 arrays are packed tightly. * - * - PackedDriverUniformStorage in GL (enabled by PIPE_CAP_PACKED_UNIFORMS) + * - PackedDriverUniformStorage in GL (enabled by pipe_caps.packed_uniforms) * combined with nir_lower_uniforms_to_ubo, where values in the default * uniform block are packed tightly. * diff --git a/src/compiler/nir/nir_lower_uniforms_to_ubo.c b/src/compiler/nir/nir_lower_uniforms_to_ubo.c index 06ddc143e45..148cb21bead 100644 --- a/src/compiler/nir/nir_lower_uniforms_to_ubo.c +++ b/src/compiler/nir/nir_lower_uniforms_to_ubo.c @@ -26,7 +26,7 @@ * of UBO binding point 0. Simultaneously, remap existing UBO accesses by * increasing their binding point by 1. * - * For PIPE_CAP_PACKED_UNIFORMS, dword_packed should be set to indicate that + * For pipe_caps.packed_uniforms, dword_packed should be set to indicate that * nir_intrinsic_load_uniform is in increments of dwords instead of vec4s. * * If load_vec4 is set, then nir_intrinsic_load_ubo_vec4 will be generated @@ -78,7 +78,7 @@ nir_lower_uniforms_to_ubo_instr(nir_builder *b, nir_instr *instr, void *data) load_result = nir_load_ubo_vec4(b, intr->num_components, intr->def.bit_size, ubo_idx, uniform_offset, .base = nir_intrinsic_base(intr)); } else { - /* For PIPE_CAP_PACKED_UNIFORMS, the uniforms are packed with the + /* For pipe_caps.packed_uniforms, the uniforms are packed with the * base/offset in dword units instead of vec4 units. */ int multiplier = state->dword_packed ? 4 : 16; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_gather.c b/src/gallium/auxiliary/gallivm/lp_bld_gather.c index 48cc190afb0..6bdec2c74ea 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_gather.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_gather.c @@ -105,9 +105,9 @@ lp_build_gather_elem(struct gallivm_state *gallivm, * two >= 32). On x86 it doesn't matter, however. * We should be able to guarantee full alignment for any kind of texture * fetch (except ARB_texture_buffer_range, oops), but not vertex fetch - * (there's PIPE_CAP_VERTEX_INPUT_ALIGNMENT + * (there's pipe_caps.vertex_input_alignment * but I don't think that's quite what we wanted). - * For ARB_texture_buffer_range, PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT + * For ARB_texture_buffer_range, pipe_caps.texture_buffer_offset_alignment * looks like a good fit, but it seems this cap bit (and OpenGL) aren't * enforcing what we want (which is what d3d10 does, the offset needs to * be aligned to element size, but GL has bytes regardless of element @@ -185,9 +185,9 @@ lp_build_gather_elem_vec(struct gallivm_state *gallivm, * two >= 32). On x86 it doesn't matter, however. * We should be able to guarantee full alignment for any kind of texture * fetch (except ARB_texture_buffer_range, oops), but not vertex fetch - * (there's PIPE_CAP_VERTEX_INPUT_ALIGNMENT + * (there's pipe_caps.vertex_input_alignment * but I don't think that's quite what we wanted). - * For ARB_texture_buffer_range, PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT + * For ARB_texture_buffer_range, pipe_caps.texture_buffer_offset_alignment * looks like a good fit, but it seems this cap bit (and OpenGL) aren't * enforcing what we want (which is what d3d10 does, the offset needs to * be aligned to element size, but GL has bytes regardless of element diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi.c b/src/gallium/auxiliary/nir/nir_to_tgsi.c index 38fd0286c6a..43ccc42e849 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi.c @@ -1896,7 +1896,7 @@ ntt_emit_load_ubo(struct ntt_compile *c, nir_intrinsic_instr *instr) } if (instr->intrinsic == nir_intrinsic_load_ubo_vec4) { - /* !PIPE_CAP_LOAD_CONSTBUF: Just emit it as a vec4 reference to the const + /* !pipe_caps.load_constbuf: Just emit it as a vec4 reference to the const * file. */ src.Index = nir_intrinsic_base(instr); @@ -1916,7 +1916,7 @@ ntt_emit_load_ubo(struct ntt_compile *c, nir_intrinsic_instr *instr) ntt_store(c, &instr->def, src); } else { - /* PIPE_CAP_LOAD_CONSTBUF: Not necessarily vec4 aligned, emit a + /* pipe_caps.load_constbuf: Not necessarily vec4 aligned, emit a * TGSI_OPCODE_LOAD instruction from the const file. */ struct ntt_insn *insn = diff --git a/src/gallium/auxiliary/util/u_blitter.h b/src/gallium/auxiliary/util/u_blitter.h index 92adde9107c..38d403ced5e 100644 --- a/src/gallium/auxiliary/util/u_blitter.h +++ b/src/gallium/auxiliary/util/u_blitter.h @@ -171,7 +171,7 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter) } /** - * Override PIPE_CAP_TEXTURE_MULTISAMPLE as reported by the driver. + * Override pipe_caps.texture_multisample as reported by the driver. */ void util_blitter_set_texture_multisample(struct blitter_context *blitter, bool supported); diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c index 5281f54c189..0ed41648189 100644 --- a/src/gallium/auxiliary/util/u_framebuffer.c +++ b/src/gallium/auxiliary/util/u_framebuffer.c @@ -245,7 +245,7 @@ util_framebuffer_get_num_samples(const struct pipe_framebuffer_state *fb) return MAX2(fb->samples, 1); /** - * If a driver doesn't advertise PIPE_CAP_SURFACE_SAMPLE_COUNT, + * If a driver doesn't advertise pipe_caps.surface_sample_count, * pipe_surface::nr_samples will always be 0. */ for (i = 0; i < fb->nr_cbufs; i++) { diff --git a/src/gallium/auxiliary/util/u_helpers.h b/src/gallium/auxiliary/util/u_helpers.h index 55ed33a29cc..f377ad4a7d8 100644 --- a/src/gallium/auxiliary/util/u_helpers.h +++ b/src/gallium/auxiliary/util/u_helpers.h @@ -67,7 +67,7 @@ util_lower_uint64_vertex_elements(const struct pipe_vertex_element **velems, /* Helper function to determine if the varying should contain the point * coordinates, given the sprite_coord_enable mask. Requires - * PIPE_CAP_TGSI_TEXCOORD to be enabled. + * pipe_caps.tgsi_texcoord to be enabled. */ static inline bool util_varying_is_point_coord(gl_varying_slot slot, uint32_t sprite_coord_enable) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 93a3ce0425a..a3e296129a4 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -755,7 +755,7 @@ agx_prepare_for_map(struct agx_context *ctx, struct agx_resource *rsrc, /* Everything after this needs the context, which is not safe for * unsynchronized transfers when we claim - * PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE. + * pipe_caps.map_unsynchronized_thread_safe. */ assert(!(usage & PIPE_MAP_UNSYNCHRONIZED)); @@ -1084,7 +1084,7 @@ agx_clear(struct pipe_context *pctx, unsigned buffers, unsigned fastclear = buffers & ~(batch->draw | batch->load); unsigned slowclear = buffers & ~fastclear; - assert(scissor_state == NULL && "we don't support PIPE_CAP_CLEAR_SCISSORED"); + assert(scissor_state == NULL && "we don't support pipe_caps.clear_scissored"); /* Fast clears configure the batch */ for (unsigned rt = 0; rt < PIPE_MAX_COLOR_BUFS; ++rt) { diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c index fa618178f56..e75741320e0 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_state.c +++ b/src/gallium/drivers/etnaviv/etnaviv_state.c @@ -669,7 +669,7 @@ etna_vertex_elements_state_create(struct pipe_context *pctx, if (nonconsecutive) start_offset = elements[idx].src_offset; - /* guaranteed by PIPE_CAP_MAX_VERTEX_BUFFERS */ + /* guaranteed by pipe_caps.max_vertex_buffers */ assert(buffer_idx < screen->info->gpu.stream_count); /* maximum vertex size is 256 bytes */ diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c index 29da0aa9bc5..eb5fad4febd 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c @@ -34,7 +34,7 @@ tex_clamp(unsigned wrap, bool *needs_border) case PIPE_TEX_WRAP_MIRROR_CLAMP: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: /* these two we could perhaps emulate, but we currently - * just don't advertise PIPE_CAP_TEXTURE_MIRROR_CLAMP + * just don't advertise pipe_caps.texture_mirror_clamp */ default: DBG("invalid wrap: %u", wrap); diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c index fbca9520cba..9074d5ff598 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c @@ -34,7 +34,7 @@ tex_clamp(unsigned wrap, bool *needs_border) case PIPE_TEX_WRAP_MIRROR_CLAMP: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: /* these two we could perhaps emulate, but we currently - * just don't advertise PIPE_CAP_TEXTURE_MIRROR_CLAMP + * just don't advertise pipe_caps.texture_mirror_clamp */ default: DBG("invalid wrap: %u", wrap); diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c index 2e283fd5142..e0b69558cbb 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_texture.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_texture.c @@ -34,7 +34,7 @@ tex_clamp(unsigned wrap, bool *needs_border) case PIPE_TEX_WRAP_MIRROR_CLAMP: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: /* these two we could perhaps emulate, but we currently - * just don't advertise PIPE_CAP_TEXTURE_MIRROR_CLAMP + * just don't advertise pipe_caps.texture_mirror_clamp */ default: DBG("invalid wrap: %u", wrap); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc b/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc index e14f1016e94..db15c589962 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.cc @@ -51,7 +51,7 @@ tex_clamp(unsigned wrap, bool *needs_border) case PIPE_TEX_WRAP_MIRROR_CLAMP: case PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER: /* these two we could perhaps emulate, but we currently - * just don't advertise PIPE_CAP_TEXTURE_MIRROR_CLAMP + * just don't advertise pipe_caps.texture_mirror_clamp */ default: DBG("invalid wrap: %u", wrap); diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index c56a97bee0e..302afa9ae84 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -2585,7 +2585,7 @@ iris_transfer_unmap(struct pipe_context *ctx, struct pipe_transfer *xfer) * The pipe->texture_subdata() driver hook. * * Mesa's state tracker takes this path whenever possible, even with - * PIPE_CAP_TEXTURE_TRANSFER_MODES set. + * pipe_caps.texture_transfer_modes set. */ static void iris_texture_subdata(struct pipe_context *ctx, diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c index e64f1e88c1a..d95bdd3ba5e 100644 --- a/src/gallium/drivers/lima/lima_draw.c +++ b/src/gallium/drivers/lima/lima_draw.c @@ -588,7 +588,7 @@ lima_pack_render_state(struct lima_context *ctx, const struct pipe_draw_info *in bool pixel_kill = true; /* do hw support RGBA independ blend? - * PIPE_CAP_INDEP_BLEND_ENABLE + * pipe_caps.indep_blend_enable * * how to handle the no cbuf only zbuf case? */ diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index cdd78e29778..b5166430815 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -965,7 +965,7 @@ panfrost_map_constant_buffer_gpu(struct panfrost_batch *batch, panfrost_batch_read_rsrc(batch, rsrc, st); /* Alignment gauranteed by - * PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT */ + * pipe_caps.constant_buffer_offset_alignment */ return rsrc->image.data.base + cb->buffer_offset; } else if (cb->user_buffer) { return pan_pool_upload_aligned(&batch->pool.base, diff --git a/src/gallium/drivers/r300/compiler/nir_to_rc.c b/src/gallium/drivers/r300/compiler/nir_to_rc.c index e788a9cf0a5..9d233c0d0a9 100644 --- a/src/gallium/drivers/r300/compiler/nir_to_rc.c +++ b/src/gallium/drivers/r300/compiler/nir_to_rc.c @@ -1314,7 +1314,7 @@ ntr_emit_load_ubo(struct ntr_compile *c, nir_intrinsic_instr *instr) src = ureg_src_dimension_indirect(src, ntr_reladdr(c, ureg_src(addr_temp), 1), c->first_ubo); } - /* !PIPE_CAP_LOAD_CONSTBUF: Just emit it as a vec4 reference to the const + /* !pipe_caps.load_constbuf: Just emit it as a vec4 reference to the const * file. */ src.Index = nir_intrinsic_base(instr); diff --git a/src/gallium/drivers/svga/svga_pipe_rasterizer.c b/src/gallium/drivers/svga/svga_pipe_rasterizer.c index d0013895129..7143d91203c 100644 --- a/src/gallium/drivers/svga/svga_pipe_rasterizer.c +++ b/src/gallium/drivers/svga/svga_pipe_rasterizer.c @@ -93,7 +93,7 @@ svga_define_rasterizer_object(struct svga_context *svga, const unsigned cull_mode = translate_cull_mode(rast->templ.cull_face); const int depth_bias = rast->templ.offset_units; const float slope_scaled_depth_bias = rast->templ.offset_scale; - /* PIPE_CAP_POLYGON_OFFSET_CLAMP not supported: */ + /* pipe_caps.polygon_offset_clamp not supported: */ const float depth_bias_clamp = 0.0; const float line_width = rast->templ.line_width > 0.0f ? rast->templ.line_width : 1.0f; diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 77e73cb279e..73b9c07de5d 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -8877,7 +8877,7 @@ emit_tg4(struct svga_shader_emitter_v10 *emit, } else { /* Only a single channel is supported in SM4_1 and we report - * PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS = 1. + * pipe_caps.max_texture_gather_components = 1. * Only the 0th component will be gathered. */ switch (emit->key.tex[unit].swizzle_r) { @@ -11190,7 +11190,7 @@ emit_instruction(struct svga_shader_emitter_v10 *emit, return emit_dtrunc(emit, inst); /* The following opcodes should never be seen here. We return zero - * for PIPE_CAP_TGSI_DROUND_SUPPORTED. + * for pipe_caps.tgsi_dround_supported. */ case TGSI_OPCODE_LDEXP: case TGSI_OPCODE_DSSG: diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c index c7362a14264..c03fa8c7ea3 100644 --- a/src/gallium/drivers/v3d/v3d_job.c +++ b/src/gallium/drivers/v3d/v3d_job.c @@ -632,7 +632,7 @@ v3d_job_submit(struct v3d_context *v3d, struct v3d_job *job) v3d_X(devinfo, bcl_epilogue)(v3d, job); if (v3d->in_fence_fd >= 0) { - /* PIPE_CAP_NATIVE_FENCE */ + /* pipe_caps.native_fence */ if (drmSyncobjImportSyncFile(v3d->fd, v3d->in_syncobj, v3d->in_fence_fd)) { fprintf(stderr, "Failed to import native fence.\n"); diff --git a/src/gallium/drivers/v3d/v3d_program.c b/src/gallium/drivers/v3d/v3d_program.c index 26718a67e76..bf31ecff639 100644 --- a/src/gallium/drivers/v3d/v3d_program.c +++ b/src/gallium/drivers/v3d/v3d_program.c @@ -402,7 +402,7 @@ v3d_uncompiled_shader_create(struct pipe_context *pctx, NIR_PASS(_, s, nir_lower_frexp); - /* Since we can't expose PIPE_CAP_PACKED_UNIFORMS the state tracker + /* Since we can't expose pipe_caps.packed_uniforms the state tracker * will produce uniform intrinsics with offsets in vec4 units but * our compiler expects to work in units of bytes. */ diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs index b86a4610f59..ca335005169 100644 --- a/src/gallium/frontends/rusticl/core/kernel.rs +++ b/src/gallium/frontends/rusticl/core/kernel.rs @@ -440,7 +440,7 @@ struct NirKernelBuild { compiled_args: Vec, } -// SAFETY: `CSOWrapper` is only safe to use if the device supports `PIPE_CAP_SHAREABLE_SHADERS` and +// SAFETY: `CSOWrapper` is only safe to use if the device supports `pipe_caps.shareable_shaders` and // we make sure to set `nir_or_cso` to `KernelDevStateVariant::Cso` only if that's the case. unsafe impl Send for NirKernelBuild {} unsafe impl Sync for NirKernelBuild {} diff --git a/src/gallium/frontends/wgl/stw_device.h b/src/gallium/frontends/wgl/stw_device.h index 6b53a161304..578d8d876c5 100644 --- a/src/gallium/frontends/wgl/stw_device.h +++ b/src/gallium/frontends/wgl/stw_device.h @@ -55,7 +55,7 @@ struct stw_device bool screen_initialized; struct pipe_screen *screen; - /* Cache some PIPE_CAP_* */ + /* Cache some pipe_caps.* */ unsigned max_2d_length; struct pipe_frontend_screen *fscreen; diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h index d3705c30ec9..6e689b91ec0 100644 --- a/src/gallium/include/pipe/p_context.h +++ b/src/gallium/include/pipe/p_context.h @@ -139,8 +139,8 @@ struct pipe_context { * * Caps: * - Always supported: Direct multi draws - * - PIPE_CAP_MULTI_DRAW_INDIRECT: Indirect multi draws - * - PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS: Indirect draw count + * - pipe_caps.multi_draw_indirect: Indirect multi draws + * - pipe_caps.multi_draw_indirect_params: Indirect draw count * * Differences against glMultiDraw and glMultiMode: * - "info->mode" and "draws->index_bias" are always constant due to the lack @@ -1087,7 +1087,7 @@ struct pipe_context { * * (2) implement GL's InvalidateBufferData. For backwards compatibility, * you must only rely on the usability for this purpose when - * PIPE_CAP_INVALIDATE_BUFFER is enabled. + * pipe_caps.invalidate_buffer is enabled. */ void (*invalidate_resource)(struct pipe_context *ctx, struct pipe_resource *resource); diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 1239fc601a6..eb24989f15f 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -496,7 +496,7 @@ enum pipe_flush_flags #define PIPE_BIND_SHARED (1 << 20) /* get_texture_handle ??? */ #define PIPE_BIND_LINEAR (1 << 21) #define PIPE_BIND_PROTECTED (1 << 22) /* Resource will be protected/encrypted */ -#define PIPE_BIND_SAMPLER_REDUCTION_MINMAX (1 << 23) /* PIPE_CAP_SAMPLER_REDUCTION_MINMAX */ +#define PIPE_BIND_SAMPLER_REDUCTION_MINMAX (1 << 23) /* pipe_caps.sampler_reduction_minmax */ /* Resource is the DRI_PRIME blit destination. Only set on on the render GPU. */ #define PIPE_BIND_PRIME_BLIT_DST (1 << 24) #define PIPE_BIND_USE_FRONT_RENDERING (1 << 25) /* Resource may be used for frontbuffer rendering */ @@ -707,7 +707,7 @@ enum pipe_texture_transfer_mode { }; /** - * Possible bits for PIPE_CAP_CONTEXT_PRIORITY_MASK param, which should + * Possible bits for pipe_caps.context_priority_mask param, which should * return a bitmask of the supported priorities. If the driver does not * support prioritized contexts, it can return 0. * diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index 6998b3c3f72..e1d90deeed1 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -135,7 +135,7 @@ struct pipe_screen { /** * Query a per-shader-stage integer-valued capability/parameter/limit - * \param param one of PIPE_CAP_x + * \param param one of pipe_caps.x */ int (*get_shader_param)(struct pipe_screen *, enum pipe_shader_type shader, enum pipe_shader_cap param); @@ -166,7 +166,7 @@ struct pipe_screen { /** * Get the sample pixel grid's size. This function requires - * PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS to be callable. + * pipe_caps.programmable_sample_locations to be callable. * * \param sample_count - total number of samples * \param out_width - the width of the pixel grid diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 717d9fd7fa0..ea0b8a98d20 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -145,7 +145,7 @@ struct pipe_rasterizer_state unsigned rasterizer_discard:1; /** - * Exposed by PIPE_CAP_TILE_RASTER_ORDER. When true, + * Exposed by pipe_caps.tile_raster_order. When true, * tile_raster_order_increasing_* indicate the order that the rasterizer * should render tiles, to meet the requirements of * GL_MESA_tile_raster_order. @@ -157,9 +157,9 @@ struct pipe_rasterizer_state /** * When false, depth clipping is disabled and the depth value will be * clamped later at the per-pixel level before depth testing. - * This depends on PIPE_CAP_DEPTH_CLIP_DISABLE. + * This depends on pipe_caps.depth_clip_disable. * - * If PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE is unsupported, depth_clip_near + * If pipe_caps.depth_clip_disable_separate is unsupported, depth_clip_near * is equal to depth_clip_far. */ unsigned depth_clip_near:1; @@ -167,7 +167,7 @@ struct pipe_rasterizer_state /** * When true, depth clamp is enabled. - * If PIPE_CAP_DEPTH_CLAMP_ENABLE is unsupported, this is always the inverse + * If pipe_caps.depth_clamp_enable is unsupported, this is always the inverse * of depth_clip_far. */ unsigned depth_clamp:1; @@ -183,7 +183,7 @@ struct pipe_rasterizer_state /** * When true do not scale offset_units and use same rules for unorm and * float depth buffers (D3D9). When false use GL/D3D1X behaviour. - * This depends on PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED. + * This depends on pipe_caps.polygon_offset_units_unscaled. */ unsigned offset_units_unscaled:1; diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c index 5ffd6a00550..2063c9dc289 100644 --- a/src/gallium/targets/d3dadapter9/drm.c +++ b/src/gallium/targets/d3dadapter9/drm.c @@ -239,7 +239,7 @@ drm_create_adapter( int fd, return D3DERR_DRIVERINTERNALERROR; } - /* Previously was set to PIPE_CAP_MAX_FRAMES_IN_FLIGHT, + /* Previously was set to pipe_caps.max_frames_in_flight, * but the change of value of this cap to 1 seems to cause * regressions. */ ctx->base.throttling_value = 2; diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index ae991b81266..a394f382bfa 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa/main/queryobj.c @@ -90,7 +90,7 @@ target_to_index(const struct gl_query_object *q) q->Target == GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB) return q->Stream; - /* Drivers with PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE = 0 ignore the + /* Drivers with pipe_caps.query_pipeline_statistics_single = 0 ignore the * index param so it should be useless; but radeonsi needs it in some cases, * so pass the correct value. */ diff --git a/src/mesa/state_tracker/st_atom_blend.c b/src/mesa/state_tracker/st_atom_blend.c index 607b2b151fe..d0e19d3a354 100644 --- a/src/mesa/state_tracker/st_atom_blend.c +++ b/src/mesa/state_tracker/st_atom_blend.c @@ -184,7 +184,7 @@ blend_per_rt(const struct st_context *st, unsigned num_cb) if (ctx->DrawBuffer->_BlendForceAlphaToOne) { /* Overriding requires independent blend functions (not just enables), - * requiring drivers to expose PIPE_CAP_INDEP_BLEND_FUNC. + * requiring drivers to expose pipe_caps.indep_blend_func. */ assert(st->has_indep_blend_func); diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 1459369b5b8..37c565f4c12 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -207,7 +207,7 @@ st_save_zombie_sampler_view(struct st_context *st, * with variants of a shader created with different contexts. * When we go to destroy a gallium shader, we want to free it with the * same context that it was created with, unless the driver reports - * PIPE_CAP_SHAREABLE_SHADERS = TRUE. + * pipe_caps.shareable_shaders = TRUE. */ void st_save_zombie_shader(struct st_context *st, diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index b7ea01d36cb..5787b6adb29 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -331,7 +331,7 @@ struct st_context void *upload_fs[5][2]; /** * For drivers supporting formatless storing - * (PIPE_CAP_IMAGE_STORE_FORMATTED) it is a pointer to the download FS; + * (pipe_caps.image_store_formatted) it is a pointer to the download FS; * for those not supporting it, it is a pointer to an array of * PIPE_FORMAT_COUNT elements, where each element is a pointer to the * download FS using that PIPE_FORMAT as the storing format. diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index a42fcace674..07265c5c6d5 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -136,7 +136,7 @@ void st_init_limits(struct pipe_screen *screen, /* Define max viewport size and max renderbuffer size in terms of * max texture size (note: max tex RECT size = max tex 2D size). - * If this isn't true for some hardware we'll need new PIPE_CAP_ queries. + * If this isn't true for some hardware we'll need new pipe_caps. queries. */ c->MaxViewportWidth = c->MaxViewportHeight = @@ -571,7 +571,7 @@ void st_init_limits(struct pipe_screen *screen, c->MaxFramebufferWidth = c->MaxViewportWidth; c->MaxFramebufferHeight = c->MaxViewportHeight; /* NOTE: we cheat here a little by assuming that - * PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS has the same + * pipe_caps.max_texture_array_layers has the same * number of layers as we need, although we technically * could have more the generality is not really useful * in practicality. @@ -749,7 +749,7 @@ get_max_samples_for_formats_advanced(struct pipe_screen *screen, } /** - * Use pipe_screen::get_param() to query PIPE_CAP_ values to determine + * Use pipe_screen::get_param() to query pipe_caps. values to determine * which GL extensions are supported. * Quite a few extensions are always supported because they are standard * features or can be built on top of other gallium features. @@ -1338,7 +1338,7 @@ void st_init_extensions(struct pipe_screen *screen, extensions->ARB_draw_indirect = GL_TRUE; } - /* Needs PIPE_CAP_SAMPLE_SHADING + all the sample-related bits of + /* Needs pipe_caps.sample_shading + all the sample-related bits of * ARB_gpu_shader5. This enables all the per-sample shading ES extensions. */ extensions->OES_sample_variables = extensions->ARB_sample_shading && diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 53c3fab0bd9..b777fa7bb2f 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -62,7 +62,7 @@ type_size(const struct glsl_type *type) return glsl_count_attribute_slots(type, false); } -/* Depending on PIPE_CAP_TGSI_TEXCOORD (st->needs_texcoord_semantic) we +/* Depending on pipe_caps.tgsi_texcoord (st->needs_texcoord_semantic) we * may need to fix up varying slots so the glsl->nir path is aligned * with the anything->tgsi->nir path. */ diff --git a/src/mesa/state_tracker/st_nir_lower_tex_src_plane.c b/src/mesa/state_tracker/st_nir_lower_tex_src_plane.c index a3408f8e9ed..a4b8257d217 100644 --- a/src/mesa/state_tracker/st_nir_lower_tex_src_plane.c +++ b/src/mesa/state_tracker/st_nir_lower_tex_src_plane.c @@ -134,7 +134,7 @@ lower_tex_src_plane(nir_builder *b, nir_instr *instr, void *data) BITSET_SET(state->shader->info.textures_used, u_v_samp); BITSET_SET(state->shader->info.samplers_used, u_v_samp); - /* For drivers using PIPE_CAP_NIR_SAMPLERS_AS_DEREF, we need + /* For drivers using pipe_caps.nir_samplers_as_deref, we need * to reference the correct sampler nir variable. */ int samp_index = nir_tex_instr_src_index(tex, nir_tex_src_sampler_deref); diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h index b81770afc9f..7dbe8111456 100644 --- a/src/mesa/state_tracker/st_program.h +++ b/src/mesa/state_tracker/st_program.h @@ -232,7 +232,7 @@ struct st_fp_variant_key struct st_external_sampler_key external; - /* bitmask of sampler units; PIPE_CAP_GL_CLAMP */ + /* bitmask of sampler units; pipe_caps.gl_clamp */ uint32_t gl_clamp[3]; /* bitmask of shadow samplers with depth textures in them for ARB programs; */ @@ -295,7 +295,7 @@ struct st_common_variant_key */ bool is_draw_shader; - /* bitmask of sampler units; PIPE_CAP_GL_CLAMP */ + /* bitmask of sampler units; pipe_caps.gl_clamp */ uint32_t gl_clamp[3]; };