wined3d-1DTextures: 0004 fix compiling-3

This commit is contained in:
gloriouseggroll 2018-02-19 15:16:57 -05:00
parent 5978ff107d
commit d01ff543f3

View File

@ -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");
+ }