d3dcompiler_43: Remove ERR() on HeapAlloc failure for small sizes known at compile time.

This commit is contained in:
Michael Stefaniuc 2013-02-08 10:34:39 +01:00 committed by Alexandre Julliard
parent 76b910514e
commit 536bdfde27
3 changed files with 3 additions and 18 deletions

View File

@ -148,10 +148,7 @@ HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob)
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
{
ERR("Failed to allocate D3D blob object memory\n");
return E_OUTOFMEMORY;
}
hr = d3dcompiler_blob_init(object, data_size);
if (FAILED(hr))

View File

@ -84,10 +84,8 @@ static void wpp_write_message(const char *fmt, va_list args)
{
wpp_messages = HeapAlloc(GetProcessHeap(), 0, MESSAGEBUFFER_INITIAL_SIZE);
if(wpp_messages == NULL)
{
ERR("Error allocating memory for parser messages\n");
return;
}
wpp_messages_capacity = MESSAGEBUFFER_INITIAL_SIZE;
}
@ -189,10 +187,8 @@ static void *wpp_open_mem(const char *filename, int type)
if(current_include == NULL) return NULL;
desc = HeapAlloc(GetProcessHeap(), 0, sizeof(*desc));
if(!desc)
{
ERR("Error allocating memory\n");
return NULL;
}
hr = ID3DInclude_Open(current_include,
type ? D3D_INCLUDE_LOCAL : D3D_INCLUDE_SYSTEM,
filename, parent_include, (LPCVOID *)&desc->buffer,
@ -275,10 +271,8 @@ static void wpp_write_mem(const char *buffer, unsigned int len)
{
wpp_output = HeapAlloc(GetProcessHeap(), 0, BUFFER_INITIAL_CAPACITY);
if(!wpp_output)
{
ERR("Error allocating memory\n");
return;
}
wpp_output_capacity = BUFFER_INITIAL_CAPACITY;
}
if(len > wpp_output_capacity - wpp_output_size)

View File

@ -1282,10 +1282,7 @@ static struct d3dcompiler_shader_reflection_type *get_reflection_type(struct d3d
type = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*type));
if (!type)
{
ERR("Failed to allocate type memory.\n");
return NULL;
}
type->ID3D11ShaderReflectionType_iface.lpVtbl = &d3dcompiler_shader_reflection_type_vtbl;
type->id = offset;
@ -1833,10 +1830,7 @@ HRESULT WINAPI D3DReflect(const void *data, SIZE_T data_size, REFIID riid, void
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
{
ERR("Failed to allocate D3D compiler shader reflection object memory\n");
return E_OUTOFMEMORY;
}
hr = d3dcompiler_shader_reflection_init(object, data, data_size);
if (FAILED(hr))