diff --git a/patches/dxgi-GammaRamp/0001-dxgi-Implement-setting-and-querying-the-gamma-value-.patch b/patches/dxgi-GammaRamp/0001-dxgi-Implement-setting-and-querying-the-gamma-value-.patch deleted file mode 100644 index d2724423..00000000 --- a/patches/dxgi-GammaRamp/0001-dxgi-Implement-setting-and-querying-the-gamma-value-.patch +++ /dev/null @@ -1,118 +0,0 @@ -From c6530912db59318d93b77daa1cab061ff5afadaa Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Tue, 24 Jan 2017 01:37:29 +0100 -Subject: [PATCH] dxgi: Implement setting and querying the gamma value of an - output. - ---- - dlls/dxgi/output.c | 17 ++++++++++++++-- - dlls/dxgi/tests/dxgi.c | 45 ++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 60 insertions(+), 2 deletions(-) - -diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c -index 2b168fb627b..31bdf9a3805 100644 ---- a/dlls/dxgi/output.c -+++ b/dlls/dxgi/output.c -@@ -293,9 +293,22 @@ static void STDMETHODCALLTYPE dxgi_output_ReleaseOwnership(IDXGIOutput4 *iface) - static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControlCapabilities(IDXGIOutput4 *iface, - DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps) - { -- FIXME("iface %p, gamma_caps %p stub!\n", iface, gamma_caps); -+ int i; - -- return E_NOTIMPL; -+ TRACE("iface %p, gamma_caps %p.\n", iface, gamma_caps); -+ -+ if (!gamma_caps) -+ return E_INVALIDARG; -+ -+ gamma_caps->ScaleAndOffsetSupported = FALSE; -+ gamma_caps->MaxConvertedValue = 1.0; -+ gamma_caps->MinConvertedValue = 0.0; -+ gamma_caps->NumGammaControlPoints = 256; -+ -+ for (i = 0; i < 256; i++) -+ gamma_caps->ControlPointPositions[i] = i / 255.0f; -+ -+ return S_OK; - } - - static HRESULT STDMETHODCALLTYPE dxgi_output_SetGammaControl(IDXGIOutput4 *iface, -diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c -index 56065456eb0..6bd257c6190 100644 ---- a/dlls/dxgi/tests/dxgi.c -+++ b/dlls/dxgi/tests/dxgi.c -@@ -2110,11 +2110,13 @@ static void test_swapchain_fullscreen_state(IDXGISwapChain *swapchain, - static void test_set_fullscreen(void) - { - struct swapchain_fullscreen_state initial_state; -+ DXGI_GAMMA_CONTROL_CAPABILITIES caps; - DXGI_SWAP_CHAIN_DESC swapchain_desc; - IDXGISwapChain *swapchain; - IDXGIFactory *factory; - IDXGIAdapter *adapter; - IDXGIDevice *device; -+ IDXGIOutput *output; - ULONG refcount; - HRESULT hr; - -@@ -2130,6 +2132,17 @@ static void test_set_fullscreen(void) - hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); - ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); - -+ hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output); -+ if (SUCCEEDED(hr)) -+ { -+ hr = IDXGIOutput_GetGammaControlCapabilities(output, &caps); -+ todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Expected DXGI_ERROR_INVALID_CALL, got %#x.\n", hr); -+ -+ IDXGIOutput_Release(output); -+ } -+ else -+ skip("Failed to get output, skipping gamma test.\n"); -+ - swapchain_desc.BufferDesc.Width = 800; - swapchain_desc.BufferDesc.Height = 600; - swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; -@@ -2160,6 +2173,38 @@ static void test_set_fullscreen(void) - skip("Could not change fullscreen state.\n"); - goto done; - } -+ -+ hr = IDXGISwapChain_GetContainingOutput(swapchain, &output); -+ if (SUCCEEDED(hr)) -+ { -+ DXGI_GAMMA_CONTROL gamma; -+ int i; -+ -+ memset(&caps, 0, sizeof(caps)); -+ hr = IDXGIOutput_GetGammaControlCapabilities(output, &caps); -+ ok(hr == S_OK, "Expected S_OK, got %#x.\n", hr); -+ -+ ok(caps.MaxConvertedValue > caps.MinConvertedValue, -+ "Expected max gamma value (%f) to be bigger than the min value (%f).\n", -+ caps.MaxConvertedValue, caps.MinConvertedValue); -+ -+ for (i = 1; i < caps.NumGammaControlPoints; i++) -+ { -+ ok(caps.ControlPointPositions[i] > caps.ControlPointPositions[i-1], -+ "Expected control point positions to be strictly monotonically increasing (%f > %f).\n", -+ caps.ControlPointPositions[i], caps.ControlPointPositions[i-1]); -+ } -+ -+ hr = IDXGIOutput_GetGammaControl(output, &gamma); -+ ok(hr == S_OK, "Expected S_OK, got %#x.\n", hr); -+ hr = IDXGIOutput_SetGammaControl(output, &gamma); -+ ok(hr == S_OK, "Expected S_OK, got %#x.\n", hr); -+ -+ IDXGIOutput_Release(output); -+ } -+ else -+ skip("Failed to get output, skipping gamma test.\n"); -+ - hr = IDXGISwapChain_SetFullscreenState(swapchain, FALSE, NULL); - ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); - refcount = IDXGISwapChain_Release(swapchain); --- -2.18.0 - diff --git a/patches/dxgi-GammaRamp/definition b/patches/dxgi-GammaRamp/definition deleted file mode 100644 index 8e29f987..00000000 --- a/patches/dxgi-GammaRamp/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [43584] Implement DXGI GammaControl methods diff --git a/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch b/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch index f5b4ad07..c158bd12 100644 --- a/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch +++ b/patches/wined3d-CSMT_Main/0045-wined3d-Improve-wined3d_cs_emit_update_sub_resource.patch @@ -1,16 +1,16 @@ -From 775e75950966aa3225f2715dc081c044fdd868e1 Mon Sep 17 00:00:00 2001 +From 6ba32e009912c40b81c83f30c0589876280bad6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 20 Feb 2017 00:27:25 +0100 Subject: [PATCH] wined3d: Improve wined3d_cs_emit_update_sub_resource. --- - dlls/wined3d/cs.c | 75 ++++++++++++++++++++++++++++++++++++++++++ - dlls/wined3d/device.c | 2 -- + dlls/wined3d/cs.c | 75 ++++++++++++++++++++++++++++++++++ + dlls/wined3d/device.c | 2 - dlls/wined3d/wined3d_private.h | 1 + 3 files changed, 76 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 02e36ca..2361fdc 100644 +index 1417c07b..7da87ba8 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -409,6 +409,7 @@ struct wined3d_cs_update_sub_resource @@ -21,7 +21,7 @@ index 02e36ca..2361fdc 100644 }; struct wined3d_cs_add_dirty_texture_region -@@ -2364,6 +2365,51 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r +@@ -2375,6 +2376,51 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r unsigned int slice_pitch) { struct wined3d_cs_update_sub_resource *op; @@ -71,17 +71,17 @@ index 02e36ca..2361fdc 100644 +no_async: + wined3d_resource_wait_idle(resource); - op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP); + op = wined3d_cs_require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP); op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; -@@ -2377,6 +2423,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r +@@ -2388,6 +2434,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r wined3d_resource_acquire(resource); - cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP); + wined3d_cs_submit(cs, WINED3D_CS_QUEUE_MAP); + /* The data pointer may go away, so we need to wait until it is read. * Copying the data may be faster if it's small. */ wined3d_cs_finish(cs, WINED3D_CS_QUEUE_MAP); -@@ -2561,6 +2608,11 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2572,6 +2619,11 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_GENERATE_MIPMAPS */ wined3d_cs_exec_generate_mipmaps, }; @@ -93,7 +93,7 @@ index 02e36ca..2361fdc 100644 static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) { if (size > (cs->data_size - cs->end)) -@@ -2614,6 +2666,7 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2625,6 +2677,7 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id static const struct wined3d_cs_ops wined3d_cs_st_ops = { @@ -101,7 +101,7 @@ index 02e36ca..2361fdc 100644 wined3d_cs_st_require_space, wined3d_cs_st_submit, wined3d_cs_st_finish, -@@ -2647,6 +2700,19 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2658,6 +2711,19 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id wined3d_cs_queue_submit(&cs->queue[queue_id], cs); } @@ -121,7 +121,7 @@ index 02e36ca..2361fdc 100644 static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs) { size_t queue_size = ARRAY_SIZE(queue->data); -@@ -2708,6 +2774,14 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size +@@ -2719,6 +2785,14 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size return packet->data; } @@ -136,7 +136,7 @@ index 02e36ca..2361fdc 100644 static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) { if (cs->thread_id == GetCurrentThreadId()) -@@ -2727,6 +2801,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2738,6 +2812,7 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id static const struct wined3d_cs_ops wined3d_cs_mt_ops = { @@ -145,7 +145,7 @@ index 02e36ca..2361fdc 100644 wined3d_cs_mt_submit, wined3d_cs_mt_finish, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index f51f4c8..7427fe4 100644 +index f51f4c87..7427fe48 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4342,8 +4342,6 @@ void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, str @@ -158,7 +158,7 @@ index f51f4c8..7427fe4 100644 } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 886f20b..dbdb16a 100644 +index 886f20b7..dbdb16a6 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3639,6 +3639,7 @@ struct wined3d_cs_queue @@ -170,5 +170,5 @@ index 886f20b..dbdb16a 100644 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 +2.19.1 diff --git a/patches/wined3d-UAV_Counters/0001-wined3d-Remaining-UAV-counter-changes.patch b/patches/wined3d-UAV_Counters/0001-wined3d-Remaining-UAV-counter-changes.patch index 9327453f..3ea99ea9 100644 --- a/patches/wined3d-UAV_Counters/0001-wined3d-Remaining-UAV-counter-changes.patch +++ b/patches/wined3d-UAV_Counters/0001-wined3d-Remaining-UAV-counter-changes.patch @@ -1,4 +1,4 @@ -From 13401363be8ff9e23972450a115b212ce3059b07 Mon Sep 17 00:00:00 2001 +From a1b44c071715bf9393e2e2da72ea987db7a4146e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 9 Aug 2017 06:32:43 +0200 Subject: wined3d: Remaining UAV counter changes. @@ -14,10 +14,10 @@ Based on patches by Michael Müller and Józef Kucia. 3 files changed, 11 insertions(+) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c -index ced9a13a8ae..2ccd71d5111 100644 +index df754de1..abd7bbcf 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c -@@ -1036,6 +1036,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11D +@@ -1075,6 +1075,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11D TRACE("iface %p, dst_buffer %p, dst_offset %u, src_view %p.\n", iface, dst_buffer, dst_offset, src_view); @@ -28,10 +28,10 @@ index ced9a13a8ae..2ccd71d5111 100644 uav = unsafe_impl_from_ID3D11UnorderedAccessView(src_view); diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 6ea2fd27a7c..fcceccb6425 100644 +index 5ea25e99..1417c07b 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c -@@ -2276,6 +2276,7 @@ static void wined3d_cs_exec_copy_uav_counter(struct wined3d_cs *cs, const void * +@@ -2468,6 +2468,7 @@ static void wined3d_cs_exec_copy_uav_counter(struct wined3d_cs *cs, const void * context_release(context); wined3d_resource_release(&op->buffer->resource); @@ -39,19 +39,19 @@ index 6ea2fd27a7c..fcceccb6425 100644 } void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer, -@@ -2290,6 +2291,7 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff +@@ -2482,6 +2483,7 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff op->view = uav; wined3d_resource_acquire(&dst_buffer->resource); + wined3d_resource_acquire(uav->resource); - cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT); + wined3d_cs_submit(cs, WINED3D_CS_QUEUE_DEFAULT); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 31955badb10..1822ee1ef37 100644 +index c90cbdbe..ebe396d7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -3974,6 +3974,12 @@ void CDECL wined3d_device_copy_uav_counter(struct wined3d_device *device, +@@ -4023,6 +4023,12 @@ void CDECL wined3d_device_copy_uav_counter(struct wined3d_device *device, TRACE("device %p, dst_buffer %p, offset %u, uav %p.\n", device, dst_buffer, offset, uav); @@ -65,5 +65,5 @@ index 31955badb10..1822ee1ef37 100644 } -- -2.14.1 +2.19.1