From d01ff543f30a94de04983ff57bfae1436a276f0e Mon Sep 17 00:00:00 2001 From: gloriouseggroll Date: Mon, 19 Feb 2018 15:16:57 -0500 Subject: [PATCH] wined3d-1DTextures: 0004 fix compiling-3 --- ...04-wined3d-Create-dummy-1d-textures-and-surfaces.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/wined3d-1DTextures/0004-wined3d-Create-dummy-1d-textures-and-surfaces.patch b/patches/wined3d-1DTextures/0004-wined3d-Create-dummy-1d-textures-and-surfaces.patch index 93a20912..e8f1767b 100644 --- a/patches/wined3d-1DTextures/0004-wined3d-Create-dummy-1d-textures-and-surfaces.patch +++ b/patches/wined3d-1DTextures/0004-wined3d-Create-dummy-1d-textures-and-surfaces.patch @@ -70,7 +70,7 @@ index 2a172ee..f81d7cf 100644 static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_context *context, const struct wined3d_box *box, const struct wined3d_const_bo_address *data, unsigned int row_pitch, unsigned int slice_pitch) -@@ -2063,6 +2102,137 @@ static const struct wined3d_resource_ops texture_resource_ops = +@@ -2022,6 +2399,137 @@ static const struct wined3d_resource_ops texture_resource_ops = texture_resource_sub_resource_unmap, }; @@ -104,8 +104,8 @@ index 2a172ee..f81d7cf 100644 + return WINED3DERR_INVALIDCALL; + } + -+ if (desc->usage & WINED3DUSAGE_DYNAMIC && (desc->pool == WINED3D_POOL_MANAGED -+ || desc->pool == WINED3D_POOL_SCRATCH)) ++ if ((desc->usage & WINED3DUSAGE_DYNAMIC && (desc->access == WINED3D_RESOURCE_ACCESS_GPU | WINED3D_RESOURCE_ACCESS_CPU | WINED3D_RESOURCE_ACCESS_MAP)) ++ || desc->usage & WINED3DUSAGE_SCRATCH) + { + WARN("Attempted to create a DYNAMIC texture in pool %s.\n", debug_d3dpool(desc->pool)); + return WINED3DERR_INVALIDCALL; @@ -113,7 +113,7 @@ index 2a172ee..f81d7cf 100644 + + if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] && !is_power_of_two(desc->width)) + { -+ if (desc->pool == WINED3D_POOL_SCRATCH) ++ if (desc->usage & WINED3DUSAGE_SCRATCH) + { + WARN("Creating a scratch NPOT 1d texture despite lack of HW support.\n"); + }