Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Rebohle <philip.rebohle@tu-dortmund.de>2018-06-28 17:47:54 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2018-06-28 17:47:54 +0300
commit4520b1ca8fc6cf089da354df8ab7f6e058eefa4e (patch)
treeb4a3fbdb04f00dd6727bfac6e6349a4b8542362c
parentdb2b6e12195646a93abe12b720f68754b107339f (diff)
[d3d11] Fix usage and access flags for multisampled imagesv0.61
Meta-resolve operations will use the image in a fragment shader.
-rw-r--r--src/d3d11/d3d11_texture.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp
index 883b08bd..0c5cc50d 100644
--- a/src/d3d11/d3d11_texture.cpp
+++ b/src/d3d11/d3d11_texture.cpp
@@ -28,7 +28,7 @@ namespace dxvk {
| VK_ACCESS_TRANSFER_WRITE_BIT;
imageInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
imageInfo.layout = VK_IMAGE_LAYOUT_GENERAL;
-
+
DecodeSampleCount(m_desc.SampleDesc.Count, &imageInfo.sampleCount);
// Typeless formats need the MUTABLE_FORMAT_BIT to be set
@@ -72,6 +72,13 @@ namespace dxvk {
| VK_ACCESS_SHADER_WRITE_BIT;
}
+ // Access pattern for meta-resolve operations
+ if (imageInfo.sampleCount != VK_SAMPLE_COUNT_1_BIT) {
+ imageInfo.usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
+ imageInfo.stages |= VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT;
+ imageInfo.access |= VK_ACCESS_SHADER_READ_BIT;
+ }
+
if (m_desc.MiscFlags & D3D11_RESOURCE_MISC_TEXTURECUBE)
imageInfo.flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;