|
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
#include<Windows.h>
#include<process.h>
#include<d3d11.h>
#include<d3dcompiler.h>
#include<d3dx11.h>
#include<vector>
#include<comdef.h>
#include<atlbase.h>
#include<d3dx11effect.h>
#include<D3dcsx.h>
static void SafeRelease(IUnknown *p){if(p!=NULL) p->Release();}
HRESULT CreateByteOrderBufferOnGPU( ID3D11Device* pDevice, UINT uElementSize, UINT uCount, VOID* pInitData, ID3D11Buffer** ppBufOut );
HRESULT CreateBufferSRV( ID3D11Device* pDevice, ID3D11Buffer* pBuffer, ID3D11ShaderResourceView** ppSRVOut );
HRESULT CreateBufferUAV( ID3D11Device* pDevice, ID3D11Buffer* pBuffer, ID3D11UnorderedAccessView** ppUAVOut );
ID3D11Buffer* CreateAndCopyToDebugBuf(ID3D11Buffer* pBuffer,ID3D11DeviceContext *pContextOut); //release the returned buffer
struct Sync
{
CRITICAL_SECTION m_cs;
Sync(){::InitializeCriticalSection(&m_cs);}
void lock(){EnterCriticalSection(&m_cs);}
void unlock(){LeaveCriticalSection(&m_cs);}
~Sync(){::DeleteCriticalSection(&m_cs);}
};
/////////////-------------------------///////////////////
//to test DX11 FFT output
struct complex
{
complex():x(0),y(0){}
complex(double r):x(r),y(0){}
float x,y;
};
complex *fourrier(complex *a,int n);
complex *invfourrier(complex *a,int n);
/////////////-------------------------///////////////////
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.