summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl/emit_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_context.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp
index 8de33b582..2a5ec7414 100644
--- a/src/shader_recompiler/backend/glsl/emit_context.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_context.cpp
@@ -126,6 +126,8 @@ EmitContext::EmitContext(IR::Program& program, Bindings& bindings, const Profile
126void EmitContext::SetupExtensions(std::string&) { 126void EmitContext::SetupExtensions(std::string&) {
127 // TODO: track this usage 127 // TODO: track this usage
128 header += "#extension GL_ARB_sparse_texture2 : enable\n"; 128 header += "#extension GL_ARB_sparse_texture2 : enable\n";
129 header += "#extension GL_ARB_shader_viewport_layer_array : enable\n";
130 header += "#extension GL_NV_viewport_array2 : enable\n";
129 header += "#extension GL_EXT_texture_shadow_lod : enable\n"; 131 header += "#extension GL_EXT_texture_shadow_lod : enable\n";
130 if (info.uses_int64) { 132 if (info.uses_int64) {
131 header += "#extension GL_ARB_gpu_shader_int64 : enable\n"; 133 header += "#extension GL_ARB_gpu_shader_int64 : enable\n";
@@ -243,9 +245,13 @@ void EmitContext::SetupImages(Bindings& bindings) {
243 } 245 }
244 texture_buffer_bindings.reserve(info.texture_buffer_descriptors.size()); 246 texture_buffer_bindings.reserve(info.texture_buffer_descriptors.size());
245 for (const auto& desc : info.texture_buffer_descriptors) { 247 for (const auto& desc : info.texture_buffer_descriptors) {
246 throw NotImplementedException("TextureType::Buffer");
247
248 texture_buffer_bindings.push_back(bindings.texture); 248 texture_buffer_bindings.push_back(bindings.texture);
249 const auto sampler_type{SamplerType(TextureType::Buffer, false)};
250 const auto indices{bindings.texture + desc.count};
251 for (u32 index = bindings.texture; index < indices; ++index) {
252 header += fmt::format("layout(binding={}) uniform {} tex{};", bindings.texture,
253 sampler_type, index);
254 }
249 bindings.texture += desc.count; 255 bindings.texture += desc.count;
250 } 256 }
251 texture_bindings.reserve(info.texture_descriptors.size()); 257 texture_bindings.reserve(info.texture_descriptors.size());