From 7038c66ab2b9b7a8a90a56b8764ee37f9e70f936 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Mon, 23 Aug 2021 16:53:55 -0300 Subject: [PATCH] Hook up missing reflection data for writable textures in compute --- src/modules/graphics/opengl/Shader.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/graphics/opengl/Shader.cpp b/src/modules/graphics/opengl/Shader.cpp index d68d95563..7abd4e2d1 100644 --- a/src/modules/graphics/opengl/Shader.cpp +++ b/src/modules/graphics/opengl/Shader.cpp @@ -160,6 +160,13 @@ void Shader::mapActiveUniforms() } else if (u.baseType == UNIFORM_STORAGETEXTURE) { + const auto reflectionit = validationReflection.storageTextures.find(u.name); + if (reflectionit != validationReflection.storageTextures.end()) + { + u.storageTextureFormat = reflectionit->second.format; + u.access = reflectionit->second.access; + } + StorageTextureBinding binding = {}; binding.gltexture = gl.getDefaultTexture(u.textureType, u.dataBaseType); binding.type = u.textureType;