gallium: add screen get_sparse_texture_virtual_page_size callback

For ARB_sparse_texture extension to query driver supported page
size for each texture format.

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:
Qiang Yu 2021-12-06 17:37:35 +08:00
parent f3ea79f65e
commit eed8421bba
1 changed files with 16 additions and 0 deletions

View File

@ -653,6 +653,22 @@ struct pipe_screen {
uint64_t modifier,
enum pipe_format format);
/**
* Get supported page sizes for sparse texture.
*
* \p size is the array size of \p x, \p y and \p z.
*
* \p offset sets an offset into the possible format page size array,
* used to pick a specific xyz size combination.
*
* \return Number of supported page sizes, 0 means not support.
*/
int (*get_sparse_texture_virtual_page_size)(struct pipe_screen *screen,
enum pipe_texture_target target,
enum pipe_format format,
unsigned offset, unsigned size,
int *x, int *y, int *z);
/**
* Vertex state CSO functions for precomputing vertex and index buffer
* states for display lists.