Mostly complete new GLSL translator (modulo flow control).
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "xenia/base/logging.h"
|
||||
#include "xenia/base/main.h"
|
||||
#include "xenia/base/string.h"
|
||||
#include "xenia/gpu/glsl_shader_translator.h"
|
||||
#include "xenia/gpu/shader_translator.h"
|
||||
#include "xenia/gpu/spirv_shader_translator.h"
|
||||
#include "xenia/ui/spirv/spirv_disassembler.h"
|
||||
@@ -25,7 +26,7 @@ DEFINE_string(shader_input_type, "",
|
||||
"'vs', 'ps', or unspecified to infer from the given filename.");
|
||||
DEFINE_string(shader_output, "", "Output shader file path.");
|
||||
DEFINE_string(shader_output_type, "ucode",
|
||||
"Translator to use: [ucode, spirv, spirvtext].");
|
||||
"Translator to use: [ucode, glsl45, spirv, spirvtext].");
|
||||
|
||||
namespace xe {
|
||||
namespace gpu {
|
||||
@@ -82,6 +83,9 @@ int shader_compiler_main(const std::vector<std::wstring>& args) {
|
||||
if (FLAGS_shader_output_type == "spirv" ||
|
||||
FLAGS_shader_output_type == "spirvtext") {
|
||||
translator = std::make_unique<SpirvShaderTranslator>();
|
||||
} else if (FLAGS_shader_output_type == "glsl45") {
|
||||
translator = std::make_unique<GlslShaderTranslator>(
|
||||
GlslShaderTranslator::Dialect::kGL45);
|
||||
} else {
|
||||
translator = std::make_unique<UcodeShaderTranslator>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user