Rebase against ae2d6e836b98440cdc938718226dc89592a64eda.

This commit is contained in:
Sebastian Lackner 2017-08-17 15:54:43 +02:00
parent 2d92c18c9e
commit f6565eb6af
8 changed files with 25 additions and 403 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "797a746fc2a1b17d67b7423293e081e3e7171033"
echo "ae2d6e836b98440cdc938718226dc89592a64eda"
}
# Show version information
@ -420,7 +420,6 @@ patch_enable_all ()
enable_wbemprox_Win32_VideoController="$1"
enable_wevtapi_EvtNext="$1"
enable_widl_SLTG_Typelib_Support="$1"
enable_windowscodecs_32bppGrayFloat="$1"
enable_windowscodecs_32bppPRGBA="$1"
enable_windowscodecs_GIF_Encoder="$1"
enable_windowscodecs_IMILBitmapSource="$1"
@ -453,7 +452,6 @@ patch_enable_all ()
enable_wined3d_Limit_Vram="$1"
enable_wined3d_QUERY_Stubs="$1"
enable_wined3d_Revert_Buffer_Upload="$1"
enable_wined3d_SM4_OP_NOP="$1"
enable_wined3d_Silence_FIXMEs="$1"
enable_wined3d_UAV_Counters="$1"
enable_wined3d_WINED3DFMT_R32G32_UINT="$1"
@ -1532,9 +1530,6 @@ patch_enable ()
widl-SLTG_Typelib_Support)
enable_widl_SLTG_Typelib_Support="$2"
;;
windowscodecs-32bppGrayFloat)
enable_windowscodecs_32bppGrayFloat="$2"
;;
windowscodecs-32bppPRGBA)
enable_windowscodecs_32bppPRGBA="$2"
;;
@ -1631,9 +1626,6 @@ patch_enable ()
wined3d-Revert_Buffer_Upload)
enable_wined3d_Revert_Buffer_Upload="$2"
;;
wined3d-SM4_OP_NOP)
enable_wined3d_SM4_OP_NOP="$2"
;;
wined3d-Silence_FIXMEs)
enable_wined3d_Silence_FIXMEs="$2"
;;
@ -2342,11 +2334,7 @@ if test "$enable_windowscodecs_Palette_Images" -eq 1; then
if test "$enable_gdiplus_Grayscale_PNG" -gt 1; then
abort "Patchset gdiplus-Grayscale_PNG disabled, but windowscodecs-Palette_Images depends on that."
fi
if test "$enable_windowscodecs_32bppGrayFloat" -gt 1; then
abort "Patchset windowscodecs-32bppGrayFloat disabled, but windowscodecs-Palette_Images depends on that."
fi
enable_gdiplus_Grayscale_PNG=1
enable_windowscodecs_32bppGrayFloat=1
fi
if test "$enable_uxtheme_GTK_Theming" -eq 1; then
@ -9024,25 +9012,10 @@ if test "$enable_wevtapi_EvtNext" -eq 1; then
) >> "$patchlist"
fi
# Patchset windowscodecs-32bppGrayFloat
# |
# | This patchset fixes the following Wine bugs:
# | * [#36517] Implement support for WICPixelFormat32bppGrayFloat
# |
# | Modified files:
# | * dlls/windowscodecs/converter.c, dlls/windowscodecs/tests/converter.c
# |
if test "$enable_windowscodecs_32bppGrayFloat" -eq 1; then
patch_apply windowscodecs-32bppGrayFloat/0004-windowscodecs-Fix-32bppGrayFloat-to-8bppGray-convers.patch
(
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Fix 32bppGrayFloat to 8bppGray conversion.", 1 },';
) >> "$patchlist"
fi
# Patchset windowscodecs-Palette_Images
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * gdiplus-Grayscale_PNG, windowscodecs-32bppGrayFloat
# | * gdiplus-Grayscale_PNG
# |
# | Modified files:
# | * dlls/windowscodecs/bmpdecode.c, dlls/windowscodecs/bmpencode.c, dlls/windowscodecs/imgfactory.c,
@ -9099,7 +9072,7 @@ fi
# Patchset windowscodecs-GIF_Encoder
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * gdiplus-Grayscale_PNG, windowscodecs-32bppGrayFloat, windowscodecs-Palette_Images
# | * gdiplus-Grayscale_PNG, windowscodecs-Palette_Images
# |
# | Modified files:
# | * dlls/gdiplus/image.c, dlls/gdiplus/tests/image.c, dlls/windowscodecs/bmpencode.c, dlls/windowscodecs/clsfactory.c,
@ -9195,8 +9168,8 @@ fi
# Patchset windowscodecs-TIFF_Support
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * gdiplus-Grayscale_PNG, windowscodecs-32bppGrayFloat, windowscodecs-Palette_Images, windowscodecs-GIF_Encoder,
# | windowscodecs-IWICPalette_InitializeFromBitmap
# | * gdiplus-Grayscale_PNG, windowscodecs-Palette_Images, windowscodecs-GIF_Encoder, windowscodecs-
# | IWICPalette_InitializeFromBitmap
# |
# | Modified files:
# | * dlls/gdiplus/image.c, dlls/gdiplus/tests/image.c, dlls/windowscodecs/metadatahandler.c, dlls/windowscodecs/regsvr.c,
@ -9242,8 +9215,8 @@ fi
# Patchset windowscodecs-32bppPRGBA
# |
# | This patchset has the following (direct or indirect) dependencies:
# | * gdiplus-Grayscale_PNG, windowscodecs-32bppGrayFloat, windowscodecs-Palette_Images, windowscodecs-GIF_Encoder,
# | windowscodecs-IWICPalette_InitializeFromBitmap, windowscodecs-TIFF_Support
# | * gdiplus-Grayscale_PNG, windowscodecs-Palette_Images, windowscodecs-GIF_Encoder, windowscodecs-
# | IWICPalette_InitializeFromBitmap, windowscodecs-TIFF_Support
# |
# | Modified files:
# | * dlls/windowscodecs/converter.c, dlls/windowscodecs/info.c, dlls/windowscodecs/regsvr.c,
@ -9598,7 +9571,7 @@ fi
# Patchset wined3d-UAV_Counters
# |
# | Modified files:
# | * dlls/d3d11/device.c, dlls/wined3d/cs.c, dlls/wined3d/device.c, dlls/wined3d/view.c
# | * dlls/d3d11/device.c, dlls/wined3d/cs.c, dlls/wined3d/device.c
# |
if test "$enable_wined3d_UAV_Counters" -eq 1; then
patch_apply wined3d-UAV_Counters/0001-wined3d-Remaining-UAV-counter-changes.patch
@ -9668,13 +9641,11 @@ fi
# | include/wine/wined3d.h
# |
if test "$enable_wined3d_DrawIndirect" -eq 1; then
patch_apply wined3d-DrawIndirect/0001-wined3d-Implement-indirect-compute-dispatch.patch
patch_apply wined3d-DrawIndirect/0002-d3d11-tests-Add-a-basic-test-for-DispatchIndirect.patch
patch_apply wined3d-DrawIndirect/0003-wined3d-Implement-indirect-drawing.patch
patch_apply wined3d-DrawIndirect/0004-wined3d-Implement-DrawInstancedIndirect.patch
patch_apply wined3d-DrawIndirect/0005-d3d11-tests-Add-a-basic-test-for-DrawInstancedIndire.patch
(
printf '%s\n' '+ { "Józef Kucia", "wined3d: Implement indirect compute dispatch.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "d3d11/tests: Add a basic test for DispatchIndirect.", 1 },';
printf '%s\n' '+ { "Józef Kucia", "wined3d: Implement indirect drawing.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Implement DrawInstancedIndirect.", 1 },';
@ -9706,18 +9677,6 @@ if test "$enable_wined3d_Limit_Vram" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-SM4_OP_NOP
# |
# | Modified files:
# | * dlls/wined3d/shader_sm4.c
# |
if test "$enable_wined3d_SM4_OP_NOP" -eq 1; then
patch_apply wined3d-SM4_OP_NOP/0001-wined3d-Recognize-SM4-nop-opcode.patch
(
printf '%s\n' '+ { "Michael Müller", "wined3d: Recognize SM4 nop opcode.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-WINED3DFMT_R32G32_UINT
# |
# | Modified files:

View File

@ -1,44 +0,0 @@
From 6d2db3592f0eccdef65691c51d16e3bb7558e8ae Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Mon, 7 Mar 2016 17:36:39 +0800
Subject: windowscodecs: Fix 32bppGrayFloat to 8bppGray conversion.
Intermediate conversion from 32bppGrayFloat to 24bppBGR applies sRGB gamma.
---
dlls/windowscodecs/converter.c | 7 ++++++-
dlls/windowscodecs/tests/converter.c | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c
index 322b2d1..bd5e978 100644
--- a/dlls/windowscodecs/converter.c
+++ b/dlls/windowscodecs/converter.c
@@ -1167,7 +1167,12 @@ static HRESULT copypixels_to_8bppGray(struct FormatConverter *This, const WICRec
{
float gray = (bgr[2] * 0.2126f + bgr[1] * 0.7152f + bgr[0] * 0.0722f) / 255.0f;
- gray = to_sRGB_component(gray) * 255.0f;
+ /* conversion from 32bppGrayFloat to 24bppBGR has already applied sRGB gamma */
+ if (source_format == format_32bppGrayFloat)
+ gray *= 255.0f;
+ else
+ gray = to_sRGB_component(gray) * 255.0f;
+
dst[x] = (BYTE)floorf(gray + 0.51f);
bgr += 3;
}
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c
index 9dd77a5..80766ea 100644
--- a/dlls/windowscodecs/tests/converter.c
+++ b/dlls/windowscodecs/tests/converter.c
@@ -825,6 +825,7 @@ START_TEST(converter)
test_conversion(&testdata_24bppBGR, &testdata_8bppGray, "24bppBGR -> 8bppGray", FALSE);
test_conversion(&testdata_32bppBGR, &testdata_8bppGray, "32bppBGR -> 8bppGray", FALSE);
test_conversion(&testdata_32bppGrayFloat, &testdata_24bppBGR_gray, "32bppGrayFloat -> 24bppBGR gray", FALSE);
+ test_conversion(&testdata_32bppGrayFloat, &testdata_8bppGray, "32bppGrayFloat -> 8bppGray", FALSE);
test_invalid_conversion();
test_default_converter();
--
2.7.1

View File

@ -1 +0,0 @@
Fixes: [36517] Implement support for WICPixelFormat32bppGrayFloat

View File

@ -1,3 +1,2 @@
Fixes: Improve palette support in windowscodecs.dll
Depends: windowscodecs-32bppGrayFloat
Depends: gdiplus-Grayscale_PNG

View File

@ -47,7 +47,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
};
struct wined3d_cs_add_dirty_texture_region
@@ -2241,6 +2244,53 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2243,6 +2246,53 @@ 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;
@ -101,7 +101,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP);
op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE;
@@ -2254,8 +2304,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r
@@ -2256,8 +2306,10 @@ 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);
@ -112,7 +112,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP);
}
@@ -2557,6 +2609,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
@@ -2559,6 +2611,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void
/* WINED3D_CS_OP_COPY_SUB_RESOURCE */ wined3d_cs_exec_copy_sub_resource,
};
@ -126,7 +126,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
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))
@@ -2610,6 +2669,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2612,6 +2671,9 @@ 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 =
{
@ -136,7 +136,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
wined3d_cs_st_require_space,
wined3d_cs_st_submit,
wined3d_cs_st_finish,
@@ -2642,6 +2704,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2644,6 +2706,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id
wined3d_cs_queue_submit(&cs->queue[queue_id], cs);
}
@ -158,7 +158,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
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);
@@ -2703,6 +2780,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
@@ -2705,6 +2782,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size
return packet->data;
}
@ -175,7 +175,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
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())
@@ -2722,6 +2809,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id
@@ -2724,6 +2811,9 @@ 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 =
{

View File

@ -1,235 +0,0 @@
From 654103d744671c2d55ad72aaae6a1107d665c9e4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B3zef=20Kucia?= <jkucia@codeweavers.com>
Date: Sun, 23 Jul 2017 23:19:51 +0200
Subject: wined3d: Implement indirect compute dispatch.
---
dlls/d3d11/device.c | 12 +++++++++++-
dlls/wined3d/cs.c | 38 ++++++++++++++++++++++++++++++--------
dlls/wined3d/device.c | 8 ++++++++
dlls/wined3d/drawprim.c | 20 +++++++++++++++++---
dlls/wined3d/wined3d.spec | 1 +
dlls/wined3d/wined3d_private.h | 27 ++++++++++++++++++++++++++-
include/wine/wined3d.h | 2 ++
7 files changed, 95 insertions(+), 13 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 3c1cefb14aa..4cfa3b5a396 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1808,7 +1808,17 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Dispatch(ID3D11DeviceConte
static void STDMETHODCALLTYPE d3d11_immediate_context_DispatchIndirect(ID3D11DeviceContext *iface,
ID3D11Buffer *buffer, UINT offset)
{
- FIXME("iface %p, buffer %p, offset %u stub!\n", iface, buffer, offset);
+ struct d3d_device *device = device_from_immediate_ID3D11DeviceContext(iface);
+ struct d3d_buffer *d3d_buffer;
+
+ TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
+
+ d3d_buffer = unsafe_impl_from_ID3D11Buffer(buffer);
+
+ wined3d_mutex_lock();
+ wined3d_device_dispatch_compute_indirect(device->wined3d_device,
+ d3d_buffer->wined3d_buffer, offset);
+ wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceContext *iface,
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index 4bdab37068c..55aa49785bd 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -113,9 +113,7 @@ struct wined3d_cs_clear
struct wined3d_cs_dispatch
{
enum wined3d_cs_op opcode;
- unsigned int group_count_x;
- unsigned int group_count_y;
- unsigned int group_count_z;
+ struct wined3d_dispatch_parameters parameters;
};
struct wined3d_cs_draw
@@ -717,8 +715,10 @@ static void wined3d_cs_exec_dispatch(struct wined3d_cs *cs, const void *data)
const struct wined3d_cs_dispatch *op = data;
struct wined3d_state *state = &cs->state;
- dispatch_compute(cs->device, state,
- op->group_count_x, op->group_count_y, op->group_count_z);
+ dispatch_compute(cs->device, state, &op->parameters);
+
+ if (op->parameters.indirect)
+ wined3d_resource_release(&op->parameters.u.indirect.buffer->resource);
release_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
release_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE],
@@ -733,9 +733,31 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
op->opcode = WINED3D_CS_OP_DISPATCH;
- op->group_count_x = group_count_x;
- op->group_count_y = group_count_y;
- op->group_count_z = group_count_z;
+ op->parameters.indirect = FALSE;
+ op->parameters.u.direct.group_count_x = group_count_x;
+ op->parameters.u.direct.group_count_y = group_count_y;
+ op->parameters.u.direct.group_count_z = group_count_z;
+
+ acquire_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
+ acquire_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE],
+ state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]);
+
+ cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
+}
+
+void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs,
+ struct wined3d_buffer *buffer, unsigned int offset)
+{
+ const struct wined3d_state *state = &cs->device->state;
+ struct wined3d_cs_dispatch *op;
+
+ op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT);
+ op->opcode = WINED3D_CS_OP_DISPATCH;
+ op->parameters.indirect = TRUE;
+ op->parameters.u.indirect.buffer = buffer;
+ op->parameters.u.indirect.offset = offset;
+
+ wined3d_resource_acquire(&buffer->resource);
acquire_shader_resources(state, 1u << WINED3D_SHADER_TYPE_COMPUTE);
acquire_unordered_access_resources(state->shader[WINED3D_SHADER_TYPE_COMPUTE],
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3b6a335efc1..dfd2da6ceac 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3703,6 +3703,14 @@ void CDECL wined3d_device_dispatch_compute(struct wined3d_device *device,
wined3d_cs_emit_dispatch(device->cs, group_count_x, group_count_y, group_count_z);
}
+void CDECL wined3d_device_dispatch_compute_indirect(struct wined3d_device *device,
+ struct wined3d_buffer *buffer, unsigned int offset)
+{
+ TRACE("device %p, buffer %p, offset %u.\n", device, buffer, offset);
+
+ wined3d_cs_emit_dispatch_indirect(device->cs, buffer, offset);
+}
+
void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device,
enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count)
{
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index ad1e587cca7..2f7ed9205ad 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -683,7 +683,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s
}
void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state,
- unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z)
+ const struct wined3d_dispatch_parameters *parameters)
{
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
@@ -713,8 +713,22 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state
return;
}
- GL_EXTCALL(glDispatchCompute(group_count_x, group_count_y, group_count_z));
- checkGLcall("glDispatchCompute");
+ if (!parameters->indirect)
+ {
+ GL_EXTCALL(glDispatchCompute(parameters->u.direct.group_count_x,
+ parameters->u.direct.group_count_y, parameters->u.direct.group_count_z));
+ checkGLcall("dispatch compute");
+ }
+ else
+ {
+ struct wined3d_buffer *buffer = parameters->u.indirect.buffer;
+
+ wined3d_buffer_load(buffer, context, state);
+ GL_EXTCALL(glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, buffer->buffer_object));
+ GL_EXTCALL(glDispatchComputeIndirect((GLintptr)0 + parameters->u.indirect.offset));
+ GL_EXTCALL(glBindBuffer(GL_DISPATCH_INDIRECT_BUFFER, 0));
+ checkGLcall("dispatch compute indirect");
+ }
GL_EXTCALL(glMemoryBarrier(GL_ALL_BARRIER_BITS));
checkGLcall("glMemoryBarrier");
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index d17e2c9eb6d..09d1d644f4b 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -42,6 +42,7 @@
@ cdecl wined3d_device_create(ptr long long ptr long long ptr ptr)
@ cdecl wined3d_device_decref(ptr)
@ cdecl wined3d_device_dispatch_compute(ptr long long long)
+@ cdecl wined3d_device_dispatch_compute_indirect(ptr ptr long)
@ cdecl wined3d_device_draw_indexed_primitive(ptr long long)
@ cdecl wined3d_device_draw_indexed_primitive_instanced(ptr long long long long)
@ cdecl wined3d_device_draw_primitive(ptr long long)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index a487ee25bc9..9425f197c2b 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1479,11 +1479,34 @@ void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_inf
const struct wined3d_state *state, const struct wined3d_gl_info *gl_info,
const struct wined3d_d3d_info *d3d_info) DECLSPEC_HIDDEN;
+struct wined3d_direct_dispatch_parameters
+{
+ unsigned int group_count_x;
+ unsigned int group_count_y;
+ unsigned int group_count_z;
+};
+
+struct wined3d_indirect_dispatch_parameters
+{
+ struct wined3d_buffer *buffer;
+ unsigned int offset;
+};
+
+struct wined3d_dispatch_parameters
+{
+ BOOL indirect;
+ union
+ {
+ struct wined3d_direct_dispatch_parameters direct;
+ struct wined3d_indirect_dispatch_parameters indirect;
+ } u;
+};
+
void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state,
int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
unsigned int start_instance, unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state,
- unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) DECLSPEC_HIDDEN;
+ const struct wined3d_dispatch_parameters *dispatch_parameters) DECLSPEC_HIDDEN;
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN;
#define eps 1e-8f
@@ -3434,6 +3457,8 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff
unsigned int offset, struct wined3d_unordered_access_view *uav) DECLSPEC_HIDDEN;
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs,
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) DECLSPEC_HIDDEN;
+void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs,
+ struct wined3d_buffer *buffer, unsigned int offset) DECLSPEC_HIDDEN;
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum primitive_type, unsigned int patch_vertex_count,
int base_vertex_idx, unsigned int start_idx, unsigned int index_count,
unsigned int start_instance, unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 06772fd645e..a6091a65c86 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2230,6 +2230,8 @@ HRESULT __cdecl wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx,
ULONG __cdecl wined3d_device_decref(struct wined3d_device *device);
void __cdecl wined3d_device_dispatch_compute(struct wined3d_device *device,
unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z);
+void __cdecl wined3d_device_dispatch_compute_indirect(struct wined3d_device *device,
+ struct wined3d_buffer *buffer, unsigned int offset);
HRESULT __cdecl wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count);
void __cdecl wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device *device,
UINT start_idx, UINT index_count, UINT start_instance, UINT instance_count);
--
2.13.1

View File

@ -1,32 +0,0 @@
From 68f13c9c9e48dd5907727d1e54680a6ee8684976 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Thu, 20 Jul 2017 16:39:29 +0200
Subject: wined3d: Recognize SM4 nop opcode.
---
dlls/wined3d/shader_sm4.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 142c0f89811..123ecbc78a4 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -171,6 +171,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_MOVC = 0x37,
WINED3D_SM4_OP_MUL = 0x38,
WINED3D_SM4_OP_NE = 0x39,
+ WINED3D_SM4_OP_NOP = 0x3a,
WINED3D_SM4_OP_NOT = 0x3b,
WINED3D_SM4_OP_OR = 0x3c,
WINED3D_SM4_OP_RESINFO = 0x3d,
@@ -937,6 +938,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{WINED3D_SM4_OP_MOVC, WINED3DSIH_MOVC, "f", "uff"},
{WINED3D_SM4_OP_MUL, WINED3DSIH_MUL, "f", "ff"},
{WINED3D_SM4_OP_NE, WINED3DSIH_NE, "u", "ff"},
+ {WINED3D_SM4_OP_NOP, WINED3DSIH_NOP, "", ""},
{WINED3D_SM4_OP_NOT, WINED3DSIH_NOT, "u", "u"},
{WINED3D_SM4_OP_OR, WINED3DSIH_OR, "u", "uu"},
{WINED3D_SM4_OP_RESINFO, WINED3DSIH_RESINFO, "f", "iR"},
--
2.13.1

View File

@ -1,4 +1,4 @@
From 421a9c0b534a902617188f3eb0e4f26ce8897613 Mon Sep 17 00:00:00 2001
From 851cedf6dc2daff577d1f301878be82a6e5e17ce Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 9 Aug 2017 06:32:43 +0200
Subject: wined3d: Remaining UAV counter changes.
@ -11,14 +11,13 @@ Based on patches by Michael Müller and Józef Kucia.
dlls/d3d11/device.c | 3 +++
dlls/wined3d/cs.c | 4 +++-
dlls/wined3d/device.c | 6 ++++++
dlls/wined3d/view.c | 5 +----
4 files changed, 13 insertions(+), 5 deletions(-)
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 0f268dfed27..5f8d0f3ec13 100644
index ced9a13a8ae..2ccd71d5111 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1026,6 +1026,9 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CopyStructureCount(ID3D11D
@@ -1036,6 +1036,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);
@ -29,10 +28,10 @@ index 0f268dfed27..5f8d0f3ec13 100644
uav = unsafe_impl_from_ID3D11UnorderedAccessView(src_view);
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c
index a76598ff4ca..39a85fa513d 100644
index 8961dfe1467..1a9a508fc21 100644
--- a/dlls/wined3d/cs.c
+++ b/dlls/wined3d/cs.c
@@ -1295,7 +1295,7 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
@@ -1319,7 +1319,7 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con
device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING(op->pipeline));
@ -41,7 +40,7 @@ index a76598ff4ca..39a85fa513d 100644
wined3d_unordered_access_view_set_counter(op->view, op->initial_count);
}
@@ -2252,6 +2252,7 @@ static void wined3d_cs_exec_copy_uav_counter(struct wined3d_cs *cs, const void *
@@ -2276,6 +2276,7 @@ static void wined3d_cs_exec_copy_uav_counter(struct wined3d_cs *cs, const void *
context_release(context);
wined3d_resource_release(&op->buffer->resource);
@ -49,7 +48,7 @@ index a76598ff4ca..39a85fa513d 100644
}
void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer,
@@ -2266,6 +2267,7 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff
@@ -2290,6 +2291,7 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff
op->view = uav;
wined3d_resource_acquire(&dst_buffer->resource);
@ -58,10 +57,10 @@ index a76598ff4ca..39a85fa513d 100644
cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT);
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 30e7fbed02a..3ecd9952893 100644
index 31955badb10..1822ee1ef37 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3966,6 +3966,12 @@ void CDECL wined3d_device_copy_uav_counter(struct wined3d_device *device,
@@ -3974,6 +3974,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);
@ -74,29 +73,6 @@ index 30e7fbed02a..3ecd9952893 100644
wined3d_cs_emit_copy_uav_counter(device->cs, dst_buffer, offset, uav);
}
diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c
index f4f3b35f20c..896bc12bd32 100644
--- a/dlls/wined3d/view.c
+++ b/dlls/wined3d/view.c
@@ -953,7 +953,7 @@ static void wined3d_unordered_access_view_cs_init(void *object)
context = context_acquire(resource->device, NULL, 0);
gl_info = context->gl_info;
create_buffer_view(&view->gl_view, context, desc, buffer, view->format);
- if (desc->flags & WINED3D_VIEW_BUFFER_COUNTER)
+ if (desc->flags & (WINED3D_VIEW_BUFFER_COUNTER|WINED3D_VIEW_BUFFER_APPEND))
{
static const GLuint initial_value = 0;
GL_EXTCALL(glGenBuffers(1, &view->counter_bo));
@@ -994,9 +994,6 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces
return E_INVALIDARG;
view->desc = *desc;
- if (desc->flags & WINED3D_VIEW_BUFFER_APPEND)
- FIXME("Unhandled view flags %#x.\n", desc->flags);
-
wined3d_resource_incref(view->resource = resource);
wined3d_cs_init_object(resource->device->cs, wined3d_unordered_access_view_cs_init, view);
--
2.13.1