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
e09f980c
Commit
e09f980c
authored
Jun 09, 2015
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Reject FBs with mismatching multisample settings.
parent
4d8bfe19
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
0 deletions
+55
-0
device.c
dlls/d3d8/device.c
+8
-0
visual.c
dlls/d3d8/tests/visual.c
+47
-0
No files found.
dlls/d3d8/device.c
View file @
e09f980c
...
@@ -1185,6 +1185,14 @@ static HRESULT WINAPI d3d8_device_SetRenderTarget(IDirect3DDevice8 *iface,
...
@@ -1185,6 +1185,14 @@ static HRESULT WINAPI d3d8_device_SetRenderTarget(IDirect3DDevice8 *iface,
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
}
}
if
(
ds_desc
.
multisample_type
!=
rt_desc
.
multisample_type
||
ds_desc
.
multisample_quality
!=
rt_desc
.
multisample_quality
)
{
WARN
(
"Multisample settings do not match, returing D3DERR_INVALIDCALL
\n
"
);
wined3d_mutex_unlock
();
return
D3DERR_INVALIDCALL
;
}
}
}
original_dsv
=
wined3d_device_get_depth_stencil_view
(
device
->
wined3d_device
);
original_dsv
=
wined3d_device_get_depth_stencil_view
(
device
->
wined3d_device
);
...
...
dlls/d3d8/tests/visual.c
View file @
e09f980c
...
@@ -6855,6 +6855,52 @@ done:
...
@@ -6855,6 +6855,52 @@ done:
DestroyWindow
(
window
);
DestroyWindow
(
window
);
}
}
static
void
test_multisample_mismatch
(
void
)
{
IDirect3DDevice8
*
device
;
IDirect3D8
*
d3d
;
HWND
window
;
HRESULT
hr
;
ULONG
refcount
;
IDirect3DSurface8
*
rt_multi
,
*
ds
;
window
=
CreateWindowA
(
"static"
,
"d3d8_test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
0
,
0
,
640
,
480
,
NULL
,
NULL
,
NULL
,
NULL
);
d3d
=
Direct3DCreate8
(
D3D_SDK_VERSION
);
ok
(
!!
d3d
,
"Failed to create a D3D object.
\n
"
);
if
(
FAILED
(
IDirect3D8_CheckDeviceMultiSampleType
(
d3d
,
D3DADAPTER_DEFAULT
,
D3DDEVTYPE_HAL
,
D3DFMT_A8R8G8B8
,
TRUE
,
D3DMULTISAMPLE_2_SAMPLES
)))
{
skip
(
"Multisampling not supported for D3DFMT_A8R8G8B8, skipping multisample mismatch test.
\n
"
);
IDirect3D8_Release
(
d3d
);
return
;
}
if
(
!
(
device
=
create_device
(
d3d
,
window
,
window
,
TRUE
)))
{
skip
(
"Failed to create a D3D device, skipping tests.
\n
"
);
goto
done
;
}
hr
=
IDirect3DDevice8_CreateRenderTarget
(
device
,
640
,
480
,
D3DFMT_A8R8G8B8
,
D3DMULTISAMPLE_2_SAMPLES
,
FALSE
,
&
rt_multi
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create render target, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_GetDepthStencilSurface
(
device
,
&
ds
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get original depth/stencil, hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_SetRenderTarget
(
device
,
rt_multi
,
ds
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
IDirect3DSurface8_Release
(
ds
);
IDirect3DSurface8_Release
(
rt_multi
);
refcount
=
IDirect3DDevice8_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
IDirect3D8_Release
(
d3d
);
DestroyWindow
(
window
);
}
START_TEST
(
visual
)
START_TEST
(
visual
)
{
{
D3DADAPTER_IDENTIFIER8
identifier
;
D3DADAPTER_IDENTIFIER8
identifier
;
...
@@ -6911,4 +6957,5 @@ START_TEST(visual)
...
@@ -6911,4 +6957,5 @@ START_TEST(visual)
test_table_fog_zw
();
test_table_fog_zw
();
test_signed_formats
();
test_signed_formats
();
test_pointsize
();
test_pointsize
();
test_multisample_mismatch
();
}
}
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