Skip to content

Commit

Permalink
[general] Added 32-bit support
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Dec 12, 2017
1 parent 23abc82 commit 2a266ea
Show file tree
Hide file tree
Showing 50 changed files with 596 additions and 552 deletions.
19 changes: 19 additions & 0 deletions build-win32.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[binaries]
c = '/usr/bin/i686-w64-mingw32-gcc'
cpp = '/usr/bin/i686-w64-mingw32-g++'
ar = '/usr/bin/i686-w64-mingw32-ar'
strip = '/usr/bin/i686-w64-mingw32-strip'
exe_wrapper = 'wine'

[properties]
c_args = ['-Og', '-ggdb']
c_link_args = ['-static', '-static-libgcc']

cpp_args = ['-std=c++17', '-Og', '-gstabs']
cpp_link_args = ['-static', '-static-libgcc', '-static-libstdc++', '-Wl,--add-stdcall-alias']

[host_machine]
system = 'windows'
cpu_family = 'x86'
cpu = 'x86'
endian = 'little'
Binary file added lib32/SDL2.lib
Binary file not shown.
Binary file added lib32/vulkan-1.lib
Binary file not shown.
13 changes: 12 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
project('dxvk', ['c', 'cpp'])

cpu_family = target_machine.cpu_family()

dxvk_compiler = meson.get_compiler('cpp')
dxvk_library_path = meson.source_root() + '/lib'
dxvk_include_path = include_directories('./include')

if (cpu_family == 'x86_64')
dxvk_library_path = meson.source_root() + '/lib'
else
dxvk_library_path = meson.source_root() + '/lib32'
endif

lib_vulkan = dxvk_compiler.find_library('vulkan-1', dirs : dxvk_library_path)
lib_sdl2 = dxvk_compiler.find_library('SDL2', dirs : dxvk_library_path)

lib_d3d11 = dxvk_compiler.find_library('d3d11')
lib_dxgi = dxvk_compiler.find_library('dxgi')
lib_d3dcompiler_47 = dxvk_compiler.find_library('d3dcompiler_47')

subdir('src')
subdir('tests')
6 changes: 3 additions & 3 deletions src/d3d11/d3d11_blend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace dxvk {
}


HRESULT D3D11BlendState::QueryInterface(REFIID riid, void** ppvObject) {
HRESULT STDMETHODCALLTYPE D3D11BlendState::QueryInterface(REFIID riid, void** ppvObject) {
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
COM_QUERY_IFACE(riid, ppvObject, ID3D11BlendState);
Expand All @@ -46,12 +46,12 @@ namespace dxvk {
}


void D3D11BlendState::GetDevice(ID3D11Device** ppDevice) {
void STDMETHODCALLTYPE D3D11BlendState::GetDevice(ID3D11Device** ppDevice) {
*ppDevice = ref(m_device);
}


void D3D11BlendState::GetDesc(D3D11_BLEND_DESC* pDesc) {
void STDMETHODCALLTYPE D3D11BlendState::GetDesc(D3D11_BLEND_DESC* pDesc) {
*pDesc = m_desc;
}

Expand Down
6 changes: 3 additions & 3 deletions src/d3d11/d3d11_blend.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ namespace dxvk {
const D3D11_BLEND_DESC& desc);
~D3D11BlendState();

HRESULT QueryInterface(
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;

void GetDevice(
void STDMETHODCALLTYPE GetDevice(
ID3D11Device **ppDevice) final;

void GetDesc(
void STDMETHODCALLTYPE GetDesc(
D3D11_BLEND_DESC* pDesc) final;

void BindToContext(
Expand Down
12 changes: 6 additions & 6 deletions src/d3d11/d3d11_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace dxvk {
}


HRESULT D3D11Buffer::QueryInterface(REFIID riid, void** ppvObject) {
HRESULT STDMETHODCALLTYPE D3D11Buffer::QueryInterface(REFIID riid, void** ppvObject) {
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
COM_QUERY_IFACE(riid, ppvObject, ID3D11Resource);
Expand All @@ -34,29 +34,29 @@ namespace dxvk {
}


void D3D11Buffer::GetDevice(ID3D11Device** ppDevice) {
void STDMETHODCALLTYPE D3D11Buffer::GetDevice(ID3D11Device** ppDevice) {
*ppDevice = m_device.ref();
}


UINT D3D11Buffer::GetEvictionPriority() {
UINT STDMETHODCALLTYPE D3D11Buffer::GetEvictionPriority() {
UINT EvictionPriority = DXGI_RESOURCE_PRIORITY_NORMAL;
m_resource->GetEvictionPriority(&EvictionPriority);
return EvictionPriority;
}


void D3D11Buffer::SetEvictionPriority(UINT EvictionPriority) {
void STDMETHODCALLTYPE D3D11Buffer::SetEvictionPriority(UINT EvictionPriority) {
m_resource->SetEvictionPriority(EvictionPriority);
}


void D3D11Buffer::GetType(D3D11_RESOURCE_DIMENSION* pResourceDimension) {
void STDMETHODCALLTYPE D3D11Buffer::GetType(D3D11_RESOURCE_DIMENSION* pResourceDimension) {
*pResourceDimension = D3D11_RESOURCE_DIMENSION_BUFFER;
}


void D3D11Buffer::GetDesc(D3D11_BUFFER_DESC* pDesc) {
void STDMETHODCALLTYPE D3D11Buffer::GetDesc(D3D11_BUFFER_DESC* pDesc) {
*pDesc = m_desc;
}

Expand Down
12 changes: 6 additions & 6 deletions src/d3d11/d3d11_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ namespace dxvk {
const D3D11_BUFFER_DESC& desc);
~D3D11Buffer();

HRESULT QueryInterface(
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;

void GetDevice(
void STDMETHODCALLTYPE GetDevice(
ID3D11Device **ppDevice) final;

void GetType(
void STDMETHODCALLTYPE GetType(
D3D11_RESOURCE_DIMENSION *pResourceDimension) final;

UINT GetEvictionPriority() final;
UINT STDMETHODCALLTYPE GetEvictionPriority() final;

void SetEvictionPriority(UINT EvictionPriority) final;
void STDMETHODCALLTYPE SetEvictionPriority(UINT EvictionPriority) final;

void GetDesc(
void STDMETHODCALLTYPE GetDesc(
D3D11_BUFFER_DESC *pDesc) final;

Rc<DxvkBuffer> GetDXVKBuffer();
Expand Down
8 changes: 4 additions & 4 deletions src/d3d11/d3d11_class_linkage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace dxvk {
}


HRESULT D3D11ClassLinkage::QueryInterface(REFIID riid, void** ppvObject) {
HRESULT STDMETHODCALLTYPE D3D11ClassLinkage::QueryInterface(REFIID riid, void** ppvObject) {
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
COM_QUERY_IFACE(riid, ppvObject, ID3D11ClassLinkage);
Expand All @@ -25,12 +25,12 @@ namespace dxvk {
}


void D3D11ClassLinkage::GetDevice(ID3D11Device** ppDevice) {
void STDMETHODCALLTYPE D3D11ClassLinkage::GetDevice(ID3D11Device** ppDevice) {
*ppDevice = m_device.ref();
}


HRESULT D3D11ClassLinkage::CreateClassInstance(
HRESULT STDMETHODCALLTYPE D3D11ClassLinkage::CreateClassInstance(
LPCSTR pClassTypeName,
UINT ConstantBufferOffset,
UINT ConstantVectorOffset,
Expand All @@ -42,7 +42,7 @@ namespace dxvk {
}


HRESULT D3D11ClassLinkage::GetClassInstance(
HRESULT STDMETHODCALLTYPE D3D11ClassLinkage::GetClassInstance(
LPCSTR pClassInstanceName,
UINT InstanceIndex,
ID3D11ClassInstance **ppInstance) {
Expand Down
8 changes: 4 additions & 4 deletions src/d3d11/d3d11_class_linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ namespace dxvk {

~D3D11ClassLinkage();

HRESULT QueryInterface(
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;

void GetDevice(
void STDMETHODCALLTYPE GetDevice(
ID3D11Device **ppDevice) final;

HRESULT CreateClassInstance(
HRESULT STDMETHODCALLTYPE CreateClassInstance(
LPCSTR pClassTypeName,
UINT ConstantBufferOffset,
UINT ConstantVectorOffset,
UINT TextureOffset,
UINT SamplerOffset,
ID3D11ClassInstance **ppInstance);

HRESULT GetClassInstance(
HRESULT STDMETHODCALLTYPE GetClassInstance(
LPCSTR pClassInstanceName,
UINT InstanceIndex,
ID3D11ClassInstance **ppInstance);
Expand Down
Loading

0 comments on commit 2a266ea

Please sign in to comment.