First pass ShaderTranslator base type, able to disasm in msft style.

This commit is contained in:
Ben Vanik
2015-11-28 16:19:04 -08:00
parent bea8870700
commit 65130edaa1
11 changed files with 2796 additions and 716 deletions

View File

@@ -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

View File

@@ -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);