Commit 6b03dd5c authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

- move input and output data in VertexShader struct

- better traces - specific input data filling function for vertex shaders using vertex shader declaration (and not FVF ... maybe FVF will return for fast path with simples vertex shader declarations) - huge vertex shader fixes: - add and fix many vs (1.0->2.0) used opcodes in complex shaders - improvements to programs parser: parse comments, version, .. - add a vertex shader input filler function (parsing vertex shader declaration): almost complete - comments most of the traces (else flood ...) - add more urls in comments - indent, cleanups
parent be514b90
......@@ -150,6 +150,10 @@ typedef struct STATEBLOCK {
/* TODO: Vertex Shader Constant */
/* Indexed Vertex Blending */
D3DVERTEXBLENDFLAGS vertex_blend;
FLOAT tween_factor;
} STATEBLOCK;
typedef struct D3DSHADERVECTOR {
......@@ -176,6 +180,20 @@ typedef struct SHADERDATA8 {
UINT codeLength;
} SHADERDATA8;
/** temporary here waiting for buffer code */
typedef struct VSHADERINPUTDATA8 {
D3DSHADERVECTOR V[16];
} VSHADERINPUTDATA8;
/** temporary here waiting for buffer code */
typedef struct VSHADEROUTPUTDATA8 {
D3DSHADERVECTOR oPos;
D3DSHADERVECTOR oD[2];
D3DSHADERVECTOR oT[4];
D3DSHADERVECTOR oFog;
D3DSHADERVECTOR oPts;
} VSHADEROUTPUTDATA8;
typedef struct VERTEXSHADER8 { /* TODO: Vertex Shader */
DWORD* decl;
DWORD* function;
......@@ -186,6 +204,8 @@ typedef struct VERTEXSHADER8 { /* TODO: Vertex Shader */
DWORD version;
/* run time datas */
SHADERDATA8* data;
VSHADERINPUTDATA8 input;
VSHADEROUTPUTDATA8 output;
} VERTEXSHADER8;
typedef struct PIXELSHADER8 { /* TODO: Pixel Shader */
......@@ -196,20 +216,6 @@ typedef struct PIXELSHADER8 { /* TODO: Pixel Shader */
SHADERDATA8* data;
} PIXELSHADER8;
/** temporary here waiting for buffer code */
typedef struct VSHADERINPUTDATA8 {
D3DSHADERVECTOR V[16];
} VSHADERINPUTDATA8;
/** temporary here waiting for buffer code */
typedef struct VSHADEROUTPUTDATA8 {
D3DSHADERVECTOR oPos;
D3DSHADERVECTOR oD[2];
D3DSHADERVECTOR oT[4];
D3DSHADERVECTOR oFog;
D3DSHADERVECTOR oPts;
} VSHADEROUTPUTDATA8;
/*
* External prototypes
*/
......@@ -229,6 +235,29 @@ void CreateStateBlock(LPDIRECT3DDEVICE8 iface);
} \
}
#define checkGLSupport(ExtName) FALSE/*(TRUE == This->direct3d8->glInfo.supported[ExtName])*/
#define GLExtCall(FuncName) /*(This->direct3d8->glInfo.FuncName)*/
#define D3DCOLOR_R(dw) (((float) (((dw) >> 16) & 0xFF)) / 255.0f)
#define D3DCOLOR_G(dw) (((float) (((dw) >> 8) & 0xFF)) / 255.0f)
#define D3DCOLOR_B(dw) (((float) (((dw) >> 0) & 0xFF)) / 255.0f)
#define D3DCOLOR_A(dw) (((float) (((dw) >> 24) & 0xFF)) / 255.0f)
#define D3DCOLORTOCOLORVALUE(dw, col) \
(col).r = D3DCOLOR_R(dw); \
(col).g = D3DCOLOR_G(dw); \
(col).b = D3DCOLOR_B(dw); \
(col).a = D3DCOLOR_A(dw);
#define D3DCOLORTOVECTOR4(dw, vec) \
(vec).x = D3DCOLOR_R(dw); \
(vec).y = D3DCOLOR_G(dw); \
(vec).z = D3DCOLOR_B(dw); \
(vec).w = D3DCOLOR_A(dw);
/* ===========================================================================
The interfactes themselves
=========================================================================== */
......@@ -929,5 +958,6 @@ extern HRESULT WINAPI IDirect3DVolumeTexture8Impl_AddDirtyBox(LPDIRECT3D
DWORD vshader_decl_parse(VERTEXSHADER8* vshader);
DWORD vshader_program_parse(VERTEXSHADER8* vshader);
BOOL vshader_program_execute_SW(VERTEXSHADER8* vshader, VSHADERINPUTDATA8* input, VSHADEROUTPUTDATA8* output);
VOID vshader_fill_input(VERTEXSHADER8* vshader, IDirect3DDevice8Impl* device, const void* vertexFirstStream, DWORD StartVertexIndex, DWORD idxDecal);
#endif /* __WINE_D3DX8_PRIVATE_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment