[PATCH 1/3] d3d11: Compare semantic names ignoring case.

Józef Kucia jkucia at codeweavers.com
Sun Aug 21 16:17:58 CDT 2016


Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 dlls/d3d11/inputlayout.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/dlls/d3d11/inputlayout.c b/dlls/d3d11/inputlayout.c
index 69ef985..7604f05 100644
--- a/dlls/d3d11/inputlayout.c
+++ b/dlls/d3d11/inputlayout.c
@@ -44,11 +44,10 @@ static HRESULT d3d11_input_layout_to_wined3d_declaration(const D3D11_INPUT_ELEME
         struct wined3d_vertex_element **wined3d_elements)
 {
     struct wined3d_shader_signature is;
+    unsigned int i;
     HRESULT hr;
-    UINT i;
 
-    hr = parse_dxbc(shader_byte_code, shader_byte_code_length, isgn_handler, &is);
-    if (FAILED(hr))
+    if (FAILED(hr = parse_dxbc(shader_byte_code, shader_byte_code_length, isgn_handler, &is)))
     {
         ERR("Failed to parse input signature.\n");
         return E_FAIL;
@@ -65,7 +64,7 @@ static HRESULT d3d11_input_layout_to_wined3d_declaration(const D3D11_INPUT_ELEME
     {
         struct wined3d_vertex_element *e = &(*wined3d_elements)[i];
         const D3D11_INPUT_ELEMENT_DESC *f = &element_descs[i];
-        UINT j;
+        unsigned int j;
 
         e->format = wined3dformat_from_dxgi_format(f->Format);
         e->input_slot = f->InputSlot;
@@ -79,13 +78,16 @@ static HRESULT d3d11_input_layout_to_wined3d_declaration(const D3D11_INPUT_ELEME
 
         for (j = 0; j < is.element_count; ++j)
         {
-            if (!strcmp(element_descs[i].SemanticName, is.elements[j].semantic_name)
+            if (!strcasecmp(element_descs[i].SemanticName, is.elements[j].semantic_name)
                     && element_descs[i].SemanticIndex == is.elements[j].semantic_idx)
             {
                 e->output_slot = is.elements[j].register_idx;
                 break;
             }
         }
+
+        if (e->output_slot == WINED3D_OUTPUT_SLOT_UNUSED)
+            WARN("Unused input element %u.\n", i);
     }
 
     shader_free_signature(&is);
-- 
2.7.3




More information about the wine-patches mailing list