1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[dxvk] Minor internal buffer API cleanup

This commit is contained in:
Philip Rebohle 2018-09-30 11:05:20 +02:00
parent aaaf2c53e0
commit da76d74a2d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 6 additions and 38 deletions

View File

@ -79,7 +79,11 @@ namespace dxvk {
* \returns Buffer slice descriptor
*/
DxvkDescriptorInfo getDescriptor(VkDeviceSize offset, VkDeviceSize length) const {
return m_physSlice.getDescriptor(offset, length);
DxvkDescriptorInfo result;
result.buffer.buffer = m_physSlice.handle();
result.buffer.offset = m_physSlice.offset() + offset;
result.buffer.range = length;
return result;
}
/**
@ -89,7 +93,7 @@ namespace dxvk {
* \returns Physical buffer slice offset
*/
VkDeviceSize getDynamicOffset(VkDeviceSize offset) const {
return m_physSlice.getDynamicOffset(offset);
return m_physSlice.offset() + offset;
}
/**

View File

@ -90,21 +90,6 @@ namespace dxvk {
return m_memory.mapPtr(offset);
}
/**
* \brief Retrieves descriptor info
*
* \param [in] offset Buffer slice offset
* \param [in] length Buffer slice length
* \returns Buffer slice descriptor
*/
DxvkDescriptorInfo getDescriptor(VkDeviceSize offset, VkDeviceSize length) const {
DxvkDescriptorInfo result;
result.buffer.buffer = m_handle;
result.buffer.offset = offset;
result.buffer.range = length;
return result;
}
/**
* \brief Retrieves a physical buffer slice
*
@ -184,27 +169,6 @@ namespace dxvk {
return DxvkPhysicalBufferSlice(m_buffer, m_offset + offset, length);
}
/**
* \brief Retrieves descriptor info
*
* \param [in] offset Buffer slice offset
* \param [in] length Buffer slice length
* \returns Buffer slice descriptor
*/
DxvkDescriptorInfo getDescriptor(VkDeviceSize offset, VkDeviceSize length) const {
return m_buffer->getDescriptor(m_offset + offset, length);
}
/**
* \brief Retrieves dynamic offset
*
* \param [in] offset Offset into the slice
* \returns Physical buffer slice offset
*/
VkDeviceSize getDynamicOffset(VkDeviceSize offset) const {
return m_offset + offset;
}
/**
* \brief Map pointer
*