mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -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:
parent
e5fea6ade0
commit
b72a2893c2
@ -20,6 +20,7 @@ vkd3d_public_headers = \
|
||||
include/vkd3d_d3d12.h \
|
||||
include/vkd3d_d3d12sdklayers.h \
|
||||
include/vkd3d_d3dcommon.h \
|
||||
include/vkd3d_d3dcompiler.h \
|
||||
include/vkd3d_dxgibase.h \
|
||||
include/vkd3d_dxgiformat.h \
|
||||
include/vkd3d_shader.h \
|
||||
|
26
include/vkd3d_d3dcompiler.h
Normal file
26
include/vkd3d_d3dcompiler.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright 2010 Matteo Bruni for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#ifndef __VKD3D_D3DCOMPILER_H
|
||||
#define __VKD3D_D3DCOMPILER_H
|
||||
#ifndef __D3DCOMPILER_H__
|
||||
|
||||
HRESULT WINAPI D3DCreateBlob(SIZE_T size, ID3D10Blob **blob);
|
||||
|
||||
#endif /* __D3DCOMPILER_H__ */
|
||||
#endif /* __VKD3D_D3DCOMPILER_H */
|
@ -54,6 +54,9 @@ HRESULT WINAPI D3D12CreateVersionedRootSignatureDeserializer(const void *data,
|
||||
HRESULT WINAPI D3D12SerializeVersionedRootSignature(const D3D12_VERSIONED_ROOT_SIGNATURE_DESC *desc,
|
||||
ID3DBlob **blob, ID3DBlob **error_blob);
|
||||
|
||||
/* 1.3 */
|
||||
HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3D10Blob **blob);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user