spirv headers and compiler skeleton.
This commit is contained in:
51
src/xenia/gpu/spirv/premake5.lua
Normal file
51
src/xenia/gpu/spirv/premake5.lua
Normal file
@@ -0,0 +1,51 @@
|
||||
project_root = "../../../.."
|
||||
include(project_root.."/build_tools")
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-spirv")
|
||||
uuid("e8a9f997-39ff-4ae2-803f-937525ad4bfb")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/build_tools/third_party/gflags/src",
|
||||
})
|
||||
local_platform_files()
|
||||
|
||||
group("src")
|
||||
project("xenia-gpu-spirv-compiler")
|
||||
uuid("ad76d3e4-4c62-439b-a0f6-f83fcf0e83c5")
|
||||
kind("ConsoleApp")
|
||||
language("C++")
|
||||
links({
|
||||
"gflags",
|
||||
"xenia-base",
|
||||
"xenia-gpu",
|
||||
"xenia-gpu-spirv",
|
||||
})
|
||||
defines({
|
||||
})
|
||||
includedirs({
|
||||
project_root.."/build_tools/third_party/gflags/src",
|
||||
})
|
||||
files({
|
||||
"spirv_compiler_main.cc",
|
||||
"../../base/main_"..platform_suffix..".cc",
|
||||
})
|
||||
|
||||
filter("platforms:Windows")
|
||||
-- Only create the .user file if it doesn't already exist.
|
||||
local user_file = project_root.."/build/xenia-gpu-spirv-compiler.vcxproj.user"
|
||||
if not os.isfile(user_file) then
|
||||
debugdir(project_root)
|
||||
debugargs({
|
||||
"--flagfile=scratch/flags.txt",
|
||||
"2>&1",
|
||||
"1>scratch/stdout-spirv-compiler.txt",
|
||||
})
|
||||
end
|
||||
20
src/xenia/gpu/spirv/spirv_compiler.cc
Normal file
20
src/xenia/gpu/spirv/spirv_compiler.cc
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/gpu/spirv/spirv_compiler.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace spirv {
|
||||
|
||||
//
|
||||
|
||||
} // namespace spirv
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
23
src/xenia/gpu/spirv/spirv_compiler.h
Normal file
23
src/xenia/gpu/spirv/spirv_compiler.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_GPU_SPIRV_SPIRV_COMPILER_H_
|
||||
#define XENIA_GPU_SPIRV_SPIRV_COMPILER_H_
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace spirv {
|
||||
|
||||
//
|
||||
|
||||
} // namespace spirv
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_GPU_SPIRV_SPIRV_COMPILER_H_
|
||||
33
src/xenia/gpu/spirv/spirv_compiler_main.cc
Normal file
33
src/xenia/gpu/spirv/spirv_compiler_main.cc
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include <gflags/gflags.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/main.h"
|
||||
#include "xenia/base/string.h"
|
||||
#include "xenia/gpu/spirv/spirv_compiler.h"
|
||||
#include "xenia/gpu/spirv/spirv_util.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace spirv {
|
||||
|
||||
int compiler_main(const std::vector<std::wstring>& args) { return 0; }
|
||||
|
||||
} // namespace spirv
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
DEFINE_ENTRY_POINT(L"xenia-gpu-spirv-compiler",
|
||||
L"xenia-gpu-spirv-compiler shader.bin",
|
||||
xe::gpu::spirv::compiler_main);
|
||||
20
src/xenia/gpu/spirv/spirv_util.cc
Normal file
20
src/xenia/gpu/spirv/spirv_util.cc
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#include "xenia/gpu/spirv/spirv_util.h"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace spirv {
|
||||
|
||||
//
|
||||
|
||||
} // namespace spirv
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
26
src/xenia/gpu/spirv/spirv_util.h
Normal file
26
src/xenia/gpu/spirv/spirv_util.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* Xenia : Xbox 360 Emulator Research Project *
|
||||
******************************************************************************
|
||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef XENIA_GPU_SPIRV_SPIRV_UTIL_H_
|
||||
#define XENIA_GPU_SPIRV_SPIRV_UTIL_H_
|
||||
|
||||
#include "third_party/spirv/GLSL.std.450.hpp11"
|
||||
#include "third_party/spirv/spirv.hpp11"
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
namespace spirv {
|
||||
|
||||
//
|
||||
|
||||
} // namespace spirv
|
||||
} // namespace gpu
|
||||
} // namespace xe
|
||||
|
||||
#endif // XENIA_GPU_SPIRV_SPIRV_UTIL_H_
|
||||
Reference in New Issue
Block a user