Rebase against dc328fe314970d39cbe6e330d99102adf619a73c

This commit is contained in:
Alistair Leslie-Hughes 2018-03-07 11:11:36 +11:00
parent 28c580ffb4
commit 61fcdf539a
5 changed files with 50 additions and 113 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "acd2f1e59bd22197b63eb5ae4ac0d621a0b8cce0"
echo "dc328fe314970d39cbe6e330d99102adf619a73c"
}
# Show version information
@ -411,7 +411,6 @@ patch_enable_all ()
enable_wined3d_Core_Context="$1"
enable_wined3d_DXTn="$1"
enable_wined3d_Dual_Source_Blending="$1"
enable_wined3d_GTX_560M="$1"
enable_wined3d_Indexed_Vertex_Blending="$1"
enable_wined3d_Limit_Vram="$1"
enable_wined3d_QUERY_Stubs="$1"
@ -1457,9 +1456,6 @@ patch_enable ()
wined3d-Dual_Source_Blending)
enable_wined3d_Dual_Source_Blending="$2"
;;
wined3d-GTX_560M)
enable_wined3d_GTX_560M="$2"
;;
wined3d-Indexed_Vertex_Blending)
enable_wined3d_Indexed_Vertex_Blending="$2"
;;
@ -8349,11 +8345,9 @@ fi
# | * dlls/windowscodecs/converter.c, dlls/windowscodecs/jpegformat.c
# |
if test "$enable_windowscodecs_JPEG_Decoder" -eq 1; then
patch_apply windowscodecs-JPEG_Decoder/0002-windowscodecs-Fix-stride-calculation-in-JPEG-decoder.patch
patch_apply windowscodecs-JPEG_Decoder/0004-windowscodecs-Move-JPEG-frame-image-data-initializat.patch
patch_apply windowscodecs-JPEG_Decoder/0005-windowscodecs-Add-support-for-CMYK-to-BGR-conversion.patch
(
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Fix stride calculation in JPEG decoder.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Move JPEG frame image data initialization from Frame::CopyPixels to Decoder::Initialize.", 2 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for CMYK to BGR conversion.", 1 },';
) >> "$patchlist"
@ -8727,18 +8721,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-GTX_560M
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_GTX_560M" -eq 1; then
patch_apply wined3d-GTX_560M/0001-wined3d-Recognize-GTX-560M-card-with-NVIDIA-driver.patch
(
printf '%s\n' '+ { "Christian Costa", "wined3d: Recognize GTX 560M card with NVIDIA driver.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-WINED3D_RS_COLORWRITEENABLE
# |
# | This patchset has the following (direct or indirect) dependencies:

View File

@ -1,25 +0,0 @@
From 140717936cf4b769bd09d7890290597597bcc131 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 18 Aug 2017 12:03:50 +0800
Subject: [PATCH] windowscodecs: Fix stride calculation in JPEG decoder.
---
dlls/windowscodecs/jpegformat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c
index 0069bdfd89..4636e30a6f 100644
--- a/dlls/windowscodecs/jpegformat.c
+++ b/dlls/windowscodecs/jpegformat.c
@@ -628,7 +628,7 @@ static HRESULT WINAPI JpegDecoder_Frame_CopyPixels(IWICBitmapFrameDecode *iface,
else if (This->cinfo.out_color_space == JCS_CMYK) bpp = 32;
else bpp = 24;
- stride = bpp * This->cinfo.output_width;
+ stride = (bpp * This->cinfo.output_width + 7) / 8;
data_size = stride * This->cinfo.output_height;
max_row_needed = prc->Y + prc->Height;
--
2.16.2

View File

@ -5,8 +5,18 @@ Based on patches by:
Michael Müller <michael@fds-team.de>
Sebastian Lackner <sebastian@fds-team.de>
Stefan Dösinger <stefan@codeweavers.com>
---
dlls/wined3d/cs.c | 90 +++++++++++++++++++++++++++++++++++++++++
dlls/wined3d/device.c | 74 +++++++++++++++++++++++++++++++++
dlls/wined3d/surface.c | 4 ++
dlls/wined3d/swapchain.c | 4 ++
dlls/wined3d/texture.c | 92 +++++++++++++++++++++++++++++++++++++++++-
dlls/wined3d/view.c | 14 +++++++
dlls/wined3d/wined3d_private.h | 23 +++++++++++
7 files changed, 300 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 003cda3..3a7c95d 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -406,6 +406,9 @@ struct wined3d_cs_update_sub_resource
@ -158,6 +168,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
wined3d_cs_mt_submit,
wined3d_cs_mt_finish,
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3f7d8f7..e2b27e0 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1212,6 +1212,9 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
@ -269,9 +280,10 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
+}
+#endif /* STAGING_CSMT */
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index b2c98c5..a2f4135 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2495,7 +2495,11 @@ static BOOL surface_load_texture(struct wined3d_surface *surface,
@@ -2409,7 +2409,11 @@ BOOL surface_load_texture(struct wined3d_surface *surface,
/* Don't use PBOs for converted surfaces. During PBO conversion we look at
* WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is
* getting called. */
@ -284,6 +296,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
TRACE("Removing the pbo attached to surface %p.\n", surface);
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 9b3962f..3721db6 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -476,7 +476,11 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
@ -299,6 +312,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
/* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 78e43db..5abb82b 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -320,7 +320,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su
@ -313,7 +327,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
return;
}
if (locations & WINED3D_LOCATION_USER_MEMORY)
@@ -428,6 +432,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
@@ -430,6 +434,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
/* Context activation is done by the caller. */
static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture,
@ -321,7 +335,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info)
{
GLuint *buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object;
@@ -440,6 +445,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
@@ -442,6 +447,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture
wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER);
*buffer_object = 0;
@ -341,7 +355,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
@@ -459,7 +477,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
@@ -461,7 +479,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture)
&& !wined3d_texture_load_location(texture, i, context, map_binding))
ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding));
if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER)
@ -353,12 +367,11 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
if (context)
@@ -660,28 +682,46 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
unsigned int sub_count = texture->level_count * texture->layer_count;
struct wined3d_device *device = texture->resource.device;
@@ -664,27 +686,45 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
struct wined3d_renderbuffer_entry *entry, *entry2;
const struct wined3d_gl_info *gl_info = NULL;
struct wined3d_context *context = NULL;
+#if !defined(STAGING_CSMT)
const struct wined3d_gl_info *gl_info;
GLuint buffer_object;
+#else /* STAGING_CSMT */
+ struct wined3d_gl_bo *buffer;
@ -398,9 +411,9 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
+ texture->sub_resources[i].buffer = NULL;
+#endif /* STAGING_CSMT */
}
if (context)
context_release(context);
@@ -1482,11 +1522,16 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
if (!context && !list_empty(&texture->renderbuffers))
@@ -1583,11 +1623,16 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT
/* Context activation is done by the caller. */
static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture,
@ -417,7 +430,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (sub_resource->buffer_object)
return;
@@ -1498,6 +1543,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
@@ -1599,6 +1644,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur
TRACE("Created buffer object %u for texture %p, sub-resource %u.\n",
sub_resource->buffer_object, texture, sub_resource_idx);
@ -434,7 +447,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
}
static void wined3d_texture_force_reload(struct wined3d_texture *texture)
@@ -1596,7 +1651,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
@@ -1697,7 +1752,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
return TRUE;
case WINED3D_LOCATION_BUFFER:
@ -446,7 +459,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
return TRUE;
case WINED3D_LOCATION_TEXTURE_RGB:
@@ -1895,7 +1954,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
@@ -1996,7 +2055,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
}
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
{
@ -458,7 +471,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB);
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
texture1d_upload_data(texture, sub_resource_idx, context, NULL, &data, row_pitch, slice_pitch);
@@ -1940,7 +2003,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
@@ -2041,7 +2104,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in
case WINED3D_LOCATION_BUFFER:
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
{
@ -470,7 +483,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
@@ -2228,8 +2295,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
@@ -2342,8 +2409,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource)
wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED);
}
@ -481,10 +494,18 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
+ if (sub_resource->buffer)
+ wined3d_texture_remove_buffer_object(texture, i, context);
+#endif /* STAGING_CSMT */
}
if (resource->type == WINED3D_RTYPE_TEXTURE_2D)
{
@@ -2992,7 +3064,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
LIST_FOR_EACH_ENTRY_SAFE(entry, entry2, &texture->renderbuffers, struct wined3d_renderbuffer_entry, entry)
@@ -2677,7 +2749,6 @@ static HRESULT texture1d_init(struct wined3d_texture *texture, const struct wine
surface->container = texture;
surface->texture_level = i;
surface->texture_layer = j;
- list_init(&surface->renderbuffers);
sub_resource = &texture->sub_resources[idx];
sub_resource->locations = WINED3D_LOCATION_DISCARDED;
@@ -3099,7 +3170,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
}
else if (sub_resource->locations & WINED3D_LOCATION_BUFFER)
{
@ -496,7 +517,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
wined3d_texture_bind_and_dirtify(texture, context,
location == WINED3D_LOCATION_TEXTURE_SRGB);
wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch);
@@ -3038,7 +3114,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
@@ -3145,7 +3220,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in
case WINED3D_LOCATION_BUFFER:
if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB))
{
@ -508,7 +529,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB)
wined3d_texture_bind_and_dirtify(texture, context, FALSE);
@@ -3241,8 +3321,19 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
@@ -3348,8 +3427,19 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned
if (dst_texture->sub_resources[dst_sub_resource_idx].map_count
|| src_texture->sub_resources[src_sub_resource_idx].map_count)
{
@ -529,6 +550,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
if ((src_format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL))
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index 1eebce6..bed39db 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -750,6 +750,10 @@ static void wined3d_shader_resource_view_cs_init(void *object)
@ -574,6 +596,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
return WINED3D_OK;
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5ac535b..b4b9055 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2898,6 +2898,16 @@ struct wined3d_dummy_textures
@ -606,7 +629,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
{
@@ -3197,7 +3213,11 @@ struct wined3d_texture
@@ -3200,7 +3216,11 @@ struct wined3d_texture
unsigned int map_count;
DWORD locations;
@ -618,7 +641,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
} sub_resources[1];
};
@@ -3524,6 +3544,9 @@ struct wined3d_cs_queue
@@ -3531,6 +3551,9 @@ struct wined3d_cs_queue
struct wined3d_cs_ops
{
@ -628,3 +651,6 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
void *(*require_space)(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id);
void (*submit)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
void (*finish)(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id);
--
1.9.1

View File

@ -1,45 +0,0 @@
From 9d6e5bd47a0186732803f1f6500ef52b8d13e11c Mon Sep 17 00:00:00 2001
From: Christian Costa <titan.costa@gmail.com>
Date: Sun, 16 Oct 2016 14:01:56 +0200
Subject: wined3d: Recognize GTX 560M card with NVIDIA driver.
---
dlls/wined3d/directx.c | 2 ++
dlls/wined3d/wined3d_private.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index a8c8c9f..9edeb5b 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1270,6 +1270,7 @@ static const struct gpu_description gpu_description_table[] =
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX550, "NVIDIA GeForce GTX 550 Ti", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GT555M, "NVIDIA GeForce GT 555M", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560TI, "NVIDIA GeForce GTX 560 Ti", DRIVER_NVIDIA_GEFORCE8, 1024},
+ {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560M, "NVIDIA GeForce GTX 560M", DRIVER_NVIDIA_GEFORCE8, 3072},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX560, "NVIDIA GeForce GTX 560", DRIVER_NVIDIA_GEFORCE8, 1024},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX570, "NVIDIA GeForce GTX 570", DRIVER_NVIDIA_GEFORCE8, 1280},
{HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX580, "NVIDIA GeForce GTX 580", DRIVER_NVIDIA_GEFORCE8, 1536},
@@ -1848,6 +1849,7 @@ cards_nvidia_binary[] =
{"GTX 580", CARD_NVIDIA_GEFORCE_GTX580}, /* Geforce 500 - highend */
{"GTX 570", CARD_NVIDIA_GEFORCE_GTX570}, /* Geforce 500 - midend high */
{"GTX 560 Ti", CARD_NVIDIA_GEFORCE_GTX560TI}, /* Geforce 500 - midend */
+ {"GTX 560M", CARD_NVIDIA_GEFORCE_GTX560M}, /* Geforce 500 - midend mobile */
{"GTX 560", CARD_NVIDIA_GEFORCE_GTX560}, /* Geforce 500 - midend */
{"GT 555M", CARD_NVIDIA_GEFORCE_GT555M}, /* Geforce 500 - midend mobile */
{"GTX 550 Ti", CARD_NVIDIA_GEFORCE_GTX550}, /* Geforce 500 - midend */
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 4326bee..f089d05 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1908,6 +1908,7 @@ enum wined3d_pci_device
CARD_NVIDIA_GEFORCE_GTX550 = 0x1244,
CARD_NVIDIA_GEFORCE_GT555M = 0x04b8,
CARD_NVIDIA_GEFORCE_GTX560TI = 0x1200,
+ CARD_NVIDIA_GEFORCE_GTX560M = 0x1251,
CARD_NVIDIA_GEFORCE_GTX560 = 0x1201,
CARD_NVIDIA_GEFORCE_GTX570 = 0x1081,
CARD_NVIDIA_GEFORCE_GTX580 = 0x1080,
--
2.9.0

View File

@ -1 +0,0 @@
Fixes: Recognize GTX 560M card with NVIDIA driver