=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Print FIXME() for unknown SM4+ primitive types.
Alexandre Julliard
julliard at winehq.org
Mon May 15 16:09:23 CDT 2017
Module: wine
Branch: master
Commit: c8b2452e35f9af5d434d755c03b1c257c1698531
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8b2452e35f9af5d434d755c03b1c257c1698531
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon May 15 12:05:46 2017 +0200
wined3d: Print FIXME() for unknown SM4+ primitive types.
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/wined3d/shader_sm4.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 37624f7..f2f229f 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -593,15 +593,13 @@ static void shader_sm4_read_dcl_output_topology(struct wined3d_shader_instructio
enum wined3d_sm4_output_primitive_type primitive_type;
primitive_type = (opcode_token & WINED3D_SM4_PRIMITIVE_TYPE_MASK) >> WINED3D_SM4_PRIMITIVE_TYPE_SHIFT;
- if (primitive_type >= sizeof(output_primitive_type_table) / sizeof(*output_primitive_type_table))
- {
- FIXME("Unhandled output primitive type %#x.\n", primitive_type);
+ if (primitive_type >= ARRAY_SIZE(output_primitive_type_table))
ins->declaration.primitive_type = WINED3D_PT_UNDEFINED;
- }
else
- {
ins->declaration.primitive_type = output_primitive_type_table[primitive_type];
- }
+
+ if (ins->declaration.primitive_type == WINED3D_PT_UNDEFINED)
+ FIXME("Unhandled output primitive type %#x.\n", primitive_type);
}
static void shader_sm4_read_dcl_input_primitive(struct wined3d_shader_instruction *ins,
@@ -611,15 +609,13 @@ static void shader_sm4_read_dcl_input_primitive(struct wined3d_shader_instructio
enum wined3d_sm4_input_primitive_type primitive_type;
primitive_type = (opcode_token & WINED3D_SM4_PRIMITIVE_TYPE_MASK) >> WINED3D_SM4_PRIMITIVE_TYPE_SHIFT;
- if (primitive_type >= sizeof(input_primitive_type_table) / sizeof(*input_primitive_type_table))
- {
- FIXME("Unhandled input primitive type %#x.\n", primitive_type);
+ if (primitive_type >= ARRAY_SIZE(input_primitive_type_table))
ins->declaration.primitive_type = WINED3D_PT_UNDEFINED;
- }
else
- {
ins->declaration.primitive_type = input_primitive_type_table[primitive_type];
- }
+
+ if (ins->declaration.primitive_type == WINED3D_PT_UNDEFINED)
+ FIXME("Unhandled input primitive type %#x.\n", primitive_type);
}
static void shader_sm4_read_declaration_count(struct wined3d_shader_instruction *ins,
More information about the wine-cvs
mailing list