Enable -Wunused-but-set-variable.
Bug: chromium:1203071 Change-Id: I73e58baa9a581bfc72f191184998d68dba9941d6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59720 Auto-Submit: Peter Kasting <pkasting@google.com> Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
08a3900522
commit
7e50a7fad3
|
@ -120,6 +120,7 @@ config("dawn_internal") {
|
|||
"-Wstrict-prototypes",
|
||||
"-Wtautological-unsigned-zero-compare",
|
||||
"-Wunreachable-code-aggressive",
|
||||
"-Wunused-but-set-variable",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
|
|
|
@ -59,6 +59,7 @@ namespace dawn_native {
|
|||
|
||||
const Format* format;
|
||||
DAWN_TRY_ASSIGN(format, device->GetInternalFormat(descriptor->format));
|
||||
DAWN_UNUSED(format);
|
||||
|
||||
switch (descriptor->format) {
|
||||
case wgpu::TextureFormat::RGBA8Unorm:
|
||||
|
|
|
@ -393,13 +393,11 @@ namespace dawn_native {
|
|||
ASSERT(mipLevel < mMipLevelCount);
|
||||
|
||||
// Fastest path, the aspect is compressed!
|
||||
uint32_t dataIndex = aspectIndex * mArrayLayerCount * mMipLevelCount;
|
||||
if (mAspectCompressed[aspectIndex]) {
|
||||
return DataInline(aspectIndex);
|
||||
}
|
||||
|
||||
// Fast path, the array layer is compressed.
|
||||
dataIndex += arrayLayer * mMipLevelCount;
|
||||
if (LayerCompressed(aspectIndex, arrayLayer)) {
|
||||
return Data(aspectIndex, arrayLayer);
|
||||
}
|
||||
|
|
|
@ -987,7 +987,6 @@ namespace dawn_native { namespace d3d12 {
|
|||
BindGroupStateTracker* bindingTracker,
|
||||
const ComputePassResourceUsage& resourceUsages) {
|
||||
uint64_t currentDispatch = 0;
|
||||
PipelineLayout* lastLayout = nullptr;
|
||||
ID3D12GraphicsCommandList* commandList = commandContext->GetCommandList();
|
||||
|
||||
Command type;
|
||||
|
@ -1035,8 +1034,6 @@ namespace dawn_native { namespace d3d12 {
|
|||
commandList->SetPipelineState(pipeline->GetPipelineState());
|
||||
|
||||
bindingTracker->OnSetPipeline(pipeline);
|
||||
|
||||
lastLayout = layout;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -184,6 +184,7 @@ namespace dawn_native { namespace d3d12 {
|
|||
uint64_t bytesEvicted;
|
||||
DAWN_TRY_ASSIGN(bytesEvicted,
|
||||
EnsureCanMakeResident(allocationSize, GetMemorySegmentInfo(memorySegment)));
|
||||
DAWN_UNUSED(bytesEvicted);
|
||||
|
||||
return {};
|
||||
}
|
||||
|
@ -298,6 +299,7 @@ namespace dawn_native { namespace d3d12 {
|
|||
ID3D12Pageable** allocations) {
|
||||
uint64_t bytesEvicted;
|
||||
DAWN_TRY_ASSIGN(bytesEvicted, EnsureCanMakeResident(sizeToMakeResident, segment));
|
||||
DAWN_UNUSED(bytesEvicted);
|
||||
|
||||
// Note that MakeResident is a synchronous function and can add a significant
|
||||
// overhead to command recording. In the future, it may be possible to decrease this
|
||||
|
|
Loading…
Reference in New Issue