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
e4cfbdd4
Commit
e4cfbdd4
authored
Jan 13, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of D3DCREATERESOURCEOBJECTINSTANCE.
parent
7d9b7453
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
0 deletions
+46
-0
device.c
dlls/wined3d/device.c
+0
-0
resource.c
dlls/wined3d/resource.c
+44
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-0
No files found.
dlls/wined3d/device.c
View file @
e4cfbdd4
This diff is collapsed.
Click to expand it.
dlls/wined3d/resource.c
View file @
e4cfbdd4
...
...
@@ -27,6 +27,50 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d
);
#define GLINFO_LOCATION ((IWineD3DImpl *)(((IWineD3DDeviceImpl *)This->resource.wineD3DDevice)->wineD3D))->gl_info
HRESULT
resource_init
(
struct
IWineD3DResourceClass
*
resource
,
WINED3DRESOURCETYPE
resource_type
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
IUnknown
*
parent
)
{
resource
->
wineD3DDevice
=
device
;
resource
->
parent
=
parent
;
resource
->
resourceType
=
resource_type
;
resource
->
ref
=
1
;
resource
->
pool
=
pool
;
resource
->
format
=
format
;
resource
->
usage
=
usage
;
resource
->
size
=
size
;
resource
->
priority
=
0
;
list_init
(
&
resource
->
privateData
);
if
(
size
)
{
resource
->
heapMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
+
RESOURCE_ALIGNMENT
);
if
(
!
resource
->
heapMemory
)
{
ERR
(
"Out of memory!
\n
"
);
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
}
else
{
resource
->
heapMemory
=
NULL
;
}
resource
->
allocatedMemory
=
(
BYTE
*
)(((
ULONG_PTR
)
resource
->
heapMemory
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
/* Check that we have enough video ram left */
if
(
pool
==
WINED3DPOOL_DEFAULT
)
{
if
(
size
>
IWineD3DDevice_GetAvailableTextureMem
((
IWineD3DDevice
*
)
device
))
{
ERR
(
"Out of adapter memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
resource
->
heapMemory
);
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
WineD3DAdapterChangeGLRam
(
device
,
size
);
}
return
WINED3D_OK
;
}
void
resource_cleanup
(
IWineD3DResource
*
iface
)
{
IWineD3DResourceImpl
*
This
=
(
IWineD3DResourceImpl
*
)
iface
;
...
...
dlls/wined3d/wined3d_private.h
View file @
e4cfbdd4
...
...
@@ -1238,6 +1238,8 @@ HRESULT resource_get_parent(IWineD3DResource *iface, IUnknown **parent);
DWORD
resource_get_priority
(
IWineD3DResource
*
iface
);
HRESULT
resource_get_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
);
HRESULT
resource_init
(
struct
IWineD3DResourceClass
*
resource
,
WINED3DRESOURCETYPE
resource_type
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
WINED3DFORMAT
format
,
WINED3DPOOL
pool
,
IUnknown
*
parent
);
WINED3DRESOURCETYPE
resource_get_type
(
IWineD3DResource
*
iface
);
DWORD
resource_set_priority
(
IWineD3DResource
*
iface
,
DWORD
new_priority
);
HRESULT
resource_set_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
,
...
...
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