Code cleanup: moving poly/ into xenia/base/
This commit is contained in:
@@ -9,8 +9,8 @@
|
||||
|
||||
#include "xenia/gpu/shader.h"
|
||||
|
||||
#include "poly/math.h"
|
||||
#include "poly/memory.h"
|
||||
#include "xenia/base/math.h"
|
||||
#include "xenia/base/memory.h"
|
||||
#include "xenia/gpu/ucode_disassembler.h"
|
||||
|
||||
namespace xe {
|
||||
@@ -26,7 +26,7 @@ Shader::Shader(ShaderType shader_type, uint64_t data_hash,
|
||||
has_prepared_(false),
|
||||
is_valid_(false) {
|
||||
data_.resize(dword_count);
|
||||
poly::copy_and_swap(data_.data(), dword_ptr, dword_count);
|
||||
xe::copy_and_swap(data_.data(), dword_ptr, dword_count);
|
||||
std::memset(&alloc_counts_, 0, sizeof(alloc_counts_));
|
||||
std::memset(&buffer_inputs_, 0, sizeof(buffer_inputs_));
|
||||
std::memset(&sampler_inputs_, 0, sizeof(sampler_inputs_));
|
||||
@@ -198,7 +198,7 @@ void Shader::GatherVertexFetch(const instr_fetch_vtx_t* vtx) {
|
||||
for (size_t n = 0; n < inputs.count; n++) {
|
||||
auto& desc = inputs.descs[n];
|
||||
if (desc.fetch_slot == fetch_slot) {
|
||||
assert_true(desc.element_count <= poly::countof(desc.elements));
|
||||
assert_true(desc.element_count <= xe::countof(desc.elements));
|
||||
// It may not hold that all strides are equal, but I hope it does.
|
||||
assert_true(!vtx->stride || desc.stride_words == vtx->stride);
|
||||
el = &desc.elements[desc.element_count++];
|
||||
@@ -207,7 +207,7 @@ void Shader::GatherVertexFetch(const instr_fetch_vtx_t* vtx) {
|
||||
}
|
||||
if (!el) {
|
||||
assert_not_zero(vtx->stride);
|
||||
assert_true(inputs.count + 1 < poly::countof(inputs.descs));
|
||||
assert_true(inputs.count + 1 < xe::countof(inputs.descs));
|
||||
auto& desc = inputs.descs[inputs.count++];
|
||||
desc.input_index = inputs.count - 1;
|
||||
desc.fetch_slot = fetch_slot;
|
||||
@@ -263,7 +263,7 @@ void Shader::GatherTextureFetch(const instr_fetch_tex_t* tex) {
|
||||
|
||||
assert_true(tex->const_idx < 0x1F);
|
||||
|
||||
assert_true(sampler_inputs_.count + 1 <= poly::countof(sampler_inputs_.descs));
|
||||
assert_true(sampler_inputs_.count + 1 <= xe::countof(sampler_inputs_.descs));
|
||||
auto& input = sampler_inputs_.descs[sampler_inputs_.count++];
|
||||
input.input_index = sampler_inputs_.count - 1;
|
||||
input.fetch_slot = tex->const_idx & 0xF; // ??????????????????????????????
|
||||
|
||||
Reference in New Issue
Block a user