wined3d: Remove constant type field in stateblock.
It is wrong to maintain a mapping from a constant index to a type
field, because different constant types do not share an index -
boolean constant 0 is supposed to co-exist with floating point
constant 0, not replace it. Drawprim and other code using the type
array to decide whether to look up a constant in bools, floats, or
ints is wrong - you can't make that decision based on the index.
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 5148c01..d9c7406 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -979,18 +979,15 @@
BOOL clipplane[MAX_CLIPPLANES];
BOOL vertexDecl;
BOOL pixelShader;
- BOOL pixelShaderConstants[MAX_PSHADER_CONSTANTS];
+ BOOL pixelShaderConstantsB[MAX_PSHADER_CONSTANTS];
+ BOOL pixelShaderConstantsI[MAX_PSHADER_CONSTANTS];
+ BOOL pixelShaderConstantsF[MAX_PSHADER_CONSTANTS];
BOOL vertexShader;
- BOOL vertexShaderConstants[MAX_VSHADER_CONSTANTS];
+ BOOL vertexShaderConstantsB[MAX_VSHADER_CONSTANTS];
+ BOOL vertexShaderConstantsI[MAX_VSHADER_CONSTANTS];
+ BOOL vertexShaderConstantsF[MAX_VSHADER_CONSTANTS];
} SAVEDSTATES;
-typedef enum {
- WINESHADERCNST_NONE = 0,
- WINESHADERCNST_FLOAT = 1,
- WINESHADERCNST_INTEGER = 2,
- WINESHADERCNST_BOOL = 3
-} WINESHADERCNST;
-
struct IWineD3DStateBlockImpl
{
/* IUnknown fields */
@@ -1017,7 +1014,6 @@
BOOL vertexShaderConstantB[MAX_VSHADER_CONSTANTS];
INT vertexShaderConstantI[MAX_VSHADER_CONSTANTS * 4];
float vertexShaderConstantF[MAX_VSHADER_CONSTANTS * 4];
- WINESHADERCNST vertexShaderConstantT[MAX_VSHADER_CONSTANTS]; /* TODO: Think about changing this to a char to possibly save a little memory */
/* Stream Source */
BOOL streamIsUP;
@@ -1054,7 +1050,6 @@
BOOL pixelShaderConstantB[MAX_PSHADER_CONSTANTS];
INT pixelShaderConstantI[MAX_PSHADER_CONSTANTS * 4];
float pixelShaderConstantF[MAX_PSHADER_CONSTANTS * 4];
- WINESHADERCNST pixelShaderConstantT[MAX_PSHADER_CONSTANTS]; /* TODO: Think about changing this to a char to possibly save a little memory */
/* Indexed Vertex Blending */
D3DVERTEXBLENDFLAGS vertex_blend;