gallium: Remove PIPE_CAP_TEXTURE_BUFFER_SAMPLER

No more users. It was already not respected by rusticl so you couldn't set it if
you wanted OpenCL support. I regret introducing the CAP in the first place, and
no more drivers should use it.

Reverts d5d3f77e4a ("gallium: Add new cap PIPE_CAP_TEXTURE_BUFFER_SAMPLER").

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22223>
This commit is contained in:
Alyssa Rosenzweig
2023-03-30 13:24:16 -04:00
committed by Marge Bot
parent e406e74aa4
commit 6ba29d37c8
8 changed files with 6 additions and 17 deletions

View File

@@ -129,11 +129,10 @@ Samplers
^^^^^^^^
pipe_sampler_state objects control how textures are sampled
(coordinate wrap modes, interpolation modes, etc). Note that unless
``PIPE_CAP_TEXTURE_BUFFER_SAMPLER`` is enabled, samplers are not used for
texture buffer objects. That is, pipe_context::bind_sampler_views()
will not bind a sampler if the corresponding sampler view refers to a
PIPE_BUFFER resource.
(coordinate wrap modes, interpolation modes, etc). Note that
samplers are not used for texture buffer objects. That is,
pipe_context::bind_sampler_views() will not bind a sampler if the corresponding
sampler view refers to a PIPE_BUFFER resource.
Sampler Views
^^^^^^^^^^^^^

View File

@@ -180,9 +180,6 @@ The integer capabilities:
TEXCOORD semantic.
Also, TGSI_SEMANTIC_PCOORD becomes available, which labels a fragment shader
input that will always be replaced with sprite coordinates.
* ``PIPE_CAP_TEXTURE_BUFFER_SAMPLER``: Whether a sampler should still
be used for PIPE_BUFFER resources (normally a sampler is only used
if the texture target is PIPE_TEXTURE_*).
* ``PIPE_CAP_TEXTURE_TRANSFER_MODES``: The ``pipe_texture_transfer_mode`` modes
that are supported for implementing a texture transfer which needs format conversions
and swizzling in gallium frontends. Generally, all hardware drivers with

View File

@@ -172,7 +172,6 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen,
case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY:
case PIPE_CAP_TGSI_TEXCOORD:
case PIPE_CAP_TEXTURE_BUFFER_SAMPLER:
return 0;
case PIPE_CAP_TEXTURE_TRANSFER_MODES:

View File

@@ -807,7 +807,6 @@ enum pipe_cap
PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT,
PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY,
PIPE_CAP_TGSI_TEXCOORD,
PIPE_CAP_TEXTURE_BUFFER_SAMPLER,
PIPE_CAP_LINEAR_IMAGE_PITCH_ALIGNMENT,
PIPE_CAP_LINEAR_IMAGE_BASE_ADDRESS_ALIGNMENT,
PIPE_CAP_TEXTURE_TRANSFER_MODES,

View File

@@ -237,8 +237,7 @@ update_shader_samplers(struct st_context *st,
* states that are NULL.
*/
if (samplers_used & 1 &&
(ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER ||
st->texture_buffer_sampler)) {
(ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER)) {
st_convert_sampler_from_unit(
st, sampler, tex_unit,
prog->shader_program && prog->shader_program->GLSL_Version >= 130);

View File

@@ -85,8 +85,7 @@ update_gl_clamp(struct st_context *st, struct gl_program *prog, uint32_t *gl_cla
for (unit = 0; samplers_used; unit++, samplers_used >>= 1) {
unsigned tex_unit = prog->SamplerUnits[unit];
if (samplers_used & 1 &&
(st->ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER ||
st->texture_buffer_sampler)) {
(st->ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER)) {
ASSERTED const struct gl_texture_object *texobj;
struct gl_context *ctx = st->ctx;
const struct gl_sampler_object *msamp;

View File

@@ -600,8 +600,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_ALPHA_NOT_W);
st->emulate_gl_clamp =
!screen->get_param(screen, PIPE_CAP_GL_CLAMP);
st->texture_buffer_sampler =
screen->get_param(screen, PIPE_CAP_TEXTURE_BUFFER_SAMPLER);
st->has_time_elapsed =
screen->get_param(screen, PIPE_CAP_QUERY_TIME_ELAPSED);
st->has_half_float_packing =

View File

@@ -202,7 +202,6 @@ struct st_context
boolean use_format_with_border_color;
boolean alpha_border_color_is_not_w;
boolean emulate_gl_clamp;
boolean texture_buffer_sampler;
boolean draw_needs_minmax_index;
boolean has_hw_atomics;