Moving byte order/memory access to poly.

This commit is contained in:
Ben Vanik
2014-07-17 19:20:17 -07:00
parent ce70978ef6
commit ec4f41fec4
42 changed files with 608 additions and 486 deletions

View File

@@ -35,7 +35,7 @@ ShaderResource::ShaderResource(const MemoryRange& memory_range,
size_t byte_size = dword_count_ * sizeof(uint32_t);
dwords_ = (uint32_t*)xe_malloc(byte_size);
for (uint32_t n = 0; n < dword_count_; n++) {
dwords_[n] = XEGETUINT32BE(memory_range.host_base + n * 4);
dwords_[n] = poly::load_and_swap<uint32_t>(memory_range.host_base + n * 4);
}
// Disassemble, for debugging.