Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
2ecbe2aa
Commit
2ecbe2aa
authored
Nov 23, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the WINED3DRECTPATCH_INFO typedef.
parent
7416953e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
34 deletions
+35
-34
device.c
dlls/d3d8/device.c
+1
-1
device.c
dlls/d3d9/device.c
+1
-1
device.c
dlls/wined3d/device.c
+3
-3
drawprim.c
dlls/wined3d/drawprim.c
+19
-18
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d.h
include/wine/wined3d.h
+10
-10
No files found.
dlls/d3d8/device.c
View file @
2ecbe2aa
...
...
@@ -2598,7 +2598,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DrawRectPatch(IDirect3DDevice8 *iface
wined3d_mutex_lock
();
hr
=
wined3d_device_draw_rect_patch
(
This
->
wined3d_device
,
Handle
,
pNumSegs
,
(
const
WINED3DRECTPATCH_INFO
*
)
pRectPatchInfo
);
pNumSegs
,
(
const
struct
wined3d_rect_patch_info
*
)
pRectPatchInfo
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d9/device.c
View file @
2ecbe2aa
...
...
@@ -2684,7 +2684,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_DrawRectPatch(IDirect3DDevice9Ex *ifa
wined3d_mutex_lock
();
hr
=
wined3d_device_draw_rect_patch
(
This
->
wined3d_device
,
Handle
,
pNumSegs
,
(
const
WINED3DRECTPATCH_INFO
*
)
pRectPatchInfo
);
pNumSegs
,
(
const
struct
wined3d_rect_patch_info
*
)
pRectPatchInfo
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/wined3d/device.c
View file @
2ecbe2aa
...
...
@@ -4647,7 +4647,7 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device,
}
HRESULT
CDECL
wined3d_device_draw_rect_patch
(
struct
wined3d_device
*
device
,
UINT
handle
,
const
float
*
num_segs
,
const
WINED3DRECTPATCH_INFO
*
rect_patch_info
)
const
float
*
num_segs
,
const
struct
wined3d_rect_patch_info
*
rect_patch_info
)
{
struct
WineD3DRectPatch
*
patch
;
GLenum
old_primitive_type
;
...
...
@@ -4704,13 +4704,13 @@ HRESULT CDECL wined3d_device_draw_rect_patch(struct wined3d_device *device, UINT
if
(
num_segs
[
0
]
!=
patch
->
numSegs
[
0
]
||
num_segs
[
1
]
!=
patch
->
numSegs
[
1
]
||
num_segs
[
2
]
!=
patch
->
numSegs
[
2
]
||
num_segs
[
3
]
!=
patch
->
numSegs
[
3
]
||
(
rect_patch_info
&&
memcmp
(
rect_patch_info
,
&
patch
->
RectPatchI
nfo
,
sizeof
(
*
rect_patch_info
))))
||
(
rect_patch_info
&&
memcmp
(
rect_patch_info
,
&
patch
->
rect_patch_i
nfo
,
sizeof
(
*
rect_patch_info
))))
{
HRESULT
hr
;
TRACE
(
"Tesselation density or patch info changed, retesselating
\n
"
);
if
(
rect_patch_info
)
patch
->
RectPatchI
nfo
=
*
rect_patch_info
;
patch
->
rect_patch_i
nfo
=
*
rect_patch_info
;
patch
->
numSegs
[
0
]
=
num_segs
[
0
];
patch
->
numSegs
[
1
]
=
num_segs
[
1
];
...
...
dlls/wined3d/drawprim.c
View file @
2ecbe2aa
...
...
@@ -789,6 +789,7 @@ static void normalize_normal(float *n) {
HRESULT
tesselate_rectpatch
(
struct
wined3d_device
*
This
,
struct
WineD3DRectPatch
*
patch
)
{
unsigned
int
i
,
j
,
num_quads
,
out_vertex_size
,
buffer_size
,
d3d_out_vertex_size
;
const
struct
wined3d_rect_patch_info
*
info
=
&
patch
->
rect_patch_info
;
float
max_x
=
0
.
0
f
,
max_y
=
0
.
0
f
,
max_z
=
0
.
0
f
,
neg_z
=
0
.
0
f
;
struct
wined3d_state
*
state
=
&
This
->
stateBlock
->
state
;
struct
wined3d_stream_info
stream_info
;
...
...
@@ -796,7 +797,6 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
struct
wined3d_context
*
context
;
struct
wined3d_shader
*
vs
;
const
BYTE
*
data
;
const
WINED3DRECTPATCH_INFO
*
info
=
&
patch
->
RectPatchInfo
;
DWORD
vtxStride
;
GLenum
feedback_type
;
GLfloat
*
feedbuffer
;
...
...
@@ -821,9 +821,9 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
e
->
data
.
addr
=
(
BYTE
*
)((
ULONG_PTR
)
e
->
data
.
addr
+
(
ULONG_PTR
)
buffer_get_sysmem
(
vb
,
context
->
gl_info
));
}
vtxStride
=
e
->
stride
;
data
=
e
->
data
.
addr
+
vtxStride
*
info
->
Stride
*
info
->
StartVertexOffsetHeight
+
vtxStride
*
info
->
StartVertexOffsetW
idth
;
data
=
e
->
data
.
addr
+
vtxStride
*
info
->
stride
*
info
->
start_vertex_offset_height
+
vtxStride
*
info
->
start_vertex_offset_w
idth
;
/* Not entirely sure about what happens with transformed vertices */
if
(
stream_info
.
position_transformed
)
FIXME
(
"Transformed position in rectpatch generation
\n
"
);
...
...
@@ -835,17 +835,17 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
*/
ERR
(
"Vertex stride is not a multiple of sizeof(GLfloat)
\n
"
);
}
if
(
info
->
Basis
!=
WINED3DBASIS_BEZIER
)
{
FIXME
(
"Basis is %s, how to handle this?
\n
"
,
debug_d3dbasis
(
info
->
Basis
));
}
if
(
info
->
Degree
!=
WINED3DDEGREE_CUBIC
)
{
FIXME
(
"Degree is %s, how to handle this?
\n
"
,
debug_d3ddegree
(
info
->
Degree
));
}
if
(
info
->
basis
!=
WINED3DBASIS_BEZIER
)
FIXME
(
"Basis is %s, how to handle this?
\n
"
,
debug_d3dbasis
(
info
->
basis
));
if
(
info
->
degree
!=
WINED3DDEGREE_CUBIC
)
FIXME
(
"Degree is %s, how to handle this?
\n
"
,
debug_d3ddegree
(
info
->
degree
));
/* First, get the boundary cube of the input data */
for
(
j
=
0
;
j
<
info
->
Height
;
j
++
)
{
for
(
i
=
0
;
i
<
info
->
Width
;
i
++
)
{
const
float
*
v
=
(
const
float
*
)(
data
+
vtxStride
*
i
+
vtxStride
*
info
->
Stride
*
j
);
for
(
j
=
0
;
j
<
info
->
height
;
++
j
)
{
for
(
i
=
0
;
i
<
info
->
width
;
++
i
)
{
const
float
*
v
=
(
const
float
*
)(
data
+
vtxStride
*
i
+
vtxStride
*
info
->
stride
*
j
);
if
(
fabs
(
v
[
0
])
>
max_x
)
max_x
=
fabsf
(
v
[
0
]);
if
(
fabs
(
v
[
1
])
>
max_y
)
max_y
=
fabsf
(
v
[
1
]);
if
(
fabs
(
v
[
2
])
>
max_z
)
max_z
=
fabsf
(
v
[
2
]);
...
...
@@ -964,14 +964,15 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct WineD3DRectPatch
feedbuffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
buffer_size
*
sizeof
(
float
)
*
8
);
glMap2f
(
GL_MAP2_VERTEX_3
,
0
.
0
f
,
1
.
0
f
,
vtxStride
/
sizeof
(
float
),
info
->
W
idth
,
0
.
0
f
,
1
.
0
f
,
info
->
Stride
*
vtxStride
/
sizeof
(
float
),
info
->
H
eight
,
0
.
0
f
,
1
.
0
f
,
vtxStride
/
sizeof
(
float
),
info
->
w
idth
,
0
.
0
f
,
1
.
0
f
,
info
->
stride
*
vtxStride
/
sizeof
(
float
),
info
->
h
eight
,
(
const
GLfloat
*
)
data
);
checkGLcall
(
"glMap2f"
);
if
(
patch
->
has_texcoords
)
{
if
(
patch
->
has_texcoords
)
{
glMap2f
(
GL_MAP2_TEXTURE_COORD_4
,
0
.
0
f
,
1
.
0
f
,
vtxStride
/
sizeof
(
float
),
info
->
W
idth
,
0
.
0
f
,
1
.
0
f
,
info
->
Stride
*
vtxStride
/
sizeof
(
float
),
info
->
H
eight
,
0
.
0
f
,
1
.
0
f
,
vtxStride
/
sizeof
(
float
),
info
->
w
idth
,
0
.
0
f
,
1
.
0
f
,
info
->
stride
*
vtxStride
/
sizeof
(
float
),
info
->
h
eight
,
(
const
GLfloat
*
)
data
);
checkGLcall
(
"glMap2f"
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
2ecbe2aa
...
...
@@ -1556,7 +1556,7 @@ struct WineD3DRectPatch
UINT
Handle
;
float
*
mem
;
WineDirect3DVertexStridedData
strided
;
WINED3DRECTPATCH_INFO
RectPatchI
nfo
;
struct
wined3d_rect_patch_info
rect_patch_i
nfo
;
float
numSegs
[
4
];
char
has_normals
,
has_texcoords
;
struct
list
entry
;
...
...
include/wine/wined3d.h
View file @
2ecbe2aa
...
...
@@ -1596,16 +1596,16 @@ struct wined3d_line_pattern
WORD
line_pattern
;
};
typedef
struct
_WINEDD3DRECTPATCH_INFO
struct
wined3d_rect_patch_info
{
UINT
StartVertexOffsetW
idth
;
UINT
StartVertexOffsetH
eight
;
UINT
W
idth
;
UINT
H
eight
;
UINT
S
tride
;
WINED3DBASISTYPE
B
asis
;
WINED3DDEGREETYPE
D
egree
;
}
WINED3DRECTPATCH_INFO
;
UINT
start_vertex_offset_w
idth
;
UINT
start_vertex_offset_h
eight
;
UINT
w
idth
;
UINT
h
eight
;
UINT
s
tride
;
WINED3DBASISTYPE
b
asis
;
WINED3DDEGREETYPE
d
egree
;
};
typedef
struct
_WINED3DTRIPATCH_INFO
{
...
...
@@ -2189,7 +2189,7 @@ HRESULT __cdecl wined3d_device_draw_primitive_strided(struct wined3d_device *dev
HRESULT
__cdecl
wined3d_device_draw_primitive_up
(
struct
wined3d_device
*
device
,
UINT
vertex_count
,
const
void
*
stream_data
,
UINT
stream_stride
);
HRESULT
__cdecl
wined3d_device_draw_rect_patch
(
struct
wined3d_device
*
device
,
UINT
handle
,
const
float
*
num_segs
,
const
WINED3DRECTPATCH_INFO
*
rect_patch_info
);
const
float
*
num_segs
,
const
struct
wined3d_rect_patch_info
*
rect_patch_info
);
HRESULT
__cdecl
wined3d_device_draw_tri_patch
(
struct
wined3d_device
*
device
,
UINT
handle
,
const
float
*
num_segs
,
const
WINED3DTRIPATCH_INFO
*
tri_patch_info
);
HRESULT
__cdecl
wined3d_device_end_scene
(
struct
wined3d_device
*
device
);
...
...
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