mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[spirv] Add method to erase data from code buffer
This commit is contained in:
parent
9f88249b91
commit
8252d1ccd5
@ -132,6 +132,13 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void SpirvCodeBuffer::erase(size_t size) {
|
||||
m_code.erase(
|
||||
m_code.begin() + m_ptr,
|
||||
m_code.begin() + m_ptr + size);
|
||||
}
|
||||
|
||||
|
||||
uint32_t SpirvCodeBuffer::strLen(const char* str) {
|
||||
// Null-termination plus padding
|
||||
return (std::strlen(str) + 4) / 4;
|
||||
|
@ -148,6 +148,15 @@ namespace dxvk {
|
||||
* \param [in] boundIds Number of bound IDs
|
||||
*/
|
||||
void putHeader(uint32_t boundIds);
|
||||
|
||||
/**
|
||||
* \brief Erases given number of dwords
|
||||
*
|
||||
* Removes data from the code buffer, starting
|
||||
* at the current insertion offset.
|
||||
* \param [in] size Number of words to remove
|
||||
*/
|
||||
void erase(size_t size);
|
||||
|
||||
/**
|
||||
* \brief Computes length of a literal string
|
||||
|
Loading…
x
Reference in New Issue
Block a user