mirror of
https://github.com/microsoft/DirectXTex
synced 2025-01-15 03:50:05 +00:00
Code review feedback
This commit is contained in:
parent
70d6a77e3c
commit
7d95a9d89a
@ -1582,12 +1582,12 @@ struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
|
|||||||
}
|
}
|
||||||
CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize)
|
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;
|
return *this;
|
||||||
}
|
}
|
||||||
CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
|
CD3DX12_CPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
|
||||||
{
|
{
|
||||||
ptr += SIZE_T(offsetScaledByIncrementSize);
|
ptr = SIZE_T(INT64(ptr) + INT64(offsetScaledByIncrementSize));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
bool operator==(_In_ const D3D12_CPU_DESCRIPTOR_HANDLE& other) const
|
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)
|
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)
|
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)
|
CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetInDescriptors, UINT descriptorIncrementSize)
|
||||||
{
|
{
|
||||||
ptr += UINT64(offsetInDescriptors) * UINT64(descriptorIncrementSize);
|
ptr = UINT64(INT64(ptr) + INT64(offsetInDescriptors) * INT64(descriptorIncrementSize));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
|
CD3DX12_GPU_DESCRIPTOR_HANDLE& Offset(INT offsetScaledByIncrementSize)
|
||||||
{
|
{
|
||||||
ptr += UINT64(offsetScaledByIncrementSize);
|
ptr = UINT64(INT64(ptr) + INT64(offsetScaledByIncrementSize));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
inline bool operator==(_In_ const D3D12_GPU_DESCRIPTOR_HANDLE& other) const
|
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)
|
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)
|
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));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user