diff --git a/docs/gallium/screen.rst b/docs/gallium/screen.rst index 9a48230b805..39a85c808d9 100644 --- a/docs/gallium/screen.rst +++ b/docs/gallium/screen.rst @@ -634,7 +634,8 @@ The integer capabilities: * ``PIPE_CAP_MAX_SPARSE_3D_TEXTURE_SIZE``: Maximum 3D texture image dimension for a sparse texture. * ``PIPE_CAP_MAX_SPARSE_ARRAY_TEXTURE_LAYERS``: Maximum number of layers in a sparse array texture. * ``PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS``: TRUE if there are no restrictions on the allocation of mipmaps in sparse textures and FALSE otherwise. See SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB description in ARB_sparse_texture extension spec. -* ``PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY``: TURE if shader sparse texture sample instruction could also return the residency information. +* ``PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY``: TRUE if shader sparse texture sample instruction could also return the residency information. +* ``PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD``: TRUE if shader sparse texture sample instruction support clamp the minimal lod to prevent read from un-committed pages. .. _pipe_capf: diff --git a/src/gallium/auxiliary/util/u_screen.c b/src/gallium/auxiliary/util/u_screen.c index 4cd961fb6d2..71458bccf03 100644 --- a/src/gallium/auxiliary/util/u_screen.c +++ b/src/gallium/auxiliary/util/u_screen.c @@ -484,6 +484,7 @@ u_pipe_screen_get_param_defaults(struct pipe_screen *pscreen, case PIPE_CAP_MAX_SPARSE_ARRAY_TEXTURE_LAYERS: case PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS: case PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY: + case PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD: return 0; default: diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index d47066f371a..e0751702acc 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -409,6 +409,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MAX_SPARSE_ARRAY_TEXTURE_LAYERS: case PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS: case PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY: + case PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD: return 0; case PIPE_CAP_VENDOR_ID: diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index d296c8716c3..f6ca26b86fe 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -438,6 +438,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MAX_SPARSE_ARRAY_TEXTURE_LAYERS: case PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS: case PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY: + case PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD: return 0; case PIPE_CAP_VENDOR_ID: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index 574c91e2290..7efd4542790 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -1004,6 +1004,7 @@ enum pipe_cap PIPE_CAP_MAX_SPARSE_ARRAY_TEXTURE_LAYERS, PIPE_CAP_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS, PIPE_CAP_QUERY_SPARSE_TEXTURE_RESIDENCY, + PIPE_CAP_CLAMP_SPARSE_TEXTURE_LOD, PIPE_CAP_LAST, /* XXX do not add caps after PIPE_CAP_LAST! */