mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[d3d11] Don't set HOST pipeline stage and access flags for resources
The backend does not and will not use that information at all.
This commit is contained in:
parent
2d6a3396dd
commit
f9c2e43ffc
@ -58,16 +58,6 @@ namespace dxvk {
|
|||||||
| VK_ACCESS_SHADER_WRITE_BIT;
|
| VK_ACCESS_SHADER_WRITE_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDesc->CPUAccessFlags & D3D11_CPU_ACCESS_WRITE) {
|
|
||||||
info.stages |= VK_PIPELINE_STAGE_HOST_BIT;
|
|
||||||
info.access |= VK_ACCESS_HOST_WRITE_BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pDesc->CPUAccessFlags & D3D11_CPU_ACCESS_READ) {
|
|
||||||
info.stages |= VK_PIPELINE_STAGE_HOST_BIT;
|
|
||||||
info.access |= VK_ACCESS_HOST_READ_BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pDesc->MiscFlags & D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS) {
|
if (pDesc->MiscFlags & D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS) {
|
||||||
info.usage |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT;
|
info.usage |= VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT;
|
||||||
info.stages |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
|
info.stages |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT;
|
||||||
|
@ -54,10 +54,8 @@ namespace dxvk {
|
|||||||
DxvkBufferCreateInfo info;
|
DxvkBufferCreateInfo info;
|
||||||
info.size = m_shader->shaderConstants().sizeInBytes();
|
info.size = m_shader->shaderConstants().sizeInBytes();
|
||||||
info.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
|
info.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT;
|
||||||
info.stages = util::pipelineStages(m_shader->stage())
|
info.stages = util::pipelineStages(m_shader->stage());
|
||||||
| VK_PIPELINE_STAGE_HOST_BIT;
|
info.access = VK_ACCESS_UNIFORM_READ_BIT;
|
||||||
info.access = VK_ACCESS_UNIFORM_READ_BIT
|
|
||||||
| VK_ACCESS_HOST_WRITE_BIT;
|
|
||||||
|
|
||||||
VkMemoryPropertyFlags memFlags
|
VkMemoryPropertyFlags memFlags
|
||||||
= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
|
= VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
|
||||||
|
@ -128,15 +128,8 @@ namespace dxvk {
|
|||||||
// to enable linear tiling, and DXVK needs to be aware that
|
// to enable linear tiling, and DXVK needs to be aware that
|
||||||
// the image can be accessed by the host.
|
// the image can be accessed by the host.
|
||||||
if (m_mapMode == D3D11_COMMON_TEXTURE_MAP_MODE_DIRECT) {
|
if (m_mapMode == D3D11_COMMON_TEXTURE_MAP_MODE_DIRECT) {
|
||||||
imageInfo.stages |= VK_PIPELINE_STAGE_HOST_BIT;
|
|
||||||
imageInfo.tiling = VK_IMAGE_TILING_LINEAR;
|
imageInfo.tiling = VK_IMAGE_TILING_LINEAR;
|
||||||
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
|
imageInfo.initialLayout = VK_IMAGE_LAYOUT_PREINITIALIZED;
|
||||||
|
|
||||||
if (m_desc.CPUAccessFlags & D3D11_CPU_ACCESS_WRITE)
|
|
||||||
imageInfo.access |= VK_ACCESS_HOST_WRITE_BIT;
|
|
||||||
|
|
||||||
if (m_desc.CPUAccessFlags & D3D11_CPU_ACCESS_READ)
|
|
||||||
imageInfo.access |= VK_ACCESS_HOST_READ_BIT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We must keep LINEAR images in GENERAL layout, but we
|
// We must keep LINEAR images in GENERAL layout, but we
|
||||||
|
Loading…
x
Reference in New Issue
Block a user