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
50a9fb57
Commit
50a9fb57
authored
Feb 05, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 06, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove ERR() on HeapAlloc failure for small sizes known at compile time.
parent
ef4b7c59
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2 additions
and
63 deletions
+2
-63
ati_fragment_shader.c
dlls/wined3d/ati_fragment_shader.c
+1
-3
buffer.c
dlls/wined3d/buffer.c
+0
-5
context.c
dlls/wined3d/context.c
+0
-3
device.c
dlls/wined3d/device.c
+1
-3
directx.c
dlls/wined3d/directx.c
+0
-3
glsl_shader.c
dlls/wined3d/glsl_shader.c
+0
-3
palette.c
dlls/wined3d/palette.c
+0
-3
query.c
dlls/wined3d/query.c
+0
-3
sampler.c
dlls/wined3d/sampler.c
+0
-3
shader.c
dlls/wined3d/shader.c
+0
-12
shader_sm1.c
dlls/wined3d/shader_sm1.c
+0
-3
stateblock.c
dlls/wined3d/stateblock.c
+0
-3
surface.c
dlls/wined3d/surface.c
+0
-3
swapchain.c
dlls/wined3d/swapchain.c
+0
-3
texture.c
dlls/wined3d/texture.c
+0
-3
vertexdeclaration.c
dlls/wined3d/vertexdeclaration.c
+0
-3
view.c
dlls/wined3d/view.c
+0
-3
volume.c
dlls/wined3d/volume.c
+0
-1
No files found.
dlls/wined3d/ati_fragment_shader.c
View file @
50a9fb57
...
...
@@ -1153,10 +1153,8 @@ static void *atifs_alloc(const struct wined3d_shader_backend_ops *shader_backend
struct
atifs_private_data
*
priv
;
if
(
!
(
priv
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
priv
))))
{
ERR
(
"Out of memory.
\n
"
);
return
NULL
;
}
if
(
wine_rb_init
(
&
priv
->
fragment_shaders
,
&
wined3d_ffp_frag_program_rb_functions
)
==
-
1
)
{
ERR
(
"Failed to initialize rbtree.
\n
"
);
...
...
dlls/wined3d/buffer.c
View file @
50a9fb57
...
...
@@ -1283,10 +1283,7 @@ HRESULT CDECL wined3d_buffer_create(struct wined3d_device *device, struct wined3
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate memory
\n
"
);
return
E_OUTOFMEMORY
;
}
FIXME
(
"Ignoring access flags (pool)
\n
"
);
...
...
@@ -1328,7 +1325,6 @@ HRESULT CDECL wined3d_buffer_create_vb(struct wined3d_device *device, UINT size,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
buffer
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -1360,7 +1356,6 @@ HRESULT CDECL wined3d_buffer_create_ib(struct wined3d_device *device, UINT size,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
buffer
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
dlls/wined3d/context.c
View file @
50a9fb57
...
...
@@ -1277,10 +1277,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
ret
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
ret
));
if
(
!
ret
)
{
ERR
(
"Failed to allocate context memory.
\n
"
);
return
NULL
;
}
ret
->
blit_targets
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
gl_info
->
limits
.
buffers
*
sizeof
(
*
ret
->
blit_targets
));
...
...
dlls/wined3d/device.c
View file @
50a9fb57
...
...
@@ -1765,10 +1765,8 @@ HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device,
TRACE
(
"Adding new light
\n
"
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory error when allocating a light
\n
"
);
return
E_OUTOFMEMORY
;
}
list_add_head
(
&
device
->
updateStateBlock
->
state
.
light_map
[
hash_idx
],
&
object
->
entry
);
object
->
glIndex
=
-
1
;
object
->
OriginalIndex
=
light_idx
;
...
...
dlls/wined3d/directx.c
View file @
50a9fb57
...
...
@@ -4780,10 +4780,7 @@ HRESULT CDECL wined3d_device_create(struct wined3d *wined3d, UINT adapter_idx, e
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate device memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
device_init
(
object
,
wined3d
,
adapter_idx
,
device_type
,
focus_window
,
flags
,
surface_alignment
,
device_parent
);
...
...
dlls/wined3d/glsl_shader.c
View file @
50a9fb57
...
...
@@ -5446,10 +5446,7 @@ static struct glsl_ffp_fragment_shader *shader_glsl_find_ffp_fragment_shader(str
return
CONTAINING_RECORD
(
desc
,
struct
glsl_ffp_fragment_shader
,
entry
);
if
(
!
(
glsl_desc
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
glsl_desc
))))
{
ERR
(
"Failed to allocate ffp desc memory.
\n
"
);
return
NULL
;
}
glsl_desc
->
entry
.
settings
=
*
args
;
glsl_desc
->
id
=
shader_glsl_generate_ffp_fragment_shader
(
&
priv
->
shader_buffer
,
args
,
gl_info
);
...
...
dlls/wined3d/palette.c
View file @
50a9fb57
...
...
@@ -199,10 +199,7 @@ HRESULT CDECL wined3d_palette_create(struct wined3d_device *device, DWORD flags,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate palette memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
wined3d_palette_init
(
object
,
device
,
flags
,
entries
,
parent
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/query.c
View file @
50a9fb57
...
...
@@ -610,10 +610,7 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device,
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/wined3d/sampler.c
View file @
50a9fb57
...
...
@@ -65,10 +65,7 @@ HRESULT CDECL wined3d_sampler_create(void *parent, struct wined3d_sampler **samp
TRACE
(
"parent %p, sampler %p.
\n
"
,
parent
,
sampler
);
if
(
!
(
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
))))
{
ERR
(
"Failed to allocate memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
wined3d_sampler_init
(
object
,
parent
);
...
...
dlls/wined3d/shader.c
View file @
50a9fb57
...
...
@@ -1510,10 +1510,7 @@ static HRESULT shader_none_alloc(struct wined3d_device *device, const struct fra
void
*
fragment_priv
;
if
(
!
(
priv
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
priv
))))
{
ERR
(
"Failed to allocate private data.
\n
"
);
return
E_OUTOFMEMORY
;
}
if
(
!
(
fragment_priv
=
fragment_pipe
->
alloc_private
(
&
none_shader_backend
,
priv
)))
{
...
...
@@ -2303,10 +2300,7 @@ HRESULT CDECL wined3d_shader_create_gs(struct wined3d_device *device, const DWOR
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
geometryshader_init
(
object
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
,
max_version
);
if
(
FAILED
(
hr
))
...
...
@@ -2334,10 +2328,7 @@ HRESULT CDECL wined3d_shader_create_ps(struct wined3d_device *device, const DWOR
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
pixelshader_init
(
object
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
,
max_version
);
if
(
FAILED
(
hr
))
...
...
@@ -2365,10 +2356,7 @@ HRESULT CDECL wined3d_shader_create_vs(struct wined3d_device *device, const DWOR
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate shader memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
vertexshader_init
(
object
,
device
,
byte_code
,
output_signature
,
parent
,
parent_ops
,
max_version
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/shader_sm1.c
View file @
50a9fb57
...
...
@@ -530,10 +530,7 @@ static void *shader_sm1_init(const DWORD *byte_code, const struct wined3d_shader
priv
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
priv
));
if
(
!
priv
)
{
ERR
(
"Failed to allocate private data
\n
"
);
return
NULL
;
}
if
(
output_signature
)
{
...
...
dlls/wined3d/stateblock.c
View file @
50a9fb57
...
...
@@ -1451,10 +1451,7 @@ HRESULT CDECL wined3d_stateblock_create(struct wined3d_device *device,
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
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/surface.c
View file @
50a9fb57
...
...
@@ -7247,10 +7247,7 @@ HRESULT CDECL wined3d_surface_create(struct wined3d_device *device, UINT width,
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate surface memory.
\n
"
);
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
if
(
FAILED
(
hr
=
surface_init
(
object
,
device
->
surface_alignment
,
width
,
height
,
multisample_type
,
multisample_quality
,
device
,
usage
,
format_id
,
pool
,
flags
,
parent
,
parent_ops
)))
...
...
dlls/wined3d/swapchain.c
View file @
50a9fb57
...
...
@@ -1098,10 +1098,7 @@ HRESULT CDECL wined3d_swapchain_create(struct wined3d_device *device, struct win
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate swapchain memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
hr
=
swapchain_init
(
object
,
device
,
desc
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/texture.c
View file @
50a9fb57
...
...
@@ -1251,7 +1251,6 @@ HRESULT CDECL wined3d_texture_create_2d(struct wined3d_device *device, UINT widt
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory.
\n
"
);
*
texture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -1287,7 +1286,6 @@ HRESULT CDECL wined3d_texture_create_3d(struct wined3d_device *device, UINT widt
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
texture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
@@ -1323,7 +1321,6 @@ HRESULT CDECL wined3d_texture_create_cube(struct wined3d_device *device, UINT ed
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
texture
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
dlls/wined3d/vertexdeclaration.c
View file @
50a9fb57
...
...
@@ -252,10 +252,7 @@ HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_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
,
element_count
,
parent
,
parent_ops
);
if
(
FAILED
(
hr
))
...
...
dlls/wined3d/view.c
View file @
50a9fb57
...
...
@@ -77,10 +77,7 @@ HRESULT CDECL wined3d_rendertarget_view_create(struct wined3d_resource *resource
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate memory
\n
"
);
return
E_OUTOFMEMORY
;
}
wined3d_rendertarget_view_init
(
object
,
resource
,
parent
);
...
...
dlls/wined3d/volume.c
View file @
50a9fb57
...
...
@@ -312,7 +312,6 @@ HRESULT CDECL wined3d_volume_create(struct wined3d_device *device, UINT width, U
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Out of memory
\n
"
);
*
volume
=
NULL
;
return
WINED3DERR_OUTOFVIDEOMEMORY
;
}
...
...
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