mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
mesa/st: update NumSparseLevels from pipe_resource
Add nr_sparse_levels in pipe_resource for updating the gl_texture_object->NumSparseLevels. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14223>
This commit is contained in:
parent
90415c1a3a
commit
30daded7e9
2 changed files with 5 additions and 0 deletions
|
|
@ -569,6 +569,8 @@ struct pipe_resource
|
|||
*/
|
||||
unsigned nr_storage_samples:8;
|
||||
|
||||
unsigned nr_sparse_levels:8; /**< Mipmap levels support partial resident */
|
||||
|
||||
unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */
|
||||
unsigned bind; /**< bitmask of PIPE_BIND_x */
|
||||
unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */
|
||||
|
|
|
|||
|
|
@ -3359,6 +3359,9 @@ st_texture_storage(struct gl_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
/* Update gl_texture_object for texture parameter query. */
|
||||
texObj->NumSparseLevels = stObj->pt->nr_sparse_levels;
|
||||
|
||||
/* The texture is in a validated state, so no need to check later. */
|
||||
stObj->needs_validation = false;
|
||||
stObj->validated_first_level = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue