diff options
author | Brian Paul <[email protected]> | 2016-09-23 12:24:03 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-10-06 11:29:32 -0600 |
commit | 628e651f64f1d90c0c56ff02f752ed45e82a50a4 (patch) | |
tree | 8398850b8d7538630e8a547e3b4c28e39b8e9690 | |
parent | b3c89351659646be12763133535e360ea57a6058 (diff) |
st/mesa: add some const qualifiers in st_atom_texture.c
And minor code reformatting.
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_atom_texture.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c index 113c0ed1b06..86f1c62e752 100644 --- a/src/mesa/state_tracker/st_atom_texture.c +++ b/src/mesa/state_tracker/st_atom_texture.c @@ -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, |