Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
ef1ebb6e
Commit
ef1ebb6e
authored
Jan 02, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Add emtpy vertex declaration and related states to the state table.
parent
a710f721
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
6 deletions
+36
-6
device.c
dlls/wined3d/device.c
+17
-5
state.c
dlls/wined3d/state.c
+9
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+10
-1
No files found.
dlls/wined3d/device.c
View file @
ef1ebb6e
...
...
@@ -2146,7 +2146,6 @@ static UINT WINAPI IWineD3DDeviceImpl_GetAvailableTextureMem(IWineD3DDevice *ifa
*****/
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetFVF
(
IWineD3DDevice
*
iface
,
DWORD
fvf
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
HRESULT
hr
=
WINED3D_OK
;
/* Update the current state block */
This
->
updateStateBlock
->
fvf
=
fvf
;
...
...
@@ -2154,7 +2153,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetFVF(IWineD3DDevice *iface, DWORD fvf
This
->
updateStateBlock
->
set
.
fvf
=
TRUE
;
TRACE
(
"(%p) : FVF Shader FVF set to %x
\n
"
,
This
,
fvf
);
return
hr
;
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VDECL
);
return
WINED3D_OK
;
}
...
...
@@ -2238,6 +2238,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSource(IWineD3DDevice *iface,
IWineD3DVertexBuffer_Release
(
oldSrc
);
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_STREAMSRC
);
return
WINED3D_OK
;
}
...
...
@@ -3228,6 +3230,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* if
if
(
NULL
!=
oldDecl
)
{
IWineD3DVertexDeclaration_Release
(
oldDecl
);
}
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VDECL
);
return
WINED3D_OK
;
}
...
...
@@ -3261,9 +3264,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShader(IWineD3DDevice *iface,
}
TRACE
(
"(%p) : setting pShader(%p)
\n
"
,
This
,
pShader
);
/**
* TODO: merge HAL shaders context switching from prototype
*/
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VSHADER
);
return
WINED3D_OK
;
}
...
...
@@ -4718,6 +4721,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
This
->
stateBlock
->
streamStride
[
0
]
=
VertexStreamZeroStride
;
This
->
stateBlock
->
streamIsUP
=
TRUE
;
/* Mark the state dirty until we have nicer tracking */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VDECL
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
/* start vertex */
,
0
/* NumVertices */
,
0
/* indxStart*/
,
0
/* indxSize*/
,
NULL
/* indxData */
,
0
/* indxMin */
,
NULL
);
...
...
@@ -4761,6 +4767,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
This
->
stateBlock
->
streamIsUP
=
TRUE
;
This
->
stateBlock
->
streamStride
[
0
]
=
VertexStreamZeroStride
;
/* Mark the state dirty until we have nicer tracking */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VDECL
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
/* vertexStart */
,
NumVertices
,
0
/* indxStart */
,
idxStride
,
pIndexData
,
MinVertexIndex
,
NULL
);
/* MSDN specifies stream zero settings and index buffer must be set to NULL */
...
...
@@ -4772,7 +4781,10 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_DrawPrimitiveStrided
(
IWineD3DDevice
*
iface
,
WINED3DPRIMITIVETYPE
PrimitiveType
,
UINT
PrimitiveCount
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
/* Mark the state dirty until we have nicer tracking */
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VDECL
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
,
0
,
0
,
0
,
NULL
,
0
,
DrawPrimStrideData
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/state.c
View file @
ef1ebb6e
...
...
@@ -1847,6 +1847,10 @@ static void transform_worldex(DWORD state, IWineD3DStateBlockImpl *stateBlock) {
WARN
(
"World matrix 1 - 255 not supported yet
\n
"
);
}
static
void
vertexdeclaration
(
DWORD
state
,
IWineD3DStateBlockImpl
*
stateBlock
)
{
TRACE
(
"To be filled later
\n
"
);
}
const
struct
StateEntry
StateTable
[]
=
{
/* State name representative, apply function */
...
...
@@ -2860,4 +2864,9 @@ const struct StateEntry StateTable[] =
{
/*509, WINED3DTS_WORLDMATRIX(253) */
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
253
)),
transform_worldex
},
{
/*510, WINED3DTS_WORLDMATRIX(254) */
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
254
)),
transform_worldex
},
{
/*511, WINED3DTS_WORLDMATRIX(255) */
STATE_TRANSFORM
(
WINED3DTS_WORLDMATRIX
(
255
)),
transform_worldex
},
/* Various Vertex states follow */
{
/* , STATE_STREAMSRC */
STATE_VDECL
,
vertexdeclaration
},
{
/* , STATE_VDECL */
STATE_VDECL
,
vertexdeclaration
},
{
/* , STATE_VSHADER */
STATE_VDECL
,
vertexdeclaration
},
};
dlls/wined3d/wined3d_private.h
View file @
ef1ebb6e
...
...
@@ -426,7 +426,16 @@ typedef void (*APPLYSTATEFUNC)(DWORD state, IWineD3DStateBlockImpl *stateblock);
#define STATE_TRANSFORM(a) (STATE_PIXELSHADER + (a))
#define STATE_IS_TRANSFORM(a) ((a) >= STATE_TRANSFORM(1) && (a) <= STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(255)))
#define STATE_HIGHEST (STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(255)))
#define STATE_STREAMSRC (STATE_TRANSFORM(WINED3DTS_WORLDMATRIX(255)) + 1)
#define STATE_IS_STREAMSRC(a) ((a) == STATE_STREAMSRC)
#define STATE_VDECL (STATE_STREAMSRC + 1)
#define STATE_IS_VDECL(a) ((a) == STATE_VDECL)
#define STATE_VSHADER (STATE_VDECL + 1)
#define STATE_IS_VSHADER(a) ((a) == STATE_VSHADER)
#define STATE_HIGHEST (STATE_VSHADER)
struct
StateEntry
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment