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
Hide 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
...
@@ -101,8 +101,8 @@ static void WINAPI IWineD3DDeviceImpl_AddResource(IWineD3DDevice *iface, IWineD3
} \
} \
WineD3DAdapterChangeGLRam(This, _size); \
WineD3DAdapterChangeGLRam(This, _size); \
} \
} \
object->resource.allocatedMemory = (0 == _size ? NULL :
Pool == WINED3DPOOL_DEFAULT ? NULL : HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size
)); \
object->resource.allocatedMemory = (0 == _size ? NULL :
HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, _size + 4
)); \
if (object->resource.allocatedMemory == NULL && _size != 0
&& Pool != WINED3DPOOL_DEFAULT
) { \
if (object->resource.allocatedMemory == NULL && _size != 0) { \
FIXME("Out of memory!\n"); \
FIXME("Out of memory!\n"); \
HeapFree(GetProcessHeap(), 0, object); \
HeapFree(GetProcessHeap(), 0, object); \
*pp##type = NULL; \
*pp##type = NULL; \
...
@@ -310,9 +310,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexBuffer(IWineD3DDevice *ifac
...
@@ -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
);
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
;
*
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
;
object
->
fvf
=
FVF
;
/* Observations show that drawStridedSlow is faster on dynamic VBs than converting +
/* Observations show that drawStridedSlow is faster on dynamic VBs than converting +
...
@@ -398,10 +395,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
...
@@ -398,10 +395,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateIndexBuffer(IWineD3DDevice *iface
/* Allocate the storage for the device */
/* Allocate the storage for the device */
D3DCREATERESOURCEOBJECTINSTANCE
(
object
,
IndexBuffer
,
WINED3DRTYPE_INDEXBUFFER
,
Length
)
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
))
{
if
(
Pool
!=
WINED3DPOOL_SYSTEMMEM
&&
!
(
Usage
&
WINED3DUSAGE_DYNAMIC
)
&&
GL_SUPPORT
(
ARB_VERTEX_BUFFER_OBJECT
))
{
CreateIndexBufferVBO
(
This
,
object
);
CreateIndexBufferVBO
(
This
,
object
);
}
}
...
...
dlls/wined3d/surface.c
View file @
f1f84a36
...
@@ -3280,12 +3280,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
...
@@ -3280,12 +3280,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
This
->
glRect
.
bottom
=
This
->
pow2Height
;
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
;
This
->
Flags
|=
SFLAG_INSYSMEM
;
return
WINED3D_OK
;
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