Only check for image load/store if sampling type is 2.

uniform texture2D is sampling type 1.
This commit is contained in:
Hans-Kristian Arntzen 2016-09-10 13:00:07 +02:00
parent b6847168b2
commit 32b463f740

View File

@ -1005,7 +1005,7 @@ void CompilerGLSL::emit_interface_block(const SPIRVariable &var)
void CompilerGLSL::emit_uniform(const SPIRVariable &var)
{
auto &type = get<SPIRType>(var.basetype);
if (type.basetype == SPIRType::Image)
if (type.basetype == SPIRType::Image && type.image.sampled == 2)
{
if (!options.es && options.version < 420)
require_extension("GL_ARB_shader_image_load_store");