mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +00:00
Remove 16 bit normalized texture formats
They were removed from the WebGPU spec because they cannot be supported everywhere, for example on recent Qualcomm chips. BUG=dawn:128 Change-Id: I189bd1b34105f215699ddd404341bbee964c8679 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10280 Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
0beb43809a
commit
87ded961ee
@@ -105,13 +105,13 @@ TEST_P(NonzeroTextureCreationTests, NonrenderableTextureFormat) {
|
||||
descriptor.size.depth = 1;
|
||||
descriptor.arrayLayerCount = 1;
|
||||
descriptor.sampleCount = 1;
|
||||
descriptor.format = dawn::TextureFormat::RGBA16Snorm;
|
||||
descriptor.format = dawn::TextureFormat::RGBA8Snorm;
|
||||
descriptor.mipLevelCount = 1;
|
||||
descriptor.usage = dawn::TextureUsageBit::CopySrc;
|
||||
dawn::Texture texture = device.CreateTexture(&descriptor);
|
||||
|
||||
// Set buffer with dirty data so we know it is cleared by the lazy cleared texture copy
|
||||
uint32_t bufferSize = 8 * kSize * kSize;
|
||||
uint32_t bufferSize = 4 * kSize * kSize;
|
||||
std::vector<uint8_t> data(bufferSize, 100);
|
||||
dawn::Buffer bufferDst = utils::CreateBufferFromData(
|
||||
device, data.data(), static_cast<uint32_t>(data.size()), dawn::BufferUsageBit::CopySrc);
|
||||
|
||||
@@ -475,21 +475,6 @@ TEST_P(TextureFormatTest, RGBA8Unorm) {
|
||||
DoUnormTest<uint8_t>({dawn::TextureFormat::RGBA8Unorm, 4, Float, 4});
|
||||
}
|
||||
|
||||
// Test the R16Unorm format
|
||||
TEST_P(TextureFormatTest, R16Unorm) {
|
||||
DoUnormTest<uint16_t>({dawn::TextureFormat::R16Unorm, 2, Float, 1});
|
||||
}
|
||||
|
||||
// Test the RG16Unorm format
|
||||
TEST_P(TextureFormatTest, RG16Unorm) {
|
||||
DoUnormTest<uint16_t>({dawn::TextureFormat::RG16Unorm, 4, Float, 2});
|
||||
}
|
||||
|
||||
// Test the RGBA16Unorm format
|
||||
TEST_P(TextureFormatTest, RGBA16Unorm) {
|
||||
DoUnormTest<uint16_t>({dawn::TextureFormat::RGBA16Unorm, 8, Float, 4});
|
||||
}
|
||||
|
||||
// Test the BGRA8Unorm format
|
||||
TEST_P(TextureFormatTest, BGRA8Unorm) {
|
||||
uint8_t maxValue = std::numeric_limits<uint8_t>::max();
|
||||
@@ -516,21 +501,6 @@ TEST_P(TextureFormatTest, RGBA8Snorm) {
|
||||
DoSnormTest<int8_t>({dawn::TextureFormat::RGBA8Snorm, 4, Float, 4});
|
||||
}
|
||||
|
||||
// Test the R16Snorm format
|
||||
TEST_P(TextureFormatTest, R16Snorm) {
|
||||
DoSnormTest<int16_t>({dawn::TextureFormat::R16Snorm, 2, Float, 1});
|
||||
}
|
||||
|
||||
// Test the RG16Snorm format
|
||||
TEST_P(TextureFormatTest, RG16Snorm) {
|
||||
DoSnormTest<int16_t>({dawn::TextureFormat::RG16Snorm, 4, Float, 2});
|
||||
}
|
||||
|
||||
// Test the RGBA16Snorm format
|
||||
TEST_P(TextureFormatTest, RGBA16Snorm) {
|
||||
DoSnormTest<int16_t>({dawn::TextureFormat::RGBA16Snorm, 8, Float, 4});
|
||||
}
|
||||
|
||||
// Test the R8Uint format
|
||||
TEST_P(TextureFormatTest, R8Uint) {
|
||||
// TODO(cwallez@chromium.org): This fails on the Intel GL driver, understand why.
|
||||
|
||||
@@ -87,7 +87,7 @@ class TextureZeroInitTest : public DawnTest {
|
||||
constexpr static dawn::TextureFormat kDepthStencilFormat =
|
||||
dawn::TextureFormat::Depth24PlusStencil8;
|
||||
constexpr static dawn::TextureFormat kNonrenderableColorFormat =
|
||||
dawn::TextureFormat::RGBA16Snorm;
|
||||
dawn::TextureFormat::RGBA8Snorm;
|
||||
};
|
||||
|
||||
// This tests that the code path of CopyTextureToBuffer clears correctly to Zero after first usage
|
||||
@@ -575,7 +575,7 @@ TEST_P(TextureZeroInitTest, NonRenderableTextureClear) {
|
||||
dawn::Texture texture = device.CreateTexture(&descriptor);
|
||||
|
||||
// Set buffer with dirty data so we know it is cleared by the lazy cleared texture copy
|
||||
uint32_t bufferSize = 8 * kSize * kSize;
|
||||
uint32_t bufferSize = 4 * kSize * kSize;
|
||||
std::vector<uint8_t> data(bufferSize, 100);
|
||||
dawn::Buffer bufferDst = utils::CreateBufferFromData(
|
||||
device, data.data(), static_cast<uint32_t>(data.size()), dawn::BufferUsageBit::CopySrc);
|
||||
|
||||
@@ -248,8 +248,6 @@ TEST_F(TextureValidationTest, NonRenderableAndOutputAttachment) {
|
||||
dawn::TextureFormat nonRenderableFormats[] = {
|
||||
dawn::TextureFormat::RG11B10Float, dawn::TextureFormat::R8Snorm,
|
||||
dawn::TextureFormat::RG8Snorm, dawn::TextureFormat::RGBA8Snorm,
|
||||
dawn::TextureFormat::R16Snorm, dawn::TextureFormat::RG16Snorm,
|
||||
dawn::TextureFormat::RGBA16Snorm,
|
||||
};
|
||||
|
||||
for (dawn::TextureFormat format : nonRenderableFormats) {
|
||||
|
||||
Reference in New Issue
Block a user