mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
st/mesa: add some const qualifiers in st_atom_texture.c
And minor code reformatting. Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
b3c8935165
commit
628e651f64
1 changed files with 5 additions and 3 deletions
|
|
@ -241,7 +241,7 @@ get_texture_format_swizzle(const struct st_context *st,
|
|||
static boolean
|
||||
check_sampler_swizzle(const struct st_context *st,
|
||||
const struct st_texture_object *stObj,
|
||||
struct pipe_sampler_view *sv, unsigned glsl_version)
|
||||
const struct pipe_sampler_view *sv, unsigned glsl_version)
|
||||
{
|
||||
unsigned swizzle = get_texture_format_swizzle(st, stObj, glsl_version);
|
||||
|
||||
|
|
@ -252,7 +252,8 @@ check_sampler_swizzle(const struct st_context *st,
|
|||
}
|
||||
|
||||
|
||||
static unsigned last_level(struct st_texture_object *stObj)
|
||||
static unsigned
|
||||
last_level(const struct st_texture_object *stObj)
|
||||
{
|
||||
unsigned ret = MIN2(stObj->base.MinLevel + stObj->base._MaxLevel,
|
||||
stObj->pt->last_level);
|
||||
|
|
@ -261,7 +262,8 @@ static unsigned last_level(struct st_texture_object *stObj)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static unsigned last_layer(struct st_texture_object *stObj)
|
||||
static unsigned
|
||||
last_layer(const struct st_texture_object *stObj)
|
||||
{
|
||||
if (stObj->base.Immutable && stObj->pt->array_size > 1)
|
||||
return MIN2(stObj->base.MinLayer + stObj->base.NumLayers - 1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue