Lucian Poston : d3d11: Return 0 for the class instance count from the shader getters.

Alexandre Julliard julliard at winehq.org
Tue May 15 16:25:23 CDT 2018


Module: wine
Branch: master
Commit: 7ec5ec584acccf10edb6a55f80e8e7aefb5d7d40
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7ec5ec584acccf10edb6a55f80e8e7aefb5d7d40

Author: Lucian Poston <lucian.poston at gmail.com>
Date:   Tue May 15 20:35:12 2018 +0430

d3d11: Return 0 for the class instance count from the shader getters.

Signed-off-by: Lucian Poston <lucian.poston at gmail.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d11/device.c      | 12 ++++++++++++
 dlls/d3d11/tests/d3d11.c | 25 +++++++++++++++++++------
 2 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index e4d8760..5bc5018 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1522,6 +1522,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo
 
     if (class_instances || class_instance_count)
         FIXME("Dynamic linking not implemented yet.\n");
+    if (class_instance_count)
+        *class_instance_count = 0;
 
     wined3d_mutex_lock();
     if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device)))
@@ -1577,6 +1579,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo
 
     if (class_instances || class_instance_count)
         FIXME("Dynamic linking not implemented yet.\n");
+    if (class_instance_count)
+        *class_instance_count = 0;
 
     wined3d_mutex_lock();
     if (!(wined3d_shader = wined3d_device_get_vertex_shader(device->wined3d_device)))
@@ -1745,6 +1749,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo
 
     if (class_instances || class_instance_count)
         FIXME("Dynamic linking not implemented yet.\n");
+    if (class_instance_count)
+        *class_instance_count = 0;
 
     wined3d_mutex_lock();
     if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device)))
@@ -2187,6 +2193,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo
 
     if (class_instances || class_instance_count)
         FIXME("Dynamic linking not implemented yet.\n");
+    if (class_instance_count)
+        *class_instance_count = 0;
 
     wined3d_mutex_lock();
     if (!(wined3d_shader = wined3d_device_get_hull_shader(device->wined3d_device)))
@@ -2294,6 +2302,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo
 
     if (class_instances || class_instance_count)
         FIXME("Dynamic linking not implemented yet.\n");
+    if (class_instance_count)
+        *class_instance_count = 0;
 
     wined3d_mutex_lock();
     if (!(wined3d_shader = wined3d_device_get_domain_shader(device->wined3d_device)))
@@ -2426,6 +2436,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo
 
     if (class_instances || class_instance_count)
         FIXME("Dynamic linking not implemented yet.\n");
+    if (class_instance_count)
+        *class_instance_count = 0;
 
     wined3d_mutex_lock();
     if (!(wined3d_shader = wined3d_device_get_compute_shader(device->wined3d_device)))
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 63f964a..9c12a76 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9684,6 +9684,7 @@ static void test_clear_state(void)
     float blend_factor[4];
     ID3D11Device *device;
     BOOL predicate_value;
+    UINT instance_count;
     DXGI_FORMAT format;
     UINT sample_mask;
     UINT stencil_ref;
@@ -9719,8 +9720,10 @@ static void test_clear_state(void)
     {
         ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
     }
-    ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, 0);
+    instance_count = 100;
+    ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, &instance_count);
     ok(!tmp_vs, "Got unexpected vertex shader %p.\n", tmp_vs);
+    ok(!instance_count, "Got unexpected instance count %u.\n", instance_count);
 
     ID3D11DeviceContext_HSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
             tmp_buffer);
@@ -9738,8 +9741,10 @@ static void test_clear_state(void)
     {
         ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
     }
-    ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, 0);
+    instance_count = 100;
+    ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, &instance_count);
     ok(!tmp_hs, "Got unexpected hull shader %p.\n", tmp_hs);
+    ok(!instance_count, "Got unexpected instance count %u.\n", instance_count);
 
     ID3D11DeviceContext_DSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
             tmp_buffer);
@@ -9757,8 +9762,10 @@ static void test_clear_state(void)
     {
         ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
     }
-    ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, 0);
+    instance_count = 100;
+    ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, &instance_count);
     ok(!tmp_ds, "Got unexpected domain shader %p.\n", tmp_ds);
+    ok(!instance_count, "Got unexpected instance count %u.\n", instance_count);
 
     ID3D11DeviceContext_GSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
             tmp_buffer);
@@ -9776,8 +9783,10 @@ static void test_clear_state(void)
     {
         ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
     }
-    ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, 0);
+    instance_count = 100;
+    ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, &instance_count);
     ok(!tmp_gs, "Got unexpected geometry shader %p.\n", tmp_gs);
+    ok(!instance_count, "Got unexpected instance count %u.\n", instance_count);
 
     ID3D11DeviceContext_PSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
             tmp_buffer);
@@ -9796,8 +9805,10 @@ static void test_clear_state(void)
     {
         ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
     }
-    ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, 0);
+    instance_count = 100;
+    ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, &instance_count);
     ok(!tmp_ps, "Got unexpected pixel shader %p.\n", tmp_ps);
+    ok(!instance_count, "Got unexpected instance count %u.\n", instance_count);
 
     ID3D11DeviceContext_CSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
             tmp_buffer);
@@ -9816,8 +9827,10 @@ static void test_clear_state(void)
     {
         ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
     }
-    ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, 0);
+    instance_count = 100;
+    ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, &instance_count);
     ok(!tmp_cs, "Got unexpected compute shader %p.\n", tmp_cs);
+    ok(!instance_count, "Got unexpected instance count %u.\n", instance_count);
     ID3D11DeviceContext_CSGetUnorderedAccessViews(context, 0, D3D11_PS_CS_UAV_REGISTER_COUNT, tmp_uav);
     for (i = 0; i < D3D11_PS_CS_UAV_REGISTER_COUNT; ++i)
     {




More information about the wine-cvs mailing list