st/mesa: move handling CubeMapSeamless into st_convert_sampler where it belongs
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12334>
This commit is contained in:
@@ -61,10 +61,13 @@ st_convert_sampler(const struct st_context *st,
|
||||
const struct gl_texture_object *texobj,
|
||||
const struct gl_sampler_object *msamp,
|
||||
float tex_unit_lod_bias,
|
||||
struct pipe_sampler_state *sampler)
|
||||
struct pipe_sampler_state *sampler,
|
||||
bool seamless_cube_map)
|
||||
{
|
||||
memcpy(sampler, &msamp->Attrib.state, sizeof(*sampler));
|
||||
|
||||
sampler->seamless_cube_map |= seamless_cube_map;
|
||||
|
||||
if (texobj->_IsIntegerFormat && st->ctx->Const.ForceIntegerTexNearest) {
|
||||
sampler->min_img_filter = PIPE_TEX_FILTER_NEAREST;
|
||||
sampler->mag_img_filter = PIPE_TEX_FILTER_NEAREST;
|
||||
@@ -156,9 +159,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);
|
||||
|
||||
sampler->seamless_cube_map |= ctx->Texture.CubeMapSeamless;
|
||||
sampler, ctx->Texture.CubeMapSeamless);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user