Gems/Atom/RHI/Code/Tests/ImageTests.cpp
std::vector<ImageAndViewBindFlags> GenerateIncompatibleImageBindFlagCombinations()
    {
        std::vector<ImageAndViewBindFlags> testCases;
        ImageAndViewBindFlags flags;

        flags.imageBindFlags = RHI::ImageBindFlags::Color;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderRead;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::ShaderRead;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderWrite;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::ShaderRead;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderReadWrite;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::ShaderWrite;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderRead;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::ShaderWrite;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderReadWrite;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::None;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderRead;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::None;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderWrite;
        testCases.push_back(flags);

        flags.imageBindFlags = RHI::ImageBindFlags::None;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderReadWrite;
        testCases.push_back(flags);

        return testCases;
    }
// These combinations should fail during ImageView::Init
These combinations should fail during ImageView::Init
These combinations should fail during ImageView :: Init
std::vector<ImageAndViewBindFlags> GenerateIncompatibleImageBindFlagCombinations()
    {
        std::vector<ImageAndViewBindFlags> testCases;
        ImageAndViewBindFlags flags;
        flags.imageBindFlags = RHI::ImageBindFlags::Color;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderRead;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::ShaderRead;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderWrite;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::ShaderRead;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderReadWrite;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::ShaderWrite;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderRead;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::ShaderWrite;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderReadWrite;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::None;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderRead;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::None;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderWrite;
        testCases.push_back(flags);
        flags.imageBindFlags = RHI::ImageBindFlags::None;
        flags.viewBindFlags = RHI::ImageBindFlags::ShaderReadWrite;
        testCases.push_back(flags);
        return testCases;
    }
std :: vector < ImageAndViewBindFlags > GenerateIncompatibleImageBindFlagCombinations ( ) { std :: vector < ImageAndViewBindFlags > testCases ; ImageAndViewBindFlags flags ; flags . imageBindFlags = RHI :: ImageBindFlags :: Color ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderRead ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: ShaderRead ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderWrite ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: ShaderRead ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderReadWrite ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: ShaderWrite ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderRead ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: ShaderWrite ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderReadWrite ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: None ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderRead ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: None ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderWrite ; testCases . push_back ( flags ) ; flags . imageBindFlags = RHI :: ImageBindFlags :: None ; flags . viewBindFlags = RHI :: ImageBindFlags :: ShaderReadWrite ; testCases . push_back ( flags ) ; return testCases ; }
These combinations should fail during ImageView::Init
These combinations should fail during ImageView :: Init