Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/gpgmm/d3d12/ResourceAllocationD3D12.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace gpgmm::d3d12 {
const D3D12_RANGE* newReadRangePtr = readRange;
if (newReadRangePtr != nullptr && mOffsetFromResource > 0) {
ASSERT(subresource == 0);
newReadRange = GetResourceRange(readRange, mOffsetFromResource);
newReadRange = GetResourceRange(readRange, static_cast<size_t>(mOffsetFromResource));
newReadRangePtr = &newReadRange;
}

Expand All @@ -140,7 +140,8 @@ namespace gpgmm::d3d12 {
const D3D12_RANGE* newWrittenRangePtr = writtenRange;
if (newWrittenRangePtr != nullptr && mOffsetFromResource > 0) {
ASSERT(subresource == 0);
newWrittenRange = GetResourceRange(newWrittenRangePtr, mOffsetFromResource);
newWrittenRange =
GetResourceRange(newWrittenRangePtr, static_cast<size_t>(mOffsetFromResource));
newWrittenRangePtr = &newWrittenRange;
}

Expand All @@ -162,7 +163,7 @@ namespace gpgmm::d3d12 {
return mResource->GetGPUVirtualAddress() + mOffsetFromResource;
}

size_t ResourceAllocation::GetOffsetFromResource() const {
uint64_t ResourceAllocation::GetOffsetFromResource() const {
return mOffsetFromResource;
}

Expand Down
6 changes: 3 additions & 3 deletions src/gpgmm/d3d12/ResourceAllocationD3D12.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace gpgmm::d3d12 {

Always zero when the resource is placed in a heap or created with it's own heap.
*/
size_t OffsetFromResource;
uint64_t OffsetFromResource;

/** \brief Method to describe how the allocation was created.

Expand Down Expand Up @@ -177,7 +177,7 @@ namespace gpgmm::d3d12 {

\return A offset, in bytes, of the start of this allocation in the resource.
*/
size_t GetOffsetFromResource() const;
uint64_t GetOffsetFromResource() const;

/** \brief Returns information about this resource allocation.

Expand Down Expand Up @@ -215,7 +215,7 @@ namespace gpgmm::d3d12 {
ResidencyManager* const mResidencyManager;
ComPtr<ID3D12Resource> mResource;

const size_t mOffsetFromResource;
const uint64_t mOffsetFromResource;
};

} // namespace gpgmm::d3d12
Expand Down