From ba29503654a752a9417908f8e077cd27ec56fb37 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 29 Sep 2020 16:06:16 -0500 Subject: [PATCH] wined3d: Introduce WINED3DFMT_FLAG_UNORDERED_ACCESS. Signed-off-by: Zebediah Figura Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/utils.c | 6 ++++++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 7 insertions(+) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 01a838db897..88175d4bf26 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2989,6 +2989,8 @@ static void query_internal_format(struct wined3d_adapter *adapter, WINED3DFMT_FLAG_VTF, "vertex texture usage"); query_format_flag(gl_info, format, format->internal, GL_FILTER, WINED3DFMT_FLAG_FILTERING, "filtering"); + query_format_flag(gl_info, format, format->internal, GL_SHADER_IMAGE_STORE, + WINED3DFMT_FLAG_UNORDERED_ACCESS, "unordered access"); if (srgb_format || format->srgb_internal != format->internal) { @@ -4183,6 +4185,10 @@ static void init_vulkan_format_info(struct wined3d_format_vk *format, { flags |= WINED3DFMT_FLAG_FILTERING; } + if (texture_flags & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) + { + flags |= WINED3DFMT_FLAG_UNORDERED_ACCESS; + } format->f.flags[WINED3D_GL_RES_TYPE_TEX_1D] |= flags; format->f.flags[WINED3D_GL_RES_TYPE_TEX_2D] |= flags; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index abc6e0e57bb..1c783d28bc2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -5560,6 +5560,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN /* WineD3D pixel format flags */ #define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001 #define WINED3DFMT_FLAG_FILTERING 0x00000002 +#define WINED3DFMT_FLAG_UNORDERED_ACCESS 0x00000004 #define WINED3DFMT_FLAG_DEPTH_STENCIL 0x00000008 #define WINED3DFMT_FLAG_RENDERTARGET 0x00000010 #define WINED3DFMT_FLAG_EXTENSION 0x00000020