mesa/st: remove prefer_real_buffer_in_constbuf0 from st_context

prefer_real_buffer_in_constbuf0 is a direct copy of
screen->caps.prefer_real_buffer_in_constbuf0.
Read the cap from the screen directly.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41184>
This commit is contained in:
Vishnu Vardan 2026-04-26 00:27:14 -04:00 committed by Marge Bot
parent 45dc94b1bb
commit e03313c06a
4 changed files with 2 additions and 5 deletions

View file

@ -121,7 +121,7 @@ st_upload_constants(struct st_context *st, struct gl_program *prog, mesa_shader_
cb.buffer_size = paramBytes;
/* this path cannot be used with select/feedback draws */
if (st->prefer_real_buffer_in_constbuf0) {
if (st->screen->caps.prefer_real_buffer_in_constbuf0) {
struct pipe_context *pipe = st->pipe;
struct pipe_resource *releasebuf = NULL;
uint32_t *ptr;

View file

@ -593,8 +593,6 @@ st_create_context_priv(struct gl_context *ctx, struct pipe_context *pipe,
break;
default: break;
}
st->prefer_real_buffer_in_constbuf0 =
screen->caps.prefer_real_buffer_in_constbuf0;
st->has_conditional_render =
screen->caps.conditional_render;
st->lower_rect_tex =

View file

@ -162,7 +162,6 @@ struct st_context
bool can_bind_const_buffer_as_vertex;
bool lower_point_size;
bool add_point_size;
bool prefer_real_buffer_in_constbuf0;
bool has_conditional_render;
bool lower_rect_tex;

View file

@ -181,7 +181,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
* in gl_program_parameter_list because allow_constbuf0_as_real_buffer
* is set.
*/
if ((st->prefer_real_buffer_in_constbuf0 || st->allow_st_finalize_nir_twice) && params->StateFlags)
if ((st->screen->caps.prefer_real_buffer_in_constbuf0 || st->allow_st_finalize_nir_twice) && params->StateFlags)
_mesa_load_state_parameters(st->ctx, params);
draw_set_constant_buffer_stride(draw, sizeof(float));