diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 469ca0d6c49..7e4212a4bc6 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -1708,7 +1708,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **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", @@ -1720,7 +1720,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11Device struct wined3d_sampler *wined3d_sampler; struct d3d_sampler_state *sampler_impl; - if (!(wined3d_sampler = wined3d_device_get_ps_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i))) { samplers[i] = NULL; continue; @@ -1943,7 +1944,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **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", @@ -1955,7 +1956,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetSamplers(ID3D11Device struct wined3d_sampler *wined3d_sampler; struct d3d_sampler_state *sampler_impl; - if (!(wined3d_sampler = wined3d_device_get_vs_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i))) { samplers[i] = NULL; continue; @@ -2022,7 +2024,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShaderResources(ID3D1 static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **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", @@ -2034,7 +2036,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetSamplers(ID3D11Device struct d3d_sampler_state *sampler_impl; struct wined3d_sampler *wined3d_sampler; - if (!(wined3d_sampler = wined3d_device_get_gs_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i))) { samplers[i] = NULL; continue; @@ -2350,7 +2353,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **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", @@ -2362,7 +2365,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetSamplers(ID3D11Device struct wined3d_sampler *wined3d_sampler; struct d3d_sampler_state *sampler_impl; - if (!(wined3d_sampler = wined3d_device_get_hs_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + context->wined3d_context, WINED3D_SHADER_TYPE_HULL, start_slot + i))) { samplers[i] = NULL; continue; @@ -2443,7 +2447,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **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", @@ -2455,7 +2459,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetSamplers(ID3D11Device struct wined3d_sampler *wined3d_sampler; struct d3d_sampler_state *sampler_impl; - if (!(wined3d_sampler = wined3d_device_get_ds_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, start_slot + i))) { samplers[i] = NULL; continue; @@ -2561,7 +2566,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **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", @@ -2573,7 +2578,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetSamplers(ID3D11Device struct wined3d_sampler *wined3d_sampler; struct d3d_sampler_state *sampler_impl; - if (!(wined3d_sampler = wined3d_device_get_cs_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, start_slot + i))) { samplers[i] = NULL; continue; @@ -5082,7 +5088,8 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetSamplers(ID3D10Device1 *iface, struct d3d_sampler_state *sampler_impl; struct wined3d_sampler *wined3d_sampler; - if (!(wined3d_sampler = wined3d_device_get_ps_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i))) { samplers[i] = NULL; continue; @@ -5297,7 +5304,8 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetSamplers(ID3D10Device1 *iface, struct d3d_sampler_state *sampler_impl; struct wined3d_sampler *wined3d_sampler; - if (!(wined3d_sampler = wined3d_device_get_vs_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i))) { samplers[i] = NULL; continue; @@ -5377,7 +5385,8 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetSamplers(ID3D10Device1 *iface, struct d3d_sampler_state *sampler_impl; struct wined3d_sampler *wined3d_sampler; - if (!(wined3d_sampler = wined3d_device_get_gs_sampler(device->wined3d_device, start_slot + i))) + if (!(wined3d_sampler = wined3d_device_context_get_sampler( + device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i))) { samplers[i] = NULL; continue;