Browse Source

Hook up missing reflection data for writable textures in compute

Alex Szpakowski 4 years ago
parent
commit
7038c66ab2
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/modules/graphics/opengl/Shader.cpp

+ 7 - 0
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;