diff --git a/docs/gallium/context.rst b/docs/gallium/context.rst index 8ebbd843590..a3fd78be522 100644 --- a/docs/gallium/context.rst +++ b/docs/gallium/context.rst @@ -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 ^^^^^^^^^^^^^ diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst index 2a7a16b0466..efcc98174c6 100644 --- a/docs/gallium/screen.rst +++ b/docs/gallium/screen.rst @@ -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 diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index c8f1c5f990e..348aaa8c9d0 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -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: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 2a6920b1d53..800e9015d90 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -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, diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 826c42dfa5f..bedd223d84f 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -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); diff --git a/src/mesa/state_tracker/st_atom_shader.c b/src/mesa/state_tracker/st_atom_shader.c index 643a3739c04..4bb24339595 100644 --- a/src/mesa/state_tracker/st_atom_shader.c +++ b/src/mesa/state_tracker/st_atom_shader.c @@ -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; diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index e7f0a2ef82d..0aba174fa22 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -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 = diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h index ce7d2fd73d6..031ba1070a3 100644 --- a/src/mesa/state_tracker/st_context.h +++ b/src/mesa/state_tracker/st_context.h @@ -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;