spirv headers and compiler skeleton.

This commit is contained in:
Ben Vanik
2015-11-21 11:22:24 -08:00
parent 4b5d2edbe0
commit add68c3743
9 changed files with 1182 additions and 0 deletions

View 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

View 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

View 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_

View 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);

View 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

View 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_