Fixed missing DX11 defines when building with MinGW on Linux.

This commit is contained in:
Branimir Karadžić 2015-01-05 20:59:58 -08:00
parent 46940ae4ec
commit 86765854b0
3 changed files with 29 additions and 5 deletions

View file

@ -148,6 +148,9 @@ function exampleProject(_name)
"/DELAYLOAD:\"libGLESv2.dll\"", "/DELAYLOAD:\"libGLESv2.dll\"",
} }
configuration { "mingw*" }
targetextension ".exe"
configuration { "vs20* or mingw*" } configuration { "vs20* or mingw*" }
links { links {
"gdi32", "gdi32",

View file

@ -653,13 +653,13 @@ namespace bgfx
D3D11_INFO_QUEUE_FILTER filter; D3D11_INFO_QUEUE_FILTER filter;
memset(&filter, 0, sizeof(filter) ); memset(&filter, 0, sizeof(filter) );
D3D11_MESSAGE_CATEGORY categies[] = D3D11_MESSAGE_CATEGORY catlist[] =
{ {
D3D11_MESSAGE_CATEGORY_STATE_SETTING, D3D11_MESSAGE_CATEGORY_STATE_SETTING,
D3D11_MESSAGE_CATEGORY_EXECUTION, D3D11_MESSAGE_CATEGORY_EXECUTION,
}; };
filter.DenyList.NumCategories = BX_COUNTOF(categies); filter.DenyList.NumCategories = BX_COUNTOF(catlist);
filter.DenyList.pCategoryList = categies; filter.DenyList.pCategoryList = catlist;
infoQueue->PushStorageFilter(&filter); infoQueue->PushStorageFilter(&filter);
DX_RELEASE(infoQueue, 3); DX_RELEASE(infoQueue, 3);
@ -2311,8 +2311,8 @@ namespace bgfx
{ {
desc.Usage = D3D11_USAGE_DEFAULT; desc.Usage = D3D11_USAGE_DEFAULT;
desc.CPUAccessFlags = 0; desc.CPUAccessFlags = 0;
desc.StructureByteStride = isValid(_declHandle) desc.StructureByteStride = isValid(_declHandle)
? s_renderD3D11->m_vertexDecls[_declHandle.idx].m_stride ? s_renderD3D11->m_vertexDecls[_declHandle.idx].m_stride
: 0 : 0
; ;

View file

@ -49,6 +49,27 @@ BX_PRAGMA_DIAGNOSTIC_POP()
# define D3D_FEATURE_LEVEL_11_1 D3D_FEATURE_LEVEL(0xb100) # define D3D_FEATURE_LEVEL_11_1 D3D_FEATURE_LEVEL(0xb100)
#endif // D3D_FEATURE_LEVEL_11_1 #endif // D3D_FEATURE_LEVEL_11_1
// MinGW Linux/Wine missing defines...
#ifndef D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
# define D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT 8
#endif // D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
#ifndef D3D11_PS_CS_UAV_REGISTER_COUNT
# define D3D11_PS_CS_UAV_REGISTER_COUNT 8
#endif // D3D11_PS_CS_UAV_REGISTER_COUNT
#ifndef D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT
# define D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT 8
#endif
#ifndef D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
# define D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT 8
#endif // D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
#ifndef D3D11_APPEND_ALIGNED_ELEMENT
# define D3D11_APPEND_ALIGNED_ELEMENT UINT32_MAX
#endif // D3D11_APPEND_ALIGNED_ELEMENT
namespace bgfx namespace bgfx
{ {
struct IndexBufferD3D11 struct IndexBufferD3D11