Suppress MaxLimitTests.MaxBufferBindingSize on Linux/Vulkan/Nvidia.

- The test was failing on the google3 TAP bots.
- Also adjusts the size so that it is the aligned min given the limit,
  not just the aligned limit since that can be larger than the limit.

Bug: dawn:1217
Change-Id: I02a68d14d61099dc5c1a2450cbaadc2320f5b8a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110760
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This commit is contained in:
Loko Kung 2022-11-18 00:46:38 +00:00 committed by Dawn LUCI CQ
parent ea12bfae75
commit e956a04daf
1 changed files with 6 additions and 5 deletions

View File

@ -110,6 +110,7 @@ TEST_P(MaxLimitTests, MaxBufferBindingSize) {
// TODO(crbug.com/dawn/1217): Remove this suppression. // TODO(crbug.com/dawn/1217): Remove this suppression.
DAWN_SUPPRESS_TEST_IF(IsWindows() && IsVulkan() && IsNvidia()); DAWN_SUPPRESS_TEST_IF(IsWindows() && IsVulkan() && IsNvidia());
DAWN_SUPPRESS_TEST_IF(IsLinux() && IsVulkan() && IsNvidia());
// TODO(dawn:1549) Fails on Qualcomm-based Android devices. // TODO(dawn:1549) Fails on Qualcomm-based Android devices.
DAWN_SUPPRESS_TEST_IF(IsAndroid() && IsQualcomm()); DAWN_SUPPRESS_TEST_IF(IsAndroid() && IsQualcomm());
@ -192,7 +193,8 @@ TEST_P(MaxLimitTests, MaxBufferBindingSize) {
device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory); device.PushErrorScope(wgpu::ErrorFilter::OutOfMemory);
wgpu::BufferDescriptor bufDesc; wgpu::BufferDescriptor bufDesc;
bufDesc.size = Align(maxBufferBindingSize, 4); uint64_t bufferSize = Align(maxBufferBindingSize - 3u, 4);
bufDesc.size = bufferSize;
bufDesc.usage = usage | wgpu::BufferUsage::CopyDst; bufDesc.usage = usage | wgpu::BufferUsage::CopyDst;
wgpu::Buffer buffer = device.CreateBuffer(&bufDesc); wgpu::Buffer buffer = device.CreateBuffer(&bufDesc);
@ -213,7 +215,7 @@ TEST_P(MaxLimitTests, MaxBufferBindingSize) {
queue.WriteBuffer(buffer, 0, &value0, sizeof(value0)); queue.WriteBuffer(buffer, 0, &value0, sizeof(value0));
uint32_t value1 = 234; uint32_t value1 = 234;
uint64_t value1Offset = Align(maxBufferBindingSize - sizeof(value1), 4); uint64_t value1Offset = Align(bufferSize - sizeof(value1), 4);
queue.WriteBuffer(buffer, value1Offset, &value1, sizeof(value1)); queue.WriteBuffer(buffer, value1Offset, &value1, sizeof(value1));
wgpu::ComputePipelineDescriptor csDesc; wgpu::ComputePipelineDescriptor csDesc;
@ -234,10 +236,9 @@ TEST_P(MaxLimitTests, MaxBufferBindingSize) {
queue.Submit(1, &commands); queue.Submit(1, &commands);
EXPECT_BUFFER_U32_EQ(value0, resultBuffer, 0) EXPECT_BUFFER_U32_EQ(value0, resultBuffer, 0)
<< "maxBufferBindingSize=" << maxBufferBindingSize << "; offset=" << 0 << "maxBufferBindingSize=" << bufferSize << "; offset=" << 0 << "; usage=" << usage;
<< "; usage=" << usage;
EXPECT_BUFFER_U32_EQ(value1, resultBuffer, 4) EXPECT_BUFFER_U32_EQ(value1, resultBuffer, 4)
<< "maxBufferBindingSize=" << maxBufferBindingSize << "; offset=" << value1Offset << "maxBufferBindingSize=" << bufferSize << "; offset=" << value1Offset
<< "; usage=" << usage; << "; usage=" << usage;
} }
} }