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
d9db221f
Commit
d9db221f
authored
Nov 22, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Disallow creating managed index buffers on d3d9ex devices.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b4590d33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
buffer.c
dlls/d3d9/buffer.c
+6
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+3
-4
No files found.
dlls/d3d9/buffer.c
View file @
d9db221f
...
@@ -585,6 +585,12 @@ HRESULT indexbuffer_init(struct d3d9_indexbuffer *buffer, struct d3d9_device *de
...
@@ -585,6 +585,12 @@ HRESULT indexbuffer_init(struct d3d9_indexbuffer *buffer, struct d3d9_device *de
if
(
pool
==
D3DPOOL_SCRATCH
)
if
(
pool
==
D3DPOOL_SCRATCH
)
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
if
(
pool
==
D3DPOOL_MANAGED
&&
device
->
d3d_parent
->
extended
)
{
WARN
(
"Managed resources are not supported by d3d9ex devices.
\n
"
);
return
D3DERR_INVALIDCALL
;
}
/* In d3d9, buffers can't be used as rendertarget or depth/stencil buffer. */
/* In d3d9, buffers can't be used as rendertarget or depth/stencil buffer. */
if
(
usage
&
(
D3DUSAGE_RENDERTARGET
|
D3DUSAGE_DEPTHSTENCIL
))
if
(
usage
&
(
D3DUSAGE_RENDERTARGET
|
D3DUSAGE_DEPTHSTENCIL
))
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
...
...
dlls/d3d9/tests/d3d9ex.c
View file @
d9db221f
...
@@ -4500,10 +4500,9 @@ static void test_resource_access(void)
...
@@ -4500,10 +4500,9 @@ static void test_resource_access(void)
hr
=
IDirect3DDevice9Ex_CreateIndexBuffer
(
device
,
16
,
tests
[
i
].
usage
,
hr
=
IDirect3DDevice9Ex_CreateIndexBuffer
(
device
,
16
,
tests
[
i
].
usage
,
tests
[
i
].
format
==
FORMAT_COLOUR
?
D3DFMT_INDEX32
:
D3DFMT_INDEX16
,
tests
[
i
].
pool
,
&
ib
,
NULL
);
tests
[
i
].
format
==
FORMAT_COLOUR
?
D3DFMT_INDEX32
:
D3DFMT_INDEX16
,
tests
[
i
].
pool
,
&
ib
,
NULL
);
todo_wine_if
(
hr
==
D3D_OK
&&
tests
[
i
].
pool
==
D3DPOOL_MANAGED
)
ok
(
hr
==
(
tests
[
i
].
pool
==
D3DPOOL_SCRATCH
||
tests
[
i
].
pool
==
D3DPOOL_MANAGED
ok
(
hr
==
(
tests
[
i
].
pool
==
D3DPOOL_SCRATCH
||
tests
[
i
].
pool
==
D3DPOOL_MANAGED
||
(
tests
[
i
].
usage
&
~
D3DUSAGE_DYNAMIC
)
?
D3DERR_INVALIDCALL
:
D3D_OK
),
||
(
tests
[
i
].
usage
&
~
D3DUSAGE_DYNAMIC
)
?
D3DERR_INVALIDCALL
:
D3D_OK
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
continue
;
continue
;
...
...
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