mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +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) {
|
uint32_t SpirvCodeBuffer::strLen(const char* str) {
|
||||||
// Null-termination plus padding
|
// Null-termination plus padding
|
||||||
return (std::strlen(str) + 4) / 4;
|
return (std::strlen(str) + 4) / 4;
|
||||||
|
@ -148,6 +148,15 @@ namespace dxvk {
|
|||||||
* \param [in] boundIds Number of bound IDs
|
* \param [in] boundIds Number of bound IDs
|
||||||
*/
|
*/
|
||||||
void putHeader(uint32_t boundIds);
|
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
|
* \brief Computes length of a literal string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user