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
04ce1419
Commit
04ce1419
authored
Jan 02, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass the user pointer strided structure via the device implementation.
parent
71631f76
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
device.c
dlls/wined3d/device.c
+7
-5
drawprim.c
dlls/wined3d/drawprim.c
+3
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/device.c
View file @
04ce1419
...
...
@@ -4699,7 +4699,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitive(IWineD3DDevice *iface, WI
if
(
StartVertex
-
This
->
stateBlock
->
baseVertexIndex
<
0
)
ERR
(
"Drawing negative
\n
"
);
/* Account for the loading offset due to index buffers. Instead of reloading all sources correct it with the startvertex parameter */
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
StartVertex
-
This
->
stateBlock
->
baseVertexIndex
,
0
/* NumVertices */
,
-
1
/* indxStart */
,
0
/* indxSize */
,
NULL
/* indxData */
,
0
/* minIndex */
,
NULL
);
0
/* indxSize */
,
NULL
/* indxData */
,
0
/* minIndex */
);
return
WINED3D_OK
;
}
...
...
@@ -4728,7 +4728,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *
}
drawPrimitive
(
iface
,
PrimitiveType
,
primCount
,
0
,
NumVertices
,
startIndex
,
idxStride
,
((
IWineD3DIndexBufferImpl
*
)
pIB
)
->
resource
.
allocatedMemory
,
minIndex
,
NULL
);
idxStride
,
((
IWineD3DIndexBufferImpl
*
)
pIB
)
->
resource
.
allocatedMemory
,
minIndex
);
return
WINED3D_OK
;
}
...
...
@@ -4753,7 +4753,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveUP(IWineD3DDevice *iface,
This
->
stateBlock
->
streamIsUP
=
TRUE
;
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
-
This
->
stateBlock
->
baseVertexIndex
/* start vertex */
,
0
/* NumVertices */
,
0
/* indxStart*/
,
0
/* indxSize*/
,
NULL
/* indxData */
,
0
/* indxMin */
,
NULL
);
0
/* indxStart*/
,
0
/* indxSize*/
,
NULL
/* indxData */
,
0
/* indxMin */
);
/* MSDN specifies stream zero settings must be set to NULL */
This
->
stateBlock
->
streamStride
[
0
]
=
0
;
...
...
@@ -4800,7 +4800,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
/* Set to 0 as per msdn. Do it now due to the stream source loading during drawPrimitive */
This
->
stateBlock
->
baseVertexIndex
=
0
;
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
/* vertexStart */
,
NumVertices
,
0
/* indxStart */
,
idxStride
,
pIndexData
,
MinVertexIndex
,
NULL
);
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
/* vertexStart */
,
NumVertices
,
0
/* indxStart */
,
idxStride
,
pIndexData
,
MinVertexIndex
);
/* MSDN specifies stream zero settings and index buffer must be set to NULL */
This
->
stateBlock
->
streamSource
[
0
]
=
NULL
;
...
...
@@ -4819,7 +4819,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawPrimitiveStrided (IWineD3DDevice *i
*/
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_VDECL
);
This
->
stateBlock
->
baseVertexIndex
=
0
;
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
,
0
,
0
,
0
,
NULL
,
0
,
DrawPrimStrideData
);
This
->
up_strided
=
DrawPrimStrideData
;
drawPrimitive
(
iface
,
PrimitiveType
,
PrimitiveCount
,
0
,
0
,
0
,
0
,
NULL
,
0
);
This
->
up_strided
=
NULL
;
return
WINED3D_OK
;
}
/* Yet another way to update a texture, some apps use this to load default textures instead of using surface/texture lock/unlock */
...
...
dlls/wined3d/drawprim.c
View file @
04ce1419
...
...
@@ -1936,8 +1936,7 @@ void drawPrimitive(IWineD3DDevice *iface,
long
StartIdx
,
short
idxSize
,
const
void
*
idxData
,
int
minIndex
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
)
{
int
minIndex
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
BOOL
useVertexShaderFunction
=
FALSE
;
...
...
@@ -1991,12 +1990,12 @@ void drawPrimitive(IWineD3DDevice *iface,
}
This
->
depth_copy_state
=
WINED3D_DCS_INITIAL
;
if
(
DrawPrimStrideData
)
{
if
(
This
->
up_strided
)
{
/* Note: this is a ddraw fixed-function code path */
TRACE
(
"================ Strided Input ===================
\n
"
);
memcpy
(
&
This
->
strided_streams
,
DrawPrimStrideData
,
sizeof
(
This
->
strided_streams
));
memcpy
(
&
This
->
strided_streams
,
This
->
up_strided
,
sizeof
(
This
->
strided_streams
));
drawPrimitiveTraceDataLocations
(
&
This
->
strided_streams
);
fixup
=
FALSE
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
04ce1419
...
...
@@ -382,8 +382,7 @@ void drawPrimitive(IWineD3DDevice *iface,
long
StartIdx
,
short
idxBytes
,
const
void
*
idxData
,
int
minIndex
,
WineDirect3DVertexStridedData
*
DrawPrimStrideData
);
int
minIndex
);
void
primitiveConvertToStridedData
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
strided
,
BOOL
*
fixup
);
...
...
@@ -669,6 +668,7 @@ typedef struct IWineD3DDeviceImpl
/* Stream source management */
WineDirect3DVertexStridedData
strided_streams
;
WineDirect3DVertexStridedData
*
up_strided
;
}
IWineD3DDeviceImpl
;
...
...
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