Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c84112f8
Commit
c84112f8
authored
Jul 25, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of wined3d_device_enum_resources().
parent
0739cae2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
47 deletions
+27
-47
device.c
dlls/wined3d/device.c
+27
-44
wined3d.spec
dlls/wined3d/wined3d.spec
+0
-1
wined3d.h
include/wine/wined3d.h
+0
-2
No files found.
dlls/wined3d/device.c
View file @
c84112f8
...
...
@@ -1372,17 +1372,9 @@ err_out:
return
hr
;
}
static
HRESULT
WINAPI
device_unload_resource
(
struct
wined3d_resource
*
resource
,
void
*
data
)
{
TRACE
(
"Unloading resource %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
return
S_OK
;
}
HRESULT
CDECL
wined3d_device_uninit_3d
(
struct
wined3d_device
*
device
)
{
struct
wined3d_resource
*
resource
,
*
cursor
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
struct
wined3d_surface
*
surface
;
...
...
@@ -1406,7 +1398,12 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
wined3d_surface_decref
(
device
->
logo_surface
);
/* Unload resources */
wined3d_device_enum_resources
(
device
,
device_unload_resource
,
NULL
);
LIST_FOR_EACH_ENTRY_SAFE
(
resource
,
cursor
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
TRACE
(
"Unloading resource %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
}
TRACE
(
"Deleting high order patches
\n
"
);
for
(
i
=
0
;
i
<
PATCHMAP_SIZE
;
i
++
)
{
...
...
@@ -5382,24 +5379,23 @@ BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
return
oldVisible
;
}
static
HRESULT
WINAPI
evict_managed_resource
(
struct
wined3d_resource
*
resource
,
void
*
data
)
HRESULT
CDECL
wined3d_device_evict_managed_resources
(
struct
wined3d_device
*
device
)
{
TRACE
(
"checking resource %p for eviction
\n
"
,
resource
)
;
struct
wined3d_resource
*
resource
,
*
cursor
;
if
(
resource
->
pool
==
WINED3DPOOL_MANAGED
)
{
TRACE
(
"Evicting %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
}
TRACE
(
"device %p.
\n
"
,
device
);
return
S_OK
;
}
LIST_FOR_EACH_ENTRY_SAFE
(
resource
,
cursor
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
TRACE
(
"Checking resource %p for eviction.
\n
"
,
resource
);
HRESULT
CDECL
wined3d_device_evict_managed_resources
(
struct
wined3d_device
*
device
)
{
TRACE
(
"device %p.
\n
"
,
device
);
if
(
resource
->
pool
==
WINED3DPOOL_MANAGED
)
{
TRACE
(
"Evicting %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
}
}
wined3d_device_enum_resources
(
device
,
evict_managed_resource
,
NULL
);
/* Invalidate stream sources, the buffer(s) may have been evicted. */
device_invalidate_state
(
device
,
STATE_STREAMSRC
);
...
...
@@ -5499,6 +5495,7 @@ static BOOL is_display_mode_supported(struct wined3d_device *device, const WINED
/* Do not call while under the GL lock. */
static
void
delete_opengl_contexts
(
struct
wined3d_device
*
device
,
struct
wined3d_swapchain
*
swapchain
)
{
struct
wined3d_resource
*
resource
,
*
cursor
;
const
struct
wined3d_gl_info
*
gl_info
;
struct
wined3d_context
*
context
;
struct
wined3d_shader
*
shader
;
...
...
@@ -5506,7 +5503,13 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
context
=
context_acquire
(
device
,
NULL
);
gl_info
=
context
->
gl_info
;
wined3d_device_enum_resources
(
device
,
device_unload_resource
,
NULL
);
LIST_FOR_EACH_ENTRY_SAFE
(
resource
,
cursor
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
TRACE
(
"Unloading resource %p.
\n
"
,
resource
);
resource
->
resource_ops
->
resource_unload
(
resource
);
}
LIST_FOR_EACH_ENTRY
(
shader
,
&
device
->
shaders
,
struct
wined3d_shader
,
shader_list_entry
)
{
device
->
shader_backend
->
shader_destroy
(
shader
);
...
...
@@ -6058,26 +6061,6 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso
TRACE
(
"Resource released.
\n
"
);
}
HRESULT
CDECL
wined3d_device_enum_resources
(
struct
wined3d_device
*
device
,
D3DCB_ENUMRESOURCES
callback
,
void
*
data
)
{
struct
wined3d_resource
*
resource
,
*
cursor
;
TRACE
(
"device %p, callback %p, data %p.
\n
"
,
device
,
callback
,
data
);
LIST_FOR_EACH_ENTRY_SAFE
(
resource
,
cursor
,
&
device
->
resources
,
struct
wined3d_resource
,
resource_list_entry
)
{
TRACE
(
"enumerating resource %p.
\n
"
,
resource
);
if
(
callback
(
resource
,
data
)
==
S_FALSE
)
{
TRACE
(
"Canceling enumeration.
\n
"
);
break
;
}
}
return
WINED3D_OK
;
}
HRESULT
CDECL
wined3d_device_get_surface_from_dc
(
struct
wined3d_device
*
device
,
HDC
dc
,
struct
wined3d_surface
**
surface
)
{
...
...
dlls/wined3d/wined3d.spec
View file @
c84112f8
...
...
@@ -60,7 +60,6 @@
@ cdecl wined3d_device_draw_tri_patch(ptr long ptr ptr)
@ cdecl wined3d_device_end_scene(ptr)
@ cdecl wined3d_device_end_stateblock(ptr ptr)
@ cdecl wined3d_device_enum_resources(ptr ptr ptr)
@ cdecl wined3d_device_evict_managed_resources(ptr)
@ cdecl wined3d_device_get_available_texture_mem(ptr)
@ cdecl wined3d_device_get_back_buffer(ptr long long long ptr)
...
...
include/wine/wined3d.h
View file @
c84112f8
...
...
@@ -2107,7 +2107,6 @@ struct wined3d_device_parent_ops
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
struct
wined3d_swapchain
**
swapchain
);
};
typedef
HRESULT
(
__stdcall
*
D3DCB_ENUMRESOURCES
)(
struct
wined3d_resource
*
resource
,
void
*
pData
);
typedef
HRESULT
(
CDECL
*
wined3d_device_reset_cb
)(
struct
wined3d_resource
*
resource
);
void
__stdcall
wined3d_mutex_lock
(
void
);
...
...
@@ -2205,7 +2204,6 @@ HRESULT __cdecl wined3d_device_draw_tri_patch(struct wined3d_device *device, UIN
const
float
*
num_segs
,
const
WINED3DTRIPATCH_INFO
*
tri_patch_info
);
HRESULT
__cdecl
wined3d_device_end_scene
(
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_end_stateblock
(
struct
wined3d_device
*
device
,
struct
wined3d_stateblock
**
stateblock
);
HRESULT
__cdecl
wined3d_device_enum_resources
(
struct
wined3d_device
*
device
,
D3DCB_ENUMRESOURCES
callback
,
void
*
data
);
HRESULT
__cdecl
wined3d_device_evict_managed_resources
(
struct
wined3d_device
*
device
);
UINT
__cdecl
wined3d_device_get_available_texture_mem
(
struct
wined3d_device
*
device
);
HRESULT
__cdecl
wined3d_device_get_back_buffer
(
struct
wined3d_device
*
device
,
UINT
swapchain_idx
,
...
...
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