Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite23792e

Browse files
committed
[d3d11] Fix handling sRGB UAV images
1 parentf903400 commite23792e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

‎src/d3d11/d3d11_texture.cpp‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,6 @@ namespace dxvk {
7474
}
7575
}
7676

77-
// Some games will try to create an SRGB image with the UAV
78-
// bind flag set. This works on Windows, but no UAVs can be
79-
// created for the image in practice.
80-
bool noUav = formatProperties->flags.test(DxvkFormatFlag::ColorSpaceSrgb)
81-
&& !CheckFormatFeatureSupport(formatInfo.Format, VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT);
82-
8377
// Adjust image flags based on the corresponding D3D flags
8478
if (m_desc.BindFlags & D3D11_BIND_SHADER_RESOURCE) {
8579
imageInfo.usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
@@ -102,11 +96,16 @@ namespace dxvk {
10296
| VK_ACCESS_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT;
10397
}
10498

105-
if (m_desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS && !noUav) {
99+
if (m_desc.BindFlags & D3D11_BIND_UNORDERED_ACCESS) {
106100
imageInfo.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
107101
imageInfo.stages |= pDevice->GetEnabledShaderStages();
108102
imageInfo.access |= VK_ACCESS_SHADER_READ_BIT
109103
| VK_ACCESS_SHADER_WRITE_BIT;
104+
105+
// UAVs are not supported for sRGB formats on most drivers,
106+
// but we can still create linear views for the image
107+
if (formatProperties->flags.test(DxvkFormatFlag::ColorSpaceSrgb))
108+
imageInfo.flags |= VK_IMAGE_CREATE_EXTENDED_USAGE_BIT;
110109
}
111110

112111
// Multi-plane formats need views to be created with color formats, and

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp