Formalize cubemap skybox pipeline across backends
This commit is contained in:
@@ -34,4 +34,30 @@ TEST(Texture, IsValid) {
|
||||
EXPECT_FALSE(texture.IsValid());
|
||||
}
|
||||
|
||||
TEST(Texture, CreatePreservesExplicitTextureCubeArraySize) {
|
||||
Texture texture;
|
||||
const unsigned char pixels[6 * 4] = {
|
||||
255, 255, 255, 255,
|
||||
255, 255, 255, 255,
|
||||
255, 255, 255, 255,
|
||||
255, 255, 255, 255,
|
||||
255, 255, 255, 255,
|
||||
255, 255, 255, 255
|
||||
};
|
||||
|
||||
ASSERT_TRUE(texture.Create(
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
TextureType::TextureCube,
|
||||
TextureFormat::RGBA8_UNORM,
|
||||
pixels,
|
||||
sizeof(pixels),
|
||||
6));
|
||||
EXPECT_EQ(texture.GetTextureType(), TextureType::TextureCube);
|
||||
EXPECT_EQ(texture.GetArraySize(), 6u);
|
||||
EXPECT_EQ(texture.GetPixelDataSize(), sizeof(pixels));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user