Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/d3d11/device.c | 168 ++++++++++++--------------------- dlls/wined3d/cs.c | 38 ++++---- dlls/wined3d/device.c | 38 ++++---- dlls/wined3d/wined3d.spec | 2 +- dlls/wined3d/wined3d_private.h | 4 +- include/wine/wined3d.h | 4 +- 6 files changed, 107 insertions(+), 147 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index bfb21b59839..b3b56af4941 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -604,6 +604,31 @@ static void d3d11_device_context_set_shader_resource_views(ID3D11DeviceContext1 wined3d_mutex_unlock(); }
+static void d3d11_device_context_set_samplers(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, + unsigned int start_slot, unsigned int count, ID3D11SamplerState *const *samplers) +{ + struct wined3d_sampler *wined3d_samplers[D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT]; + struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); + unsigned int i; + + if (count > ARRAY_SIZE(wined3d_samplers)) + { + WARN("Sampler count %u exceeds limit; ignoring call.\n", count); + return; + } + + for (i = 0; i < count; ++i) + { + struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); + + wined3d_samplers[i] = sampler ? sampler->wined3d_sampler : NULL; + } + + wined3d_mutex_lock(); + wined3d_device_context_set_samplers(context->wined3d_context, type, start_slot, count, wined3d_samplers); + wined3d_mutex_unlock(); +} + static void STDMETHODCALLTYPE d3d11_device_context_GetDevice(ID3D11DeviceContext1 *iface, ID3D11Device **device) { struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); @@ -684,21 +709,10 @@ static void STDMETHODCALLTYPE d3d11_device_context_PSSetShader(ID3D11DeviceConte static void STDMETHODCALLTYPE d3d11_device_context_PSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i, - sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d11_device_context_VSSetShader(ID3D11DeviceContext1 *iface, @@ -936,21 +950,10 @@ static void STDMETHODCALLTYPE d3d11_device_context_VSSetShaderResources(ID3D11De static void STDMETHODCALLTYPE d3d11_device_context_VSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i, - sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d11_device_context_Begin(ID3D11DeviceContext1 *iface, @@ -1037,21 +1040,10 @@ static void STDMETHODCALLTYPE d3d11_device_context_GSSetShaderResources(ID3D11De static void STDMETHODCALLTYPE d3d11_device_context_GSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i, - sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d11_device_context_OMSetRenderTargets(ID3D11DeviceContext1 *iface, @@ -1563,21 +1555,10 @@ static void STDMETHODCALLTYPE d3d11_device_context_HSSetShader(ID3D11DeviceConte static void STDMETHODCALLTYPE d3d11_device_context_HSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_HULL, start_slot + i, - sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_HULL, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d11_device_context_HSSetConstantBuffers(ID3D11DeviceContext1 *iface, @@ -1620,21 +1601,10 @@ static void STDMETHODCALLTYPE d3d11_device_context_DSSetShader(ID3D11DeviceConte static void STDMETHODCALLTYPE d3d11_device_context_DSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, start_slot + i, - sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_DOMAIN, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d11_device_context_DSSetConstantBuffers(ID3D11DeviceContext1 *iface, @@ -1697,21 +1667,10 @@ static void STDMETHODCALLTYPE d3d11_device_context_CSSetShader(ID3D11DeviceConte static void STDMETHODCALLTYPE d3d11_device_context_CSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers) { - struct d3d11_device_context *context = impl_from_ID3D11DeviceContext1(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, start_slot + i, - sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_COMPUTE, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d11_device_context_CSSetConstantBuffers(ID3D11DeviceContext1 *iface, @@ -4575,6 +4534,32 @@ static void d3d10_device_set_shader_resource_views(ID3D10Device1 *iface, enum wi wined3d_mutex_unlock(); }
+static void d3d10_device_set_samplers(ID3D10Device1 *iface, enum wined3d_shader_type type, + unsigned int start_slot, unsigned int count, ID3D10SamplerState *const *samplers) +{ + struct wined3d_sampler *wined3d_samplers[D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT]; + struct d3d_device *device = impl_from_ID3D10Device(iface); + unsigned int i; + + if (count > ARRAY_SIZE(wined3d_samplers)) + { + WARN("Sampler count %u exceeds limit; ignoring call.\n", count); + return; + } + + for (i = 0; i < count; ++i) + { + struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]); + + wined3d_samplers[i] = sampler ? sampler->wined3d_sampler : NULL; + } + + wined3d_mutex_lock(); + wined3d_device_context_set_samplers(device->immediate_context.wined3d_context, + type, start_slot, count, wined3d_samplers); + wined3d_mutex_unlock(); +} + static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers) { @@ -4611,21 +4596,10 @@ static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device1 *iface, static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(device->immediate_context.wined3d_context, - WINED3D_SHADER_TYPE_PIXEL, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d10_device_set_samplers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d10_device_VSSetShader(ID3D10Device1 *iface, @@ -4810,21 +4784,10 @@ static void STDMETHODCALLTYPE d3d10_device_VSSetShaderResources(ID3D10Device1 *i static void STDMETHODCALLTYPE d3d10_device_VSSetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(device->immediate_context.wined3d_context, - WINED3D_SHADER_TYPE_VERTEX, start_slot + i, sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d10_device_set_samplers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d10_device_SetPredication(ID3D10Device1 *iface, ID3D10Predicate *predicate, BOOL value) @@ -4853,21 +4816,10 @@ static void STDMETHODCALLTYPE d3d10_device_GSSetShaderResources(ID3D10Device1 *i static void STDMETHODCALLTYPE d3d10_device_GSSetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers) { - struct d3d_device *device = impl_from_ID3D10Device(iface); - unsigned int i; - TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n", iface, start_slot, sampler_count, samplers);
- wined3d_mutex_lock(); - for (i = 0; i < sampler_count; ++i) - { - struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D10SamplerState(samplers[i]); - - wined3d_device_context_set_sampler(device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, - start_slot + i, sampler ? sampler->wined3d_sampler : NULL); - } - wined3d_mutex_unlock(); + d3d10_device_set_samplers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, sampler_count, samplers); }
static void STDMETHODCALLTYPE d3d10_device_OMSetRenderTargets(ID3D10Device1 *iface, diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 12d3c99e909..83c9cef5c06 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -120,7 +120,7 @@ enum wined3d_cs_op WINED3D_CS_OP_SET_TEXTURE, WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEWS, WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW, - WINED3D_CS_OP_SET_SAMPLER, + WINED3D_CS_OP_SET_SAMPLERS, WINED3D_CS_OP_SET_SHADER, WINED3D_CS_OP_SET_BLEND_STATE, WINED3D_CS_OP_SET_DEPTH_STENCIL_STATE, @@ -325,12 +325,13 @@ struct wined3d_cs_set_unordered_access_view unsigned int initial_count; };
-struct wined3d_cs_set_sampler +struct wined3d_cs_set_samplers { enum wined3d_cs_op opcode; enum wined3d_shader_type type; - UINT sampler_idx; - struct wined3d_sampler *sampler; + unsigned int start_idx; + unsigned int count; + struct wined3d_sampler *samplers[1]; };
struct wined3d_cs_set_shader @@ -609,7 +610,7 @@ static const char *debug_cs_op(enum wined3d_cs_op op) WINED3D_TO_STR(WINED3D_CS_OP_SET_TEXTURE); WINED3D_TO_STR(WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEWS); WINED3D_TO_STR(WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW); - WINED3D_TO_STR(WINED3D_CS_OP_SET_SAMPLER); + WINED3D_TO_STR(WINED3D_CS_OP_SET_SAMPLERS); WINED3D_TO_STR(WINED3D_CS_OP_SET_SHADER); WINED3D_TO_STR(WINED3D_CS_OP_SET_BLEND_STATE); WINED3D_TO_STR(WINED3D_CS_OP_SET_DEPTH_STENCIL_STATE); @@ -1742,27 +1743,32 @@ void wined3d_device_context_emit_set_unordered_access_view(struct wined3d_device wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); }
-static void wined3d_cs_exec_set_sampler(struct wined3d_cs *cs, const void *data) +static void wined3d_cs_exec_set_samplers(struct wined3d_cs *cs, const void *data) { - const struct wined3d_cs_set_sampler *op = data; + const struct wined3d_cs_set_samplers *op = data; + unsigned int i; + + for (i = 0; i < op->count; ++i) + cs->state.sampler[op->type][op->start_idx + i] = op->samplers[i];
- cs->state.sampler[op->type][op->sampler_idx] = op->sampler; if (op->type != WINED3D_SHADER_TYPE_COMPUTE) device_invalidate_state(cs->c.device, STATE_GRAPHICS_SHADER_RESOURCE_BINDING); else device_invalidate_state(cs->c.device, STATE_COMPUTE_SHADER_RESOURCE_BINDING); }
-void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, - unsigned int sampler_idx, struct wined3d_sampler *sampler) +void wined3d_device_context_emit_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers) { - struct wined3d_cs_set_sampler *op; + struct wined3d_cs_set_samplers *op;
- op = wined3d_device_context_require_space(context, sizeof(*op), WINED3D_CS_QUEUE_DEFAULT); - op->opcode = WINED3D_CS_OP_SET_SAMPLER; + op = wined3d_device_context_require_space(context, offsetof(struct wined3d_cs_set_samplers, samplers[count]), + WINED3D_CS_QUEUE_DEFAULT); + op->opcode = WINED3D_CS_OP_SET_SAMPLERS; op->type = type; - op->sampler_idx = sampler_idx; - op->sampler = sampler; + op->start_idx = start_idx; + op->count = count; + memcpy(op->samplers, samplers, count * sizeof(*samplers));
wined3d_device_context_submit(context, WINED3D_CS_QUEUE_DEFAULT); } @@ -2933,7 +2939,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_SET_TEXTURE */ wined3d_cs_exec_set_texture, /* WINED3D_CS_OP_SET_SHADER_RESOURCE_VIEWS */ wined3d_cs_exec_set_shader_resource_views, /* WINED3D_CS_OP_SET_UNORDERED_ACCESS_VIEW */ wined3d_cs_exec_set_unordered_access_view, - /* WINED3D_CS_OP_SET_SAMPLER */ wined3d_cs_exec_set_sampler, + /* WINED3D_CS_OP_SET_SAMPLERS */ wined3d_cs_exec_set_samplers, /* WINED3D_CS_OP_SET_SHADER */ wined3d_cs_exec_set_shader, /* WINED3D_CS_OP_SET_BLEND_STATE */ wined3d_cs_exec_set_blend_state, /* WINED3D_CS_OP_SET_DEPTH_STENCIL_STATE */ wined3d_cs_exec_set_depth_stencil_state, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index a90c55bb6d6..e478256ff5e 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1697,10 +1697,7 @@ void CDECL wined3d_device_context_set_state(struct wined3d_device_context *conte { wined3d_device_context_emit_set_shader(context, i, state->shader[i]); wined3d_device_context_emit_set_constant_buffers(context, i, 0, MAX_CONSTANT_BUFFERS, state->cb[i]); - for (j = 0; j < MAX_SAMPLER_OBJECTS; ++j) - { - wined3d_device_context_emit_set_sampler(context, i, j, state->sampler[i][j]); - } + wined3d_device_context_emit_set_samplers(context, i, 0, MAX_SAMPLER_OBJECTS, state->sampler[i]); wined3d_device_context_emit_set_shader_resource_views(context, i, 0, MAX_SHADER_RESOURCE_VIEWS, state->shader_resource_view[i]); } @@ -2033,30 +2030,35 @@ void CDECL wined3d_device_context_set_shader_resource_views(struct wined3d_devic } }
-void CDECL wined3d_device_context_set_sampler(struct wined3d_device_context *context, - enum wined3d_shader_type type, unsigned int idx, struct wined3d_sampler *sampler) +void CDECL wined3d_device_context_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers) { struct wined3d_state *state = context->state; - struct wined3d_sampler *prev; + unsigned int i;
- TRACE("context %p, type %#x, idx %u, sampler %p.\n", context, type, idx, sampler); + TRACE("context %p, type %#x, start_idx %u, count %u, samplers %p.\n", context, type, start_idx, count, samplers);
- if (idx >= MAX_SAMPLER_OBJECTS) + if (start_idx + count > MAX_SAMPLER_OBJECTS) { - WARN("Invalid sampler index %u.\n", idx); + WARN("Invalid sampler index %u, count %u.\n", start_idx, count); return; }
- prev = state->sampler[type][idx]; - if (sampler == prev) + if (!memcmp(samplers, &state->sampler[type][start_idx], count * sizeof(*samplers))) return;
- if (sampler) - wined3d_sampler_incref(sampler); - state->sampler[type][idx] = sampler; - wined3d_device_context_emit_set_sampler(context, type, idx, sampler); - if (prev) - wined3d_sampler_decref(prev); + wined3d_device_context_emit_set_samplers(context, type, start_idx, count, samplers); + for (i = 0; i < count; ++i) + { + struct wined3d_sampler *prev = state->sampler[type][start_idx + i]; + struct wined3d_sampler *sampler = samplers[i]; + + if (sampler) + wined3d_sampler_incref(sampler); + state->sampler[type][start_idx + i] = sampler; + if (prev) + wined3d_sampler_decref(prev); + } }
void CDECL wined3d_device_context_set_unordered_access_view(struct wined3d_device_context *context, diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 2c61996be6d..c93be0a1007 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -130,7 +130,7 @@ @ cdecl wined3d_device_context_set_primitive_type(ptr long long) @ cdecl wined3d_device_context_set_rasterizer_state(ptr ptr) @ cdecl wined3d_device_context_set_rendertarget_view(ptr long ptr long) -@ cdecl wined3d_device_context_set_sampler(ptr long long ptr) +@ cdecl wined3d_device_context_set_samplers(ptr long long long ptr) @ cdecl wined3d_device_context_set_scissor_rects(ptr long ptr) @ cdecl wined3d_device_context_set_shader(ptr long ptr) @ cdecl wined3d_device_context_set_shader_resource_views(ptr long long long ptr) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ff10b1362f9..75583c32f1c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4813,8 +4813,8 @@ void wined3d_device_context_emit_set_render_state(struct wined3d_device_context enum wined3d_render_state state, unsigned int value) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_rendertarget_view(struct wined3d_device_context *context, unsigned int view_idx, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; -void wined3d_device_context_emit_set_sampler(struct wined3d_device_context *context, enum wined3d_shader_type type, - unsigned int sampler_idx, struct wined3d_sampler *sampler) DECLSPEC_HIDDEN; +void wined3d_device_context_emit_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_sampler_state(struct wined3d_device_context *context, unsigned int sampler_idx, enum wined3d_sampler_state state, unsigned int value) DECLSPEC_HIDDEN; void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 7272a40287e..5de5026107f 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2511,8 +2511,8 @@ void __cdecl wined3d_device_context_set_rasterizer_state(struct wined3d_device_c struct wined3d_rasterizer_state *rasterizer_state); HRESULT __cdecl wined3d_device_context_set_rendertarget_view(struct wined3d_device_context *context, unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport); -void __cdecl wined3d_device_context_set_sampler(struct wined3d_device_context *context, - enum wined3d_shader_type type, unsigned int idx, struct wined3d_sampler *sampler); +void __cdecl wined3d_device_context_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, + unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers); void __cdecl wined3d_device_context_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects); void __cdecl wined3d_device_context_set_shader(struct wined3d_device_context *context,