H. Verbeet : wined3d: D3d8 shaders can have a NULL pFunction,
but a valid vertex declaration.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jul 25 05:09:46 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 2d6e661fbe1aec26fab03564edc82ee9fb8acea1
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=2d6e661fbe1aec26fab03564edc82ee9fb8acea1
Author: H. Verbeet <hverbeet at gmail.com>
Date: Tue Jul 25 00:50:43 2006 +0200
wined3d: D3d8 shaders can have a NULL pFunction, but a valid vertex declaration.
---
dlls/wined3d/drawprim.c | 4 ++--
dlls/wined3d/vertexbuffer.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index b9dd6f8..bb48982 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -423,7 +423,7 @@ void primitiveDeclarationConvertToStride
int reg;
/* 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");
vertexDeclaration = (IWineD3DVertexDeclarationImpl *)((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->vertexDeclaration;
} else {
@@ -2091,7 +2091,7 @@ void drawPrimitive(IWineD3DDevice *iface
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.
* This means it must handle both types of strided data.
diff --git a/dlls/wined3d/vertexbuffer.c b/dlls/wined3d/vertexbuffer.c
index b67a1ca..cea45fd 100644
--- a/dlls/wined3d/vertexbuffer.c
+++ b/dlls/wined3d/vertexbuffer.c
@@ -222,7 +222,7 @@ static void WINAPI IWineD3DVertexBuf
/* Check against updated declarations */
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 */
This->Flags |= VBFLAG_LOAD;
More information about the wine-cvs
mailing list