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
7080922e
Commit
7080922e
authored
Jan 06, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DResourceImpl pointer to resource_init().
parent
d54d410d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
25 deletions
+25
-25
basetexture.c
dlls/wined3d/basetexture.c
+1
-1
buffer.c
dlls/wined3d/buffer.c
+1
-1
resource.c
dlls/wined3d/resource.c
+20
-20
surface.c
dlls/wined3d/surface.c
+1
-1
volume.c
dlls/wined3d/volume.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/basetexture.c
View file @
7080922e
...
...
@@ -34,7 +34,7 @@ HRESULT basetexture_init(IWineD3DBaseTextureImpl *texture, const struct wined3d_
{
HRESULT
hr
;
hr
=
resource_init
((
IWineD3DResource
*
)
texture
,
resource_type
,
device
,
hr
=
resource_init
((
IWineD3DResource
Impl
*
)
texture
,
resource_type
,
device
,
0
,
usage
,
format
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/buffer.c
View file @
7080922e
...
...
@@ -1473,7 +1473,7 @@ HRESULT buffer_init(struct wined3d_buffer *buffer, IWineD3DDeviceImpl *device,
buffer
->
vtbl
=
&
wined3d_buffer_vtbl
;
hr
=
resource_init
((
IWineD3DResource
*
)
buffer
,
WINED3DRTYPE_BUFFER
,
hr
=
resource_init
((
IWineD3DResource
Impl
*
)
buffer
,
WINED3DRTYPE_BUFFER
,
device
,
size
,
usage
,
format
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/resource.c
View file @
7080922e
...
...
@@ -43,28 +43,28 @@ struct private_data
DWORD
size
;
};
HRESULT
resource_init
(
IWineD3DResource
*
ifa
ce
,
WINED3DRESOURCETYPE
resource_type
,
HRESULT
resource_init
(
struct
IWineD3DResourceImpl
*
resour
ce
,
WINED3DRESOURCETYPE
resource_type
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
const
struct
wined3d_format
*
format
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
{
struct
IWineD3DResourceClass
*
r
esource
=
&
((
IWineD3DResourceImpl
*
)
iface
)
->
resource
;
r
esource
->
device
=
device
;
r
esource
->
resourceType
=
resource_type
;
r
esource
->
ref
=
1
;
r
esource
->
pool
=
pool
;
r
esource
->
format
=
format
;
r
esource
->
usage
=
usage
;
r
esource
->
size
=
size
;
r
esource
->
priority
=
0
;
r
esource
->
parent
=
parent
;
r
esource
->
parent_ops
=
parent_ops
;
list_init
(
&
r
esource
->
privateData
);
struct
IWineD3DResourceClass
*
r
=
&
resource
->
resource
;
r
->
device
=
device
;
r
->
resourceType
=
resource_type
;
r
->
ref
=
1
;
r
->
pool
=
pool
;
r
->
format
=
format
;
r
->
usage
=
usage
;
r
->
size
=
size
;
r
->
priority
=
0
;
r
->
parent
=
parent
;
r
->
parent_ops
=
parent_ops
;
list_init
(
&
r
->
privateData
);
if
(
size
)
{
r
esource
->
heapMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
+
RESOURCE_ALIGNMENT
);
if
(
!
r
esource
->
heapMemory
)
r
->
heapMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
+
RESOURCE_ALIGNMENT
);
if
(
!
r
->
heapMemory
)
{
ERR
(
"Out of memory!
\n
"
);
return
WINED3DERR_OUTOFVIDEOMEMORY
;
...
...
@@ -72,9 +72,9 @@ HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type
}
else
{
r
esource
->
heapMemory
=
NULL
;
r
->
heapMemory
=
NULL
;
}
r
esource
->
allocatedMemory
=
(
BYTE
*
)(((
ULONG_PTR
)
resource
->
heapMemory
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
r
->
allocatedMemory
=
(
BYTE
*
)(((
ULONG_PTR
)
r
->
heapMemory
+
(
RESOURCE_ALIGNMENT
-
1
))
&
~
(
RESOURCE_ALIGNMENT
-
1
));
/* Check that we have enough video ram left */
if
(
pool
==
WINED3DPOOL_DEFAULT
)
...
...
@@ -82,13 +82,13 @@ HRESULT resource_init(IWineD3DResource *iface, WINED3DRESOURCETYPE resource_type
if
(
size
>
IWineD3DDevice_GetAvailableTextureMem
((
IWineD3DDevice
*
)
device
))
{
ERR
(
"Out of adapter memory
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
r
esource
->
heapMemory
);
HeapFree
(
GetProcessHeap
(),
0
,
r
->
heapMemory
);
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
WineD3DAdapterChangeGLRam
(
device
,
size
);
}
device_resource_add
(
device
,
ifa
ce
);
device_resource_add
(
device
,
(
IWineD3DResource
*
)
resour
ce
);
return
WINED3D_OK
;
}
...
...
dlls/wined3d/surface.c
View file @
7080922e
...
...
@@ -373,7 +373,7 @@ HRESULT surface_init(IWineD3DSurfaceImpl *surface, WINED3DSURFTYPE surface_type,
return
WINED3DERR_INVALIDCALL
;
}
hr
=
resource_init
((
IWineD3DResource
*
)
surface
,
WINED3DRTYPE_SURFACE
,
hr
=
resource_init
((
IWineD3DResource
Impl
*
)
surface
,
WINED3DRTYPE_SURFACE
,
device
,
resource_size
,
usage
,
format
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/volume.c
View file @
7080922e
...
...
@@ -346,7 +346,7 @@ HRESULT volume_init(IWineD3DVolumeImpl *volume, IWineD3DDeviceImpl *device, UINT
volume
->
lpVtbl
=
&
IWineD3DVolume_Vtbl
;
hr
=
resource_init
((
IWineD3DResource
*
)
volume
,
WINED3DRTYPE_VOLUME
,
device
,
hr
=
resource_init
((
IWineD3DResource
Impl
*
)
volume
,
WINED3DRTYPE_VOLUME
,
device
,
width
*
height
*
depth
*
format
->
byte_count
,
usage
,
format
,
pool
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/wined3d_private.h
View file @
7080922e
...
...
@@ -1833,7 +1833,7 @@ HRESULT resource_free_private_data(IWineD3DResource *iface, REFGUID guid) DECLSP
DWORD
resource_get_priority
(
IWineD3DResource
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
resource_get_private_data
(
IWineD3DResource
*
iface
,
REFGUID
guid
,
void
*
data
,
DWORD
*
data_size
)
DECLSPEC_HIDDEN
;
HRESULT
resource_init
(
IWineD3DResource
*
ifa
ce
,
WINED3DRESOURCETYPE
resource_type
,
HRESULT
resource_init
(
struct
IWineD3DResourceImpl
*
resour
ce
,
WINED3DRESOURCETYPE
resource_type
,
IWineD3DDeviceImpl
*
device
,
UINT
size
,
DWORD
usage
,
const
struct
wined3d_format
*
format
,
WINED3DPOOL
pool
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
)
DECLSPEC_HIDDEN
;
WINED3DRESOURCETYPE
resource_get_type
(
IWineD3DResource
*
iface
)
DECLSPEC_HIDDEN
;
...
...
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