mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
demos: Remove hack for creating root signatures.
This commit is contained in:
parent
cb417ef46b
commit
7129e23aef
15
demos/demo.h
15
demos/demo.h
@ -123,6 +123,21 @@ static inline void demo_blend_desc_init_default(D3D12_BLEND_DESC *desc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline HRESULT demo_create_root_signature(ID3D12Device *device,
|
||||||
|
const D3D12_ROOT_SIGNATURE_DESC *desc, ID3D12RootSignature **signature)
|
||||||
|
{
|
||||||
|
ID3DBlob *blob;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
if (FAILED(hr = D3D12SerializeRootSignature(desc, D3D_ROOT_SIGNATURE_VERSION_1, &blob, NULL)))
|
||||||
|
return hr;
|
||||||
|
hr = ID3D12Device_CreateRootSignature(device, 0, ID3D10Blob_GetBufferPointer(blob),
|
||||||
|
ID3D10Blob_GetBufferSize(blob), &IID_ID3D12RootSignature, (void **)signature);
|
||||||
|
ID3D10Blob_Release(blob);
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include "demo_win32.h"
|
#include "demo_win32.h"
|
||||||
#else
|
#else
|
||||||
|
@ -325,18 +325,3 @@ static inline void demo_destroy_event(HANDLE event)
|
|||||||
{
|
{
|
||||||
CloseHandle(event);
|
CloseHandle(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline HRESULT demo_create_root_signature(ID3D12Device *device,
|
|
||||||
const D3D12_ROOT_SIGNATURE_DESC *desc, ID3D12RootSignature **signature)
|
|
||||||
{
|
|
||||||
ID3DBlob *blob;
|
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
if (FAILED(hr = D3D12SerializeRootSignature(desc, D3D_ROOT_SIGNATURE_VERSION_1, &blob, NULL)))
|
|
||||||
return hr;
|
|
||||||
hr = ID3D12Device_CreateRootSignature(device, 0, ID3D10Blob_GetBufferPointer(blob),
|
|
||||||
ID3D10Blob_GetBufferSize(blob), &IID_ID3D12RootSignature, (void **)signature);
|
|
||||||
ID3D10Blob_Release(blob);
|
|
||||||
|
|
||||||
return hr;
|
|
||||||
}
|
|
||||||
|
@ -564,10 +564,3 @@ static inline void demo_destroy_event(HANDLE event)
|
|||||||
{
|
{
|
||||||
vkd3d_destroy_event(event);
|
vkd3d_destroy_event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline HRESULT demo_create_root_signature(ID3D12Device *device,
|
|
||||||
const D3D12_ROOT_SIGNATURE_DESC *desc, ID3D12RootSignature **signature)
|
|
||||||
{
|
|
||||||
return ID3D12Device_CreateRootSignature(device, 0, desc, ~(SIZE_T)0,
|
|
||||||
&IID_ID3D12RootSignature, (void **)signature);
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user