d3d11: Use wined3d_device_context_set_sampler().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9a1d82a3c0
commit
c057c76893
|
@ -537,7 +537,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetShader(ID3D11DeviceCo
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11DeviceContext1 *iface,
|
||||
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
|
||||
|
@ -548,7 +548,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSSetSamplers(ID3D11Device
|
|||
{
|
||||
struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]);
|
||||
|
||||
wined3d_device_set_ps_sampler(device->wined3d_device, start_slot + i,
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i,
|
||||
sampler ? sampler->wined3d_sampler : NULL);
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
@ -799,7 +799,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetShaderResources(ID3D1
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11DeviceContext1 *iface,
|
||||
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
|
||||
|
@ -810,7 +810,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSSetSamplers(ID3D11Device
|
|||
{
|
||||
struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]);
|
||||
|
||||
wined3d_device_set_vs_sampler(device->wined3d_device, start_slot + i,
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i,
|
||||
sampler ? sampler->wined3d_sampler : NULL);
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
@ -913,7 +913,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetShaderResources(ID3D1
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11DeviceContext1 *iface,
|
||||
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
|
||||
|
@ -924,7 +924,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSSetSamplers(ID3D11Device
|
|||
{
|
||||
struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]);
|
||||
|
||||
wined3d_device_set_gs_sampler(device->wined3d_device, start_slot + i,
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i,
|
||||
sampler ? sampler->wined3d_sampler : NULL);
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
@ -1454,7 +1454,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShader(ID3D11DeviceCo
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11DeviceContext1 *iface,
|
||||
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
|
||||
|
@ -1465,7 +1465,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetSamplers(ID3D11Device
|
|||
{
|
||||
struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]);
|
||||
|
||||
wined3d_device_set_hs_sampler(device->wined3d_device, start_slot + i,
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_HULL, start_slot + i,
|
||||
sampler ? sampler->wined3d_sampler : NULL);
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
@ -1522,7 +1522,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetShader(ID3D11DeviceCo
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11DeviceContext1 *iface,
|
||||
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
|
||||
|
@ -1533,7 +1533,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSSetSamplers(ID3D11Device
|
|||
{
|
||||
struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]);
|
||||
|
||||
wined3d_device_set_ds_sampler(device->wined3d_device, start_slot + i,
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, start_slot + i,
|
||||
sampler ? sampler->wined3d_sampler : NULL);
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
@ -1610,7 +1610,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetShader(ID3D11DeviceCo
|
|||
static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11DeviceContext1 *iface,
|
||||
UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
|
||||
{
|
||||
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface);
|
||||
struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
|
||||
unsigned int i;
|
||||
|
||||
TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
|
||||
|
@ -1621,7 +1621,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSSetSamplers(ID3D11Device
|
|||
{
|
||||
struct d3d_sampler_state *sampler = unsafe_impl_from_ID3D11SamplerState(samplers[i]);
|
||||
|
||||
wined3d_device_set_cs_sampler(device->wined3d_device, start_slot + i,
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, start_slot + i,
|
||||
sampler ? sampler->wined3d_sampler : NULL);
|
||||
}
|
||||
wined3d_mutex_unlock();
|
||||
|
@ -2599,15 +2599,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon
|
|||
TRACE("iface %p.\n", iface);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
for (i = 0; i < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; ++i)
|
||||
{
|
||||
wined3d_device_set_vs_sampler(device->wined3d_device, i, NULL);
|
||||
wined3d_device_set_hs_sampler(device->wined3d_device, i, NULL);
|
||||
wined3d_device_set_ds_sampler(device->wined3d_device, i, NULL);
|
||||
wined3d_device_set_gs_sampler(device->wined3d_device, i, NULL);
|
||||
wined3d_device_set_ps_sampler(device->wined3d_device, i, NULL);
|
||||
wined3d_device_set_cs_sampler(device->wined3d_device, i, NULL);
|
||||
}
|
||||
for (i = 0; i < WINED3D_SHADER_TYPE_COUNT; ++i)
|
||||
{
|
||||
wined3d_device_context_set_shader(context->wined3d_context, i, NULL);
|
||||
|
@ -2615,6 +2606,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ClearState(ID3D11DeviceCon
|
|||
wined3d_device_context_set_constant_buffer(context->wined3d_context, i, j, NULL);
|
||||
for (j = 0; j < D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT; ++j)
|
||||
wined3d_device_context_set_shader_resource_view(context->wined3d_context, i, j, NULL);
|
||||
for (j = 0; j < D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT; ++j)
|
||||
wined3d_device_context_set_sampler(context->wined3d_context, i, j, NULL);
|
||||
}
|
||||
for (i = 0; i < D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT; ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue