emit_glsl_context_get_set.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. // Copyright 2021 yuzu Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include <string_view>
  5. #include "shader_recompiler/backend/glsl/emit_context.h"
  6. #include "shader_recompiler/backend/glsl/emit_glsl_instructions.h"
  7. #include "shader_recompiler/frontend/ir/value.h"
  8. #include "shader_recompiler/profile.h"
  9. namespace Shader::Backend::GLSL {
  10. void EmitGetCbufU8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  11. [[maybe_unused]] const IR::Value& offset) {
  12. throw NotImplementedException("GLSL");
  13. }
  14. void EmitGetCbufS8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  15. [[maybe_unused]] const IR::Value& offset) {
  16. throw NotImplementedException("GLSL");
  17. }
  18. void EmitGetCbufU16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  19. [[maybe_unused]] const IR::Value& offset) {
  20. throw NotImplementedException("GLSL");
  21. }
  22. void EmitGetCbufS16([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  23. [[maybe_unused]] const IR::Value& offset) {
  24. throw NotImplementedException("GLSL");
  25. }
  26. void EmitGetCbufU32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  27. [[maybe_unused]] const IR::Value& offset) {
  28. const auto var{ctx.AllocVar()};
  29. ctx.Add("uint {} = c{}[{}];", var, binding.U32(), offset.U32());
  30. }
  31. void EmitGetCbufF32([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  32. [[maybe_unused]] const IR::Value& offset) {
  33. throw NotImplementedException("GLSL");
  34. }
  35. void EmitGetCbufU32x2([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] const IR::Value& binding,
  36. [[maybe_unused]] const IR::Value& offset) {
  37. throw NotImplementedException("GLSL");
  38. }
  39. } // namespace Shader::Backend::GLSL