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
df829de8
Commit
df829de8
authored
Mar 17, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Mar 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Handle DDBLT_ROP in ddraw.
parent
38e4cb29
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
21 deletions
+62
-21
surface.c
dlls/ddraw/surface.c
+30
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+32
-0
surface.c
dlls/wined3d/surface.c
+0
-21
No files found.
dlls/ddraw/surface.c
View file @
df829de8
...
...
@@ -1518,6 +1518,7 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
struct
ddraw_surface
*
dst_surface
=
impl_from_IDirectDrawSurface7
(
iface
);
struct
ddraw_surface
*
src_surface
=
unsafe_impl_from_IDirectDrawSurface7
(
SrcSurface
);
HRESULT
hr
=
DD_OK
;
DDBLTFX
rop_fx
;
TRACE
(
"iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.
\n
"
,
iface
,
wine_dbgstr_rect
(
DestRect
),
SrcSurface
,
wine_dbgstr_rect
(
SrcRect
),
Flags
,
DDBltFx
);
...
...
@@ -1583,6 +1584,35 @@ static HRESULT WINAPI ddraw_surface7_Blt(IDirectDrawSurface7 *iface, RECT *DestR
WARN
(
"DDBLT_ROP used with DDBltFx = NULL, returning DDERR_INVALIDPARAMS.
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
Flags
&=
~
DDBLT_ROP
;
switch
(
DDBltFx
->
dwROP
)
{
case
SRCCOPY
:
break
;
case
WHITENESS
:
case
BLACKNESS
:
rop_fx
=
*
DDBltFx
;
if
(
DDBltFx
->
dwROP
==
WHITENESS
)
rop_fx
.
u5
.
dwFillColor
=
0xffffffff
;
else
rop_fx
.
u5
.
dwFillColor
=
0
;
if
(
dst_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
)
Flags
|=
DDBLT_DEPTHFILL
;
else
Flags
|=
DDBLT_COLORFILL
;
DDBltFx
=
&
rop_fx
;
break
;
default:
wined3d_mutex_unlock
();
WARN
(
"Unsupported ROP %#x used, returning DDERR_NORASTEROPHW.
\n
"
,
DDBltFx
->
dwROP
);
return
DDERR_NORASTEROPHW
;
}
}
if
(
Flags
&
DDBLT_KEYSRC
&&
(
!
src_surface
||
!
(
src_surface
->
surface_desc
.
dwFlags
&
DDSD_CKSRCBLT
)))
...
...
dlls/ddraw/tests/ddraw7.c
View file @
df829de8
...
...
@@ -8672,6 +8672,31 @@ static void test_color_fill(void)
}
},
};
static
const
struct
{
DWORD
rop
;
const
char
*
name
;
HRESULT
hr
;
}
rops
[]
=
{
{
SRCCOPY
,
"SRCCOPY"
,
DD_OK
},
{
SRCPAINT
,
"SRCPAINT"
,
DDERR_NORASTEROPHW
},
{
SRCAND
,
"SRCAND"
,
DDERR_NORASTEROPHW
},
{
SRCINVERT
,
"SRCINVERT"
,
DDERR_NORASTEROPHW
},
{
SRCERASE
,
"SRCERASE"
,
DDERR_NORASTEROPHW
},
{
NOTSRCCOPY
,
"NOTSRCCOPY"
,
DDERR_NORASTEROPHW
},
{
NOTSRCERASE
,
"NOTSRCERASE"
,
DDERR_NORASTEROPHW
},
{
MERGECOPY
,
"MERGECOPY"
,
DDERR_NORASTEROPHW
},
{
MERGEPAINT
,
"MERGEPAINT"
,
DDERR_NORASTEROPHW
},
{
PATCOPY
,
"PATCOPY"
,
DDERR_NORASTEROPHW
},
{
PATPAINT
,
"PATPAINT"
,
DDERR_NORASTEROPHW
},
{
PATINVERT
,
"PATINVERT"
,
DDERR_NORASTEROPHW
},
{
DSTINVERT
,
"DSTINVERT"
,
DDERR_NORASTEROPHW
},
{
BLACKNESS
,
"BLACKNESS"
,
DD_OK
},
{
WHITENESS
,
"WHITENESS"
,
DD_OK
},
{
0xaa0029
,
"0xaa0029"
,
DDERR_NORASTEROPHW
}
/* noop */
};
window
=
CreateWindowA
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
...
...
@@ -8926,6 +8951,13 @@ static void test_color_fill(void)
hr
=
IDirectDrawSurface7_Blt
(
surface
,
&
rect
,
NULL
,
NULL
,
DDBLT_COLORFILL
|
DDBLT_ROP
|
DDBLT_WAIT
,
&
fx
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Got unexpected hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
sizeof
(
rops
)
/
sizeof
(
*
rops
);
i
++
)
{
fx
.
dwROP
=
rops
[
i
].
rop
;
hr
=
IDirectDrawSurface7_Blt
(
surface
,
NULL
,
surface2
,
NULL
,
DDBLT_ROP
|
DDBLT_WAIT
,
&
fx
);
ok
(
hr
==
rops
[
i
].
hr
,
"Got unexpected hr %#x for rop %s.
\n
"
,
hr
,
rops
[
i
].
name
);
}
IDirectDrawSurface7_Release
(
surface2
);
IDirectDrawSurface7_Release
(
surface
);
...
...
dlls/wined3d/surface.c
View file @
df829de8
...
...
@@ -4733,27 +4733,6 @@ static HRESULT surface_cpu_blt(struct wined3d_surface *dst_surface, const RECT *
{
FIXME
(
"DDBLT_DEPTHFILL needs to be implemented!
\n
"
);
}
if
(
flags
&
WINEDDBLT_ROP
)
{
/* Catch some degenerate cases here. */
switch
(
fx
->
dwROP
)
{
case
BLACKNESS
:
hr
=
_Blt_ColorFill
(
dbuf
,
dstwidth
,
dstheight
,
bpp
,
dst_map
.
row_pitch
,
0
);
break
;
case
0xaa0029
:
/* No-op */
break
;
case
WHITENESS
:
hr
=
_Blt_ColorFill
(
dbuf
,
dstwidth
,
dstheight
,
bpp
,
dst_map
.
row_pitch
,
~
0U
);
break
;
case
SRCCOPY
:
/* Well, we do that below? */
break
;
default:
FIXME
(
"Unsupported raster op: %08x Pattern: %p
\n
"
,
fx
->
dwROP
,
fx
->
u5
.
lpDDSPattern
);
goto
error
;
}
flags
&=
~
WINEDDBLT_ROP
;
}
if
(
flags
&
WINEDDBLT_DDROPS
)
{
FIXME
(
"
\t
Ddraw Raster Ops: %08x Pattern: %p
\n
"
,
fx
->
dwDDROP
,
fx
->
u5
.
lpDDSPattern
);
...
...
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