Signed-off-by: Pablo Martin pmart-wine@riseup.net --- Tested on Ubuntu 17.10.
This patch series is a preparation for implementing the Get/SetConstantBuffer1 methods in an upcoming series. Those methods will also be reusing the same code, so in the end 12 functions are reusing the code for each method. This series makes the upcoming one much more reasonable by removing duplicated code that with the next series would become even more duplicated.
Here goes a small explanation of each patch role in this series:
0001: To implement the helper method, it is needed to directly call the wined3d constant_buffer methods, instead of relying on the intermediate methods, so the first step here is exposing those and the associated enum. Also adds new trace in the methods since atm just the intermediate ones are tracing. 000[23]: Implements the actual helper methods for d3d11, this is what is need for the next series.
The rest of the series is just continuing the refactor until the specific methods can be completely removed and we make good use of the newly exposed generic methods everywhere. I don't really need these for the next series, but I think it makes sense.
000[45]: Helper methods for d3d10 similar to the ones from 2 and 3. 0006: Remove the specific methods and all remaining uses (just in ClearState).
A similar refactoring can be done later for XX[SG]etShaderResources and XX[SG]etShaderSamplers methods reducing a bit of duplicate code and also removing even more specific methods from wined3d. Also note how then ClearState will have just one loop over SHADER_TYPES in the end.
dlls/wined3d/device.c | 8 ++++++-- dlls/wined3d/wined3d.spec | 2 ++ dlls/wined3d/wined3d_private.h | 14 -------------- include/wine/wined3d.h | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 16 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ec77a5661c..4124004198 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2227,11 +2227,13 @@ struct wined3d_shader * CDECL wined3d_device_get_vertex_shader(const struct wine return device->state.shader[WINED3D_SHADER_TYPE_VERTEX]; }
-static void wined3d_device_set_constant_buffer(struct wined3d_device *device, +void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, struct wined3d_buffer *buffer) { struct wined3d_buffer *prev;
+ TRACE("device %p, type %#x, idx %u, buffer %p.\n", device, type, idx, buffer); + if (idx >= MAX_CONSTANT_BUFFERS) { WARN("Invalid constant buffer index %u.\n", idx); @@ -2258,9 +2260,11 @@ void CDECL wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, str wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_VERTEX, idx, buffer); }
-static struct wined3d_buffer *wined3d_device_get_constant_buffer(const struct wined3d_device *device, +struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device, enum wined3d_shader_type shader_type, unsigned int idx) { + TRACE("device %p, shader_type %#x, idx %u.\n", device, shader_type, idx); + if (idx >= MAX_CONSTANT_BUFFERS) { WARN("Invalid constant buffer index %u.\n", idx); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index db50a44295..c397f676e3 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -61,6 +61,7 @@ @ cdecl wined3d_device_get_clip_plane(ptr long ptr) @ cdecl wined3d_device_get_clip_status(ptr ptr) @ cdecl wined3d_device_get_compute_shader(ptr) +@ cdecl wined3d_device_get_constant_buffer(ptr long long) @ cdecl wined3d_device_get_creation_parameters(ptr ptr) @ cdecl wined3d_device_get_cs_cb(ptr long) @ cdecl wined3d_device_get_cs_resource_view(ptr long) @@ -137,6 +138,7 @@ @ cdecl wined3d_device_set_clip_plane(ptr long ptr) @ cdecl wined3d_device_set_clip_status(ptr ptr) @ cdecl wined3d_device_set_compute_shader(ptr ptr) +@ cdecl wined3d_device_set_constant_buffer(ptr long long ptr) @ cdecl wined3d_device_set_cs_cb(ptr long ptr) @ cdecl wined3d_device_set_cs_resource_view(ptr long ptr) @ cdecl wined3d_device_set_cs_sampler(ptr long ptr) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f2c4cd669c..c30bb139d3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -926,20 +926,6 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_TABLE_SIZE };
-enum wined3d_shader_type -{ - WINED3D_SHADER_TYPE_PIXEL, - WINED3D_SHADER_TYPE_VERTEX, - WINED3D_SHADER_TYPE_GEOMETRY, - WINED3D_SHADER_TYPE_HULL, - WINED3D_SHADER_TYPE_DOMAIN, - WINED3D_SHADER_TYPE_GRAPHICS_COUNT, - - WINED3D_SHADER_TYPE_COMPUTE = WINED3D_SHADER_TYPE_GRAPHICS_COUNT, - WINED3D_SHADER_TYPE_COUNT, - WINED3D_SHADER_TYPE_INVALID = WINED3D_SHADER_TYPE_COUNT, -}; - struct wined3d_shader_version { enum wined3d_shader_type type; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index e15269f3b2..17cc3b8751 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -843,6 +843,20 @@ enum wined3d_shader_byte_code_format WINED3D_SHADER_BYTE_CODE_FORMAT_SM4 = 1, };
+enum wined3d_shader_type +{ + WINED3D_SHADER_TYPE_PIXEL, + WINED3D_SHADER_TYPE_VERTEX, + WINED3D_SHADER_TYPE_GEOMETRY, + WINED3D_SHADER_TYPE_HULL, + WINED3D_SHADER_TYPE_DOMAIN, + WINED3D_SHADER_TYPE_GRAPHICS_COUNT, + + WINED3D_SHADER_TYPE_COMPUTE = WINED3D_SHADER_TYPE_GRAPHICS_COUNT, + WINED3D_SHADER_TYPE_COUNT, + WINED3D_SHADER_TYPE_INVALID = WINED3D_SHADER_TYPE_COUNT, +}; + #define WINED3DCOLORWRITEENABLE_RED (1u << 0) #define WINED3DCOLORWRITEENABLE_GREEN (1u << 1) #define WINED3DCOLORWRITEENABLE_BLUE (1u << 2) @@ -2247,6 +2261,8 @@ HRESULT __cdecl wined3d_device_get_clip_plane(const struct wined3d_device *devic HRESULT __cdecl wined3d_device_get_clip_status(const struct wined3d_device *device, struct wined3d_clip_status *clip_status); struct wined3d_shader * __cdecl wined3d_device_get_compute_shader(const struct wined3d_device *device); +struct wined3d_buffer * __cdecl wined3d_device_get_constant_buffer(const struct wined3d_device *device, + enum wined3d_shader_type shader_type, unsigned int idx); void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *creation_parameters); struct wined3d_buffer * __cdecl wined3d_device_get_cs_cb(const struct wined3d_device *device, unsigned int idx); @@ -2365,6 +2381,8 @@ HRESULT __cdecl wined3d_device_set_clip_plane(struct wined3d_device *device, HRESULT __cdecl wined3d_device_set_clip_status(struct wined3d_device *device, const struct wined3d_clip_status *clip_status); void __cdecl wined3d_device_set_compute_shader(struct wined3d_device *device, struct wined3d_shader *shader); +void __cdecl wined3d_device_set_constant_buffer(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, + struct wined3d_buffer *buffer); void __cdecl wined3d_device_set_cs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer); void __cdecl wined3d_device_set_cs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view);
Signed-off-by: Pablo Martin pmart-wine@riseup.net --- dlls/d3d11/device.c | 101 +++++++++++++++------------------------------------- 1 file changed, 29 insertions(+), 72 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 36ed44b176..5b5449cd8b 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -97,6 +97,23 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceConte return refcount; }
+static void d3d11_immediate_context_set_constant_buffers(ID3D11DeviceContext1 *iface, + enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) +{ + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + unsigned int i; + + wined3d_mutex_lock(); + for (i = 0; i < buffer_count; ++i) + { + struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); + + wined3d_device_set_constant_buffer(device->wined3d_device, type, start_slot + i, + buffer ? buffer->wined3d_buffer : NULL); + } + wined3d_mutex_unlock(); +} + static void STDMETHODCALLTYPE d3d11_immediate_context_GetDevice(ID3D11DeviceContext1 *iface, ID3D11Device **device) { struct d3d_device *device_object = device_from_immediate_ID3D11DeviceContext1(iface); @@ -140,21 +157,11 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_SetPrivateDataInterface static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); - - wined3d_device_set_vs_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_set_constant_buffers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShaderResources(ID3D11DeviceContext1 *iface, @@ -302,21 +309,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_Unmap(ID3D11DeviceContext1 static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); - - wined3d_device_set_ps_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_set_constant_buffers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_IASetInputLayout(ID3D11DeviceContext1 *iface, @@ -405,21 +402,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DrawInstanced(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); - - wined3d_device_set_gs_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_set_constant_buffers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShader(ID3D11DeviceContext1 *iface, @@ -1260,21 +1247,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); - - wined3d_device_set_hs_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_set_constant_buffers(iface, WINED3D_SHADER_TYPE_HULL, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShaderResources(ID3D11DeviceContext1 *iface, @@ -1337,21 +1314,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); - - wined3d_device_set_ds_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_set_constant_buffers(iface, WINED3D_SHADER_TYPE_DOMAIN, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShaderResources(ID3D11DeviceContext1 *iface, @@ -1434,21 +1401,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D11Buffer(buffers[i]); - - wined3d_device_set_cs_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_set_constant_buffers(iface, WINED3D_SHADER_TYPE_COMPUTE, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers(ID3D11DeviceContext1 *iface,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Pablo Martin pmart-wine@riseup.net --- dlls/d3d11/device.c | 155 +++++++++++++--------------------------------------- 1 file changed, 38 insertions(+), 117 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 5b5449cd8b..a35b82fe3d 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -97,6 +97,32 @@ static ULONG STDMETHODCALLTYPE d3d11_immediate_context_Release(ID3D11DeviceConte return refcount; }
+static void d3d11_immediate_context_get_constant_buffers(ID3D11DeviceContext1 *iface, + enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) +{ + struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); + unsigned int i; + + wined3d_mutex_lock(); + for (i = 0; i < buffer_count; ++i) + { + struct wined3d_buffer *wined3d_buffer; + struct d3d_buffer *buffer_impl; + + if (!(wined3d_buffer = wined3d_device_get_constant_buffer(device->wined3d_device, + type, start_slot + i))) + { + buffers[i] = NULL; + continue; + } + + buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); + buffers[i] = &buffer_impl->ID3D11Buffer_iface; + ID3D11Buffer_AddRef(buffers[i]); + } + wined3d_mutex_unlock(); +} + static void d3d11_immediate_context_set_constant_buffers(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers) { @@ -1411,29 +1437,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetConstantBuffers(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_vs_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - buffers[i] = &buffer_impl->ID3D11Buffer_iface; - ID3D11Buffer_AddRef(buffers[i]); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_get_constant_buffers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D11DeviceContext1 *iface, @@ -1553,29 +1561,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_ps_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - buffers[i] = &buffer_impl->ID3D11Buffer_iface; - ID3D11Buffer_AddRef(buffers[i]); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_get_constant_buffers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetInputLayout(ID3D11DeviceContext1 *iface, @@ -1666,29 +1656,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_IAGetIndexBuffer(ID3D11Dev static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_gs_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - buffers[i] = &buffer_impl->ID3D11Buffer_iface; - ID3D11Buffer_AddRef(buffers[i]); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_get_constant_buffers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceContext1 *iface, @@ -2193,28 +2165,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_hs_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - ID3D11Buffer_AddRef(buffers[i] = &buffer_impl->ID3D11Buffer_iface); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_get_constant_buffers(iface, WINED3D_SHADER_TYPE_HULL, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D11DeviceContext1 *iface, @@ -2302,28 +2257,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_ds_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - ID3D11Buffer_AddRef(buffers[i] = &buffer_impl->ID3D11Buffer_iface); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_get_constant_buffers(iface, WINED3D_SHADER_TYPE_DOMAIN, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShaderResources(ID3D11DeviceContext1 *iface, @@ -2436,28 +2374,11 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11Device static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers) { - struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_cs_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - ID3D11Buffer_AddRef(buffers[i] = &buffer_impl->ID3D11Buffer_iface); - } - wined3d_mutex_unlock(); + d3d11_immediate_context_get_constant_buffers(iface, WINED3D_SHADER_TYPE_COMPUTE, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceContext1 *iface)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Pablo Martin pmart-wine@riseup.net --- dlls/d3d11/device.c | 47 +++++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 30 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index a35b82fe3d..0fdbb3c366 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3890,26 +3890,33 @@ static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device1 *iface)
/* ID3D10Device methods */
-static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device1 *iface, - UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) +static void d3d10_device_set_constant_buffers(ID3D10Device1 *iface, + enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) { struct d3d_device *device = impl_from_ID3D10Device(iface); unsigned int i;
- TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", - iface, start_slot, buffer_count, buffers); - wined3d_mutex_lock(); for (i = 0; i < buffer_count; ++i) { struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]);
- wined3d_device_set_vs_cb(device->wined3d_device, start_slot + i, + wined3d_device_set_constant_buffer(device->wined3d_device, type, start_slot + i, buffer ? buffer->wined3d_buffer : NULL); } wined3d_mutex_unlock(); }
+static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device1 *iface, + UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) +{ + TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", + iface, start_slot, buffer_count, buffers); + + d3d10_device_set_constant_buffers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, + buffer_count, buffers); +} + static void STDMETHODCALLTYPE d3d10_device_PSSetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views) { @@ -4006,21 +4013,11 @@ static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device1 *iface, UINT verte static void STDMETHODCALLTYPE d3d10_device_PSSetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]); - - wined3d_device_set_ps_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d10_device_set_constant_buffers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device1 *iface, @@ -4110,21 +4107,11 @@ static void STDMETHODCALLTYPE d3d10_device_DrawInstanced(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_GSSetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct d3d_buffer *buffer = unsafe_impl_from_ID3D10Buffer(buffers[i]); - - wined3d_device_set_gs_cb(device->wined3d_device, start_slot + i, - buffer ? buffer->wined3d_buffer : NULL); - } - wined3d_mutex_unlock(); + d3d10_device_set_constant_buffers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, + buffer_count, buffers); }
static void STDMETHODCALLTYPE d3d10_device_GSSetShader(ID3D10Device1 *iface, ID3D10GeometryShader *shader)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Pablo Martin pmart-wine@riseup.net --- dlls/d3d11/device.c | 92 +++++++++++++++++++---------------------------------- 1 file changed, 32 insertions(+), 60 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 0fdbb3c366..d231284db3 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -3890,6 +3890,32 @@ static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device1 *iface)
/* ID3D10Device methods */
+static void d3d10_device_get_constant_buffers(ID3D10Device1 *iface, + enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers) +{ + struct d3d_device *device = impl_from_ID3D10Device(iface); + unsigned int i; + + wined3d_mutex_lock(); + for (i = 0; i < buffer_count; ++i) + { + struct wined3d_buffer *wined3d_buffer; + struct d3d_buffer *buffer_impl; + + if (!(wined3d_buffer = wined3d_device_get_constant_buffer(device->wined3d_device, + type, start_slot + i))) + { + buffers[i] = NULL; + continue; + } + + buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); + buffers[i] = &buffer_impl->ID3D10Buffer_iface; + ID3D10Buffer_AddRef(buffers[i]); + } + wined3d_mutex_unlock(); +} + static void d3d10_device_set_constant_buffers(ID3D10Device1 *iface, enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) { @@ -4511,29 +4537,11 @@ static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device1 *ifa static void STDMETHODCALLTYPE d3d10_device_VSGetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_vs_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - buffers[i] = &buffer_impl->ID3D10Buffer_iface; - ID3D10Buffer_AddRef(buffers[i]); - } - wined3d_mutex_unlock(); + d3d10_device_get_constant_buffers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, buffer_count, + buffers); }
static void STDMETHODCALLTYPE d3d10_device_PSGetShaderResources(ID3D10Device1 *iface, @@ -4639,29 +4647,11 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetShader(ID3D10Device1 *iface, ID3 static void STDMETHODCALLTYPE d3d10_device_PSGetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_ps_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - buffers[i] = &buffer_impl->ID3D10Buffer_iface; - ID3D10Buffer_AddRef(buffers[i]); - } - wined3d_mutex_unlock(); + d3d10_device_get_constant_buffers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, buffer_count, + buffers); }
static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device1 *iface, ID3D10InputLayout **input_layout) @@ -4747,29 +4737,11 @@ static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device1 *iface static void STDMETHODCALLTYPE d3d10_device_GSGetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n", iface, start_slot, buffer_count, buffers);
- wined3d_mutex_lock(); - for (i = 0; i < buffer_count; ++i) - { - struct wined3d_buffer *wined3d_buffer; - struct d3d_buffer *buffer_impl; - - if (!(wined3d_buffer = wined3d_device_get_gs_cb(device->wined3d_device, start_slot + i))) - { - buffers[i] = NULL; - continue; - } - - buffer_impl = wined3d_buffer_get_parent(wined3d_buffer); - buffers[i] = &buffer_impl->ID3D10Buffer_iface; - ID3D10Buffer_AddRef(buffers[i]); - } - wined3d_mutex_unlock(); + d3d10_device_get_constant_buffers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, buffer_count, + buffers); }
static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device1 *iface, ID3D10GeometryShader **shader)
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Pablo Martin pmart-wine@riseup.net --- dlls/d3d11/device.c | 12 +++---- dlls/wined3d/device.c | 84 ----------------------------------------------- dlls/wined3d/wined3d.spec | 12 ------- include/wine/wined3d.h | 12 ------- 4 files changed, 4 insertions(+), 116 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index d231284db3..d75ebcfe3c 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2385,7 +2385,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon { struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); static const float blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f}; - unsigned int i; + unsigned int i, j;
TRACE("iface %p.\n", iface);
@@ -2414,14 +2414,10 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon wined3d_device_set_ps_resource_view(device->wined3d_device, i, NULL); wined3d_device_set_cs_resource_view(device->wined3d_device, i, NULL); } - for (i = 0; i < D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; ++i) + for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i) { - wined3d_device_set_vs_cb(device->wined3d_device, i, NULL); - wined3d_device_set_hs_cb(device->wined3d_device, i, NULL); - wined3d_device_set_ds_cb(device->wined3d_device, i, NULL); - wined3d_device_set_gs_cb(device->wined3d_device, i, NULL); - wined3d_device_set_ps_cb(device->wined3d_device, i, NULL); - wined3d_device_set_cs_cb(device->wined3d_device, i, NULL); + for (j = 0; j < D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT; ++j) + wined3d_device_set_constant_buffer(device->wined3d_device, i, j, NULL); } for (i = 0; i < D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; ++i) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4124004198..8ef74b6ef0 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2253,13 +2253,6 @@ void CDECL wined3d_device_set_constant_buffer(struct wined3d_device *device, wined3d_buffer_decref(prev); }
-void CDECL wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); - - wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_VERTEX, idx, buffer); -} - struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wined3d_device *device, enum wined3d_shader_type shader_type, unsigned int idx) { @@ -2274,13 +2267,6 @@ struct wined3d_buffer * CDECL wined3d_device_get_constant_buffer(const struct wi return device->state.cb[shader_type][idx]; }
-struct wined3d_buffer * CDECL wined3d_device_get_vs_cb(const struct wined3d_device *device, UINT idx) -{ - TRACE("device %p, idx %u.\n", device, idx); - - return wined3d_device_get_constant_buffer(device, WINED3D_SHADER_TYPE_VERTEX, idx); -} - static void wined3d_device_set_shader_resource_view(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, struct wined3d_shader_resource_view *view) { @@ -2554,20 +2540,6 @@ struct wined3d_shader * CDECL wined3d_device_get_pixel_shader(const struct wined return device->state.shader[WINED3D_SHADER_TYPE_PIXEL]; }
-void CDECL wined3d_device_set_ps_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); - - wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_PIXEL, idx, buffer); -} - -struct wined3d_buffer * CDECL wined3d_device_get_ps_cb(const struct wined3d_device *device, UINT idx) -{ - TRACE("device %p, idx %u.\n", device, idx); - - return wined3d_device_get_constant_buffer(device, WINED3D_SHADER_TYPE_PIXEL, idx); -} - void CDECL wined3d_device_set_ps_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view) { @@ -2766,20 +2738,6 @@ struct wined3d_shader * CDECL wined3d_device_get_hull_shader(const struct wined3 return device->state.shader[WINED3D_SHADER_TYPE_HULL]; }
-void CDECL wined3d_device_set_hs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); - - wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_HULL, idx, buffer); -} - -struct wined3d_buffer * CDECL wined3d_device_get_hs_cb(const struct wined3d_device *device, unsigned int idx) -{ - TRACE("device %p, idx %u.\n", device, idx); - - return wined3d_device_get_constant_buffer(device, WINED3D_SHADER_TYPE_HULL, idx); -} - void CDECL wined3d_device_set_hs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view) { @@ -2835,20 +2793,6 @@ struct wined3d_shader * CDECL wined3d_device_get_domain_shader(const struct wine return device->state.shader[WINED3D_SHADER_TYPE_DOMAIN]; }
-void CDECL wined3d_device_set_ds_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); - - wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_DOMAIN, idx, buffer); -} - -struct wined3d_buffer * CDECL wined3d_device_get_ds_cb(const struct wined3d_device *device, unsigned int idx) -{ - TRACE("device %p, idx %u.\n", device, idx); - - return wined3d_device_get_constant_buffer(device, WINED3D_SHADER_TYPE_DOMAIN, idx); -} - void CDECL wined3d_device_set_ds_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view) { @@ -2903,20 +2847,6 @@ struct wined3d_shader * CDECL wined3d_device_get_geometry_shader(const struct wi return device->state.shader[WINED3D_SHADER_TYPE_GEOMETRY]; }
-void CDECL wined3d_device_set_gs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); - - wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_GEOMETRY, idx, buffer); -} - -struct wined3d_buffer * CDECL wined3d_device_get_gs_cb(const struct wined3d_device *device, UINT idx) -{ - TRACE("device %p, idx %u.\n", device, idx); - - return wined3d_device_get_constant_buffer(device, WINED3D_SHADER_TYPE_GEOMETRY, idx); -} - void CDECL wined3d_device_set_gs_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view) { @@ -2971,20 +2901,6 @@ struct wined3d_shader * CDECL wined3d_device_get_compute_shader(const struct win return device->state.shader[WINED3D_SHADER_TYPE_COMPUTE]; }
-void CDECL wined3d_device_set_cs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer) -{ - TRACE("device %p, idx %u, buffer %p.\n", device, idx, buffer); - - wined3d_device_set_constant_buffer(device, WINED3D_SHADER_TYPE_COMPUTE, idx, buffer); -} - -struct wined3d_buffer * CDECL wined3d_device_get_cs_cb(const struct wined3d_device *device, unsigned int idx) -{ - TRACE("device %p, idx %u.\n", device, idx); - - return wined3d_device_get_constant_buffer(device, WINED3D_SHADER_TYPE_COMPUTE, idx); -} - void CDECL wined3d_device_set_cs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view) { diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index c397f676e3..93cecf0d3b 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -63,7 +63,6 @@ @ cdecl wined3d_device_get_compute_shader(ptr) @ cdecl wined3d_device_get_constant_buffer(ptr long long) @ cdecl wined3d_device_get_creation_parameters(ptr ptr) -@ cdecl wined3d_device_get_cs_cb(ptr long) @ cdecl wined3d_device_get_cs_resource_view(ptr long) @ cdecl wined3d_device_get_cs_sampler(ptr long) @ cdecl wined3d_device_get_cs_uav(ptr long) @@ -71,15 +70,12 @@ @ cdecl wined3d_device_get_device_caps(ptr ptr) @ cdecl wined3d_device_get_display_mode(ptr long ptr ptr) @ cdecl wined3d_device_get_domain_shader(ptr) -@ cdecl wined3d_device_get_ds_cb(ptr long) @ cdecl wined3d_device_get_ds_resource_view(ptr long) @ cdecl wined3d_device_get_ds_sampler(ptr long) @ cdecl wined3d_device_get_gamma_ramp(ptr long ptr) @ cdecl wined3d_device_get_geometry_shader(ptr) -@ cdecl wined3d_device_get_gs_cb(ptr long) @ cdecl wined3d_device_get_gs_resource_view(ptr long) @ cdecl wined3d_device_get_gs_sampler(ptr long) -@ cdecl wined3d_device_get_hs_cb(ptr long) @ cdecl wined3d_device_get_hs_resource_view(ptr long) @ cdecl wined3d_device_get_hs_sampler(ptr long) @ cdecl wined3d_device_get_hull_shader(ptr) @@ -92,7 +88,6 @@ @ cdecl wined3d_device_get_pixel_shader(ptr) @ cdecl wined3d_device_get_predication(ptr ptr) @ cdecl wined3d_device_get_primitive_type(ptr ptr ptr) -@ cdecl wined3d_device_get_ps_cb(ptr long) @ cdecl wined3d_device_get_ps_consts_b(ptr long long ptr) @ cdecl wined3d_device_get_ps_consts_f(ptr long long ptr) @ cdecl wined3d_device_get_ps_consts_i(ptr long long ptr) @@ -117,7 +112,6 @@ @ cdecl wined3d_device_get_vertex_declaration(ptr) @ cdecl wined3d_device_get_vertex_shader(ptr) @ cdecl wined3d_device_get_viewports(ptr ptr ptr) -@ cdecl wined3d_device_get_vs_cb(ptr long) @ cdecl wined3d_device_get_vs_consts_b(ptr long long ptr) @ cdecl wined3d_device_get_vs_consts_f(ptr long long ptr) @ cdecl wined3d_device_get_vs_consts_i(ptr long long ptr) @@ -139,7 +133,6 @@ @ cdecl wined3d_device_set_clip_status(ptr ptr) @ cdecl wined3d_device_set_compute_shader(ptr ptr) @ cdecl wined3d_device_set_constant_buffer(ptr long long ptr) -@ cdecl wined3d_device_set_cs_cb(ptr long ptr) @ cdecl wined3d_device_set_cs_resource_view(ptr long ptr) @ cdecl wined3d_device_set_cs_sampler(ptr long ptr) @ cdecl wined3d_device_set_cs_uav(ptr long ptr long) @@ -148,15 +141,12 @@ @ cdecl wined3d_device_set_depth_stencil_view(ptr ptr) @ cdecl wined3d_device_set_dialog_box_mode(ptr long) @ cdecl wined3d_device_set_domain_shader(ptr ptr) -@ cdecl wined3d_device_set_ds_cb(ptr long ptr) @ cdecl wined3d_device_set_ds_resource_view(ptr long ptr) @ cdecl wined3d_device_set_ds_sampler(ptr long ptr) @ cdecl wined3d_device_set_gamma_ramp(ptr long long ptr) @ cdecl wined3d_device_set_geometry_shader(ptr ptr) -@ cdecl wined3d_device_set_gs_cb(ptr long ptr) @ cdecl wined3d_device_set_gs_resource_view(ptr long ptr) @ cdecl wined3d_device_set_gs_sampler(ptr long ptr) -@ cdecl wined3d_device_set_hs_cb(ptr long ptr) @ cdecl wined3d_device_set_hs_resource_view(ptr long ptr) @ cdecl wined3d_device_set_hs_sampler(ptr long ptr) @ cdecl wined3d_device_set_hull_shader(ptr ptr) @@ -170,7 +160,6 @@ @ cdecl wined3d_device_set_pixel_shader(ptr ptr) @ cdecl wined3d_device_set_predication(ptr ptr long) @ cdecl wined3d_device_set_primitive_type(ptr long long) -@ cdecl wined3d_device_set_ps_cb(ptr long ptr) @ cdecl wined3d_device_set_ps_consts_b(ptr long long ptr) @ cdecl wined3d_device_set_ps_consts_f(ptr long long ptr) @ cdecl wined3d_device_set_ps_consts_i(ptr long long ptr) @@ -192,7 +181,6 @@ @ cdecl wined3d_device_set_vertex_declaration(ptr ptr) @ cdecl wined3d_device_set_vertex_shader(ptr ptr) @ cdecl wined3d_device_set_viewports(ptr long ptr) -@ cdecl wined3d_device_set_vs_cb(ptr long ptr) @ cdecl wined3d_device_set_vs_consts_b(ptr long long ptr) @ cdecl wined3d_device_set_vs_consts_f(ptr long long ptr) @ cdecl wined3d_device_set_vs_consts_i(ptr long long ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 17cc3b8751..5f54826b56 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2265,7 +2265,6 @@ struct wined3d_buffer * __cdecl wined3d_device_get_constant_buffer(const struct enum wined3d_shader_type shader_type, unsigned int idx); void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *creation_parameters); -struct wined3d_buffer * __cdecl wined3d_device_get_cs_cb(const struct wined3d_device *device, unsigned int idx); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_cs_resource_view(const struct wined3d_device *device, unsigned int idx); struct wined3d_sampler * __cdecl wined3d_device_get_cs_sampler(const struct wined3d_device *device, unsigned int idx); @@ -2276,18 +2275,15 @@ HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *devi HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation); struct wined3d_shader * __cdecl wined3d_device_get_domain_shader(const struct wined3d_device *device); -struct wined3d_buffer * __cdecl wined3d_device_get_ds_cb(const struct wined3d_device *device, unsigned int idx); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_ds_resource_view(const struct wined3d_device *device, unsigned int idx); struct wined3d_sampler * __cdecl wined3d_device_get_ds_sampler(const struct wined3d_device *device, unsigned int idx); void __cdecl wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp); struct wined3d_shader * __cdecl wined3d_device_get_geometry_shader(const struct wined3d_device *device); -struct wined3d_buffer * __cdecl wined3d_device_get_gs_cb(const struct wined3d_device *device, UINT idx); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_gs_resource_view(const struct wined3d_device *device, UINT idx); struct wined3d_sampler * __cdecl wined3d_device_get_gs_sampler(const struct wined3d_device *device, UINT idx); -struct wined3d_buffer * __cdecl wined3d_device_get_hs_cb(const struct wined3d_device *device, unsigned int idx); struct wined3d_shader_resource_view * __cdecl wined3d_device_get_hs_resource_view(const struct wined3d_device *device, unsigned int idx); struct wined3d_sampler * __cdecl wined3d_device_get_hs_sampler(const struct wined3d_device *device, unsigned int idx); @@ -2304,7 +2300,6 @@ struct wined3d_shader * __cdecl wined3d_device_get_pixel_shader(const struct win struct wined3d_query * __cdecl wined3d_device_get_predication(struct wined3d_device *device, BOOL *value); void __cdecl wined3d_device_get_primitive_type(const struct wined3d_device *device, enum wined3d_primitive_type *primitive_topology, unsigned int *patch_vertex_count); -struct wined3d_buffer * __cdecl wined3d_device_get_ps_cb(const struct wined3d_device *device, UINT idx); HRESULT __cdecl wined3d_device_get_ps_consts_b(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, BOOL *constants); HRESULT __cdecl wined3d_device_get_ps_consts_f(const struct wined3d_device *device, @@ -2345,7 +2340,6 @@ struct wined3d_vertex_declaration * __cdecl wined3d_device_get_vertex_declaratio struct wined3d_shader * __cdecl wined3d_device_get_vertex_shader(const struct wined3d_device *device); void __cdecl wined3d_device_get_viewports(const struct wined3d_device *device, unsigned int *viewport_count, struct wined3d_viewport *viewports); -struct wined3d_buffer * __cdecl wined3d_device_get_vs_cb(const struct wined3d_device *device, UINT idx); HRESULT __cdecl wined3d_device_get_vs_consts_b(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, BOOL *constants); HRESULT __cdecl wined3d_device_get_vs_consts_f(const struct wined3d_device *device, @@ -2383,7 +2377,6 @@ HRESULT __cdecl wined3d_device_set_clip_status(struct wined3d_device *device, void __cdecl wined3d_device_set_compute_shader(struct wined3d_device *device, struct wined3d_shader *shader); void __cdecl wined3d_device_set_constant_buffer(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, struct wined3d_buffer *buffer); -void __cdecl wined3d_device_set_cs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer); void __cdecl wined3d_device_set_cs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_cs_sampler(struct wined3d_device *device, @@ -2398,7 +2391,6 @@ void __cdecl wined3d_device_set_depth_stencil_view(struct wined3d_device *device struct wined3d_rendertarget_view *view); HRESULT __cdecl wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs); void __cdecl wined3d_device_set_domain_shader(struct wined3d_device *device, struct wined3d_shader *shader); -void __cdecl wined3d_device_set_ds_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer); void __cdecl wined3d_device_set_ds_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_ds_sampler(struct wined3d_device *device, @@ -2406,11 +2398,9 @@ void __cdecl wined3d_device_set_ds_sampler(struct wined3d_device *device, void __cdecl wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp); void __cdecl wined3d_device_set_geometry_shader(struct wined3d_device *device, struct wined3d_shader *shader); -void __cdecl wined3d_device_set_gs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer); void __cdecl wined3d_device_set_gs_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_gs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler); -void __cdecl wined3d_device_set_hs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer); void __cdecl wined3d_device_set_hs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_hs_sampler(struct wined3d_device *device, @@ -2430,7 +2420,6 @@ void __cdecl wined3d_device_set_predication(struct wined3d_device *device, struct wined3d_query *predicate, BOOL value); void __cdecl wined3d_device_set_primitive_type(struct wined3d_device *device, enum wined3d_primitive_type primitive_topology, unsigned int patch_vertex_count); -void __cdecl wined3d_device_set_ps_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer); HRESULT __cdecl wined3d_device_set_ps_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants); HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device, @@ -2468,7 +2457,6 @@ void __cdecl wined3d_device_set_vertex_declaration(struct wined3d_device *device void __cdecl wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader); void __cdecl wined3d_device_set_viewports(struct wined3d_device *device, unsigned int viewport_count, const struct wined3d_viewport *viewports); -void __cdecl wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer); HRESULT __cdecl wined3d_device_set_vs_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants); HRESULT __cdecl wined3d_device_set_vs_consts_f(struct wined3d_device *device,
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com