First pass ShaderTranslator base type, able to disasm in msft style.
This commit is contained in:
@@ -83,4 +83,10 @@ std::string StringBuffer::to_string() {
|
||||
|
||||
char* StringBuffer::ToString() { return strdup(buffer_); }
|
||||
|
||||
std::vector<uint8_t> StringBuffer::ToBytes() const {
|
||||
std::vector<uint8_t> bytes(buffer_offset_);
|
||||
std::memcpy(bytes.data(), buffer_, buffer_offset_);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
} // namespace xe
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace xe {
|
||||
|
||||
@@ -34,6 +35,7 @@ class StringBuffer {
|
||||
const char* GetString() const;
|
||||
std::string to_string();
|
||||
char* ToString();
|
||||
std::vector<uint8_t> ToBytes() const;
|
||||
|
||||
private:
|
||||
void Grow(size_t additional_length);
|
||||
|
||||
Reference in New Issue
Block a user