diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 2b0fcb09043..a86025678c2 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -534,6 +534,7 @@ struct pipe_image_view unsigned last_layer:16; /**< last layer to use for array textures */ unsigned level:8; /**< mipmap level to use */ bool single_layer_view; /**< single layer view of array */ + bool is_2d_view_of_3d; } tex; struct { unsigned offset; /**< offset in bytes */ diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c index 70a42e9dcff..c46cc0ff0f9 100644 --- a/src/mesa/state_tracker/st_atom_image.c +++ b/src/mesa/state_tracker/st_atom_image.c @@ -114,6 +114,7 @@ st_convert_image(const struct st_context *st, const struct gl_image_unit *u, } else { img->u.tex.first_layer = u->_Layer; img->u.tex.last_layer = u->_Layer; + img->u.tex.is_2d_view_of_3d = true; } } else { img->u.tex.first_layer = u->_Layer + stObj->Attrib.MinLayer;