10 changed files with 398 additions and 260 deletions
-
7src/shader_recompiler/backend/glsl/emit_context.cpp
-
43src/shader_recompiler/backend/glsl/emit_context.h
-
13src/shader_recompiler/backend/glsl/emit_glsl_bitwise_conversion.cpp
-
237src/shader_recompiler/backend/glsl/emit_glsl_composite.cpp
-
10src/shader_recompiler/backend/glsl/emit_glsl_instructions.h
-
51src/shader_recompiler/backend/glsl/emit_glsl_integer.cpp
-
214src/shader_recompiler/backend/glsl/emit_glsl_not_implemented.cpp
-
61src/shader_recompiler/backend/glsl/emit_glsl_select.cpp
-
19src/shader_recompiler/backend/glsl/reg_alloc.cpp
-
3src/shader_recompiler/backend/glsl/reg_alloc.h
@ -0,0 +1,237 @@ |
|||
// Copyright 2021 yuzu Emulator Project
|
|||
// Licensed under GPLv2 or any later version
|
|||
// Refer to the license.txt file included.
|
|||
|
|||
#include <string_view>
|
|||
|
|||
#include "shader_recompiler/backend/glsl/emit_context.h"
|
|||
#include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
|
|||
#include "shader_recompiler/frontend/ir/value.h"
|
|||
#include "shader_recompiler/profile.h"
|
|||
|
|||
namespace Shader::Backend::GLSL { |
|||
void EmitCompositeConstructU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2) { |
|||
ctx.AddU32x2("{}=uvec2({},{});", inst, e1, e2); |
|||
} |
|||
|
|||
void EmitCompositeConstructU32x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2, |
|||
[[maybe_unused]] std::string_view e3) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructU32x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2, |
|||
[[maybe_unused]] std::string_view e3, |
|||
[[maybe_unused]] std::string_view e4) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractU32x2([[maybe_unused]] EmitContext& ctx, IR::Inst& inst, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
ctx.AddU32("{}={}[{}];", inst, composite, index); |
|||
} |
|||
|
|||
void EmitCompositeExtractU32x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractU32x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertU32x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertU32x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertU32x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF16x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF16x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2, |
|||
[[maybe_unused]] std::string_view e3) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF16x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2, |
|||
[[maybe_unused]] std::string_view e3, |
|||
[[maybe_unused]] std::string_view e4) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF16x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF16x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF16x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF16x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF16x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF16x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF32x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF32x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2, |
|||
[[maybe_unused]] std::string_view e3) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF32x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view e1, |
|||
[[maybe_unused]] std::string_view e2, |
|||
[[maybe_unused]] std::string_view e3, |
|||
[[maybe_unused]] std::string_view e4) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF32x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF32x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF32x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF32x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF32x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF32x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF64x2([[maybe_unused]] EmitContext& ctx) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF64x3([[maybe_unused]] EmitContext& ctx) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeConstructF64x4([[maybe_unused]] EmitContext& ctx) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF64x2([[maybe_unused]] EmitContext& ctx) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF64x3([[maybe_unused]] EmitContext& ctx) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeExtractF64x4([[maybe_unused]] EmitContext& ctx) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF64x2([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF64x3([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitCompositeInsertF64x4([[maybe_unused]] EmitContext& ctx, |
|||
[[maybe_unused]] std::string_view composite, |
|||
[[maybe_unused]] std::string_view object, |
|||
[[maybe_unused]] u32 index) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
} // namespace Shader::Backend::GLSL
|
|||
@ -0,0 +1,61 @@ |
|||
// Copyright 2021 yuzu Emulator Project
|
|||
// Licensed under GPLv2 or any later version
|
|||
// Refer to the license.txt file included.
|
|||
|
|||
#include <string_view>
|
|||
|
|||
#include "shader_recompiler/backend/glsl/emit_context.h"
|
|||
#include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
|
|||
#include "shader_recompiler/frontend/ir/value.h"
|
|||
#include "shader_recompiler/profile.h"
|
|||
|
|||
namespace Shader::Backend::GLSL { |
|||
void EmitSelectU1([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectU8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectU16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectU32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectU64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectF16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectF32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
void EmitSelectF64([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] std::string_view cond, |
|||
[[maybe_unused]] std::string_view true_value, |
|||
[[maybe_unused]] std::string_view false_value) { |
|||
throw NotImplementedException("GLSL Instruction"); |
|||
} |
|||
|
|||
} // namespace Shader::Backend::GLSL
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue