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
d86ecd4b
Commit
d86ecd4b
authored
Feb 07, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
parent
14c38955
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
43 deletions
+0
-43
d3d9_main.c
dlls/d3d9/d3d9_main.c
+0
-6
device.c
dlls/d3d9/device.c
+0
-25
directx.c
dlls/d3d9/directx.c
+0
-6
swapchain.c
dlls/d3d9/swapchain.c
+0
-3
vertexdeclaration.c
dlls/d3d9/vertexdeclaration.c
+0
-3
No files found.
dlls/d3d9/d3d9_main.c
View file @
d86ecd4b
...
...
@@ -40,10 +40,7 @@ IDirect3D9 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate9(UINT sdk_version)
TRACE
(
"sdk_version %#x.
\n
"
,
sdk_version
);
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
{
ERR
(
"Failed to allocate d3d9 object memory.
\n
"
);
return
NULL
;
}
if
(
!
d3d9_init
(
object
,
FALSE
))
{
...
...
@@ -64,10 +61,7 @@ HRESULT WINAPI DECLSPEC_HOTPATCH Direct3DCreate9Ex(UINT sdk_version, IDirect3D9E
TRACE
(
"sdk_version %#x, d3d9ex %p.
\n
"
,
sdk_version
,
d3d9ex
);
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
{
ERR
(
"Failed to allocate d3d9 object memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
if
(
!
d3d9_init
(
object
,
TRUE
))
{
...
...
dlls/d3d9/device.c
View file @
d86ecd4b
...
...
@@ -734,10 +734,7 @@ static HRESULT WINAPI d3d9_device_CreateTexture(IDirect3DDevice9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate texture memory.
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
texture_init
(
object
,
device
,
width
,
height
,
levels
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
...
...
@@ -781,10 +778,7 @@ static HRESULT WINAPI d3d9_device_CreateVolumeTexture(IDirect3DDevice9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate volume texture memory.
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
volumetexture_init
(
object
,
device
,
width
,
height
,
depth
,
levels
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
...
...
@@ -816,10 +810,7 @@ static HRESULT WINAPI d3d9_device_CreateCubeTexture(IDirect3DDevice9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate cube texture memory.
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
cubetexture_init
(
object
,
device
,
edge_length
,
levels
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
...
...
@@ -851,10 +842,7 @@ static HRESULT WINAPI d3d9_device_CreateVertexBuffer(IDirect3DDevice9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate buffer memory.
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
vertexbuffer_init
(
object
,
device
,
size
,
usage
,
fvf
,
pool
);
if
(
FAILED
(
hr
))
...
...
@@ -886,10 +874,7 @@ static HRESULT WINAPI d3d9_device_CreateIndexBuffer(IDirect3DDevice9Ex *iface, U
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate buffer memory.
\n
"
);
return
D3DERR_OUTOFVIDEOMEMORY
;
}
hr
=
indexbuffer_init
(
object
,
device
,
size
,
usage
,
format
,
pool
);
if
(
FAILED
(
hr
))
...
...
@@ -1559,10 +1544,7 @@ static HRESULT WINAPI d3d9_device_CreateStateBlock(IDirect3DDevice9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate stateblock memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
stateblock_init
(
object
,
device
,
type
,
NULL
);
if
(
FAILED
(
hr
))
...
...
@@ -1613,7 +1595,6 @@ static HRESULT WINAPI d3d9_device_EndStateBlock(IDirect3DDevice9Ex *iface, IDire
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate stateblock memory.
\n
"
);
wined3d_mutex_lock
();
wined3d_stateblock_decref
(
wined3d_stateblock
);
wined3d_mutex_unlock
();
...
...
@@ -2413,10 +2394,7 @@ static HRESULT WINAPI d3d9_device_CreateVertexShader(IDirect3DDevice9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate vertex shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
vertexshader_init
(
object
,
device
,
byte_code
);
if
(
FAILED
(
hr
))
...
...
@@ -2896,10 +2874,7 @@ static HRESULT WINAPI d3d9_device_CreateQuery(IDirect3DDevice9Ex *iface, D3DQUER
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate query memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
query_init
(
object
,
device
,
type
);
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/directx.c
View file @
d86ecd4b
...
...
@@ -456,10 +456,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDevice(IDirect3D9Ex *iface, U
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate device memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
device_init
(
object
,
d3d9
,
d3d9
->
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
parameters
,
NULL
);
if
(
FAILED
(
hr
))
...
...
@@ -567,10 +564,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_CreateDeviceEx(IDirect3D9Ex *iface,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate device memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
device_init
(
object
,
d3d9
,
d3d9
->
wined3d
,
adapter
,
device_type
,
focus_window
,
flags
,
parameters
,
mode
);
if
(
FAILED
(
hr
))
...
...
dlls/d3d9/swapchain.c
View file @
d86ecd4b
...
...
@@ -278,10 +278,7 @@ HRESULT d3d9_swapchain_create(struct d3d9_device *device, struct wined3d_swapcha
HRESULT
hr
;
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
{
ERR
(
"Failed to allocate swapchain memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
=
swapchain_init
(
object
,
device
,
desc
)))
{
...
...
dlls/d3d9/vertexdeclaration.c
View file @
d86ecd4b
...
...
@@ -419,10 +419,7 @@ HRESULT d3d9_vertex_declaration_create(struct d3d9_device *device,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate vertex declaration memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
vertexdeclaration_init
(
object
,
device
,
elements
);
if
(
FAILED
(
hr
))
...
...
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