Revert "Add MSVC support (#123)"

This reverts commit c63d4361a0.
This commit is contained in:
Philip Rebohle 2018-03-05 14:32:28 +01:00
parent c63d4361a0
commit 1cbe6829eb
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
27 changed files with 1787 additions and 1837 deletions

View File

@ -1,15 +1,8 @@
project('dxvk', ['c', 'cpp'])
project('dxvk', ['c', 'cpp'], default_options : ['cpp_std=c++1z'])
cpu_family = target_machine.cpu_family()
dxvk_compiler = meson.get_compiler('cpp')
if dxvk_compiler.get_id() == 'msvc'
add_global_arguments('-DNOMINMAX', language : 'cpp')
dxvk_cpp_std='c++17'
else
dxvk_cpp_std='c++1z'
endif
dxvk_include_path = include_directories('./include')
if (cpu_family == 'x86_64')
@ -25,9 +18,7 @@ lib_spirvtools_opt = dxvk_compiler.find_library('libSPIRV-Tools-opt', dirs : dxv
lib_d3d11 = dxvk_compiler.find_library('d3d11')
lib_dxgi = dxvk_compiler.find_library('dxgi')
if dxvk_compiler.get_id() != 'msvc'
lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler_47')
endif
lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler_47')
glsl_compiler = find_program('glslangValidator')
glsl_generator = generator(glsl_compiler,
@ -35,7 +26,5 @@ glsl_generator = generator(glsl_compiler,
arguments : [ '-V', '--vn', '@BASENAME@', '@INPUT@', '-o', '@OUTPUT@' ])
subdir('src')
if dxvk_compiler.get_id() != 'msvc'
subdir('tests')
subdir('wine_utils')
endif
subdir('tests')
subdir('wine_utils')

View File

@ -1,4 +0,0 @@
LIBRARY
EXPORTS
D3D11CreateDevice
D3D11CreateDeviceAndSwapChain

View File

@ -225,14 +225,14 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11DeviceContext::SetPredication(
ID3D11Predicate* pPredicate,
BOOL PredicateValue) {
WINBOOL PredicateValue) {
Logger::err("D3D11DeviceContext::SetPredication: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::GetPredication(
ID3D11Predicate** ppPredicate,
BOOL* pPredicateValue) {
WINBOOL* pPredicateValue) {
Logger::err("D3D11DeviceContext::GetPredication: Not implemented");
}

View File

@ -40,11 +40,11 @@ namespace dxvk {
void STDMETHODCALLTYPE SetPredication(
ID3D11Predicate* pPredicate,
BOOL PredicateValue) final;
WINBOOL PredicateValue) final;
void STDMETHODCALLTYPE GetPredication(
ID3D11Predicate** ppPredicate,
BOOL* pPredicateValue) final;
WINBOOL* pPredicateValue) final;
void STDMETHODCALLTYPE CopySubresourceRegion(
ID3D11Resource* pDstResource,

View File

@ -30,7 +30,7 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11DeferredContext::ExecuteCommandList(
ID3D11CommandList* pCommandList,
BOOL RestoreContextState) {
WINBOOL RestoreContextState) {
static_cast<D3D11CommandList*>(pCommandList)->EmitToCommandList(m_commandList.ptr());
if (RestoreContextState)
@ -41,7 +41,7 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE D3D11DeferredContext::FinishCommandList(
BOOL RestoreDeferredContextState,
WINBOOL RestoreDeferredContextState,
ID3D11CommandList **ppCommandList) {
if (ppCommandList != nullptr)
*ppCommandList = m_commandList.ref();

View File

@ -22,10 +22,10 @@ namespace dxvk {
void STDMETHODCALLTYPE ExecuteCommandList(
ID3D11CommandList* pCommandList,
BOOL RestoreContextState) final;
WINBOOL RestoreContextState) final;
HRESULT STDMETHODCALLTYPE FinishCommandList(
BOOL RestoreDeferredContextState,
WINBOOL RestoreDeferredContextState,
ID3D11CommandList **ppCommandList) final;
HRESULT STDMETHODCALLTYPE Map(

View File

@ -64,7 +64,7 @@ namespace dxvk {
void STDMETHODCALLTYPE D3D11ImmediateContext::ExecuteCommandList(
ID3D11CommandList* pCommandList,
BOOL RestoreContextState) {
WINBOOL RestoreContextState) {
static_cast<D3D11CommandList*>(pCommandList)->EmitToCsThread(&m_csThread);
if (RestoreContextState)
@ -75,7 +75,7 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE D3D11ImmediateContext::FinishCommandList(
BOOL RestoreDeferredContextState,
WINBOOL RestoreDeferredContextState,
ID3D11CommandList **ppCommandList) {
Logger::err("D3D11: FinishCommandList called on immediate context");
return DXGI_ERROR_INVALID_CALL;

View File

@ -25,10 +25,10 @@ namespace dxvk {
void STDMETHODCALLTYPE ExecuteCommandList(
ID3D11CommandList* pCommandList,
BOOL RestoreContextState) final;
WINBOOL RestoreContextState) final;
HRESULT STDMETHODCALLTYPE FinishCommandList(
BOOL RestoreDeferredContextState,
WINBOOL RestoreDeferredContextState,
ID3D11CommandList **ppCommandList) final;
HRESULT STDMETHODCALLTYPE Map(

View File

@ -24,7 +24,6 @@
// For some strange reason, we cannot use the structures
// directly, although others from the same header work.
// Some structures are missing from the mingw headers.
#ifndef _MSC_VER
typedef struct D3D11_FEATURE_DATA_THREADING {
BOOL DriverConcurrentCreates;
BOOL DriverCommandLists;
@ -59,5 +58,4 @@ typedef struct D3D11_QUERY_DATA_PIPELINE_STATISTICS {
UINT64 HSInvocations;
UINT64 DSInvocations;
UINT64 CSInvocations;
} D3D11_QUERY_DATA_PIPELINE_STATISTICS;
#endif
} D3D11_QUERY_DATA_PIPELINE_STATISTICS;

View File

@ -30,9 +30,7 @@ d3d11_dll = shared_library('d3d11', d3d11_src,
link_with : [ util_lib ],
dependencies : [ dxvk_dep, dxgi_dep, dxbc_dep ],
include_directories : dxvk_include_path,
install : true,
vs_module_defs : 'd3d11.def',
override_options : ['cpp_std='+dxvk_cpp_std])
install : true)
d3d11_dep = declare_dependency(
link_with : [ d3d11_dll ],

View File

@ -1,7 +1,5 @@
#pragma once
#include <cctype>
#include "dxbc_common.h"
#include "dxbc_decoder.h"
#include "dxbc_enums.h"

View File

@ -14,8 +14,7 @@ dxbc_src = files([
])
dxbc_lib = static_library('dxbc', dxbc_src,
include_directories : [ dxvk_include_path ],
override_options : ['cpp_std='+dxvk_cpp_std])
include_directories : [ dxvk_include_path ])
dxbc_dep = declare_dependency(
link_with : [ dxbc_lib ],

View File

@ -1,6 +0,0 @@
LIBRARY
EXPORTS
CreateDXGIFactory
CreateDXGIFactory1
CreateDXGIFactory2
DXGICreateDevicePrivate

View File

@ -1,10 +1,6 @@
#pragma once
#ifdef _MSC_VER
#define DLLEXPORT
#else
#define DLLEXPORT __declspec(dllexport)
#endif
#define DLLEXPORT __declspec(dllexport)
#include "../util/com/com_guid.h"
#include "../util/com/com_object.h"

View File

@ -155,14 +155,8 @@ IDXGIPresentDevicePrivate : public IUnknown {
void** ppDevice) = 0;
};
#ifdef _MSC_VER
struct __declspec(uuid("907bf281-ea3c-43b4-a8e4-9f231107b4ff")) IDXGIAdapterPrivate;
struct __declspec(uuid("7a622cf6-627a-46b2-b52f-360ef3da831c")) IDXGIDevicePrivate;
struct __declspec(uuid("5679becd-8547-4d93-96a1-e61a1ce7ef37")) IDXGIPresentBackBuffer;
struct __declspec(uuid("79352328-16f2-4f81-9746-9c2e2ccd43cf")) IDXGIPresentDevicePrivate;
#else
DXVK_DEFINE_GUID(IDXGIAdapterPrivate);
DXVK_DEFINE_GUID(IDXGIDevicePrivate);
DXVK_DEFINE_GUID(IDXGIPresentBackBuffer);
DXVK_DEFINE_GUID(IDXGIPresentDevicePrivate);
#endif

View File

@ -14,9 +14,7 @@ dxgi_dll = shared_library('dxgi', dxgi_src,
link_with : [ util_lib ],
dependencies : [ dxvk_dep ],
include_directories : dxvk_include_path,
install : true,
vs_module_defs : 'dxgi.def',
override_options : ['cpp_std='+dxvk_cpp_std])
install : true)
dxgi_dep = declare_dependency(
link_with : [ dxgi_dll ],

View File

@ -25,7 +25,7 @@ namespace dxvk {
DxvkMemory::DxvkMemory(DxvkMemory&& other)
: m_chunk (std::exchange(other.m_chunk, nullptr)),
m_heap (std::exchange(other.m_heap, nullptr)),
m_memory (std::exchange(other.m_memory, VkDeviceMemory(VK_NULL_HANDLE))),
m_memory (std::exchange(other.m_memory, VkDeviceMemory(nullptr))),
m_offset (std::exchange(other.m_offset, 0)),
m_length (std::exchange(other.m_length, 0)),
m_mapPtr (std::exchange(other.m_mapPtr, nullptr)) { }
@ -34,7 +34,7 @@ namespace dxvk {
DxvkMemory& DxvkMemory::operator = (DxvkMemory&& other) {
m_chunk = std::exchange(other.m_chunk, nullptr);
m_heap = std::exchange(other.m_heap, nullptr);
m_memory = std::exchange(other.m_memory, VkDeviceMemory(VK_NULL_HANDLE));
m_memory = std::exchange(other.m_memory, VkDeviceMemory(nullptr));
m_offset = std::exchange(other.m_offset, 0);
m_length = std::exchange(other.m_length, 0);
m_mapPtr = std::exchange(other.m_mapPtr, nullptr);

File diff suppressed because it is too large Load Diff

View File

@ -63,8 +63,7 @@ thread_dep = dependency('threads')
dxvk_lib = static_library('dxvk', dxvk_src, glsl_generator.process(dxvk_hud_shaders),
link_with : [ util_lib, spirv_lib ],
dependencies : [ thread_dep, lib_vulkan ],
include_directories : [ dxvk_include_path ],
override_options : ['cpp_std='+dxvk_cpp_std])
include_directories : [ dxvk_include_path ])
dxvk_dep = declare_dependency(
link_with : [ dxvk_lib ],

View File

@ -5,5 +5,4 @@ spirv_src = files([
spirv_lib = static_library('spirv', spirv_src,
include_directories : [ dxvk_include_path ],
dependencies : [ lib_spirvtools, lib_spirvtools_opt ],
override_options : ['cpp_std='+dxvk_cpp_std])
dependencies : [ lib_spirvtools, lib_spirvtools_opt ])

View File

@ -5,9 +5,7 @@
#include "com_include.h"
#ifndef _MSC_VER
#define DXVK_DEFINE_GUID(iface) \
template<> inline GUID const& __mingw_uuidof<iface> () { return iface::guid; }
#endif
std::ostream& operator << (std::ostream& os, REFIID guid);

View File

@ -2,9 +2,7 @@
// GCC complains about the COM interfaces
// not having virtual destructors
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#endif // __GNUC__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

View File

@ -1,6 +1,5 @@
#pragma once
#include <array>
#include <fstream>
#include <iostream>
#include <mutex>

View File

@ -12,8 +12,7 @@ util_src = files([
])
util_lib = static_library('util', util_src,
include_directories : [ dxvk_include_path ],
override_options : ['cpp_std='+dxvk_cpp_std])
include_directories : [ dxvk_include_path ])
util_dep = declare_dependency(
link_with : [ util_lib ])

View File

@ -1,4 +1,4 @@
test_d3d11_deps = [ util_dep, lib_dxgi, lib_d3d11, lib_d3dcompiler_47 ]
executable('d3d11-compute', files('test_d3d11_compute.cpp'), dependencies : test_d3d11_deps, install : true, override_options: ['cpp_std='+dxvk_cpp_std])
executable('d3d11-triangle', files('test_d3d11_triangle.cpp'), dependencies : test_d3d11_deps, install : true, override_options: ['cpp_std='+dxvk_cpp_std])
executable('d3d11-compute', files('test_d3d11_compute.cpp'), dependencies : test_d3d11_deps, install : true)
executable('d3d11-triangle', files('test_d3d11_triangle.cpp'), dependencies : test_d3d11_deps, install : true)

View File

@ -1,5 +1,5 @@
test_dxbc_deps = [ dxbc_dep, dxvk_dep ]
executable('dxbc-compiler', files('test_dxbc_compiler.cpp'), dependencies : test_dxbc_deps, install : true, override_options: ['cpp_std='+dxvk_cpp_std])
executable('dxbc-disasm', files('test_dxbc_disasm.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler_47 ], install : true, override_options: ['cpp_std='+dxvk_cpp_std])
executable('hlsl-compiler', files('test_hlsl_compiler.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler_47 ], install : true, override_options: ['cpp_std='+dxvk_cpp_std])
executable('dxbc-compiler', files('test_dxbc_compiler.cpp'), dependencies : test_dxbc_deps, install : true)
executable('dxbc-disasm', files('test_dxbc_disasm.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler_47 ], install : true)
executable('hlsl-compiler', files('test_hlsl_compiler.cpp'), dependencies : [ test_dxbc_deps, lib_d3dcompiler_47 ], install : true)

View File

@ -1,3 +1,3 @@
test_dxgi_deps = [ util_dep, lib_dxgi ]
executable('dxgi-factory', files('test_dxgi_factory.cpp'), dependencies : test_dxgi_deps, install: true, override_options: ['cpp_std='+dxvk_cpp_std])
executable('dxgi-factory', files('test_dxgi_factory.cpp'), dependencies : test_dxgi_deps, install: true)