Chip Davis : wined3d: Move WINED3DFMT_FLAG_MAPPABLE to the attributes group.
Alexandre Julliard
julliard at winehq.org
Tue May 24 15:55:01 CDT 2022
Module: wine
Branch: master
Commit: 03196b9ff9cb54fdb4024aa5cd2dc30db8cfe0ee
URL: https://source.winehq.org/git/wine.git/?a=commit;h=03196b9ff9cb54fdb4024aa5cd2dc30db8cfe0ee
Author: Chip Davis <cdavis5x at gmail.com>
Date: Sun May 8 16:37:24 2022 -0500
wined3d: Move WINED3DFMT_FLAG_MAPPABLE to the attributes group.
Signed-off-by: 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 4ad8745f109..72a0914026f 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_attrs & WINED3D_FORMAT_ATTR_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 9c472f94160..9308848ce97 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, WINED3D_FORMAT_ATTR_BROKEN_PITCH,
- WINED3DFMT_FLAG_MAPPABLE},
- {WINED3DFMT_ATI2N, WINED3D_FORMAT_ATTR_BROKEN_PITCH,
- WINED3DFMT_FLAG_MAPPABLE},
- {WINED3DFMT_D16_LOCKABLE, 0,
- WINED3DFMT_FLAG_MAPPABLE},
- {WINED3DFMT_INTZ, 0,
- WINED3DFMT_FLAG_MAPPABLE},
+ {WINED3DFMT_ATI1N, WINED3D_FORMAT_ATTR_MAPPABLE | WINED3D_FORMAT_ATTR_BROKEN_PITCH},
+ {WINED3DFMT_ATI2N, WINED3D_FORMAT_ATTR_MAPPABLE | WINED3D_FORMAT_ATTR_BROKEN_PITCH},
+ {WINED3DFMT_D16_LOCKABLE, WINED3D_FORMAT_ATTR_MAPPABLE},
+ {WINED3DFMT_INTZ, WINED3D_FORMAT_ATTR_MAPPABLE},
{WINED3DFMT_R11G11B10_FLOAT, WINED3D_FORMAT_ATTR_FLOAT},
{WINED3DFMT_D32_FLOAT, WINED3D_FORMAT_ATTR_FLOAT},
{WINED3DFMT_S8_UINT_D24_FLOAT, WINED3D_FORMAT_ATTR_FLOAT},
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 6a5e718950a..7145c0ca64b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -6118,6 +6118,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3D_FORMAT_ATTR_COMPRESSED 0x00000080
#define WINED3D_FORMAT_ATTR_BROKEN_PITCH 0x00000100
#define WINED3D_FORMAT_ATTR_HEIGHT_SCALE 0x00000200
+#define WINED3D_FORMAT_ATTR_MAPPABLE 0x00000400
/* WineD3D pixel format flags */
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING 0x00000001
@@ -6136,7 +6137,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
More information about the wine-cvs
mailing list