mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 04:50:11 +01:00
d3d12: PIPE_BIND_SHARED doesn't mean linear and is always on opened resources
Reviewed-by: Bill Kristiansen <billkris@microsoft.com> Reviewed-by: Giancarlo Devich <gdevich@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
This commit is contained in:
parent
e02b11af57
commit
c87d7cfaad
1 changed files with 2 additions and 2 deletions
|
|
@ -242,8 +242,7 @@ init_texture(struct d3d12_screen *screen,
|
||||||
}
|
}
|
||||||
|
|
||||||
desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
|
desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
|
||||||
if (templ->bind & (PIPE_BIND_SCANOUT |
|
if (templ->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_LINEAR))
|
||||||
PIPE_BIND_SHARED | PIPE_BIND_LINEAR))
|
|
||||||
desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
|
desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
|
||||||
|
|
||||||
D3D12_HEAP_PROPERTIES heap_pris = screen->dev->GetCustomHeapProperties(0, D3D12_HEAP_TYPE_DEFAULT);
|
D3D12_HEAP_PROPERTIES heap_pris = screen->dev->GetCustomHeapProperties(0, D3D12_HEAP_TYPE_DEFAULT);
|
||||||
|
|
@ -469,6 +468,7 @@ d3d12_resource_from_handle(struct pipe_screen *pscreen,
|
||||||
res->base.b.nr_samples = incoming_res_desc.SampleDesc.Count;
|
res->base.b.nr_samples = incoming_res_desc.SampleDesc.Count;
|
||||||
res->base.b.last_level = incoming_res_desc.MipLevels - 1;
|
res->base.b.last_level = incoming_res_desc.MipLevels - 1;
|
||||||
res->base.b.usage = PIPE_USAGE_DEFAULT;
|
res->base.b.usage = PIPE_USAGE_DEFAULT;
|
||||||
|
res->base.b.bind |= PIPE_BIND_SHARED;
|
||||||
if (incoming_res_desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET)
|
if (incoming_res_desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET)
|
||||||
res->base.b.bind |= PIPE_BIND_RENDER_TARGET | PIPE_BIND_BLENDABLE | PIPE_BIND_DISPLAY_TARGET;
|
res->base.b.bind |= PIPE_BIND_RENDER_TARGET | PIPE_BIND_BLENDABLE | PIPE_BIND_DISPLAY_TARGET;
|
||||||
if (incoming_res_desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)
|
if (incoming_res_desc.Flags & D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue