Skip to content

Commit

Permalink
Merge pull request #246 from tannergooding/main
Browse files Browse the repository at this point in the history
Splitting out multiple `PREFIX_*` groups with more than 50 members into classes named `PREFIX`
  • Loading branch information
tannergooding authored Nov 14, 2021
2 parents 2132f18 + 96956f8 commit 3ec6fc5
Show file tree
Hide file tree
Showing 5,029 changed files with 194,853 additions and 189,519 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion generation/Windows/shared/lmerr/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
--file
shared-lmerr.h
--methodClassName
WinError
Windows
--namespace
TerraFX.Interop.Windows
--output
Expand Down
2 changes: 1 addition & 1 deletion generation/Windows/shared/ntstatus/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ __NTSTATUS_FROM_WIN32
--file
shared-ntstatus.h
--methodClassName
WinError
Windows
--namespace
TerraFX.Interop.Windows
--output
Expand Down
2 changes: 1 addition & 1 deletion generation/Windows/shared/winerror/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ __HRESULT_FROM_WIN32
--file
shared-winerror.h
--methodClassName
WinError
Windows
--namespace
TerraFX.Interop.Windows
--output
Expand Down
2 changes: 1 addition & 1 deletion generation/Windows/um/Mferror/generate.rsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _HRESULT_TYPEDEF_
--file
um-Mferror.h
--methodClassName
WinError
Windows
--namespace
TerraFX.Interop.Windows
--output
Expand Down
101 changes: 101 additions & 0 deletions generation/remap-classes.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
--with-class
ALG_*=ALG
APPCOMMAND_*=APPCOMMAND
CALG_*=CALG
CERTSRV_*=CERTSRV
CERT_*=CERT
CFSTR_*=CFSTR
CLSID_*=CLSID
CMSG_*=CMSG
COMADMIN_*=COMADMIN
CONTEXT_*=CONTEXT
CO_*=CO
CRED_*=CRED
CRYPTNET_*=CRYPTNET
CRYPT_*=CRYPT
CSIDL_*=CSIDL
DISPID_*=DISPID
DI_*=DI
DMPAPER_*=DMPAPER
DNS_*=DNS
DOMAIN_*=DOMAIN
EM_*=EM
ERROR_*=ERROR
EVENT_*=EVENT
E_*=E
FACILITY_*=FACILITY
FAST_*=FAST
FILE_*=FILE
FLG_*=FLG
FSCTL_*=FSCTL
FVE_*=FVE
FWP_*=FWP
HID_*=HID
HRESULT_FROM_WIN32=Windows
HTTP_*=HTTP
IF_*=IF
IID_*=IID
IMAGE_*=IMAGE
IME_*=IME
INET_*=INET
IOCTL_*=IOCTL
IO_*=IO
IPROPNAME_*=IPROPNAME
IP_*=IP
JIFMK_*=JIFMK
JOB_*=JOB
LANG_*=LANG
LVM_*=LVM
LVS_*=LVS
MAX_*=MAX
META_*=META
MF_*=MF
MIXERCONTROL_*=MIXERCONTROL
MM_*=MM
NERR_*=NERR
NTE_*=NTE
PAN_*=PAN
PEER_*=PEER
PID_*=PID
PROCESSOR_*=PROCESSOR
PROCESS_*=PROCESS
PRODUCT_*=PRODUCT
REG_*=REG
RPC_*=RPC
SB_*=SB
SCARD_*=SCARD
SECURITY_*=SECURITY
SEC_*=SEC
SE_*=SE
SHTDN_*=SHTDN
SM_*=SM
SPAPI_*=SPAPI
SPI_*=SPI
SP_*=SP
SQLITE_*=SQLITE
STATUS_*=STATUS
STG_*=STG
STORAGE_*=STORAGE
SUBLANG_*=SUBLANG
TAPE_*=TAPE
TBS_*=TBS
TB_*=TB
TF_*=TF
TMT_*=TMT
TPM_*=TPM
TRANSACTION_*=TRANSACTION
TS_*=TS
TTM_*=TTM
TVM_*=TVM
TXFS_*=TXFS
URLACTION_*=URLACTION
UTC_*=UTC
VK_*=VK
VSCLASS_*=VSCLASS
WAVE_*=WAVE
WINCODEC_*=WINCODEC
WINHTTP_*=WINHTTP
WININET_*=WININET
WM_*=WM
WS_*=WS
XACT_*=XACT
103 changes: 101 additions & 2 deletions generation/remap-namespaces.rsp
Original file line number Diff line number Diff line change
@@ -1,41 +1,140 @@
--with-namespace
ALG=TerraFX.Interop.Windows
APPCOMMAND=TerraFX.Interop.Windows
AUDIO_STREAM_CATEGORY=TerraFX.Interop.Windows
BitmapDescription=TerraFX.Interop.WinRT
BOOL=TerraFX.Interop.Windows
CALG=TerraFX.Interop.Windows
CERT=TerraFX.Interop.Windows
CERTSRV=TerraFX.Interop.Windows
CFSTR=TerraFX.Interop.Windows
CLSID=TerraFX.Interop.Windows
CMSG=TerraFX.Interop.Windows
CO=TerraFX.Interop.Windows
COMADMIN=TerraFX.Interop.Windows
CONTEXT=TerraFX.Interop.Windows
CRED=TerraFX.Interop.Windows
CRYPT=TerraFX.Interop.Windows
CRYPTNET=TerraFX.Interop.Windows
CSIDL=TerraFX.Interop.Windows
D2D1_PIXEL_FORMAT=TerraFX.Interop.DirectX
D3D12_RESOURCE_DESC=TerraFX.Interop.DirectX
DDCAPS_DX7=TerraFX.Interop.DirectX
DDCOLORKEY=TerraFX.Interop.DirectX
DDPIXELFORMAT=TerraFX.Interop.DirectX
DI=TerraFX.Interop.Windows
DISPID=TerraFX.Interop.Windows
DMPAPER=TerraFX.Interop.Windows
DNS=TerraFX.Interop.Windows
DOMAIN=TerraFX.Interop.Windows
DXGI_FORMAT=TerraFX.Interop.DirectX
DXGI_JPEG_QUANTIZATION_TABLE=TerraFX.Interop.DirectX
DXGI_RGBA=TerraFX.Interop.DirectX
E=TerraFX.Interop.Windows
EM=TerraFX.Interop.Windows
ERROR=TerraFX.Interop.Windows
EVENT=TerraFX.Interop.Windows
FACILITY=TerraFX.Interop.Windows
FAST=TerraFX.Interop.Windows
FILE=TerraFX.Interop.Windows
FLG=TerraFX.Interop.Windows
FSCTL=TerraFX.Interop.Windows
FVE=TerraFX.Interop.Windows
FWP=TerraFX.Interop.Windows
HANDLE=TerraFX.Interop.Windows
HID=TerraFX.Interop.Windows
HRESULT=TerraFX.Interop.Windows
HRESULT_FROM_WIN32=TerraFX.Interop.Windows;WinError
HSTRING=TerraFX.Interop.WinRT
HSTRING_BUFFER=TerraFX.Interop.WinRT
HTTP=TerraFX.Interop.Windows
HWND=TerraFX.Interop.Windows
ID2D1Device=TerraFX.Interop.DirectX
ID2D1DeviceContext=TerraFX.Interop.DirectX
ID2D1Image=TerraFX.Interop.DirectX
ID3D12CommandQueue=TerraFX.Interop.DirectX
ID3D12Resource=TerraFX.Interop.DirectX
IDCompositionAnimation=TerraFX.Interop.DirectX
IDirectDraw=TerraFX.Interop.DirectX
IDirectDraw7=TerraFX.Interop.DirectX
IDirectDraw=TerraFX.Interop.DirectX
IDirectDrawSurface7=TerraFX.Interop.DirectX
IDXGIDevice=TerraFX.Interop.DirectX
IDXGISwapChain=TerraFX.Interop.DirectX
IF=TerraFX.Interop.Windows
IID=TerraFX.Interop.Windows
IInspectable=TerraFX.Interop.WinRT
IMAGE=TerraFX.Interop.Windows
IME=TerraFX.Interop.Windows
INET=TerraFX.Interop.Windows
InstanceHandle=TerraFX.Interop.WinRT
IO=TerraFX.Interop.Windows
IOCTL=TerraFX.Interop.Windows
IP=TerraFX.Interop.Windows
IPROPNAME=TerraFX.Interop.Windows
IUnknown=TerraFX.Interop.Windows
JIFMK=TerraFX.Interop.Windows
JOB=TerraFX.Interop.Windows
LANG=TerraFX.Interop.Windows
LARGE_INTEGER=TerraFX.Interop.Windows
LUID=TerraFX.Interop.Windows
LVM=TerraFX.Interop.Windows
LVS=TerraFX.Interop.Windows
MAX=TerraFX.Interop.Windows
META=TerraFX.Interop.Windows
MF=TerraFX.Interop.Windows
MIXERCONTROL=TerraFX.Interop.Windows
MM=TerraFX.Interop.Windows
NativeInheritanceAttribute=TerraFX.Interop
NativeTypeNameAttribute=TerraFX.Interop
NERR=TerraFX.Interop.Windows
NTE=TerraFX.Interop.Windows
PAN=TerraFX.Interop.Windows
PEER=TerraFX.Interop.Windows
PID=TerraFX.Interop.Windows
POINT=TerraFX.Interop.Windows
PROCESS=TerraFX.Interop.Windows
PROCESSOR=TerraFX.Interop.Windows
PRODUCT=TerraFX.Interop.Windows
RECT=TerraFX.Interop.Windows
REG=TerraFX.Interop.Windows
RPC=TerraFX.Interop.Windows
SAFEARRAY=TerraFX.Interop.Windows
SB=TerraFX.Interop.Windows
SCARD=TerraFX.Interop.Windows
SE=TerraFX.Interop.Windows
SEC=TerraFX.Interop.Windows
SECURITY=TerraFX.Interop.Windows
SHTDN=TerraFX.Interop.Windows
SM=TerraFX.Interop.Windows
SP=TerraFX.Interop.Windows
SPAPI=TerraFX.Interop.Windows
SPI=TerraFX.Interop.Windows
SQLITE=TerraFX.Interop.Windows
STATUS=TerraFX.Interop.Windows
STG=TerraFX.Interop.Windows
STORAGE=TerraFX.Interop.Windows
SUBLANG=TerraFX.Interop.Windows
TAPE=TerraFX.Interop.Windows
TB=TerraFX.Interop.Windows
TBS=TerraFX.Interop.Windows
TF=TerraFX.Interop.Windows
TMT=TerraFX.Interop.Windows
TPM=TerraFX.Interop.Windows
TRANSACTION=TerraFX.Interop.Windows
TS=TerraFX.Interop.Windows
TTM=TerraFX.Interop.Windows
TVM=TerraFX.Interop.Windows
TXFS=TerraFX.Interop.Windows
URLACTION=TerraFX.Interop.Windows
UTC=TerraFX.Interop.Windows
VK=TerraFX.Interop.Windows
VSCLASS=TerraFX.Interop.Windows
VtblIndexAttribute=TerraFX.Interop
WAVE=TerraFX.Interop.Windows
WAVEFORMATEX=TerraFX.Interop.Windows
WINCODEC=TerraFX.Interop.Windows
Windows=TerraFX.Interop.Windows
WINHTTP=TerraFX.Interop.Windows
WININET=TerraFX.Interop.Windows
WM=TerraFX.Interop.Windows
WS=TerraFX.Interop.Windows
XACT=TerraFX.Interop.DirectX
1 change: 1 addition & 0 deletions generation/remap.rsp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@../../../remap-classes.rsp
@../../../remap-guids.rsp
@../../../remap-handles.rsp
@../../../remap-members.rsp
Expand Down
9 changes: 2 additions & 7 deletions samples/DirectX/D3D11/Shared/DX11Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ protected override void CreateDeviceDependentResources()
IDXGIFactory1* CreateDxgiFactory()
{
IDXGIFactory1* dxgiFactory;

var iid = IID_IDXGIFactory1;
ThrowIfFailed(CreateDXGIFactory1(&iid, (void**)&dxgiFactory));

ThrowIfFailed(CreateDXGIFactory1(__uuidof<IDXGIFactory1>(), (void**)&dxgiFactory));
return dxgiFactory;
}

Expand All @@ -91,9 +88,7 @@ protected virtual void CreateResourceViews()
ID3D11RenderTargetView* CreateRenderTargetView()
{
using ComPtr<ID3D11Resource> backBuffer = null;

var iid = IID_ID3D11Texture2D;
ThrowIfFailed(SwapChain->GetBuffer(0, &iid, (void**)backBuffer.GetAddressOf()));
ThrowIfFailed(SwapChain->GetBuffer(0, __uuidof<ID3D11Texture2D>(), (void**)backBuffer.GetAddressOf()));

ID3D11RenderTargetView* renderTargetView;
ThrowIfFailed(D3DDevice->CreateRenderTargetView(backBuffer.Get(), null, &renderTargetView));
Expand Down
11 changes: 3 additions & 8 deletions samples/DirectX/D3D12/HelloBundles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using TerraFX.Interop.DirectX;
using static TerraFX.Interop.DirectX.D3D_PRIMITIVE_TOPOLOGY;
using static TerraFX.Interop.DirectX.D3D12_COMMAND_LIST_TYPE;
using static TerraFX.Interop.DirectX.DirectX;
using static TerraFX.Samples.DirectX.DXSampleHelper;
using static TerraFX.Interop.Windows.Windows;

namespace TerraFX.Samples.DirectX.D3D12
{
Expand All @@ -33,9 +33,7 @@ protected override void CreateAssets()
ID3D12GraphicsCommandList* CreateBundle()
{
ID3D12GraphicsCommandList* bundle;

var iid = IID_ID3D12GraphicsCommandList;
ThrowIfFailed(D3DDevice->CreateCommandList(nodeMask: 0, D3D12_COMMAND_LIST_TYPE_BUNDLE, _bundleAllocator, PipelineState, &iid, (void**)&bundle));
ThrowIfFailed(D3DDevice->CreateCommandList(nodeMask: 0, D3D12_COMMAND_LIST_TYPE_BUNDLE, _bundleAllocator, PipelineState, __uuidof<ID3D12GraphicsCommandList>(), (void**)&bundle));

bundle->SetGraphicsRootSignature(RootSignature);
bundle->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
Expand All @@ -54,10 +52,7 @@ protected override void CreateAssets()
ID3D12CommandAllocator* CreateBundleAllocator()
{
ID3D12CommandAllocator* bundleAllocator;

var iid = IID_ID3D12CommandAllocator;
ThrowIfFailed(D3DDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_BUNDLE, &iid, (void**)&bundleAllocator));

ThrowIfFailed(D3DDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_BUNDLE, __uuidof<ID3D12CommandAllocator>(), (void**)&bundleAllocator));
return bundleAllocator;
}
}
Expand Down
15 changes: 4 additions & 11 deletions samples/DirectX/D3D12/HelloConstBuffer12.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ protected override void CreateBuffers()
var heapProperties = new D3D12_HEAP_PROPERTIES(D3D12_HEAP_TYPE_UPLOAD);
var bufferDesc = D3D12_RESOURCE_DESC.Buffer(1024 * 64);

var iid = IID_ID3D12Resource;
ThrowIfFailed(D3DDevice->CreateCommittedResource(&heapProperties, D3D12_HEAP_FLAG_NONE, &bufferDesc, D3D12_RESOURCE_STATE_GENERIC_READ, pOptimizedClearValue: null, &iid, (void**)&constantBuffer));
ThrowIfFailed(D3DDevice->CreateCommittedResource(&heapProperties, D3D12_HEAP_FLAG_NONE, &bufferDesc, D3D12_RESOURCE_STATE_GENERIC_READ, pOptimizedClearValue: null, __uuidof<ID3D12Resource>(), (void**)&constantBuffer));

var cbvDesc = new D3D12_CONSTANT_BUFFER_VIEW_DESC {
BufferLocation = constantBuffer->GetGPUVirtualAddress(),
Expand Down Expand Up @@ -103,9 +102,7 @@ protected override void CreateDescriptorHeaps()
};

ID3D12DescriptorHeap* cbvHeap;

var iid = IID_ID3D12DescriptorHeap;
ThrowIfFailed(D3DDevice->CreateDescriptorHeap(&cbvHeapDesc, &iid, (void**)&cbvHeap));
ThrowIfFailed(D3DDevice->CreateDescriptorHeap(&cbvHeapDesc, __uuidof<ID3D12DescriptorHeap>(), (void**)&cbvHeap));

return cbvHeap;
}
Expand Down Expand Up @@ -180,9 +177,7 @@ protected override void CreateDescriptorHeaps()
psoDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;

ID3D12PipelineState* pipelineState;

var iid = IID_ID3D12PipelineState;
ThrowIfFailed(D3DDevice->CreateGraphicsPipelineState(&psoDesc, &iid, (void**)&pipelineState));
ThrowIfFailed(D3DDevice->CreateGraphicsPipelineState(&psoDesc, __uuidof<ID3D12PipelineState>(), (void**)&pipelineState));

return pipelineState;
}
Expand Down Expand Up @@ -224,9 +219,7 @@ protected override void CreateDescriptorHeaps()
ThrowIfFailed(D3D12SerializeVersionedRootSignature(&rootSignatureDesc, featureData.HighestVersion, signature.GetAddressOf(), error.GetAddressOf()));

ID3D12RootSignature* rootSignature;

var iid = IID_ID3D12RootSignature;
ThrowIfFailed(D3DDevice->CreateRootSignature(0, signature.Get()->GetBufferPointer(), signature.Get()->GetBufferSize(), &iid, (void**)&rootSignature));
ThrowIfFailed(D3DDevice->CreateRootSignature(0, signature.Get()->GetBufferPointer(), signature.Get()->GetBufferSize(), __uuidof<ID3D12RootSignature>(), (void**)&rootSignature));

return rootSignature;
}
Expand Down
Loading

0 comments on commit 3ec6fc5

Please sign in to comment.