Code review feedback

This commit is contained in:
Chuck Walbourn 2019-07-08 11:57:07 -07:00
parent 70d6a77e3c
commit 7d95a9d89a

View File

@ -1582,12 +1582,12 @@ struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
}
CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize)
{
ptr += SIZE_T(offsetInDescriptors) * SIZE_T(descriptorIncrementSize);
ptr = SIZE_T(INT64(ptr) + INT64(offsetInDescriptors) * INT64(descriptorIncrementSize));
return *this;
}
CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
{
ptr += SIZE_T(offsetScaledByIncrementSize);
ptr = SIZE_T(INT64(ptr) + INT64(offsetScaledByIncrementSize));
return *this;
}
bool operator==(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other) const
@ -1616,12 +1616,12 @@ struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetScaledByIncrementSize)
{
handle.ptr = base.ptr + SIZE_T(offsetScaledByIncrementSize);
handle.ptr = SIZE_T(INT64(base.ptr) + INT64(offsetScaledByIncrementSize));
}
static inline void InitOffsetted(_Out_ D3D12_CPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_CPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize)
{
handle.ptr = base.ptr + SIZE_T(offsetInDescriptors) * SIZE_T(descriptorIncrementSize);
handle.ptr = SIZE_T(INT64(base.ptr) + INT64(offsetInDescriptors) * INT64(descriptorIncrementSize));
}
};
@ -1643,12 +1643,12 @@ struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
}
CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize)
{
ptr += UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize);
ptr = UINT64(INT64(ptr) + INT64(offsetInDescriptors) * INT64(descriptorIncrementSize));
return *this;
}
CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
{
ptr += UINT64(offsetScaledByIncrementSize);
ptr = UINT64(INT64(ptr) + INT64(offsetScaledByIncrementSize));
return *this;
}
inline bool operator==(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other) const
@ -1677,12 +1677,12 @@ struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetScaledByIncrementSize)
{
handle.ptr = base.ptr + UINT64(offsetScaledByIncrementSize);
handle.ptr = UINT64(INT64(base.ptr) + INT64(offsetScaledByIncrementSize));
}
static inline void InitOffsetted(_Out_ D3D12_GPU_DESCRIPTOR_HANDLE &handle, _In_ const D3D12_GPU_DESCRIPTOR_HANDLE &base, INT offsetInDescriptors, UINT descriptorIncrementSize)
{
handle.ptr = base.ptr + UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize);
handle.ptr = UINT64(INT64(base.ptr) + INT64(offsetInDescriptors) * INT64(descriptorIncrementSize));
}
};