=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: wined3d: Print FIXME() for unknown SM4+ register types.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Apr 4 10:37:02 CDT 2016
Module: wine
Branch: master
Commit: ab3aaee6fd9adae79f5d80552fca46f12333c7b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ab3aaee6fd9adae79f5d80552fca46f12333c7b8
Author: Józef Kucia <jkucia at codeweavers.com>
Date: Mon Apr 4 11:26:28 2016 +0200
wined3d: Print FIXME() for unknown SM4+ register 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 | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c
index 487c4a9..ae17a1f 100644
--- a/dlls/wined3d/shader_sm4.c
+++ b/dlls/wined3d/shader_sm4.c
@@ -731,33 +731,33 @@ static const enum wined3d_shader_register_type register_type_table[] =
/* WINED3D_SM4_RT_TEMP */ WINED3DSPR_TEMP,
/* WINED3D_SM4_RT_INPUT */ WINED3DSPR_INPUT,
/* WINED3D_SM4_RT_OUTPUT */ WINED3DSPR_OUTPUT,
- /* UNKNOWN */ 0,
+ /* UNKNOWN */ ~0u,
/* WINED3D_SM4_RT_IMMCONST */ WINED3DSPR_IMMCONST,
- /* UNKNOWN */ 0,
+ /* UNKNOWN */ ~0u,
/* WINED3D_SM4_RT_SAMPLER */ WINED3DSPR_SAMPLER,
/* WINED3D_SM4_RT_RESOURCE */ WINED3DSPR_RESOURCE,
/* WINED3D_SM4_RT_CONSTBUFFER */ WINED3DSPR_CONSTBUFFER,
/* WINED3D_SM4_RT_IMMCONSTBUFFER */ WINED3DSPR_IMMCONSTBUFFER,
- /* UNKNOWN */ 0,
+ /* UNKNOWN */ ~0u,
/* WINED3D_SM4_RT_PRIMID */ WINED3DSPR_PRIMID,
/* WINED3D_SM4_RT_DEPTHOUT */ WINED3DSPR_DEPTHOUT,
/* WINED3D_SM4_RT_NULL */ WINED3DSPR_NULL,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
/* WINED3D_SM5_RT_FORK_INSTANCE_ID */ WINED3DSPR_FORKINSTID,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
- /* UNKNOWN */ 0,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
+ /* UNKNOWN */ ~0u,
/* WINED3D_SM5_RT_UAV */ WINED3DSPR_UAV,
};
@@ -967,7 +967,8 @@ static BOOL shader_sm4_read_param(struct wined3d_sm4_data *priv, const DWORD **p
DWORD order;
register_type = (token & WINED3D_SM4_REGISTER_TYPE_MASK) >> WINED3D_SM4_REGISTER_TYPE_SHIFT;
- if (register_type >= sizeof(register_type_table) / sizeof(*register_type_table))
+ if (register_type >= sizeof(register_type_table) / sizeof(*register_type_table)
+ || register_type_table[register_type] == ~0u)
{
FIXME("Unhandled register type %#x.\n", register_type);
param->type = WINED3DSPR_TEMP;
More information about the wine-cvs
mailing list