mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
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>
(cherry picked from commit aa072b137b)
This commit is contained in:
parent
dc465140c6
commit
97570a038d
3 changed files with 3 additions and 1 deletions
|
|
@ -3244,7 +3244,7 @@
|
|||
"description": "gallium,st/mesa: Add and set pipe_image_view::is_2d_view_of_3d",
|
||||
"nominated": false,
|
||||
"nomination_type": 3,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -533,6 +533,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue