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
d9bd9a9a
Commit
d9bd9a9a
authored
Dec 10, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Volume and cube textures do not support user memory.
parent
b7b0b7d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
device.c
dlls/d3d9/device.c
+14
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+20
-1
No files found.
dlls/d3d9/device.c
View file @
d9bd9a9a
...
...
@@ -800,7 +800,14 @@ static HRESULT WINAPI d3d9_device_CreateVolumeTexture(IDirect3DDevice9Ex *iface,
*
texture
=
NULL
;
if
(
shared_handle
)
{
if
(
pool
!=
D3DPOOL_DEFAULT
)
{
WARN
(
"Trying to create a shared volume texture in pool %#x.
\n
"
,
pool
);
return
D3DERR_INVALIDCALL
;
}
FIXME
(
"Resource sharing not implemented, *shared_handle %p.
\n
"
,
*
shared_handle
);
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -833,7 +840,14 @@ static HRESULT WINAPI d3d9_device_CreateCubeTexture(IDirect3DDevice9Ex *iface,
*
texture
=
NULL
;
if
(
shared_handle
)
{
if
(
pool
!=
D3DPOOL_DEFAULT
)
{
WARN
(
"Trying to create a shared cube texture in pool %#x.
\n
"
,
pool
);
return
D3DERR_INVALIDCALL
;
}
FIXME
(
"Resource sharing not implemented, *shared_handle %p.
\n
"
,
*
shared_handle
);
}
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
dlls/d3d9/tests/d3d9ex.c
View file @
d9bd9a9a
...
...
@@ -539,11 +539,14 @@ static void test_user_memory(void)
{
IDirect3DDevice9Ex
*
device
;
IDirect3DTexture9
*
texture
;
IDirect3DCubeTexture9
*
cube_texture
;
IDirect3DVolumeTexture9
*
volume_texture
;
D3DLOCKED_RECT
locked_rect
;
UINT
refcount
;
HWND
window
;
HRESULT
hr
;
void
*
mem
;
D3DCAPS9
caps
;
window
=
create_window
();
if
(
!
(
device
=
create_device
(
window
,
window
,
TRUE
)))
...
...
@@ -552,6 +555,9 @@ static void test_user_memory(void)
goto
done
;
}
hr
=
IDirect3DDevice9_GetDeviceCaps
(
device
,
&
caps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get caps, hr %#x.
\n
"
,
hr
);
mem
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
128
*
128
*
4
);
hr
=
IDirect3DDevice9Ex_CreateTexture
(
device
,
128
,
128
,
0
,
0
,
D3DFMT_A8R8G8B8
,
D3DPOOL_SYSTEMMEM
,
&
texture
,
&
mem
);
...
...
@@ -576,8 +582,21 @@ static void test_user_memory(void)
hr
=
IDirect3DTexture9_UnlockRect
(
texture
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock texture, hr %#x.
\n
"
,
hr
);
IDirect3DTexture9_Release
(
texture
);
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
if
(
caps
.
TextureCaps
&
D3DPTEXTURECAPS_CUBEMAP
)
{
hr
=
IDirect3DDevice9Ex_CreateCubeTexture
(
device
,
2
,
1
,
0
,
D3DFMT_A8R8G8B8
,
D3DPOOL_SYSTEMMEM
,
&
cube_texture
,
&
mem
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
}
if
(
caps
.
TextureCaps
&
D3DPTEXTURECAPS_VOLUMEMAP
)
{
hr
=
IDirect3DDevice9Ex_CreateVolumeTexture
(
device
,
2
,
2
,
2
,
1
,
0
,
D3DFMT_A8R8G8B8
,
D3DPOOL_SYSTEMMEM
,
&
volume_texture
,
&
mem
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
}
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
refcount
=
IDirect3DDevice9Ex_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
...
...
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