mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 14:40:10 +01:00
st/mesa: simplify some code in get_texture_format_swizzle()
There's no need to cast to st_texture_image. Just use gl_texture_image. 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
9add37b100
commit
b3c8935165
1 changed files with 5 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue