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
1d3abdee
Commit
1d3abdee
authored
Jan 16, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the stream number in the strided structure.
parent
71f923a6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
6 deletions
+17
-6
device.c
dlls/ddraw/device.c
+1
-1
device.c
dlls/wined3d/device.c
+1
-1
drawprim.c
dlls/wined3d/drawprim.c
+12
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
wined3d_types.h
include/wine/wined3d_types.h
+1
-0
No files found.
dlls/ddraw/device.c
View file @
1d3abdee
...
...
@@ -3281,6 +3281,7 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
TRACE
(
"(%p)->(%08x,%08x,%p,%08x,%08x): stub!
\n
"
,
This
,
PrimitiveType
,
VertexType
,
D3DDrawPrimStrideData
,
VertexCount
,
Flags
);
memset
(
&
WineD3DStrided
,
0
,
sizeof
(
WineD3DStrided
));
/* Get the strided data right. the wined3d structure is a bit bigger
* Watch out: The contents of the strided data are determined by the fvf,
* not by the members set in D3DDrawPrimStrideData. So it's valid
...
...
@@ -3289,7 +3290,6 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
*/
if
(
VertexType
&
D3DFVF_POSITION_MASK
)
{
memset
(
&
WineD3DStrided
,
0
,
sizeof
(
WineD3DStrided
));
WineD3DStrided
.
u
.
s
.
position
.
lpData
=
D3DDrawPrimStrideData
->
position
.
lpvData
;
WineD3DStrided
.
u
.
s
.
position
.
dwStride
=
D3DDrawPrimStrideData
->
position
.
dwStride
;
WineD3DStrided
.
u
.
s
.
position
.
dwType
=
WINED3DDECLTYPE_FLOAT3
;
...
...
dlls/wined3d/device.c
View file @
1d3abdee
...
...
@@ -4098,7 +4098,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
}
memset
(
&
strided
,
0
,
sizeof
(
strided
));
primitiveConvertFVFtoOffset
(
SrcImpl
->
fvf
,
get_flexible_vertex_size
(
SrcImpl
->
fvf
),
SrcImpl
->
resource
.
allocatedMemory
+
get_flexible_vertex_size
(
SrcImpl
->
fvf
)
*
SrcStartIndex
,
&
strided
,
0
);
primitiveConvertFVFtoOffset
(
SrcImpl
->
fvf
,
get_flexible_vertex_size
(
SrcImpl
->
fvf
),
SrcImpl
->
resource
.
allocatedMemory
+
get_flexible_vertex_size
(
SrcImpl
->
fvf
)
*
SrcStartIndex
,
&
strided
,
0
,
0
);
return
process_vertices_strided
(
This
,
DestIndex
,
VertexCount
,
&
strided
,
SrcImpl
->
fvf
,
(
IWineD3DVertexBufferImpl
*
)
pDestBuffer
,
Flags
);
}
...
...
dlls/wined3d/drawprim.c
View file @
1d3abdee
...
...
@@ -223,6 +223,7 @@ void primitiveDeclarationConvertToStridedData(
strided
->
u
.
input
[
idx
].
dwType
=
element
->
Type
;
strided
->
u
.
input
[
idx
].
dwStride
=
stride
;
strided
->
u
.
input
[
idx
].
VBO
=
streamVBO
;
strided
->
u
.
input
[
idx
].
streamNo
=
element
->
Stream
;
if
(
!
useVertexShaderFunction
)
{
if
(
element
->
Usage
==
D3DDECLUSAGE_POSITION
)
strided
->
u
.
s
.
position_transformed
=
FALSE
;
...
...
@@ -244,7 +245,7 @@ void primitiveDeclarationConvertToStridedData(
}
}
void
primitiveConvertFVFtoOffset
(
DWORD
thisFVF
,
DWORD
stride
,
BYTE
*
data
,
WineDirect3DVertexStridedData
*
strided
,
GLint
streamVBO
)
{
void
primitiveConvertFVFtoOffset
(
DWORD
thisFVF
,
DWORD
stride
,
BYTE
*
data
,
WineDirect3DVertexStridedData
*
strided
,
GLint
streamVBO
,
UINT
streamNo
)
{
int
numBlends
;
int
numTextures
;
int
textureNo
;
...
...
@@ -259,6 +260,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
position
.
dwType
=
WINED3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
position
.
dwStride
=
stride
;
strided
->
u
.
s
.
position
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
position
.
streamNo
=
streamNo
;
data
+=
3
*
sizeof
(
float
);
if
(
thisFVF
&
WINED3DFVF_XYZRHW
)
{
strided
->
u
.
s
.
position
.
dwType
=
WINED3DDECLTYPE_FLOAT4
;
...
...
@@ -279,6 +281,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
blendWeights
.
dwType
=
WINED3DDECLTYPE_FLOAT1
+
numBlends
-
1
;
strided
->
u
.
s
.
blendWeights
.
dwStride
=
stride
;
strided
->
u
.
s
.
blendWeights
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
blendWeights
.
streamNo
=
streamNo
;
data
+=
numBlends
*
sizeof
(
FLOAT
);
if
(
thisFVF
&
WINED3DFVF_LASTBETA_UBYTE4
)
{
...
...
@@ -286,6 +289,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
blendMatrixIndices
.
dwType
=
WINED3DDECLTYPE_UBYTE4
;
strided
->
u
.
s
.
blendMatrixIndices
.
dwStride
=
stride
;
strided
->
u
.
s
.
blendMatrixIndices
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
blendMatrixIndices
.
streamNo
=
streamNo
;
data
+=
sizeof
(
DWORD
);
}
}
...
...
@@ -295,7 +299,8 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
normal
.
lpData
=
data
;
strided
->
u
.
s
.
normal
.
dwType
=
WINED3DDECLTYPE_FLOAT3
;
strided
->
u
.
s
.
normal
.
dwStride
=
stride
;
strided
->
u
.
s
.
normal
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
normal
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
normal
.
streamNo
=
streamNo
;
data
+=
3
*
sizeof
(
FLOAT
);
}
...
...
@@ -305,6 +310,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
pSize
.
dwType
=
WINED3DDECLTYPE_FLOAT1
;
strided
->
u
.
s
.
pSize
.
dwStride
=
stride
;
strided
->
u
.
s
.
pSize
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
pSize
.
streamNo
=
streamNo
;
data
+=
sizeof
(
FLOAT
);
}
...
...
@@ -314,6 +320,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
diffuse
.
dwType
=
WINED3DDECLTYPE_SHORT4
;
strided
->
u
.
s
.
diffuse
.
dwStride
=
stride
;
strided
->
u
.
s
.
diffuse
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
diffuse
.
streamNo
=
streamNo
;
data
+=
sizeof
(
DWORD
);
}
...
...
@@ -323,6 +330,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
specular
.
dwType
=
WINED3DDECLTYPE_SHORT4
;
strided
->
u
.
s
.
specular
.
dwStride
=
stride
;
strided
->
u
.
s
.
specular
.
VBO
=
streamVBO
;
strided
->
u
.
s
.
specular
.
streamNo
=
streamNo
;
data
+=
sizeof
(
DWORD
);
}
...
...
@@ -343,6 +351,7 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF, DWORD stride, BYTE *data, WineDi
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwType
=
WINED3DDECLTYPE_FLOAT1
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
dwStride
=
stride
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
VBO
=
streamVBO
;
strided
->
u
.
s
.
texCoords
[
textureNo
].
streamNo
=
streamNo
;
numCoords
[
textureNo
]
=
coordIdxInfo
&
0x03
;
/* Always one set */
...
...
@@ -420,7 +429,7 @@ void primitiveConvertToStridedData(IWineD3DDevice *iface, WineDirect3DVertexStri
if
(
thisFVF
==
0
)
continue
;
/* Now convert the stream into pointers */
primitiveConvertFVFtoOffset
(
thisFVF
,
stride
,
data
,
strided
,
streamVBO
);
primitiveConvertFVFtoOffset
(
thisFVF
,
stride
,
data
,
strided
,
streamVBO
,
nStream
);
}
/* Now call PreLoad on all the vertex buffers. In the very rare case
* that the buffers stopps converting PreLoad will dirtify the VDECL again.
...
...
dlls/wined3d/wined3d_private.h
View file @
1d3abdee
...
...
@@ -396,7 +396,8 @@ void primitiveConvertFVFtoOffset(DWORD thisFVF,
DWORD
stride
,
BYTE
*
data
,
WineDirect3DVertexStridedData
*
strided
,
GLint
streamVBO
);
GLint
streamVBO
,
UINT
streamNo
);
DWORD
get_flexible_vertex_size
(
DWORD
d3dvtVertexType
);
...
...
include/wine/wined3d_types.h
View file @
1d3abdee
...
...
@@ -1252,6 +1252,7 @@ typedef struct WineDirect3DStridedData {
DWORD
dwStride
;
/* Stride between occurances of this data */
DWORD
dwType
;
/* Type (as in D3DVSDT_TYPE) */
int
VBO
;
/* Vertex buffer object this data is in */
UINT
streamNo
;
/* D3D stream number */
}
WineDirect3DStridedData
;
typedef
struct
WineDirect3DVertexStridedData
{
...
...
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