wined3d: D3d8 shaders can have a NULL pFunction, but a valid vertex declaration.

This commit is contained in:
H. Verbeet 2006-07-25 00:50:43 +02:00 committed by Alexandre Julliard
parent 12a9dfd62f
commit 2d6e661fbe
2 changed files with 3 additions and 3 deletions

View File

@ -423,7 +423,7 @@ void primitiveDeclarationConvertToStridedData(
int reg; int reg;
/* Locate the vertex declaration */ /* Locate the vertex declaration */
if (useVertexShaderFunction && ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->vertexDeclaration) { if (This->stateBlock->vertexShader && ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->vertexDeclaration) {
TRACE("Using vertex declaration from shader\n"); TRACE("Using vertex declaration from shader\n");
vertexDeclaration = (IWineD3DVertexDeclarationImpl *)((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->vertexDeclaration; vertexDeclaration = (IWineD3DVertexDeclarationImpl *)((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->vertexDeclaration;
} else { } else {
@ -2091,7 +2091,7 @@ void drawPrimitive(IWineD3DDevice *iface,
fixup = FALSE; fixup = FALSE;
} }
else if (This->stateBlock->vertexDecl != NULL || useVertexShaderFunction) { else if (This->stateBlock->vertexDecl || This->stateBlock->vertexShader) {
/* Note: This is a fixed function or shader codepath. /* Note: This is a fixed function or shader codepath.
* This means it must handle both types of strided data. * This means it must handle both types of strided data.

View File

@ -222,7 +222,7 @@ static void WINAPI IWineD3DVertexBufferImpl_PreLoad(IWineD3DVertexBuffer *if
/* Check against updated declarations */ /* Check against updated declarations */
memset(&strided, 0, sizeof(strided)); memset(&strided, 0, sizeof(strided));
if(device->stateBlock->vertexDecl != NULL) { if(device->stateBlock->vertexDecl || device->stateBlock->vertexShader) {
/* Check against the stream offset and make sure it is 0 */ /* Check against the stream offset and make sure it is 0 */
This->Flags |= VBFLAG_LOAD; This->Flags |= VBFLAG_LOAD;