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
9287bb80
Commit
9287bb80
authored
May 19, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d: d3d9ex does not do video memory accounting for D3DPOOL_DEFAULT resources.
parent
124d5a87
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
5 deletions
+12
-5
directx.c
dlls/d3d8/directx.c
+3
-1
directx.c
dlls/d3d9/directx.c
+2
-1
ddraw.c
dlls/ddraw/ddraw.c
+1
-1
resource.c
dlls/wined3d/resource.c
+5
-2
wined3d.h
include/wine/wined3d.h
+1
-0
No files found.
dlls/d3d8/directx.c
View file @
9287bb80
...
@@ -404,11 +404,13 @@ static const struct IDirect3D8Vtbl d3d8_vtbl =
...
@@ -404,11 +404,13 @@ static const struct IDirect3D8Vtbl d3d8_vtbl =
BOOL
d3d8_init
(
struct
d3d8
*
d3d8
)
BOOL
d3d8_init
(
struct
d3d8
*
d3d8
)
{
{
DWORD
flags
=
WINED3D_LEGACY_DEPTH_BIAS
|
WINED3D_VIDMEM_ACCOUNTING
;
d3d8
->
IDirect3D8_iface
.
lpVtbl
=
&
d3d8_vtbl
;
d3d8
->
IDirect3D8_iface
.
lpVtbl
=
&
d3d8_vtbl
;
d3d8
->
refcount
=
1
;
d3d8
->
refcount
=
1
;
wined3d_mutex_lock
();
wined3d_mutex_lock
();
d3d8
->
wined3d
=
wined3d_create
(
8
,
WINED3D_LEGACY_DEPTH_BIAS
);
d3d8
->
wined3d
=
wined3d_create
(
8
,
flags
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
if
(
!
d3d8
->
wined3d
)
if
(
!
d3d8
->
wined3d
)
return
FALSE
;
return
FALSE
;
...
...
dlls/d3d9/directx.c
View file @
9287bb80
...
@@ -632,11 +632,12 @@ static const struct IDirect3D9ExVtbl d3d9_vtbl =
...
@@ -632,11 +632,12 @@ static const struct IDirect3D9ExVtbl d3d9_vtbl =
BOOL
d3d9_init
(
struct
d3d9
*
d3d9
,
BOOL
extended
)
BOOL
d3d9_init
(
struct
d3d9
*
d3d9
,
BOOL
extended
)
{
{
DWORD
flags
=
extended
?
0
:
WINED3D_VIDMEM_ACCOUNTING
;
d3d9
->
IDirect3D9Ex_iface
.
lpVtbl
=
&
d3d9_vtbl
;
d3d9
->
IDirect3D9Ex_iface
.
lpVtbl
=
&
d3d9_vtbl
;
d3d9
->
refcount
=
1
;
d3d9
->
refcount
=
1
;
wined3d_mutex_lock
();
wined3d_mutex_lock
();
d3d9
->
wined3d
=
wined3d_create
(
9
,
0
);
d3d9
->
wined3d
=
wined3d_create
(
9
,
flags
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
if
(
!
d3d9
->
wined3d
)
if
(
!
d3d9
->
wined3d
)
return
FALSE
;
return
FALSE
;
...
...
dlls/ddraw/ddraw.c
View file @
9287bb80
...
@@ -5234,7 +5234,7 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type)
...
@@ -5234,7 +5234,7 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type)
ddraw
->
numIfaces
=
1
;
ddraw
->
numIfaces
=
1
;
ddraw
->
ref7
=
1
;
ddraw
->
ref7
=
1
;
flags
=
WINED3D_LEGACY_DEPTH_BIAS
;
flags
=
WINED3D_LEGACY_DEPTH_BIAS
|
WINED3D_VIDMEM_ACCOUNTING
;
if
(
DefaultSurfaceType
!=
DDRAW_SURFACE_TYPE_OPENGL
)
if
(
DefaultSurfaceType
!=
DDRAW_SURFACE_TYPE_OPENGL
)
flags
|=
WINED3D_NO3D
;
flags
|=
WINED3D_NO3D
;
...
...
dlls/wined3d/resource.c
View file @
9287bb80
...
@@ -84,6 +84,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
...
@@ -84,6 +84,8 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
const
struct
wined3d_resource_ops
*
resource_ops
)
const
struct
wined3d_resource_ops
*
resource_ops
)
{
{
const
struct
wined3d
*
d3d
=
device
->
wined3d
;
resource
->
ref
=
1
;
resource
->
ref
=
1
;
resource
->
device
=
device
;
resource
->
device
=
device
;
resource
->
type
=
type
;
resource
->
type
=
type
;
...
@@ -124,7 +126,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
...
@@ -124,7 +126,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
/* Check that we have enough video ram left */
/* Check that we have enough video ram left */
if
(
pool
==
WINED3D_POOL_DEFAULT
)
if
(
pool
==
WINED3D_POOL_DEFAULT
&&
d3d
->
flags
&
WINED3D_VIDMEM_ACCOUNTING
)
{
{
if
(
size
>
wined3d_device_get_available_texture_mem
(
device
))
if
(
size
>
wined3d_device_get_available_texture_mem
(
device
))
{
{
...
@@ -142,13 +144,14 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
...
@@ -142,13 +144,14 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
void
resource_cleanup
(
struct
wined3d_resource
*
resource
)
void
resource_cleanup
(
struct
wined3d_resource
*
resource
)
{
{
const
struct
wined3d
*
d3d
=
resource
->
device
->
wined3d
;
struct
private_data
*
data
;
struct
private_data
*
data
;
struct
list
*
e1
,
*
e2
;
struct
list
*
e1
,
*
e2
;
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"Cleaning up resource %p.
\n
"
,
resource
);
TRACE
(
"Cleaning up resource %p.
\n
"
,
resource
);
if
(
resource
->
pool
==
WINED3D_POOL_DEFAULT
)
if
(
resource
->
pool
==
WINED3D_POOL_DEFAULT
&&
d3d
->
flags
&
WINED3D_VIDMEM_ACCOUNTING
)
{
{
TRACE
(
"Decrementing device memory pool by %u.
\n
"
,
resource
->
size
);
TRACE
(
"Decrementing device memory pool by %u.
\n
"
,
resource
->
size
);
adapter_adjust_memory
(
resource
->
device
->
adapter
,
0
-
resource
->
size
);
adapter_adjust_memory
(
resource
->
device
->
adapter
,
0
-
resource
->
size
);
...
...
include/wine/wined3d.h
View file @
9287bb80
...
@@ -1216,6 +1216,7 @@ enum wined3d_display_rotation
...
@@ -1216,6 +1216,7 @@ enum wined3d_display_rotation
#define WINED3D_LEGACY_DEPTH_BIAS 0x00000001
#define WINED3D_LEGACY_DEPTH_BIAS 0x00000001
#define WINED3D_NO3D 0x00000002
#define WINED3D_NO3D 0x00000002
#define WINED3D_VIDMEM_ACCOUNTING 0x00000004
#define WINED3D_RESZ_CODE 0x7fa05000
#define WINED3D_RESZ_CODE 0x7fa05000
...
...
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