mesa/st: plumb glsl130_or_later through sampler creation
no functional changes Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17687>
This commit is contained in:

committed by
Marge Bot

parent
d1e33fa345
commit
1c172cdbcc
@@ -233,7 +233,7 @@ new_texture_handle(struct gl_context *ctx, struct gl_texture_object *texObj,
|
||||
if (!st_finalize_texture(ctx, pipe, texObj, 0))
|
||||
return 0;
|
||||
|
||||
st_convert_sampler(st, texObj, sampObj, 0, &sampler, false, false);
|
||||
st_convert_sampler(st, texObj, sampObj, 0, &sampler, false, false, true);
|
||||
|
||||
/* TODO: Clarify the interaction of ARB_bindless_texture and EXT_texture_sRGB_decode */
|
||||
view = st_get_texture_sampler_view_from_stobj(st, texObj, sampObj, 0,
|
||||
|
@@ -62,7 +62,8 @@ st_convert_sampler(const struct st_context *st,
|
||||
float tex_unit_lod_bias,
|
||||
struct pipe_sampler_state *sampler,
|
||||
bool seamless_cube_map,
|
||||
bool ignore_srgb_decode)
|
||||
bool ignore_srgb_decode,
|
||||
bool glsl130_or_later)
|
||||
{
|
||||
memcpy(sampler, &msamp->Attrib.state, sizeof(*sampler));
|
||||
|
||||
@@ -152,7 +153,8 @@ st_convert_sampler(const struct st_context *st,
|
||||
void
|
||||
st_convert_sampler_from_unit(const struct st_context *st,
|
||||
struct pipe_sampler_state *sampler,
|
||||
GLuint texUnit)
|
||||
GLuint texUnit,
|
||||
bool glsl130_or_later)
|
||||
{
|
||||
const struct gl_texture_object *texobj;
|
||||
struct gl_context *ctx = st->ctx;
|
||||
@@ -164,7 +166,7 @@ st_convert_sampler_from_unit(const struct st_context *st,
|
||||
msamp = _mesa_get_samplerobj(ctx, texUnit);
|
||||
|
||||
st_convert_sampler(st, texobj, msamp, ctx->Texture.Unit[texUnit].LodBiasQuantized,
|
||||
sampler, ctx->Texture.CubeMapSeamless, true);
|
||||
sampler, ctx->Texture.CubeMapSeamless, true, glsl130_or_later);
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +211,8 @@ update_shader_samplers(struct st_context *st,
|
||||
if (samplers_used & 1 &&
|
||||
(ctx->Texture.Unit[tex_unit]._Current->Target != GL_TEXTURE_BUFFER ||
|
||||
st->texture_buffer_sampler)) {
|
||||
st_convert_sampler_from_unit(st, sampler, tex_unit);
|
||||
st_convert_sampler_from_unit(st, sampler, tex_unit,
|
||||
prog->sh.data && prog->sh.data->Version >= 130);
|
||||
states[unit] = sampler;
|
||||
} else {
|
||||
states[unit] = NULL;
|
||||
|
@@ -523,7 +523,8 @@ st_create_texture_handle_from_unit(struct st_context *st,
|
||||
return 0;
|
||||
|
||||
if (view->target != PIPE_BUFFER)
|
||||
st_convert_sampler_from_unit(st, &sampler, texUnit);
|
||||
st_convert_sampler_from_unit(st, &sampler, texUnit,
|
||||
prog->sh.data && prog->sh.data->Version >= 130);
|
||||
|
||||
assert(st->ctx->Texture.Unit[texUnit]._Current);
|
||||
|
||||
|
@@ -240,12 +240,14 @@ st_convert_sampler(const struct st_context *st,
|
||||
float tex_unit_lod_bias,
|
||||
struct pipe_sampler_state *sampler,
|
||||
bool seamless_cube_map,
|
||||
bool ignore_srgb_decode);
|
||||
bool ignore_srgb_decode,
|
||||
bool glsl130_or_later);
|
||||
|
||||
void
|
||||
st_convert_sampler_from_unit(const struct st_context *st,
|
||||
struct pipe_sampler_state *sampler,
|
||||
GLuint texUnit);
|
||||
GLuint texUnit,
|
||||
bool glsl130_or_later);
|
||||
|
||||
struct pipe_sampler_view *
|
||||
st_update_single_texture(struct st_context *st,
|
||||
|
Reference in New Issue
Block a user