Formalize cubemap skybox pipeline across backends

This commit is contained in:
2026-04-06 01:37:04 +08:00
parent 66a6818b89
commit f014ae6e6f
24 changed files with 549 additions and 196 deletions

View File

@@ -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