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
4c3dfa1b
Commit
4c3dfa1b
authored
Dec 06, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WineDirect3DStridedData typedef.
parent
5c5216e6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
49 deletions
+50
-49
device.c
dlls/ddraw/device.c
+20
-20
device.c
dlls/wined3d/device.c
+8
-8
drawprim.c
dlls/wined3d/drawprim.c
+12
-11
wined3d.h
include/wine/wined3d.h
+10
-10
No files found.
dlls/ddraw/device.c
View file @
4c3dfa1b
...
@@ -3865,8 +3865,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
...
@@ -3865,8 +3865,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
if
(
VertexType
&
D3DFVF_POSITION_MASK
)
if
(
VertexType
&
D3DFVF_POSITION_MASK
)
{
{
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
position
.
lpD
ata
=
D3DDrawPrimStrideData
->
position
.
lpvData
;
WineD3DStrided
.
position
.
d
ata
=
D3DDrawPrimStrideData
->
position
.
lpvData
;
WineD3DStrided
.
position
.
dwS
tride
=
D3DDrawPrimStrideData
->
position
.
dwStride
;
WineD3DStrided
.
position
.
s
tride
=
D3DDrawPrimStrideData
->
position
.
dwStride
;
if
(
VertexType
&
D3DFVF_XYZRHW
)
if
(
VertexType
&
D3DFVF_XYZRHW
)
{
{
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32A32_FLOAT
;
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32A32_FLOAT
;
...
@@ -3878,22 +3878,22 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
...
@@ -3878,22 +3878,22 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
if
(
VertexType
&
D3DFVF_NORMAL
)
if
(
VertexType
&
D3DFVF_NORMAL
)
{
{
WineD3DStrided
.
normal
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
normal
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
normal
.
lpD
ata
=
D3DDrawPrimStrideData
->
normal
.
lpvData
;
WineD3DStrided
.
normal
.
d
ata
=
D3DDrawPrimStrideData
->
normal
.
lpvData
;
WineD3DStrided
.
normal
.
dwS
tride
=
D3DDrawPrimStrideData
->
normal
.
dwStride
;
WineD3DStrided
.
normal
.
s
tride
=
D3DDrawPrimStrideData
->
normal
.
dwStride
;
}
}
if
(
VertexType
&
D3DFVF_DIFFUSE
)
if
(
VertexType
&
D3DFVF_DIFFUSE
)
{
{
WineD3DStrided
.
diffuse
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
diffuse
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
diffuse
.
lpD
ata
=
D3DDrawPrimStrideData
->
diffuse
.
lpvData
;
WineD3DStrided
.
diffuse
.
d
ata
=
D3DDrawPrimStrideData
->
diffuse
.
lpvData
;
WineD3DStrided
.
diffuse
.
dwS
tride
=
D3DDrawPrimStrideData
->
diffuse
.
dwStride
;
WineD3DStrided
.
diffuse
.
s
tride
=
D3DDrawPrimStrideData
->
diffuse
.
dwStride
;
}
}
if
(
VertexType
&
D3DFVF_SPECULAR
)
if
(
VertexType
&
D3DFVF_SPECULAR
)
{
{
WineD3DStrided
.
specular
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
specular
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
specular
.
lpD
ata
=
D3DDrawPrimStrideData
->
specular
.
lpvData
;
WineD3DStrided
.
specular
.
d
ata
=
D3DDrawPrimStrideData
->
specular
.
lpvData
;
WineD3DStrided
.
specular
.
dwS
tride
=
D3DDrawPrimStrideData
->
specular
.
dwStride
;
WineD3DStrided
.
specular
.
s
tride
=
D3DDrawPrimStrideData
->
specular
.
dwStride
;
}
}
for
(
i
=
0
;
i
<
GET_TEXCOUNT_FROM_FVF
(
VertexType
);
i
++
)
for
(
i
=
0
;
i
<
GET_TEXCOUNT_FROM_FVF
(
VertexType
);
i
++
)
...
@@ -3907,8 +3907,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
...
@@ -3907,8 +3907,8 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
default:
ERR
(
"Unexpected texture coordinate size %d
\n
"
,
default:
ERR
(
"Unexpected texture coordinate size %d
\n
"
,
GET_TEXCOORD_SIZE_FROM_FVF
(
VertexType
,
i
));
GET_TEXCOORD_SIZE_FROM_FVF
(
VertexType
,
i
));
}
}
WineD3DStrided
.
texCoords
[
i
].
lpD
ata
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
lpvData
;
WineD3DStrided
.
texCoords
[
i
].
d
ata
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
lpvData
;
WineD3DStrided
.
texCoords
[
i
].
dwS
tride
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
dwStride
;
WineD3DStrided
.
texCoords
[
i
].
s
tride
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
dwStride
;
}
}
/* WineD3D doesn't need the FVF here */
/* WineD3D doesn't need the FVF here */
...
@@ -4007,8 +4007,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
...
@@ -4007,8 +4007,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
if
(
VertexType
&
D3DFVF_POSITION_MASK
)
if
(
VertexType
&
D3DFVF_POSITION_MASK
)
{
{
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
position
.
lpD
ata
=
D3DDrawPrimStrideData
->
position
.
lpvData
;
WineD3DStrided
.
position
.
d
ata
=
D3DDrawPrimStrideData
->
position
.
lpvData
;
WineD3DStrided
.
position
.
dwS
tride
=
D3DDrawPrimStrideData
->
position
.
dwStride
;
WineD3DStrided
.
position
.
s
tride
=
D3DDrawPrimStrideData
->
position
.
dwStride
;
if
(
VertexType
&
D3DFVF_XYZRHW
)
if
(
VertexType
&
D3DFVF_XYZRHW
)
{
{
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32A32_FLOAT
;
WineD3DStrided
.
position
.
format
=
WINED3DFMT_R32G32B32A32_FLOAT
;
...
@@ -4020,22 +4020,22 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
...
@@ -4020,22 +4020,22 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
if
(
VertexType
&
D3DFVF_NORMAL
)
if
(
VertexType
&
D3DFVF_NORMAL
)
{
{
WineD3DStrided
.
normal
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
normal
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
WineD3DStrided
.
normal
.
lpD
ata
=
D3DDrawPrimStrideData
->
normal
.
lpvData
;
WineD3DStrided
.
normal
.
d
ata
=
D3DDrawPrimStrideData
->
normal
.
lpvData
;
WineD3DStrided
.
normal
.
dwS
tride
=
D3DDrawPrimStrideData
->
normal
.
dwStride
;
WineD3DStrided
.
normal
.
s
tride
=
D3DDrawPrimStrideData
->
normal
.
dwStride
;
}
}
if
(
VertexType
&
D3DFVF_DIFFUSE
)
if
(
VertexType
&
D3DFVF_DIFFUSE
)
{
{
WineD3DStrided
.
diffuse
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
diffuse
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
diffuse
.
lpD
ata
=
D3DDrawPrimStrideData
->
diffuse
.
lpvData
;
WineD3DStrided
.
diffuse
.
d
ata
=
D3DDrawPrimStrideData
->
diffuse
.
lpvData
;
WineD3DStrided
.
diffuse
.
dwS
tride
=
D3DDrawPrimStrideData
->
diffuse
.
dwStride
;
WineD3DStrided
.
diffuse
.
s
tride
=
D3DDrawPrimStrideData
->
diffuse
.
dwStride
;
}
}
if
(
VertexType
&
D3DFVF_SPECULAR
)
if
(
VertexType
&
D3DFVF_SPECULAR
)
{
{
WineD3DStrided
.
specular
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
specular
.
format
=
WINED3DFMT_B8G8R8A8_UNORM
;
WineD3DStrided
.
specular
.
lpD
ata
=
D3DDrawPrimStrideData
->
specular
.
lpvData
;
WineD3DStrided
.
specular
.
d
ata
=
D3DDrawPrimStrideData
->
specular
.
lpvData
;
WineD3DStrided
.
specular
.
dwS
tride
=
D3DDrawPrimStrideData
->
specular
.
dwStride
;
WineD3DStrided
.
specular
.
s
tride
=
D3DDrawPrimStrideData
->
specular
.
dwStride
;
}
}
for
(
i
=
0
;
i
<
GET_TEXCOUNT_FROM_FVF
(
VertexType
);
i
++
)
for
(
i
=
0
;
i
<
GET_TEXCOUNT_FROM_FVF
(
VertexType
);
i
++
)
...
@@ -4049,8 +4049,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
...
@@ -4049,8 +4049,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
default:
ERR
(
"Unexpected texture coordinate size %d
\n
"
,
default:
ERR
(
"Unexpected texture coordinate size %d
\n
"
,
GET_TEXCOORD_SIZE_FROM_FVF
(
VertexType
,
i
));
GET_TEXCOORD_SIZE_FROM_FVF
(
VertexType
,
i
));
}
}
WineD3DStrided
.
texCoords
[
i
].
lpD
ata
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
lpvData
;
WineD3DStrided
.
texCoords
[
i
].
d
ata
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
lpvData
;
WineD3DStrided
.
texCoords
[
i
].
dwS
tride
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
dwStride
;
WineD3DStrided
.
texCoords
[
i
].
s
tride
=
D3DDrawPrimStrideData
->
textureCoords
[
i
].
dwStride
;
}
}
/* WineD3D doesn't need the FVF here */
/* WineD3D doesn't need the FVF here */
...
...
dlls/wined3d/device.c
View file @
4c3dfa1b
...
@@ -343,12 +343,12 @@ void device_stream_info_from_declaration(struct wined3d_device *device,
...
@@ -343,12 +343,12 @@ void device_stream_info_from_declaration(struct wined3d_device *device,
}
}
static
void
stream_info_element_from_strided
(
const
struct
wined3d_gl_info
*
gl_info
,
static
void
stream_info_element_from_strided
(
const
struct
wined3d_gl_info
*
gl_info
,
const
struct
WineDirect3DStridedData
*
strided
,
struct
wined3d_stream_info_element
*
e
)
const
struct
wined3d_strided_element
*
strided
,
struct
wined3d_stream_info_element
*
e
)
{
{
e
->
data
.
addr
=
strided
->
lpD
ata
;
e
->
data
.
addr
=
strided
->
d
ata
;
e
->
data
.
buffer_object
=
0
;
e
->
data
.
buffer_object
=
0
;
e
->
format
=
wined3d_get_format
(
gl_info
,
strided
->
format
);
e
->
format
=
wined3d_get_format
(
gl_info
,
strided
->
format
);
e
->
stride
=
strided
->
dwS
tride
;
e
->
stride
=
strided
->
s
tride
;
e
->
stream_idx
=
0
;
e
->
stream_idx
=
0
;
}
}
...
@@ -359,18 +359,18 @@ static void device_stream_info_from_strided(const struct wined3d_gl_info *gl_inf
...
@@ -359,18 +359,18 @@ static void device_stream_info_from_strided(const struct wined3d_gl_info *gl_inf
memset
(
stream_info
,
0
,
sizeof
(
*
stream_info
));
memset
(
stream_info
,
0
,
sizeof
(
*
stream_info
));
if
(
strided
->
position
.
lpD
ata
)
if
(
strided
->
position
.
d
ata
)
stream_info_element_from_strided
(
gl_info
,
&
strided
->
position
,
&
stream_info
->
elements
[
WINED3D_FFP_POSITION
]);
stream_info_element_from_strided
(
gl_info
,
&
strided
->
position
,
&
stream_info
->
elements
[
WINED3D_FFP_POSITION
]);
if
(
strided
->
normal
.
lpD
ata
)
if
(
strided
->
normal
.
d
ata
)
stream_info_element_from_strided
(
gl_info
,
&
strided
->
normal
,
&
stream_info
->
elements
[
WINED3D_FFP_NORMAL
]);
stream_info_element_from_strided
(
gl_info
,
&
strided
->
normal
,
&
stream_info
->
elements
[
WINED3D_FFP_NORMAL
]);
if
(
strided
->
diffuse
.
lpD
ata
)
if
(
strided
->
diffuse
.
d
ata
)
stream_info_element_from_strided
(
gl_info
,
&
strided
->
diffuse
,
&
stream_info
->
elements
[
WINED3D_FFP_DIFFUSE
]);
stream_info_element_from_strided
(
gl_info
,
&
strided
->
diffuse
,
&
stream_info
->
elements
[
WINED3D_FFP_DIFFUSE
]);
if
(
strided
->
specular
.
lpD
ata
)
if
(
strided
->
specular
.
d
ata
)
stream_info_element_from_strided
(
gl_info
,
&
strided
->
specular
,
&
stream_info
->
elements
[
WINED3D_FFP_SPECULAR
]);
stream_info_element_from_strided
(
gl_info
,
&
strided
->
specular
,
&
stream_info
->
elements
[
WINED3D_FFP_SPECULAR
]);
for
(
i
=
0
;
i
<
WINED3DDP_MAXTEXCOORD
;
++
i
)
for
(
i
=
0
;
i
<
WINED3DDP_MAXTEXCOORD
;
++
i
)
{
{
if
(
strided
->
texCoords
[
i
].
lpD
ata
)
if
(
strided
->
texCoords
[
i
].
d
ata
)
stream_info_element_from_strided
(
gl_info
,
&
strided
->
texCoords
[
i
],
stream_info_element_from_strided
(
gl_info
,
&
strided
->
texCoords
[
i
],
&
stream_info
->
elements
[
WINED3D_FFP_TEXCOORD0
+
i
]);
&
stream_info
->
elements
[
WINED3D_FFP_TEXCOORD0
+
i
]);
}
}
...
...
dlls/wined3d/drawprim.c
View file @
4c3dfa1b
...
@@ -1125,21 +1125,22 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
...
@@ -1125,21 +1125,22 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
}
}
memset
(
&
patch
->
strided
,
0
,
sizeof
(
patch
->
strided
));
memset
(
&
patch
->
strided
,
0
,
sizeof
(
patch
->
strided
));
patch
->
strided
.
position
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
patch
->
strided
.
position
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
patch
->
strided
.
position
.
lpData
=
(
BYTE
*
)
patch
->
mem
;
patch
->
strided
.
position
.
data
=
(
BYTE
*
)
patch
->
mem
;
patch
->
strided
.
position
.
dwS
tride
=
vtxStride
;
patch
->
strided
.
position
.
s
tride
=
vtxStride
;
if
(
patch
->
has_normals
)
{
if
(
patch
->
has_normals
)
{
patch
->
strided
.
normal
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
patch
->
strided
.
normal
.
format
=
WINED3DFMT_R32G32B32_FLOAT
;
patch
->
strided
.
normal
.
lpData
=
(
BYTE
*
)
patch
->
mem
+
3
*
sizeof
(
float
)
/* pos */
;
patch
->
strided
.
normal
.
data
=
(
BYTE
*
)
patch
->
mem
+
3
*
sizeof
(
float
)
/* pos */
;
patch
->
strided
.
normal
.
dwS
tride
=
vtxStride
;
patch
->
strided
.
normal
.
s
tride
=
vtxStride
;
}
}
if
(
patch
->
has_texcoords
)
{
if
(
patch
->
has_texcoords
)
{
patch
->
strided
.
texCoords
[
0
].
format
=
WINED3DFMT_R32G32B32A32_FLOAT
;
patch
->
strided
.
texCoords
[
0
].
format
=
WINED3DFMT_R32G32B32A32_FLOAT
;
patch
->
strided
.
texCoords
[
0
].
lpData
=
(
BYTE
*
)
patch
->
mem
+
3
*
sizeof
(
float
)
/* pos */
;
patch
->
strided
.
texCoords
[
0
].
data
=
(
BYTE
*
)
patch
->
mem
+
3
*
sizeof
(
float
)
/* pos */
;
if
(
patch
->
has_normals
)
{
if
(
patch
->
has_normals
)
patch
->
strided
.
texCoords
[
0
].
lpData
+=
3
*
sizeof
(
float
);
patch
->
strided
.
texCoords
[
0
].
data
+=
3
*
sizeof
(
float
);
}
patch
->
strided
.
texCoords
[
0
].
stride
=
vtxStride
;
patch
->
strided
.
texCoords
[
0
].
dwStride
=
vtxStride
;
}
}
return
WINED3D_OK
;
return
WINED3D_OK
;
...
...
include/wine/wined3d.h
View file @
4c3dfa1b
...
@@ -1725,20 +1725,20 @@ struct wined3d_box
...
@@ -1725,20 +1725,20 @@ struct wined3d_box
UINT
back
;
UINT
back
;
};
};
typedef
struct
WineDirect3DStridedData
struct
wined3d_strided_element
{
{
enum
wined3d_format_id
format
;
/* Format of the data */
enum
wined3d_format_id
format
;
/* Format of the data */
const
BYTE
*
lpData
;
/* Pointer to start of data */
const
BYTE
*
data
;
/* Pointer to start of data */
DWORD
dwStride
;
/* Stride between occurrences of this data */
UINT
stride
;
/* Stride between occurrences of this data */
}
WineDirect3DStridedData
;
};
typedef
struct
WineDirect3DVertexStridedData
typedef
struct
WineDirect3DVertexStridedData
{
{
WineDirect3DStridedData
position
;
struct
wined3d_strided_element
position
;
WineDirect3DStridedData
normal
;
struct
wined3d_strided_element
normal
;
WineDirect3DStridedData
diffuse
;
struct
wined3d_strided_element
diffuse
;
WineDirect3DStridedData
specular
;
struct
wined3d_strided_element
specular
;
WineDirect3DStridedData
texCoords
[
WINED3DDP_MAXTEXCOORD
];
struct
wined3d_strided_element
texCoords
[
WINED3DDP_MAXTEXCOORD
];
BOOL
position_transformed
;
BOOL
position_transformed
;
}
WineDirect3DVertexStridedData
;
}
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