[GPU] Move all xenos.h to gpu::xenos, disambiguate Dimension/TextureDimension
This commit is contained in:
@@ -589,7 +589,7 @@ void VulkanCommandProcessor::PerformSwap(uint32_t frontbuffer_ptr,
|
||||
current_batch_fence_ = nullptr;
|
||||
}
|
||||
|
||||
Shader* VulkanCommandProcessor::LoadShader(ShaderType shader_type,
|
||||
Shader* VulkanCommandProcessor::LoadShader(xenos::ShaderType shader_type,
|
||||
uint32_t guest_address,
|
||||
const uint32_t* host_address,
|
||||
uint32_t dword_count) {
|
||||
@@ -597,7 +597,7 @@ Shader* VulkanCommandProcessor::LoadShader(ShaderType shader_type,
|
||||
dword_count);
|
||||
}
|
||||
|
||||
bool VulkanCommandProcessor::IssueDraw(PrimitiveType primitive_type,
|
||||
bool VulkanCommandProcessor::IssueDraw(xenos::PrimitiveType primitive_type,
|
||||
uint32_t index_count,
|
||||
IndexBufferInfo* index_buffer_info,
|
||||
bool major_mode_explicit) {
|
||||
@@ -783,16 +783,17 @@ bool VulkanCommandProcessor::PopulateIndexBuffer(
|
||||
assert_true(min_index == 0);
|
||||
assert_true(max_index == 0xFFFF || max_index == 0xFFFFFF);
|
||||
|
||||
assert_true(info.endianness == Endian::k8in16 ||
|
||||
info.endianness == Endian::k8in32);
|
||||
assert_true(info.endianness == xenos::Endian::k8in16 ||
|
||||
info.endianness == xenos::Endian::k8in32);
|
||||
|
||||
trace_writer_.WriteMemoryRead(info.guest_base, info.length);
|
||||
|
||||
// Upload (or get a cached copy of) the buffer.
|
||||
uint32_t source_addr = info.guest_base;
|
||||
uint32_t source_length =
|
||||
info.count * (info.format == IndexFormat::kInt32 ? sizeof(uint32_t)
|
||||
: sizeof(uint16_t));
|
||||
info.count * (info.format == xenos::IndexFormat::kInt32
|
||||
? sizeof(uint32_t)
|
||||
: sizeof(uint16_t));
|
||||
auto buffer_ref = buffer_cache_->UploadIndexBuffer(
|
||||
current_setup_buffer_, source_addr, source_length, info.format,
|
||||
current_batch_fence_);
|
||||
@@ -802,7 +803,7 @@ bool VulkanCommandProcessor::PopulateIndexBuffer(
|
||||
}
|
||||
|
||||
// Bind the buffer.
|
||||
VkIndexType index_type = info.format == IndexFormat::kInt32
|
||||
VkIndexType index_type = info.format == xenos::IndexFormat::kInt32
|
||||
? VK_INDEX_TYPE_UINT32
|
||||
: VK_INDEX_TYPE_UINT16;
|
||||
vkCmdBindIndexBuffer(command_buffer, buffer_ref.first, buffer_ref.second,
|
||||
@@ -926,7 +927,8 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||
// https://fossies.org/dox/MesaLib-10.3.5/fd2__gmem_8c_source.html
|
||||
uint32_t surface_info = regs[XE_GPU_REG_RB_SURFACE_INFO].u32;
|
||||
uint32_t surface_pitch = surface_info & 0x3FFF;
|
||||
auto surface_msaa = static_cast<MsaaSamples>((surface_info >> 16) & 0x3);
|
||||
auto surface_msaa =
|
||||
static_cast<xenos::MsaaSamples>((surface_info >> 16) & 0x3);
|
||||
|
||||
// TODO(benvanik): any way to scissor this? a200 has:
|
||||
// REG_A2XX_RB_COPY_DEST_OFFSET = A2XX_RB_COPY_DEST_OFFSET_X(tile->xoff) |
|
||||
@@ -969,7 +971,7 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||
break;
|
||||
}
|
||||
assert_true(fetch->type == xenos::FetchConstantType::kVertex);
|
||||
assert_true(fetch->endian == Endian::k8in32);
|
||||
assert_true(fetch->endian == xenos::Endian::k8in32);
|
||||
assert_true(fetch->size == 6);
|
||||
const uint8_t* vertex_addr = memory_->TranslatePhysical(fetch->address << 2);
|
||||
trace_writer_.WriteMemoryRead(fetch->address << 2, fetch->size * 4);
|
||||
@@ -1002,8 +1004,8 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||
|
||||
uint32_t color_edram_base = 0;
|
||||
uint32_t depth_edram_base = 0;
|
||||
ColorRenderTargetFormat color_format;
|
||||
DepthRenderTargetFormat depth_format;
|
||||
xenos::ColorRenderTargetFormat color_format;
|
||||
xenos::DepthRenderTargetFormat depth_format;
|
||||
if (is_color_source) {
|
||||
// Source from a color target.
|
||||
reg::RB_COLOR_INFO color_info[4] = {
|
||||
@@ -1027,10 +1029,10 @@ bool VulkanCommandProcessor::IssueCopy() {
|
||||
}
|
||||
}
|
||||
|
||||
Endian resolve_endian = Endian::k8in32;
|
||||
if (copy_regs->copy_dest_info.copy_dest_endian <= Endian128::k16in32) {
|
||||
xenos::Endian resolve_endian = xenos::Endian::k8in32;
|
||||
if (copy_regs->copy_dest_info.copy_dest_endian <= xenos::Endian128::k16in32) {
|
||||
resolve_endian =
|
||||
static_cast<Endian>(copy_regs->copy_dest_info.copy_dest_endian);
|
||||
static_cast<xenos::Endian>(copy_regs->copy_dest_info.copy_dest_endian);
|
||||
}
|
||||
|
||||
// Demand a resolve texture from the texture cache.
|
||||
|
||||
Reference in New Issue
Block a user