From 900edf55b587dda06b9771d8ef734bb178b5841a Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Fri, 20 Sep 2024 00:24:07 +0200 Subject: [PATCH] [d3d9] Only create sampling image views if the image supports sampling Fixes validation error --- src/d3d9/d3d9_common_texture.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp index 08981b80f..9fda27795 100644 --- a/src/d3d9/d3d9_common_texture.cpp +++ b/src/d3d9/d3d9_common_texture.cpp @@ -72,7 +72,8 @@ namespace dxvk { ExportImageInfo(); } - CreateSampleView(0); + if ((m_image->info().usage & VK_IMAGE_USAGE_SAMPLED_BIT) != 0) + CreateSampleView(0); if (!IsManaged()) { m_size = m_image->memory().length();