Implement GL_EXT_shader_image_load_formatted

This commit is contained in:
Jason Ekstrand 2017-02-16 20:35:17 -08:00
parent d950283324
commit f44d89a398
8 changed files with 444 additions and 12 deletions

View file

@ -4499,8 +4499,11 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
}
}
}
} else if (type.isImage() && ! qualifier.writeonly)
error(loc, "image variables not declared 'writeonly' must have a format layout qualifier", "", "");
} else if (type.isImage() && ! qualifier.writeonly) {
const char *explanation = "image variables declared 'writeonly' without a format layout qualifier";
requireProfile(loc, ECoreProfile | ECompatibilityProfile, explanation);
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation);
}
if (qualifier.layoutPushConstant && type.getBasicType() != EbtBlock)
error(loc, "can only be used with a block", "push_constant", "");