zink: use sparse residency for buffers.
GL ARB_sparse_buffer allows unbound regions in buffers. VK sparseBinding insists all regions must be bound before first use. This means we need to use sparseResidencyBuffer to back GL sparse buffers to get the same semantics. Fixes GL and piglit sparse buffer tests on zink/nvk. Fixes:c90246b682
("zink: implement sparse buffer creation/mapping") Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27404> (cherry picked from commitff50e80574
)
This commit is contained in:

committed by
Eric Engestrom

parent
7934b44b8f
commit
e16629a285
@@ -994,7 +994,7 @@
|
||||
"description": "zink: use sparse residency for buffers.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "c90246b682686597b09109858fb2c220dca1ad59",
|
||||
"notes": null
|
||||
|
@@ -309,7 +309,7 @@ create_bci(struct zink_screen *screen, const struct pipe_resource *templ, unsign
|
||||
bci.usage |= VK_BUFFER_USAGE_CONDITIONAL_RENDERING_BIT_EXT;
|
||||
|
||||
if (templ->flags & PIPE_RESOURCE_FLAG_SPARSE)
|
||||
bci.flags |= VK_BUFFER_CREATE_SPARSE_BINDING_BIT;
|
||||
bci.flags |= VK_BUFFER_CREATE_SPARSE_BINDING_BIT | VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT;
|
||||
return bci;
|
||||
}
|
||||
|
||||
|
@@ -940,7 +940,7 @@ zink_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
||||
return screen->info.feats.features.shaderCullDistance;
|
||||
|
||||
case PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE:
|
||||
return screen->info.feats.features.sparseBinding ? ZINK_SPARSE_BUFFER_PAGE_SIZE : 0;
|
||||
return screen->info.feats.features.sparseResidencyBuffer ? ZINK_SPARSE_BUFFER_PAGE_SIZE : 0;
|
||||
|
||||
/* Sparse texture */
|
||||
case PIPE_CAP_MAX_SPARSE_TEXTURE_SIZE:
|
||||
|
Reference in New Issue
Block a user