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
f1f84a36
Commit
f1f84a36
authored
Oct 22, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Nov 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Allocate memory for default pool resources too.
parent
a175e7b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
15 deletions
+2
-15
device.c
dlls/wined3d/device.c
+2
-9
surface.c
dlls/wined3d/surface.c
+0
-6
No files found.
dlls/wined3d/device.c
View file @
f1f84a36
...
...
@@ -101,8 +101,8 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3
} \
WineD3DAdapterChangeGLRam(This, _size); \
} \
object->resource.allocatedMemory = (0 == _size ? NULL :
Pool == WINED3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size
)); \
if (object->resource.allocatedMemory == NULL && _size != 0
&& Pool != WINED3DPOOL_DEFAULT
) { \
object->resource.allocatedMemory = (0 == _size ? NULL :
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size + 4
)); \
if (object->resource.allocatedMemory == NULL && _size != 0) { \
FIXME("Out of memory!\n"); \
HeapFree(GetProcessHeap(), 0, object); \
*pp##type = NULL; \
...
...
@@ -310,9 +310,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
TRACE
(
"(%p) : Size=%d, Usage=%d, FVF=%x, Pool=%d - Memory@%p, Iface@%p
\n
"
,
This
,
Size
,
Usage
,
FVF
,
Pool
,
object
->
resource
.
allocatedMemory
,
object
);
*
ppVertexBuffer
=
(
IWineD3DVertexBuffer
*
)
object
;
if
(
Pool
==
WINED3DPOOL_DEFAULT
)
{
/* Allocate some system memory for now */
object
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
object
->
resource
.
size
);
}
object
->
fvf
=
FVF
;
/* Observations show that drawStridedSlow is faster on dynamic VBs than converting +
...
...
@@ -398,10 +395,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
/* Allocate the storage for the device */
D3DCREATERESOURCEOBJECTINSTANCE
(
object
,
IndexBuffer
,
WINED3DRTYPE_INDEXBUFFER
,
Length
)
if
(
Pool
==
WINED3DPOOL_DEFAULT
)
{
/* We need a local copy for drawStridedSlow */
object
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
object
->
resource
.
size
);
}
if
(
Pool
!=
WINED3DPOOL_SYSTEMMEM
&&
!
(
Usage
&
WINED3DUSAGE_DYNAMIC
)
&&
GL_SUPPORT
(
ARB_VERTEX_BUFFER_OBJECT
))
{
CreateIndexBufferVBO
(
This
,
object
);
}
...
...
dlls/wined3d/surface.c
View file @
f1f84a36
...
...
@@ -3280,12 +3280,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
This
->
glRect
.
bottom
=
This
->
pow2Height
;
}
if
(
This
->
resource
.
allocatedMemory
==
NULL
)
{
/* Make sure memory exists from the start, and it is initialized properly. D3D initializes surfaces,
* gl does not, so we need to upload zeroes to init the gl texture.
*/
This
->
resource
.
allocatedMemory
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
This
->
resource
.
size
+
4
);
}
This
->
Flags
|=
SFLAG_INSYSMEM
;
return
WINED3D_OK
;
...
...
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