=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d11: Compare semantic names ignoring case.
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 10:24:12 CDT 2016
Module: wine
Branch: master
Commit: ce63bd29457e42edb501df8104aff9435e1e1cb5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ce63bd29457e42edb501df8104aff9435e1e1cb5
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Sun Aug 21 23:17:58 2016 +0200
d3d11: Compare semantic names ignoring case.
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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);
More information about the wine-cvs
mailing list