d3d12: Advertise PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19396>
This commit is contained in:
Jesse Natalie
2022-10-29 07:53:45 -07:00
committed by Marge Bot
parent 61afaa0c68
commit b4f2b244fa
4 changed files with 11 additions and 16 deletions

View File

@@ -146,7 +146,12 @@ init_buffer(struct d3d12_screen *screen,
* element state */
assert(templ->format == d3d12_emulated_vtx_format(templ->format));
switch (templ->usage) {
if ((templ->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) &&
res->base.b.usage == PIPE_USAGE_DEFAULT)
{
res->base.b.usage = PIPE_USAGE_STAGING;
}
switch (res->base.b.usage) {
case PIPE_USAGE_DEFAULT:
case PIPE_USAGE_IMMUTABLE:
bufmgr = screen->cache_bufmgr;