summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-09-23 12:18:46 -0600
committerBrian Paul <[email protected]>2016-10-06 11:29:31 -0600
commitb3c89351659646be12763133535e360ea57a6058 (patch)
tree997e1c2db5eef31d06be3a0ca7f6b8d3885b75bd /src/mesa
parent9add37b1007eb0dcb071c706e3b27300d91bb4ad (diff)
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 <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_texture.c10
1 files 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 efc8c90ffae..113c0ed1b06 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,