mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-utils: Introduce D3DCreateBlob().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
e5fea6ade0
commit
b72a2893c2
@@ -8,6 +8,7 @@ global:
|
||||
D3D12GetDebugInterface;
|
||||
D3D12SerializeRootSignature;
|
||||
D3D12SerializeVersionedRootSignature;
|
||||
D3DCreateBlob;
|
||||
vkd3d_create_event;
|
||||
vkd3d_destroy_event;
|
||||
vkd3d_signal_event;
|
||||
|
@@ -232,3 +232,21 @@ void vkd3d_destroy_event(HANDLE event)
|
||||
ERR("Failed to destroy condition variable, error %d.\n", rc);
|
||||
vkd3d_free(impl);
|
||||
}
|
||||
|
||||
HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3D10Blob **blob)
|
||||
{
|
||||
HRESULT hr;
|
||||
void *data;
|
||||
|
||||
TRACE("data_size %lu, blob %p.\n", data_size, blob);
|
||||
|
||||
if (!(data = vkd3d_calloc(data_size, 1)))
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (FAILED(hr = vkd3d_blob_create(data, data_size, blob)))
|
||||
{
|
||||
WARN("Failed to create blob object, hr %#x.\n", hr);
|
||||
vkd3d_free(data);
|
||||
}
|
||||
return hr;
|
||||
}
|
||||
|
@@ -25,7 +25,9 @@
|
||||
|
||||
#include <pthread.h>
|
||||
#include <vkd3d.h>
|
||||
#include <vkd3d_shader.h>
|
||||
|
||||
#include "vkd3d_blob.h"
|
||||
#include "vkd3d_memory.h"
|
||||
#include <vkd3d_utils.h>
|
||||
|
||||
|
Reference in New Issue
Block a user