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
d511b67d
Commit
d511b67d
authored
Nov 23, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Disallow creating managed 2D textures on d3d9ex devices.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4d6dfd5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+2
-2
texture.c
dlls/d3d9/texture.c
+6
-0
No files found.
dlls/d3d9/tests/d3d9ex.c
View file @
d511b67d
...
@@ -4273,8 +4273,8 @@ static void test_resource_access(void)
...
@@ -4273,8 +4273,8 @@ static void test_resource_access(void)
case
SURFACE_2D
:
case
SURFACE_2D
:
hr
=
IDirect3DDevice9Ex_CreateTexture
(
device
,
16
,
16
,
1
,
hr
=
IDirect3DDevice9Ex_CreateTexture
(
device
,
16
,
16
,
1
,
tests
[
j
].
usage
,
format
,
tests
[
j
].
pool
,
&
texture_2d
,
NULL
);
tests
[
j
].
usage
,
format
,
tests
[
j
].
pool
,
&
texture_2d
,
NULL
);
todo_wine_if
(
!
tests
[
j
].
valid
&&
!
tests
[
j
].
usage
&&
(
tests
[
j
].
format
==
FORMAT_DEPTH
todo_wine_if
(
!
tests
[
j
].
valid
&&
tests
[
j
].
format
==
FORMAT_DEPTH
||
tests
[
j
].
pool
==
D3DPOOL_MANAGED
)
)
&&
!
tests
[
j
].
usage
&&
tests
[
j
].
pool
!=
D3DPOOL_MANAGED
)
ok
(
hr
==
(
tests
[
j
].
valid
&&
(
tests
[
j
].
format
!=
FORMAT_DEPTH
||
depth_2d
)
ok
(
hr
==
(
tests
[
j
].
valid
&&
(
tests
[
j
].
format
!=
FORMAT_DEPTH
||
depth_2d
)
?
D3D_OK
:
D3DERR_INVALIDCALL
),
?
D3D_OK
:
D3DERR_INVALIDCALL
),
"Test %s %u: Got unexpected hr %#x.
\n
"
,
surface_types
[
i
].
name
,
j
,
hr
);
"Test %s %u: Got unexpected hr %#x.
\n
"
,
surface_types
[
i
].
name
,
j
,
hr
);
...
...
dlls/d3d9/texture.c
View file @
d511b67d
...
@@ -1301,6 +1301,12 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
...
@@ -1301,6 +1301,12 @@ HRESULT texture_init(struct d3d9_texture *texture, struct d3d9_device *device,
DWORD
flags
=
0
;
DWORD
flags
=
0
;
HRESULT
hr
;
HRESULT
hr
;
if
(
pool
==
D3DPOOL_MANAGED
&&
device
->
d3d_parent
->
extended
)
{
WARN
(
"Managed resources are not supported by d3d9ex devices.
\n
"
);
return
D3DERR_INVALIDCALL
;
}
texture
->
IDirect3DBaseTexture9_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_2d_vtbl
;
texture
->
IDirect3DBaseTexture9_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_2d_vtbl
;
d3d9_resource_init
(
&
texture
->
resource
);
d3d9_resource_init
(
&
texture
->
resource
);
list_init
(
&
texture
->
rtv_list
);
list_init
(
&
texture
->
rtv_list
);
...
...
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