mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-05 01:24:14 +01:00
36 lines
611 B
C
36 lines
611 B
C
|
#pragma once
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
#include "spirv_code_buffer.h"
|
||
|
|
||
|
namespace dxvk {
|
||
|
|
||
|
/**
|
||
|
* \brief Compressed SPIR-V code buffer
|
||
|
*
|
||
|
* Implements a fast in-memory compression
|
||
|
* to keep memory footprint low.
|
||
|
*/
|
||
|
class SpirvCompressedBuffer {
|
||
|
constexpr static uint32_t NumMaskWords = 32;
|
||
|
public:
|
||
|
|
||
|
SpirvCompressedBuffer();
|
||
|
|
||
|
SpirvCompressedBuffer(
|
||
|
const SpirvCodeBuffer& code);
|
||
|
|
||
|
~SpirvCompressedBuffer();
|
||
|
|
||
|
SpirvCodeBuffer decompress() const;
|
||
|
|
||
|
private:
|
||
|
|
||
|
uint32_t m_size;
|
||
|
std::vector<uint64_t> m_mask;
|
||
|
std::vector<uint64_t> m_code;
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|