wined3d: Store the position_transformed flag in the vdecl.
This commit is contained in:
parent
06e51c21e1
commit
b8dd5839ef
|
@ -160,14 +160,9 @@ void primitiveDeclarationConvertToStridedData(
|
|||
DWORD *streams = vertexDeclaration->streams;
|
||||
|
||||
/* Check for transformed vertices, disable vertex shader if present */
|
||||
strided->u.s.position_transformed = FALSE;
|
||||
for (i = 0; i < vertexDeclaration->declarationWNumElements - 1; ++i) {
|
||||
element = vertexDeclaration->pDeclarationWine + i;
|
||||
|
||||
if (element->Usage == WINED3DDECLUSAGE_POSITIONT) {
|
||||
strided->u.s.position_transformed = TRUE;
|
||||
useVertexShaderFunction = FALSE;
|
||||
}
|
||||
strided->u.s.position_transformed = vertexDeclaration->position_transformed;
|
||||
if(vertexDeclaration->position_transformed) {
|
||||
useVertexShaderFunction = FALSE;
|
||||
}
|
||||
|
||||
/* Translate the declaration into strided data */
|
||||
|
|
|
@ -143,14 +143,18 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVerte
|
|||
|
||||
/* Do some static analysis on the elements to make reading the declaration more comfortable
|
||||
* for the drawing code
|
||||
*
|
||||
* First, find the Streams used in the declaration. The vertex buffers have to be loaded
|
||||
* when drawing.
|
||||
*/
|
||||
This->num_streams = 0;
|
||||
This->position_transformed = FALSE;
|
||||
for (i = 0; i < element_count; ++i) {
|
||||
|
||||
/* Filter tesselation pseudo streams*/
|
||||
if(This->pDeclarationWine[i].Usage == WINED3DDECLUSAGE_POSITIONT) {
|
||||
This->position_transformed = TRUE;
|
||||
}
|
||||
|
||||
/* Find the Streams used in the declaration. The vertex buffers have to be loaded
|
||||
* when drawing, but filter tesselation pseudo streams
|
||||
*/
|
||||
if(This->pDeclarationWine[i].Stream >= MAX_STREAMS) continue;
|
||||
|
||||
if(!isPreLoaded[This->pDeclarationWine[i].Stream]) {
|
||||
|
|
|
@ -1228,6 +1228,7 @@ typedef struct IWineD3DVertexDeclarationImpl {
|
|||
|
||||
DWORD streams[MAX_STREAMS];
|
||||
UINT num_streams;
|
||||
BOOL position_transformed;
|
||||
} IWineD3DVertexDeclarationImpl;
|
||||
|
||||
extern const IWineD3DVertexDeclarationVtbl IWineD3DVertexDeclaration_Vtbl;
|
||||
|
|
Loading…
Reference in New Issue