Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
21b82143
Commit
21b82143
authored
Feb 06, 2016
by
Michael Müller
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Don't set HWTRANSFORMANDLIGHT flag on d3d7 RGB device.
parent
3dea5360
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
ddraw.c
dlls/ddraw/ddraw.c
+9
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+18
-0
No files found.
dlls/ddraw/ddraw.c
View file @
21b82143
...
...
@@ -49,6 +49,7 @@ static struct enum_device_entry
char
interface_name
[
100
];
char
device_name
[
100
];
const
GUID
*
device_guid
;
DWORD
remove_caps
;
}
device_list7
[]
=
{
/* T&L HAL device */
...
...
@@ -56,6 +57,7 @@ static struct enum_device_entry
"WINE Direct3D7 Hardware Transform and Lighting acceleration using WineD3D"
,
"Wine D3D7 T&L HAL"
,
&
IID_IDirect3DTnLHalDevice
,
0
,
},
/* HAL device */
...
...
@@ -63,6 +65,7 @@ static struct enum_device_entry
"WINE Direct3D7 Hardware acceleration using WineD3D"
,
"Direct3D HAL"
,
&
IID_IDirect3DHALDevice
,
0
,
},
/* RGB device */
...
...
@@ -70,6 +73,7 @@ static struct enum_device_entry
"WINE Direct3D7 RGB Software Emulation using WineD3D"
,
"Wine D3D7 RGB"
,
&
IID_IDirect3DRGBDevice
,
D3DDEVCAPS_HWTRANSFORMANDLIGHT
,
},
};
...
...
@@ -3757,6 +3761,7 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
{
struct
ddraw
*
ddraw
=
impl_from_IDirect3D7
(
iface
);
D3DDEVICEDESC7
device_desc7
;
DWORD
dev_caps
;
HRESULT
hr
;
size_t
i
;
...
...
@@ -3773,11 +3778,15 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
return
hr
;
}
dev_caps
=
device_desc7
.
dwDevCaps
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
device_list7
);
i
++
)
{
HRESULT
ret
;
device_desc7
.
deviceGUID
=
*
device_list7
[
i
].
device_guid
;
device_desc7
.
dwDevCaps
=
dev_caps
&
~
device_list7
[
i
].
remove_caps
;
ret
=
callback
(
device_list7
[
i
].
interface_name
,
device_list7
[
i
].
device_name
,
&
device_desc7
,
context
);
if
(
ret
!=
DDENUMRET_OK
)
{
...
...
dlls/ddraw/tests/ddraw7.c
View file @
21b82143
...
...
@@ -577,6 +577,19 @@ static IDirect3DDevice7 *create_device_ex(HWND window, DWORD coop_level, const G
return
device
;
}
static
HRESULT
WINAPI
enum_devtype_software_cb
(
char
*
desc_str
,
char
*
name
,
D3DDEVICEDESC7
*
desc
,
void
*
ctx
)
{
BOOL
*
software_ok
=
ctx
;
if
(
IsEqualGUID
(
&
desc
->
deviceGUID
,
&
IID_IDirect3DRGBDevice
))
{
ok
(
!
(
desc
->
dwDevCaps
&
D3DDEVCAPS_HWTRANSFORMANDLIGHT
),
"RGB emulation device shouldn't have HWTRANSFORMANDLIGHT flag
\n
"
);
*
software_ok
=
TRUE
;
return
DDENUMRET_CANCEL
;
}
return
DDENUMRET_OK
;
}
static
IDirect3DDevice7
*
create_device
(
HWND
window
,
DWORD
coop_level
)
{
const
GUID
*
device_guid
=
&
IID_IDirect3DHALDevice
;
...
...
@@ -6837,6 +6850,7 @@ static void test_surface_lock(void)
ULONG
refcount
;
DDPIXELFORMAT
z_fmt
;
BOOL
hal_ok
=
FALSE
;
BOOL
software_ok
=
FALSE
;
const
GUID
*
devtype
=
&
IID_IDirect3DHALDevice
;
D3DDEVICEDESC7
device_desc
;
BOOL
cubemap_supported
;
...
...
@@ -6962,6 +6976,10 @@ static void test_surface_lock(void)
if
(
hal_ok
)
devtype
=
&
IID_IDirect3DTnLHalDevice
;
hr
=
IDirect3D7_EnumDevices
(
d3d
,
enum_devtype_software_cb
,
&
software_ok
);
ok
(
SUCCEEDED
(
hr
),
"Failed to enumerate devices, hr %#x.
\n
"
,
hr
);
if
(
!
software_ok
)
win_skip
(
"RGB device not found, unable to check flags
\n
"
);
memset
(
&
z_fmt
,
0
,
sizeof
(
z_fmt
));
hr
=
IDirect3D7_EnumZBufferFormats
(
d3d
,
devtype
,
enum_z_fmt
,
&
z_fmt
);
if
(
FAILED
(
hr
)
||
!
z_fmt
.
dwSize
)
...
...
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