summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/glsl/emit_context.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-05-29 07:06:29 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:36 +0200
commit55e0211a5e520482246273f2cc64388c4b4eff1c (patch)
tree1ae4461b0384924e90d2bdbaebcec1b57fdcabcd /src/shader_recompiler/backend/glsl/emit_context.cpp
parentglsl: Rework Shuffle emit instructions to align with SPIR-V (diff)
downloadyuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.tar
yuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.tar.gz
yuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.tar.bz2
yuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.tar.lz
yuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.tar.xz
yuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.tar.zst
yuzu-55e0211a5e520482246273f2cc64388c4b4eff1c.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_context.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp
index db62ba73b..eb1d8266f 100644
--- a/src/shader_recompiler/backend/glsl/emit_context.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_context.cpp
@@ -23,6 +23,10 @@ std::string_view InterpDecorator(Interpolation interp) {
std::string_view SamplerType(TextureType type) {
switch (type) {
+ case TextureType::Color1D:
+ return "sampler1D";
+ case TextureType::ColorArray1D:
+ return "sampler1DArray";
case TextureType::Color2D:
return "sampler2D";
case TextureType::ColorArray2D:
@@ -31,6 +35,10 @@ std::string_view SamplerType(TextureType type) {
return "sampler3D";
case TextureType::ColorCube:
return "samplerCube";
+ case TextureType::ColorArrayCube:
+ return "samplerCubeArray";
+ case TextureType::Buffer:
+ return "samplerBuffer";
default:
fmt::print("Texture type: {}", type);
throw NotImplementedException("Texture type: {}", type);
@@ -101,6 +109,7 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
void EmitContext::SetupExtensions(std::string&) {
header += "#extension GL_ARB_separate_shader_objects : enable\n";
+ header += "#extension GL_ARB_sparse_texture2 : enable\n";
// header += "#extension GL_ARB_texture_cube_map_array : enable\n";
if (info.uses_int64) {
header += "#extension GL_ARB_gpu_shader_int64 : enable\n";