Commit 8cd9754b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3d11: Use wined3d_device_context_get_shader().

parent fd723149
...@@ -1678,7 +1678,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D1 ...@@ -1678,7 +1678,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShaderResources(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceContext1 *iface,
ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{ {
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
struct d3d_pixel_shader *shader_impl; struct d3d_pixel_shader *shader_impl;
...@@ -1691,7 +1691,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo ...@@ -1691,7 +1691,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo
*class_instance_count = 0; *class_instance_count = 0;
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -1735,7 +1735,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11Device ...@@ -1735,7 +1735,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetSamplers(ID3D11Device
static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceContext1 *iface,
ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{ {
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct d3d_vertex_shader *shader_impl; struct d3d_vertex_shader *shader_impl;
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
...@@ -1748,7 +1748,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo ...@@ -1748,7 +1748,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo
*class_instance_count = 0; *class_instance_count = 0;
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_vertex_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -1869,7 +1869,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D1 ...@@ -1869,7 +1869,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetConstantBuffers(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceContext1 *iface,
ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{ {
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct d3d_geometry_shader *shader_impl; struct d3d_geometry_shader *shader_impl;
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
...@@ -1882,7 +1882,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo ...@@ -1882,7 +1882,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo
*class_instance_count = 0; *class_instance_count = 0;
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -2318,7 +2318,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D1 ...@@ -2318,7 +2318,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShaderResources(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceContext1 *iface,
ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{ {
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct d3d11_hull_shader *shader_impl; struct d3d11_hull_shader *shader_impl;
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
...@@ -2331,7 +2331,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo ...@@ -2331,7 +2331,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo
*class_instance_count = 0; *class_instance_count = 0;
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_hull_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_HULL)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -2410,7 +2410,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D1 ...@@ -2410,7 +2410,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShaderResources(ID3D1
static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceContext1 *iface,
ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{ {
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct d3d11_domain_shader *shader_impl; struct d3d11_domain_shader *shader_impl;
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
...@@ -2423,7 +2423,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo ...@@ -2423,7 +2423,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo
*class_instance_count = 0; *class_instance_count = 0;
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_domain_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -2527,7 +2527,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews( ...@@ -2527,7 +2527,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetUnorderedAccessViews(
static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceContext1 *iface, static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceContext1 *iface,
ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count) ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
{ {
struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d11_immediate_context *context = impl_from_ID3D11DeviceContext1(iface);
struct d3d11_compute_shader *shader_impl; struct d3d11_compute_shader *shader_impl;
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
...@@ -2540,7 +2540,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo ...@@ -2540,7 +2540,7 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo
*class_instance_count = 0; *class_instance_count = 0;
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_compute_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -5046,7 +5046,8 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetShader(ID3D10Device1 *iface, ID3 ...@@ -5046,7 +5046,8 @@ static void STDMETHODCALLTYPE d3d10_device_PSGetShader(ID3D10Device1 *iface, ID3
TRACE("iface %p, shader %p.\n", iface, shader); TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context,
WINED3D_SHADER_TYPE_PIXEL)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -5096,7 +5097,8 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetShader(ID3D10Device1 *iface, ID3 ...@@ -5096,7 +5097,8 @@ static void STDMETHODCALLTYPE d3d10_device_VSGetShader(ID3D10Device1 *iface, ID3
TRACE("iface %p, shader %p.\n", iface, shader); TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_vertex_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context,
WINED3D_SHADER_TYPE_VERTEX)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
...@@ -5218,7 +5220,8 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device1 *iface, ID3 ...@@ -5218,7 +5220,8 @@ static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device1 *iface, ID3
TRACE("iface %p, shader %p.\n", iface, shader); TRACE("iface %p, shader %p.\n", iface, shader);
wined3d_mutex_lock(); wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device))) if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context,
WINED3D_SHADER_TYPE_GEOMETRY)))
{ {
wined3d_mutex_unlock(); wined3d_mutex_unlock();
*shader = NULL; *shader = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment