Skip to content

Commit afcbf1e

Browse files
committed
formatting that clang-format missed
1 parent 68717ea commit afcbf1e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

lib/API/DX/Device.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -528,17 +528,16 @@ class DXDevice : public offloadtest::Device {
528528
addUploadEndBarrier(IS, Destination, R.isReadWrite());
529529
}
530530

531-
UINT GetNumTiles(std::optional<int> numTiles, UINT64 width) {
532-
UINT ret;
533-
if (numTiles.has_value()) {
534-
ret = static_cast<UINT>(*numTiles);
535-
} else {
531+
UINT getNumTiles(std::optional<int> NumTiles, UINT64 Width) {
532+
UINT Ret;
533+
if (NumTiles.has_value())
534+
Ret = static_cast<UINT>(*NumTiles);
535+
else
536536
// Map the entire buffer by computing how many 64KB tiles cover it
537-
ret = static_cast<UINT>(
538-
(width + D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT - 1) /
537+
Ret = static_cast<UINT>(
538+
(Width + D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT - 1) /
539539
D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT);
540-
}
541-
return ret;
540+
return Ret;
542541
}
543542

544543
llvm::Expected<ResourceBundle> createSRV(Resource &R, InvocationState &IS) {
@@ -579,7 +578,7 @@ class DXDevice : public offloadtest::Device {
579578
return Err;
580579

581580
// Tile mapping setup (optional if NumTiles > 0)
582-
UINT NumTiles = GetNumTiles(R.TilesMapped, ResDesc.Width);
581+
const UINT NumTiles = getNumTiles(R.TilesMapped, ResDesc.Width);
583582

584583
ComPtr<ID3D12Heap> Heap; // optional, only created if NumTiles > 0
585584

@@ -734,7 +733,7 @@ class DXDevice : public offloadtest::Device {
734733
return Err;
735734

736735
// Tile mapping setup (optional if NumTiles > 0)
737-
const UINT NumTiles = GetNumTiles(R.TilesMapped, ResDesc.Width);
736+
const UINT NumTiles = getNumTiles(R.TilesMapped, ResDesc.Width);
738737

739738
ComPtr<ID3D12Heap> Heap; // optional, only created if NumTiles > 0
740739

0 commit comments

Comments
 (0)