mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
Merge pull request #1539 from lioncash/dma
maxwell_dma: Silence compilation warnings
This commit is contained in:
commit
0f3d8c2574
|
@ -13,8 +13,7 @@
|
||||||
#include "video_core/renderer_base.h"
|
#include "video_core/renderer_base.h"
|
||||||
#include "video_core/textures/texture.h"
|
#include "video_core/textures/texture.h"
|
||||||
|
|
||||||
namespace Tegra {
|
namespace Tegra::Engines {
|
||||||
namespace Engines {
|
|
||||||
|
|
||||||
/// First register id that is actually a Macro call.
|
/// First register id that is actually a Macro call.
|
||||||
constexpr u32 MacroRegistersStart = 0xE00;
|
constexpr u32 MacroRegistersStart = 0xE00;
|
||||||
|
@ -408,5 +407,4 @@ void Maxwell3D::ProcessClearBuffers() {
|
||||||
rasterizer.Clear();
|
rasterizer.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Engines
|
} // namespace Tegra::Engines
|
||||||
} // namespace Tegra
|
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
#include "video_core/engines/maxwell_compute.h"
|
#include "video_core/engines/maxwell_compute.h"
|
||||||
|
|
||||||
namespace Tegra {
|
namespace Tegra::Engines {
|
||||||
namespace Engines {
|
|
||||||
|
|
||||||
void MaxwellCompute::WriteReg(u32 method, u32 value) {
|
void MaxwellCompute::WriteReg(u32 method, u32 value) {
|
||||||
ASSERT_MSG(method < Regs::NUM_REGS,
|
ASSERT_MSG(method < Regs::NUM_REGS,
|
||||||
|
@ -26,5 +25,4 @@ void MaxwellCompute::WriteReg(u32 method, u32 value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Engines
|
} // namespace Tegra::Engines
|
||||||
} // namespace Tegra
|
|
||||||
|
|
|
@ -7,8 +7,7 @@
|
||||||
#include "video_core/rasterizer_interface.h"
|
#include "video_core/rasterizer_interface.h"
|
||||||
#include "video_core/textures/decoders.h"
|
#include "video_core/textures/decoders.h"
|
||||||
|
|
||||||
namespace Tegra {
|
namespace Tegra::Engines {
|
||||||
namespace Engines {
|
|
||||||
|
|
||||||
MaxwellDMA::MaxwellDMA(VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager)
|
MaxwellDMA::MaxwellDMA(VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager)
|
||||||
: memory_manager(memory_manager), rasterizer{rasterizer} {}
|
: memory_manager(memory_manager), rasterizer{rasterizer} {}
|
||||||
|
@ -78,9 +77,9 @@ void MaxwellDMA::HandleCopy() {
|
||||||
|
|
||||||
ASSERT(regs.exec.enable_2d == 1);
|
ASSERT(regs.exec.enable_2d == 1);
|
||||||
|
|
||||||
std::size_t copy_size = regs.x_count * regs.y_count;
|
const std::size_t copy_size = regs.x_count * regs.y_count;
|
||||||
|
|
||||||
const auto FlushAndInvalidate = [&](u32 src_size, u32 dst_size) {
|
const auto FlushAndInvalidate = [&](u32 src_size, u64 dst_size) {
|
||||||
// TODO(Subv): For now, manually flush the regions until we implement GPU-accelerated
|
// TODO(Subv): For now, manually flush the regions until we implement GPU-accelerated
|
||||||
// copying.
|
// copying.
|
||||||
rasterizer.FlushRegion(source_cpu, src_size);
|
rasterizer.FlushRegion(source_cpu, src_size);
|
||||||
|
@ -91,14 +90,11 @@ void MaxwellDMA::HandleCopy() {
|
||||||
rasterizer.InvalidateRegion(dest_cpu, dst_size);
|
rasterizer.InvalidateRegion(dest_cpu, dst_size);
|
||||||
};
|
};
|
||||||
|
|
||||||
u8* src_buffer = Memory::GetPointer(source_cpu);
|
|
||||||
u8* dst_buffer = Memory::GetPointer(dest_cpu);
|
|
||||||
|
|
||||||
if (regs.exec.is_dst_linear && !regs.exec.is_src_linear) {
|
if (regs.exec.is_dst_linear && !regs.exec.is_src_linear) {
|
||||||
ASSERT(regs.src_params.size_z == 1);
|
ASSERT(regs.src_params.size_z == 1);
|
||||||
// If the input is tiled and the output is linear, deswizzle the input and copy it over.
|
// If the input is tiled and the output is linear, deswizzle the input and copy it over.
|
||||||
|
|
||||||
u32 src_bytes_per_pixel = regs.src_pitch / regs.src_params.size_x;
|
const u32 src_bytes_per_pixel = regs.src_pitch / regs.src_params.size_x;
|
||||||
|
|
||||||
FlushAndInvalidate(regs.src_pitch * regs.src_params.size_y,
|
FlushAndInvalidate(regs.src_pitch * regs.src_params.size_y,
|
||||||
copy_size * src_bytes_per_pixel);
|
copy_size * src_bytes_per_pixel);
|
||||||
|
@ -111,7 +107,7 @@ void MaxwellDMA::HandleCopy() {
|
||||||
ASSERT(regs.dst_params.size_z == 1);
|
ASSERT(regs.dst_params.size_z == 1);
|
||||||
ASSERT(regs.src_pitch == regs.x_count);
|
ASSERT(regs.src_pitch == regs.x_count);
|
||||||
|
|
||||||
u32 src_bpp = regs.src_pitch / regs.x_count;
|
const u32 src_bpp = regs.src_pitch / regs.x_count;
|
||||||
|
|
||||||
FlushAndInvalidate(regs.src_pitch * regs.y_count,
|
FlushAndInvalidate(regs.src_pitch * regs.y_count,
|
||||||
regs.dst_params.size_x * regs.dst_params.size_y * src_bpp);
|
regs.dst_params.size_x * regs.dst_params.size_y * src_bpp);
|
||||||
|
@ -122,5 +118,4 @@ void MaxwellDMA::HandleCopy() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Engines
|
} // namespace Tegra::Engines
|
||||||
} // namespace Tegra
|
|
||||||
|
|
Loading…
Reference in a new issue