[PATCH 08/11] wined3d: Move WINED3DFMT_FLAG_MAPPABLE to the base flags group.
Chip Davis
wine at gitlab.winehq.org
Mon May 16 20:26:52 CDT 2022
From: Chip Davis <cdavis5x at gmail.com>
---
dlls/wined3d/resource.c | 2 +-
dlls/wined3d/utils.c | 12 ++++--------
dlls/wined3d/wined3d_private.h | 2 +-
3 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
index 8e3743526e8..f00e741ae25 100644
--- a/dlls/wined3d/resource.c
+++ b/dlls/wined3d/resource.c
@@ -195,7 +195,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
resource->multisample_quality = multisample_quality;
resource->usage = usage;
resource->bind_flags = bind_flags;
- if (resource->format_flags & WINED3DFMT_FLAG_MAPPABLE)
+ if (resource->format_base_flags & WINED3DFMT_FLAG_MAPPABLE)
access |= WINED3D_RESOURCE_ACCESS_MAP_R | WINED3D_RESOURCE_ACCESS_MAP_W;
resource->access = access;
resource->width = width;
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index b91626b9f81..64bc2d8b2ba 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -315,14 +315,10 @@ struct wined3d_format_base_flags
* resource size. */
static const struct wined3d_format_base_flags format_base_flags[] =
{
- {WINED3DFMT_ATI1N, WINED3DFMT_FLAG_BROKEN_PITCH,
- WINED3DFMT_FLAG_MAPPABLE},
- {WINED3DFMT_ATI2N, WINED3DFMT_FLAG_BROKEN_PITCH,
- WINED3DFMT_FLAG_MAPPABLE},
- {WINED3DFMT_D16_LOCKABLE, 0,
- WINED3DFMT_FLAG_MAPPABLE},
- {WINED3DFMT_INTZ, 0,
- WINED3DFMT_FLAG_MAPPABLE},
+ {WINED3DFMT_ATI1N, WINED3DFMT_FLAG_MAPPABLE | WINED3DFMT_FLAG_BROKEN_PITCH},
+ {WINED3DFMT_ATI2N, WINED3DFMT_FLAG_MAPPABLE | WINED3DFMT_FLAG_BROKEN_PITCH},
+ {WINED3DFMT_D16_LOCKABLE, WINED3DFMT_FLAG_MAPPABLE},
+ {WINED3DFMT_INTZ, WINED3DFMT_FLAG_MAPPABLE},
{WINED3DFMT_R11G11B10_FLOAT, WINED3DFMT_FLAG_FLOAT},
{WINED3DFMT_D32_FLOAT, WINED3DFMT_FLAG_FLOAT},
{WINED3DFMT_S8_UINT_D24_FLOAT, WINED3DFMT_FLAG_FLOAT},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 22009db8811..71a77484a22 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -6116,6 +6116,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3DFMT_FLAG_COMPRESSED 0x00000080
#define WINED3DFMT_FLAG_BROKEN_PITCH 0x00000100
#define WINED3DFMT_FLAG_HEIGHT_SCALE 0x00000200
+#define WINED3DFMT_FLAG_MAPPABLE 0x00000400
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001
#define WINED3DFMT_FLAG_FILTERING 0x00000002
@@ -6133,7 +6134,6 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3DFMT_FLAG_GEN_MIPMAP 0x00400000
#define WINED3DFMT_FLAG_VERTEX_ATTRIBUTE 0x01000000
#define WINED3DFMT_FLAG_BLIT 0x02000000
-#define WINED3DFMT_FLAG_MAPPABLE 0x04000000
#define WINED3DFMT_FLAG_CAST_TO_BLOCK 0x08000000
#define WINED3DFMT_FLAG_INDEX_BUFFER 0x10000000
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/79
More information about the wine-devel
mailing list