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
c3c98ed4
Commit
c3c98ed4
authored
Nov 20, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Disallow rendertarget and depth/stencil usage on 3D textures.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fc97073e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
device.c
dlls/d3d9/tests/device.c
+2
-4
texture.c
dlls/d3d9/texture.c
+4
-0
No files found.
dlls/d3d9/tests/device.c
View file @
c3c98ed4
...
...
@@ -12926,10 +12926,8 @@ static void test_resource_access(void)
hr
=
IDirect3DDevice9_CreateVolumeTexture
(
device
,
16
,
16
,
1
,
1
,
tests
[
i
].
usage
,
format
,
tests
[
i
].
pool
,
&
texture
,
NULL
);
todo_wine_if
(
tests
[
i
].
usage
&
D3DUSAGE_RENDERTARGET
&&
!
(
tests
[
i
].
usage
&
D3DUSAGE_DYNAMIC
)
&&
tests
[
i
].
pool
==
D3DPOOL_DEFAULT
)
ok
(
hr
==
(
!
(
tests
[
i
].
usage
&
~
D3DUSAGE_DYNAMIC
)
?
D3D_OK
:
D3DERR_INVALIDCALL
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
ok
(
hr
==
(
!
(
tests
[
i
].
usage
&
~
D3DUSAGE_DYNAMIC
)
?
D3D_OK
:
D3DERR_INVALIDCALL
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
if
(
FAILED
(
hr
))
continue
;
...
...
dlls/d3d9/texture.c
View file @
c3c98ed4
...
...
@@ -1453,6 +1453,10 @@ HRESULT volumetexture_init(struct d3d9_texture *texture, struct d3d9_device *dev
struct
wined3d_resource_desc
desc
;
HRESULT
hr
;
/* In d3d9, 3D textures can't be used as rendertarget or depth/stencil buffer. */
if
(
usage
&
(
D3DUSAGE_RENDERTARGET
|
D3DUSAGE_DEPTHSTENCIL
))
return
D3DERR_INVALIDCALL
;
texture
->
IDirect3DBaseTexture9_iface
.
lpVtbl
=
(
const
IDirect3DBaseTexture9Vtbl
*
)
&
d3d9_texture_3d_vtbl
;
d3d9_resource_init
(
&
texture
->
resource
);
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