Added patch to fix initial texture upload for 1D/3D textures.

This commit is contained in:
Sebastian Lackner
2016-09-21 01:21:33 +02:00
parent 8112d76673
commit dd166155b5
4 changed files with 73 additions and 5 deletions

View File

@@ -7873,7 +7873,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
texture->resource.map_binding = WINED3D_LOCATION_BUFFER;
}
@@ -3344,13 +3841,47 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
@@ -3355,13 +3852,47 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct
return WINED3D_OK;
}
@@ -7921,7 +7921,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc);
@@ -3375,6 +3906,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -3386,6 +3917,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
return WINED3DERR_INVALIDCALL;
@@ -7929,7 +7929,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (device->d3d_initialized)
context = context_acquire(device, NULL);
@@ -3397,6 +3929,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
@@ -3408,6 +3940,32 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i
TRACE("Returning dc %p.\n", *dc);
return hr;
@@ -7962,7 +7962,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
@@ -3427,6 +3985,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
@@ -3438,6 +3996,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
return WINED3DERR_INVALIDCALL;
}
@@ -7970,7 +7970,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D))
wined3d_surface_destroy_dc(surface);
@@ -3435,6 +3994,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
@@ -3446,6 +4005,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign
wined3d_texture_update_map_binding(texture);
if (!(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT))
texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE;