[Mesa-dev] [PATCH 1/6] st/mesa: simplify some code in get_texture_format_swizzle()
Marek Olšák
maraeo at gmail.com
Thu Oct 6 17:21:59 UTC 2016
For the series:
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Thu, Oct 6, 2016 at 2:42 AM, Brian Paul <brianp at vmware.com> wrote:
> There's no need to cast to st_texture_image. Just use gl_texture_image.
>
> Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>
> ---
> src/mesa/state_tracker/st_atom_texture.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_atom_texture.c b/src/mesa/state_tracker/st_atom_texture.c
> index efc8c90..113c0ed 100644
> --- a/src/mesa/state_tracker/st_atom_texture.c
> +++ b/src/mesa/state_tracker/st_atom_texture.c
> @@ -211,11 +211,11 @@ get_texture_format_swizzle(const struct st_context *st,
> */
> if (_mesa_is_gles3(st->ctx) &&
> util_format_is_depth_or_stencil(stObj->pt->format)) {
> - const struct st_texture_image *firstImage =
> - st_texture_image_const(_mesa_base_tex_image(&stObj->base));
> - if (firstImage->base.InternalFormat != GL_DEPTH_COMPONENT &&
> - firstImage->base.InternalFormat != GL_DEPTH_STENCIL &&
> - firstImage->base.InternalFormat != GL_STENCIL_INDEX)
> + const struct gl_texture_image *firstImage =
> + _mesa_base_tex_image(&stObj->base);
> + if (firstImage->InternalFormat != GL_DEPTH_COMPONENT &&
> + firstImage->InternalFormat != GL_DEPTH_STENCIL &&
> + firstImage->InternalFormat != GL_STENCIL_INDEX)
> depth_mode = GL_RED;
> }
> tex_swizzle = compute_texture_format_swizzle(baseFormat,
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list