gallium,st/mesa: Add and set pipe_image_view::is_2d_view_of_3d
This will be useful for lavapipe since the Z-coordinate has to be ignored for 2D view accesses. Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31038>
This commit is contained in:

committed by
Marge Bot

parent
f5b0699efa
commit
aa072b137b
@@ -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 */
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user