Merge pull request #300 from ben-clayton/image-load-store

Require GL_ARB_shader_image_load_store extension.
This commit is contained in:
Hans-Kristian Arntzen 2017-10-09 12:50:26 +02:00 committed by GitHub
commit 4263956c02

View File

@ -349,13 +349,19 @@ void CompilerGLSL::emit_header()
auto &execution = get_entry_point();
statement("#version ", options.version, options.es && options.version > 100 ? " es" : "");
if (!options.es && options.version < 420)
{
// Needed for binding = # on UBOs, etc.
if (!options.es && options.version < 420 && options.enable_420pack_extension)
if (options.enable_420pack_extension)
{
statement("#ifdef GL_ARB_shading_language_420pack");
statement("#extension GL_ARB_shading_language_420pack : require");
statement("#endif");
}
// Needed for: layout(early_fragment_tests) in;
if (execution.flags & (1ull << ExecutionModeEarlyFragmentTests))
require_extension("GL_ARB_shader_image_load_store");
}
for (auto &ext : forced_extensions)
statement("#extension ", ext, " : require");