Merge branch 'master' into d3d12
This commit is contained in:
commit
ec92d46480
|
@ -7,7 +7,7 @@ objdir(build_obj)
|
|||
|
||||
-- Define an ARCH variable
|
||||
-- Only use this to enable architecture-specific functionality.
|
||||
if os.is("linux") then
|
||||
if os.istarget("linux") then
|
||||
ARCH = os.outputof("uname -p")
|
||||
else
|
||||
ARCH = "unknown"
|
||||
|
@ -221,9 +221,9 @@ solution("xenia")
|
|||
uuid("931ef4b0-6170-4f7a-aaf2-0fece7632747")
|
||||
startproject("xenia-app")
|
||||
architecture("x86_64")
|
||||
if os.is("linux") then
|
||||
if os.istarget("linux") then
|
||||
platforms({"Linux"})
|
||||
elseif os.is("windows") then
|
||||
elseif os.istarget("windows") then
|
||||
platforms({"Windows"})
|
||||
-- Minimum version to support ID3D12GraphicsCommandList1 (for
|
||||
-- SetSamplePositions).
|
||||
|
@ -266,7 +266,7 @@ solution("xenia")
|
|||
include("src/xenia/ui/vulkan")
|
||||
include("src/xenia/vfs")
|
||||
|
||||
if os.is("windows") then
|
||||
if os.istarget("windows") then
|
||||
include("src/xenia/apu/xaudio2")
|
||||
include("src/xenia/gpu/d3d12")
|
||||
include("src/xenia/hid/winkey")
|
||||
|
|
|
@ -40,9 +40,6 @@ project("xenia-app")
|
|||
"xenia-vfs",
|
||||
"xxhash",
|
||||
})
|
||||
flags({
|
||||
"WinMain", -- Use WinMain instead of main.
|
||||
})
|
||||
defines({
|
||||
"XBYAK_NO_OP_NAMES",
|
||||
"XBYAK_ENABLE_OMITTED_OPERAND",
|
||||
|
|
|
@ -497,22 +497,22 @@ void X64ThunkEmitter::EmitSaveVolatileRegs() {
|
|||
mov(qword[rsp + offsetof(StackLayout::Thunk, r[5])], r10);
|
||||
mov(qword[rsp + offsetof(StackLayout::Thunk, r[6])], r11);
|
||||
|
||||
// movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[0])], xmm0);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[1])], xmm1);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[2])], xmm2);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[3])], xmm3);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[4])], xmm4);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[5])], xmm5);
|
||||
// vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[0])], xmm0);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[1])], xmm1);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[2])], xmm2);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[3])], xmm3);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[4])], xmm4);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[5])], xmm5);
|
||||
}
|
||||
|
||||
void X64ThunkEmitter::EmitLoadVolatileRegs() {
|
||||
// Load volatile registers from our stack frame.
|
||||
// movaps(xmm0, qword[rsp + offsetof(StackLayout::Thunk, xmm[0])]);
|
||||
movaps(xmm1, qword[rsp + offsetof(StackLayout::Thunk, xmm[1])]);
|
||||
movaps(xmm2, qword[rsp + offsetof(StackLayout::Thunk, xmm[2])]);
|
||||
movaps(xmm3, qword[rsp + offsetof(StackLayout::Thunk, xmm[3])]);
|
||||
movaps(xmm4, qword[rsp + offsetof(StackLayout::Thunk, xmm[4])]);
|
||||
movaps(xmm5, qword[rsp + offsetof(StackLayout::Thunk, xmm[5])]);
|
||||
// vmovaps(xmm0, qword[rsp + offsetof(StackLayout::Thunk, xmm[0])]);
|
||||
vmovaps(xmm1, qword[rsp + offsetof(StackLayout::Thunk, xmm[1])]);
|
||||
vmovaps(xmm2, qword[rsp + offsetof(StackLayout::Thunk, xmm[2])]);
|
||||
vmovaps(xmm3, qword[rsp + offsetof(StackLayout::Thunk, xmm[3])]);
|
||||
vmovaps(xmm4, qword[rsp + offsetof(StackLayout::Thunk, xmm[4])]);
|
||||
vmovaps(xmm5, qword[rsp + offsetof(StackLayout::Thunk, xmm[5])]);
|
||||
|
||||
// mov(rax, qword[rsp + offsetof(StackLayout::Thunk, r[0])]);
|
||||
mov(rcx, qword[rsp + offsetof(StackLayout::Thunk, r[1])]);
|
||||
|
@ -535,29 +535,29 @@ void X64ThunkEmitter::EmitSaveNonvolatileRegs() {
|
|||
mov(qword[rsp + offsetof(StackLayout::Thunk, r[7])], r14);
|
||||
mov(qword[rsp + offsetof(StackLayout::Thunk, r[8])], r15);
|
||||
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[0])], xmm6);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[1])], xmm7);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[2])], xmm8);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[3])], xmm9);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[4])], xmm10);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[5])], xmm11);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[6])], xmm12);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[7])], xmm13);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[8])], xmm14);
|
||||
movaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[9])], xmm15);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[0])], xmm6);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[1])], xmm7);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[2])], xmm8);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[3])], xmm9);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[4])], xmm10);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[5])], xmm11);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[6])], xmm12);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[7])], xmm13);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[8])], xmm14);
|
||||
vmovaps(qword[rsp + offsetof(StackLayout::Thunk, xmm[9])], xmm15);
|
||||
}
|
||||
|
||||
void X64ThunkEmitter::EmitLoadNonvolatileRegs() {
|
||||
movaps(xmm6, qword[rsp + offsetof(StackLayout::Thunk, xmm[0])]);
|
||||
movaps(xmm7, qword[rsp + offsetof(StackLayout::Thunk, xmm[1])]);
|
||||
movaps(xmm8, qword[rsp + offsetof(StackLayout::Thunk, xmm[2])]);
|
||||
movaps(xmm9, qword[rsp + offsetof(StackLayout::Thunk, xmm[3])]);
|
||||
movaps(xmm10, qword[rsp + offsetof(StackLayout::Thunk, xmm[4])]);
|
||||
movaps(xmm11, qword[rsp + offsetof(StackLayout::Thunk, xmm[5])]);
|
||||
movaps(xmm12, qword[rsp + offsetof(StackLayout::Thunk, xmm[6])]);
|
||||
movaps(xmm13, qword[rsp + offsetof(StackLayout::Thunk, xmm[7])]);
|
||||
movaps(xmm14, qword[rsp + offsetof(StackLayout::Thunk, xmm[8])]);
|
||||
movaps(xmm15, qword[rsp + offsetof(StackLayout::Thunk, xmm[9])]);
|
||||
vmovaps(xmm6, qword[rsp + offsetof(StackLayout::Thunk, xmm[0])]);
|
||||
vmovaps(xmm7, qword[rsp + offsetof(StackLayout::Thunk, xmm[1])]);
|
||||
vmovaps(xmm8, qword[rsp + offsetof(StackLayout::Thunk, xmm[2])]);
|
||||
vmovaps(xmm9, qword[rsp + offsetof(StackLayout::Thunk, xmm[3])]);
|
||||
vmovaps(xmm10, qword[rsp + offsetof(StackLayout::Thunk, xmm[4])]);
|
||||
vmovaps(xmm11, qword[rsp + offsetof(StackLayout::Thunk, xmm[5])]);
|
||||
vmovaps(xmm12, qword[rsp + offsetof(StackLayout::Thunk, xmm[6])]);
|
||||
vmovaps(xmm13, qword[rsp + offsetof(StackLayout::Thunk, xmm[7])]);
|
||||
vmovaps(xmm14, qword[rsp + offsetof(StackLayout::Thunk, xmm[8])]);
|
||||
vmovaps(xmm15, qword[rsp + offsetof(StackLayout::Thunk, xmm[9])]);
|
||||
|
||||
mov(rbx, qword[rsp + offsetof(StackLayout::Thunk, r[0])]);
|
||||
mov(rcx, qword[rsp + offsetof(StackLayout::Thunk, r[1])]);
|
||||
|
|
|
@ -59,9 +59,6 @@ project("xenia-gpu-vulkan-trace-viewer")
|
|||
"xenia-vfs",
|
||||
"xxhash",
|
||||
})
|
||||
flags({
|
||||
"WinMain", -- Use WinMain instead of main.
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
|
|
|
@ -33,9 +33,6 @@ project("xenia-hid-demo")
|
|||
"xenia-ui",
|
||||
"xenia-ui-vulkan",
|
||||
})
|
||||
flags({
|
||||
"WinMain", -- Use WinMain instead of main.
|
||||
})
|
||||
defines({
|
||||
"GLEW_STATIC=1",
|
||||
"GLEW_MX=1",
|
||||
|
|
|
@ -37,9 +37,6 @@ project("xenia-ui-window-vulkan-demo")
|
|||
"xenia-ui-spirv",
|
||||
"xenia-ui-vulkan",
|
||||
})
|
||||
flags({
|
||||
"WinMain", -- Use WinMain instead of main.
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
|
|
|
@ -26,9 +26,6 @@ project("xenia-vfs-dump")
|
|||
"xenia-base",
|
||||
"xenia-vfs",
|
||||
})
|
||||
flags({
|
||||
-- "WinMain", -- Use WinMain instead of main.
|
||||
})
|
||||
defines({})
|
||||
includedirs({
|
||||
project_root.."/third_party/gflags/src",
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 61d799c8f9d1ab8130942b2d9dcd2819b9d8b049
|
||||
Subproject commit 8593bc9480924f0d0724a4533e8de70222e6a08d
|
Binary file not shown.
Binary file not shown.
|
@ -69,9 +69,8 @@ def build_premake():
|
|||
elif sys.platform == 'win32':
|
||||
# Grab Visual Studio version and execute shell to set up environment.
|
||||
vs_version = import_vs_environment()
|
||||
if vs_version != 2015:
|
||||
print('ERROR: Visual Studio 2015 not found!')
|
||||
print('Ensure you have the VS140COMNTOOLS environment variable!')
|
||||
if vs_version is None:
|
||||
print('ERROR: Visual Studio not found!')
|
||||
sys.exit(1)
|
||||
return
|
||||
|
||||
|
@ -143,17 +142,30 @@ def import_vs_environment():
|
|||
A version such as 2015 or None if no VS is found.
|
||||
"""
|
||||
version = 0
|
||||
|
||||
candidate_path = subprocess.check_output('../../third_party/vswhere/vswhere.exe -all -version "[15,)" -latest -format value -property installationPath', shell=False, universal_newlines=True)
|
||||
candidate_path = candidate_path.strip()
|
||||
|
||||
tools_path = ''
|
||||
if 'VS140COMNTOOLS' in os.environ:
|
||||
if candidate_path:
|
||||
tools_path = os.path.join(candidate_path, 'vc\\auxiliary\\build\\vcvarsall.bat')
|
||||
if os.path.isfile(tools_path) and os.access(tools_path, os.X_OK):
|
||||
version = subprocess.check_output('../../third_party/vswhere/vswhere.exe -version "[15,)" -latest -format value -property catalog_productLineVersion', shell=False, universal_newlines=True)
|
||||
version = version.strip()
|
||||
if version:
|
||||
version = int(version)
|
||||
else:
|
||||
version = 2017
|
||||
if version == 0 and 'VS140COMNTOOLS' in os.environ:
|
||||
version = 2015
|
||||
tools_path = os.environ['VS140COMNTOOLS']
|
||||
tools_path = os.path.join(tools_path, '..\\..\\vc\\vcvarsall.bat')
|
||||
if version == 0:
|
||||
return None
|
||||
tools_path = os.path.join(tools_path, '..\\..\\vc\\vcvarsall.bat')
|
||||
|
||||
args = [tools_path, '&&', 'set']
|
||||
args = [tools_path, 'x64', '&&', 'set']
|
||||
popen = subprocess.Popen(
|
||||
args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||
variables, _ = popen.communicate()
|
||||
envvars_to_save = (
|
||||
'devenvdir',
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
require("vstudio")
|
||||
|
||||
include("scripts/build_paths.lua")
|
||||
include("scripts/force_compile_as_c.lua")
|
||||
include("scripts/force_compile_as_cc.lua")
|
||||
|
|
|
@ -7,7 +7,7 @@ build_tools = "tools/build"
|
|||
build_scripts = build_tools .. "/scripts"
|
||||
build_tools_src = build_tools .. "/src"
|
||||
|
||||
if os.is("windows") then
|
||||
if os.istarget("windows") then
|
||||
platform_suffix = "win"
|
||||
else
|
||||
platform_suffix = "posix"
|
||||
|
|
|
@ -21,7 +21,11 @@ if premake.override then
|
|||
-- for msvc
|
||||
premake.override(premake.vstudio.vc2010, "additionalCompileOptions", function(base, cfg, condition)
|
||||
if cfg.abspath and table.contains(forced_c_files, cfg.abspath) then
|
||||
_p(3,'<CompileAs %s>CompileAsC</CompileAs>', condition)
|
||||
if condition == nil or condition == '' then
|
||||
_p(3,'<CompileAs>CompileAsC</CompileAs>')
|
||||
else
|
||||
_p(3,'<CompileAs Condition="\'$(Configuration)|$(Platform)\'==\'%s\'">CompileAsC</CompileAs>', condition)
|
||||
end
|
||||
end
|
||||
return base(cfg, condition)
|
||||
end)
|
||||
|
|
|
@ -21,7 +21,11 @@ if premake.override then
|
|||
-- for msvc
|
||||
premake.override(premake.vstudio.vc2010, "additionalCompileOptions", function(base, cfg, condition)
|
||||
if cfg.abspath and table.contains(forced_cc_files, cfg.abspath) then
|
||||
_p(3,'<CompileAs %s>CompileAsCpp</CompileAs>', condition)
|
||||
if condition == nil or condition == '' then
|
||||
_p(3,'<CompileAs>CompileAsCpp</CompileAs>')
|
||||
else
|
||||
_p(3,'<CompileAs Condition="\'$(Configuration)|$(Platform)\'==\'%s\'">CompileAsCpp</CompileAs>', condition)
|
||||
end
|
||||
end
|
||||
return base(cfg, condition)
|
||||
end)
|
||||
|
|
14
xenia-build
14
xenia-build
|
@ -100,6 +100,11 @@ def import_vs_environment():
|
|||
if candidate_path:
|
||||
tools_path = os.path.join(candidate_path, 'vc\\auxiliary\\build\\vcvarsall.bat')
|
||||
if os.path.isfile(tools_path) and os.access(tools_path, os.X_OK):
|
||||
version = subprocess.check_output('third_party/vswhere/vswhere.exe -version "[15,)" -latest -format value -property catalog_productLineVersion', shell=False, universal_newlines=True)
|
||||
version = version.strip()
|
||||
if version:
|
||||
version = int(version)
|
||||
else:
|
||||
version = 2017
|
||||
if version == 0 and 'VS140COMNTOOLS' in os.environ:
|
||||
version = 2015
|
||||
|
@ -317,16 +322,19 @@ def run_premake(target_os, action, cc=None):
|
|||
target_os: target --os to pass to premake.
|
||||
action: action to preform.
|
||||
"""
|
||||
ret = subprocess.call([
|
||||
args = [
|
||||
sys.executable,
|
||||
os.path.join('tools', 'build', 'premake'),
|
||||
'--file=premake5.lua',
|
||||
'--os=%s' % target_os,
|
||||
'--cc=%s' % ('clang' if not cc else cc),
|
||||
'--test-suite-mode=combined',
|
||||
'--verbose',
|
||||
action,
|
||||
], shell=False)
|
||||
]
|
||||
if cc:
|
||||
args.insert(4, '--cc=%s' % cc)
|
||||
|
||||
ret = subprocess.call(args, shell=False)
|
||||
|
||||
if ret == 0:
|
||||
generate_version_h()
|
||||
|
|
Loading…
Reference in New Issue