emit_glsl_undefined.cpp 776 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
  5. #include "shader_recompiler/backend/glsl/glsl_emit_context.h"
  6. namespace Shader::Backend::GLSL {
  7. void EmitUndefU1(EmitContext& ctx, IR::Inst& inst) {
  8. ctx.AddU1("{}=false;", inst);
  9. }
  10. void EmitUndefU8(EmitContext& ctx, IR::Inst& inst) {
  11. ctx.AddU32("{}=0u;", inst);
  12. }
  13. void EmitUndefU16(EmitContext& ctx, IR::Inst& inst) {
  14. ctx.AddU32("{}=0u;", inst);
  15. }
  16. void EmitUndefU32(EmitContext& ctx, IR::Inst& inst) {
  17. ctx.AddU32("{}=0u;", inst);
  18. }
  19. void EmitUndefU64(EmitContext& ctx, IR::Inst& inst) {
  20. ctx.AddU64("{}=0u;", inst);
  21. }
  22. } // namespace Shader::Backend::GLSL