#include "GLSLANG/ShaderLang.h"
#include "angle_gl.h"
#include "compiler/translator/StaticType.h"
#include "gtest/gtest.h"
#include "tests/test_utils/ShaderCompileTreeTest.h"
#include "tests/test_utils/compiler_test.h"
usingnamespacesh;
namespace
{
void CheckImageStoreCall(TIntermNode *astRoot,
const TString &imageStoreMangledName,
TBasicType imageType,
int storeLocationNominalSize,
TBasicType storeValueType,
int storeValueNominalSize)
{ … }
void CheckImageLoadCall(TIntermNode *astRoot,
const TString &imageLoadMangledName,
TBasicType imageType,
int loadLocationNominalSize)
{ … }
void CheckExportedImageUniform(const std::vector<sh::ShaderVariable> &uniforms,
size_t uniformIndex,
::GLenum imageTypeGL,
const TString &imageName)
{ … }
void CheckImageDeclaration(TIntermNode *astRoot,
const ImmutableString &imageName,
TBasicType imageType,
TLayoutImageInternalFormat internalFormat,
bool readonly,
bool writeonly,
bool coherent,
bool restrictQualifier,
bool volatileQualifier,
int binding)
{ … }
}
class ShaderImageTest : public ShaderCompileTreeTest
{ … };
TEST_F(ShaderImageTest, Image2DDeclaration)
{ … }
TEST_F(ShaderImageTest, Image3DDeclaration)
{ … }
TEST_F(ShaderImageTest, ImageLoad)
{ … }
TEST_F(ShaderImageTest, ImageStore)
{ … }
TEST_F(ShaderImageTest, ImageMemoryQualifiers)
{ … }