|
@@ -5,6 +5,7 @@
|
|
|
|
|
|
|
|
#include <array>
|
|
#include <array>
|
|
|
#include <cstddef>
|
|
#include <cstddef>
|
|
|
|
|
+#include <optional>
|
|
|
#include <vector>
|
|
#include <vector>
|
|
|
#include "common/bit_field.h"
|
|
#include "common/bit_field.h"
|
|
|
#include "common/common_funcs.h"
|
|
#include "common/common_funcs.h"
|
|
@@ -36,6 +37,9 @@ namespace Tegra::Engines {
|
|
|
#define KEPLER_COMPUTE_REG_INDEX(field_name) \
|
|
#define KEPLER_COMPUTE_REG_INDEX(field_name) \
|
|
|
(offsetof(Tegra::Engines::KeplerCompute::Regs, field_name) / sizeof(u32))
|
|
(offsetof(Tegra::Engines::KeplerCompute::Regs, field_name) / sizeof(u32))
|
|
|
|
|
|
|
|
|
|
+#define LAUNCH_REG_INDEX(field_name) \
|
|
|
|
|
+ (offsetof(Tegra::Engines::KeplerCompute::LaunchParams, field_name) / sizeof(u32))
|
|
|
|
|
+
|
|
|
class KeplerCompute final : public EngineInterface {
|
|
class KeplerCompute final : public EngineInterface {
|
|
|
public:
|
|
public:
|
|
|
explicit KeplerCompute(Core::System& system, MemoryManager& memory_manager);
|
|
explicit KeplerCompute(Core::System& system, MemoryManager& memory_manager);
|
|
@@ -201,6 +205,10 @@ public:
|
|
|
void CallMultiMethod(u32 method, const u32* base_start, u32 amount,
|
|
void CallMultiMethod(u32 method, const u32* base_start, u32 amount,
|
|
|
u32 methods_pending) override;
|
|
u32 methods_pending) override;
|
|
|
|
|
|
|
|
|
|
+ std::optional<GPUVAddr> GetIndirectComputeAddress() const {
|
|
|
|
|
+ return indirect_compute;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private:
|
|
private:
|
|
|
void ProcessLaunch();
|
|
void ProcessLaunch();
|
|
|
|
|
|
|
@@ -216,6 +224,15 @@ private:
|
|
|
MemoryManager& memory_manager;
|
|
MemoryManager& memory_manager;
|
|
|
VideoCore::RasterizerInterface* rasterizer = nullptr;
|
|
VideoCore::RasterizerInterface* rasterizer = nullptr;
|
|
|
Upload::State upload_state;
|
|
Upload::State upload_state;
|
|
|
|
|
+ GPUVAddr upload_address;
|
|
|
|
|
+
|
|
|
|
|
+ struct UploadInfo {
|
|
|
|
|
+ GPUVAddr upload_address;
|
|
|
|
|
+ GPUVAddr exec_address;
|
|
|
|
|
+ u32 copy_size;
|
|
|
|
|
+ };
|
|
|
|
|
+ std::vector<UploadInfo> uploads;
|
|
|
|
|
+ std::optional<GPUVAddr> indirect_compute{};
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
#define ASSERT_REG_POSITION(field_name, position) \
|
|
#define ASSERT_REG_POSITION(field_name, position) \
|