@@ -564,7 +564,7 @@ class DXDevice : public offloadtest::Device {
564564 return Err;
565565
566566 // Tile mapping setup (optional if NumTiles > 0)
567- UINT NumTiles = static_cast <UINT>(*R.TilesMapped );
567+ const UINT NumTiles = static_cast <UINT>(*R.TilesMapped );
568568 ComPtr<ID3D12Heap> Heap; // optional, only created if NumTiles > 0
569569
570570 if (NumTiles > 0 ) {
@@ -609,7 +609,7 @@ class DXDevice : public offloadtest::Device {
609609
610610 // Upload data initialization
611611 void *ResDataPtr = nullptr ;
612- D3D12_RANGE Range = {0 , 0 }; // no reads expected
612+ const D3D12_RANGE Range = {0 , 0 }; // no reads expected
613613 if (SUCCEEDED (UploadBuffer->Map (0 , &Range, &ResDataPtr))) {
614614 memcpy (ResDataPtr, ResData.get (), R.size ());
615615 // Zero remaining bytes if the buffer is padded
@@ -779,7 +779,7 @@ class DXDevice : public offloadtest::Device {
779779 return Err;
780780
781781 // Tile mapping setup (optional if NumTiles > 0)
782- UINT NumTiles = static_cast <UINT>(*R.TilesMapped );
782+ const UINT NumTiles = static_cast <UINT>(*R.TilesMapped );
783783 ComPtr<ID3D12Heap> Heap; // optional, only created if NumTiles > 0
784784
785785 if (NumTiles > 0 ) {
@@ -824,7 +824,7 @@ class DXDevice : public offloadtest::Device {
824824
825825 // Upload data initialization
826826 void *ResDataPtr = nullptr ;
827- D3D12_RANGE Range = {0 , 0 }; // no reads expected
827+ const D3D12_RANGE Range = {0 , 0 }; // no reads expected
828828 if (SUCCEEDED (UploadBuffer->Map (0 , &Range, &ResDataPtr))) {
829829 memcpy (ResDataPtr, ResData.get (), R.size ());
830830 // Zero remaining bytes if the buffer is padded
@@ -1016,7 +1016,7 @@ class DXDevice : public offloadtest::Device {
10161016 return Err;
10171017
10181018 // Tile mapping setup (optional if NumTiles > 0)
1019- UINT NumTiles = static_cast <UINT>(*R.TilesMapped );
1019+ const UINT NumTiles = static_cast <UINT>(*R.TilesMapped );
10201020 ComPtr<ID3D12Heap> Heap; // optional, only created if NumTiles > 0
10211021
10221022 if (NumTiles > 0 ) {
@@ -1061,7 +1061,7 @@ class DXDevice : public offloadtest::Device {
10611061
10621062 // Upload data initialization
10631063 void *ResDataPtr = nullptr ;
1064- D3D12_RANGE Range = {0 , 0 }; // no reads expected
1064+ const D3D12_RANGE Range = {0 , 0 }; // no reads expected
10651065 if (SUCCEEDED (UploadBuffer->Map (0 , &Range, &ResDataPtr))) {
10661066 memcpy (ResDataPtr, ResData.get (), R.size ());
10671067 // Zero remaining bytes if the buffer is padded
0 commit comments