mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[dxvk] Introduce bindResourceBufferRange
This commit is contained in:
parent
57445227ac
commit
ce3eae59a9
@ -518,7 +518,18 @@ namespace dxvk {
|
||||
return this->m_offset == other.m_offset
|
||||
&& this->m_length == other.m_length;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Sets buffer range
|
||||
*
|
||||
* \param [in] offset New offset
|
||||
* \param [in] length New length
|
||||
*/
|
||||
void setRange(VkDeviceSize offset, VkDeviceSize length) {
|
||||
m_offset = offset;
|
||||
m_length = length;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Rc<DxvkBuffer> m_buffer = nullptr;
|
||||
|
@ -165,6 +165,22 @@ namespace dxvk {
|
||||
m_descriptorState.dirtyBuffers(stages);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Changes bound range of a resource buffer
|
||||
*
|
||||
* Can be used to quickly bind a new sub-range of
|
||||
* a buffer rather than re-binding the entire buffer.
|
||||
*/
|
||||
void bindResourceBufferRange(
|
||||
VkShaderStageFlags stages,
|
||||
uint32_t slot,
|
||||
VkDeviceSize offset,
|
||||
VkDeviceSize length) {
|
||||
m_rc[slot].bufferSlice.setRange(offset, length);
|
||||
|
||||
m_descriptorState.dirtyBuffers(stages);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Binds image or buffer view
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user