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:
parent
aaaf2c53e0
commit
da76d74a2d
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user