Fixup readability/check issues.
This CL fixes a few readability/check issues and enables the lint. Bug: dawn:1339 Change-Id: I09950e8c3822d77a4ddaea6629b35b8fed4232cc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86869 Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
9676fc66e8
commit
92bef59295
|
@ -2,7 +2,6 @@ filter=-build/include_order
|
|||
filter=-build/include_what_you_use
|
||||
filter=-build/namespaces
|
||||
filter=-readability/casting
|
||||
filter=-readability/check
|
||||
filter=-readability/namespace
|
||||
filter=-readability/todo
|
||||
filter=-runtime/arrays
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace {
|
|||
// Check that the union of the copy regions exactly covers the texture region
|
||||
void ValidateTextureBounds(const TextureSpec& textureSpec,
|
||||
const TextureCopySubresource& copySplit) {
|
||||
ASSERT_TRUE(copySplit.count > 0);
|
||||
ASSERT_GT(copySplit.count, 0u);
|
||||
|
||||
uint32_t minX = copySplit.copies[0].textureOffset.x;
|
||||
uint32_t minY = copySplit.copies[0].textureOffset.y;
|
||||
|
@ -190,7 +190,7 @@ namespace {
|
|||
const BufferSpec& bufferSpec,
|
||||
const TextureCopySubresource& copySplit,
|
||||
wgpu::TextureDimension dimension) {
|
||||
ASSERT_TRUE(copySplit.count > 0);
|
||||
ASSERT_GT(copySplit.count, 0u);
|
||||
|
||||
uint32_t texelsPerBlock = textureSpec.blockWidth * textureSpec.blockHeight;
|
||||
for (uint32_t i = 0; i < copySplit.count; ++i) {
|
||||
|
|
|
@ -88,8 +88,9 @@ TEST_P(D3D12ResourceHeapTests, AlignUBO) {
|
|||
wgpu::Buffer buffer = device.CreateBuffer(&descriptor);
|
||||
Buffer* d3dBuffer = reinterpret_cast<Buffer*>(buffer.Get());
|
||||
|
||||
EXPECT_TRUE((d3dBuffer->GetD3D12Resource()->GetDesc().Width %
|
||||
static_cast<uint64_t>(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT)) == 0u);
|
||||
EXPECT_EQ((d3dBuffer->GetD3D12Resource()->GetDesc().Width %
|
||||
static_cast<uint64_t>(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT)),
|
||||
0u);
|
||||
|
||||
// Create a larger UBO
|
||||
descriptor.size = (4 * 1024 * 1024) + 255;
|
||||
|
@ -98,8 +99,9 @@ TEST_P(D3D12ResourceHeapTests, AlignUBO) {
|
|||
buffer = device.CreateBuffer(&descriptor);
|
||||
d3dBuffer = reinterpret_cast<Buffer*>(buffer.Get());
|
||||
|
||||
EXPECT_TRUE((d3dBuffer->GetD3D12Resource()->GetDesc().Width %
|
||||
static_cast<uint64_t>(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT)) == 0u);
|
||||
EXPECT_EQ((d3dBuffer->GetD3D12Resource()->GetDesc().Width %
|
||||
static_cast<uint64_t>(D3D12_CONSTANT_BUFFER_DATA_PLACEMENT_ALIGNMENT)),
|
||||
0u);
|
||||
}
|
||||
|
||||
DAWN_INSTANTIATE_TEST(D3D12ResourceHeapTests, D3D12Backend());
|
||||
|
|
Loading…
Reference in New Issue