|
|
@ -19,8 +19,10 @@ namespace Tegra::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;
|
|
|
|
|
|
|
|
|
|
|
|
Maxwell3D::Maxwell3D(VideoCore::RasterizerInterface& rasterizer, MemoryManager& memory_manager)
|
|
|
|
Maxwell3D::Maxwell3D(Core::System& system, VideoCore::RasterizerInterface& rasterizer,
|
|
|
|
: memory_manager(memory_manager), rasterizer{rasterizer}, macro_interpreter(*this) {
|
|
|
|
MemoryManager& memory_manager)
|
|
|
|
|
|
|
|
: memory_manager(memory_manager), system{system}, rasterizer{rasterizer},
|
|
|
|
|
|
|
|
macro_interpreter(*this) {
|
|
|
|
InitializeRegisterDefaults();
|
|
|
|
InitializeRegisterDefaults();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -103,7 +105,7 @@ void Maxwell3D::CallMacroMethod(u32 method, std::vector<u32> parameters) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) {
|
|
|
|
void Maxwell3D::CallMethod(const GPU::MethodCall& method_call) {
|
|
|
|
auto debug_context = Core::System::GetInstance().GetGPUDebugContext();
|
|
|
|
auto debug_context = system.GetGPUDebugContext();
|
|
|
|
|
|
|
|
|
|
|
|
// It is an error to write to a register other than the current macro's ARG register before it
|
|
|
|
// It is an error to write to a register other than the current macro's ARG register before it
|
|
|
|
// has finished execution.
|
|
|
|
// has finished execution.
|
|
|
@ -317,7 +319,7 @@ void Maxwell3D::ProcessQueryGet() {
|
|
|
|
LongQueryResult query_result{};
|
|
|
|
LongQueryResult query_result{};
|
|
|
|
query_result.value = result;
|
|
|
|
query_result.value = result;
|
|
|
|
// TODO(Subv): Generate a real GPU timestamp and write it here instead of CoreTiming
|
|
|
|
// TODO(Subv): Generate a real GPU timestamp and write it here instead of CoreTiming
|
|
|
|
query_result.timestamp = Core::System::GetInstance().CoreTiming().GetTicks();
|
|
|
|
query_result.timestamp = system.CoreTiming().GetTicks();
|
|
|
|
Memory::WriteBlock(*address, &query_result, sizeof(query_result));
|
|
|
|
Memory::WriteBlock(*address, &query_result, sizeof(query_result));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dirty_flags.OnMemoryWrite();
|
|
|
|
dirty_flags.OnMemoryWrite();
|
|
|
@ -334,7 +336,7 @@ void Maxwell3D::DrawArrays() {
|
|
|
|
regs.vertex_buffer.count);
|
|
|
|
regs.vertex_buffer.count);
|
|
|
|
ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?");
|
|
|
|
ASSERT_MSG(!(regs.index_array.count && regs.vertex_buffer.count), "Both indexed and direct?");
|
|
|
|
|
|
|
|
|
|
|
|
auto debug_context = Core::System::GetInstance().GetGPUDebugContext();
|
|
|
|
auto debug_context = system.GetGPUDebugContext();
|
|
|
|
|
|
|
|
|
|
|
|
if (debug_context) {
|
|
|
|
if (debug_context) {
|
|
|
|
debug_context->OnEvent(Tegra::DebugContext::Event::IncomingPrimitiveBatch, nullptr);
|
|
|
|
debug_context->OnEvent(Tegra::DebugContext::Event::IncomingPrimitiveBatch, nullptr);
|
|
|
|