Skip to content

Commit d3cbf91

Browse files
committed
fix build errors
1 parent 59a0b7c commit d3cbf91

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/API/DX/Device.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

lib/Support/Pipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void MappingTraits<offloadtest::Resource>::mapping(IO &I,
291291
I.mapRequired("Name", R.Name);
292292
I.mapRequired("Kind", R.Kind);
293293
I.mapOptional("HasCounter", R.HasCounter, 0);
294-
I.mapOptional("TilesMapped", R.TilesMapped, -1);
294+
I.mapOptional("TilesMapped", R.TilesMapped);
295295
I.mapRequired("DirectXBinding", R.DXBinding);
296296
I.mapOptional("VulkanBinding", R.VKBinding);
297297
}

0 commit comments

Comments
 (0)