diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 639e22039db..b69ca4df402 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -143,8 +143,19 @@ static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device1 *i static void STDMETHODCALLTYPE d3d10_device_PSSetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views) { - FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n", + struct d3d10_device *device = impl_from_ID3D10Device(iface); + unsigned int i; + + TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views); + + for (i = 0; i < view_count; ++i) + { + struct d3d10_shader_resource_view *view = unsafe_impl_from_ID3D10ShaderResourceView(views[i]); + + wined3d_device_set_ps_resource_view(device->wined3d_device, start_slot + i, + view ? view->wined3d_view : NULL); + } } static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device1 *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 5f9e2fa69e4..9b749badd01 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2432,6 +2432,14 @@ struct wined3d_buffer * CDECL wined3d_device_get_ps_cb(const struct wined3d_devi return device->state.cb[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) +{ + TRACE("device %p, idx %u, view %p.\n", device, idx, view); + + wined3d_device_set_shader_resource_view(device, WINED3D_SHADER_TYPE_PIXEL, idx, view); +} + void CDECL wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler) { TRACE("device %p, idx %u, sampler %p.\n", device, idx, sampler); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index d3ac07adb73..af3acfa2959 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -130,6 +130,7 @@ @ cdecl wined3d_device_set_ps_consts_b(ptr long ptr long) @ cdecl wined3d_device_set_ps_consts_f(ptr long ptr long) @ cdecl wined3d_device_set_ps_consts_i(ptr long ptr long) +@ cdecl wined3d_device_set_ps_resource_view(ptr long ptr) @ cdecl wined3d_device_set_ps_sampler(ptr long ptr) @ cdecl wined3d_device_set_render_state(ptr long long) @ cdecl wined3d_device_set_rendertarget_view(ptr long ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 842f6f69c11..99919e260f4 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2241,6 +2241,8 @@ HRESULT __cdecl wined3d_device_set_ps_consts_f(struct wined3d_device *device, UINT start_register, const float *constants, UINT vector4f_count); HRESULT __cdecl wined3d_device_set_ps_consts_i(struct wined3d_device *device, UINT start_register, const int *constants, UINT vector4i_count); +void __cdecl wined3d_device_set_ps_resource_view(struct wined3d_device *device, + UINT idx, struct wined3d_shader_resource_view *view); void __cdecl wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler); void __cdecl wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value);