aboutsummaryrefslogtreecommitdiff
path: root/src/engine.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine.h')
-rw-r--r--src/engine.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/engine.h b/src/engine.h
index 7b1f10e..7819b07 100644
--- a/src/engine.h
+++ b/src/engine.h
@@ -17,6 +17,7 @@
#include <memory>
#include <string>
+#include <utility>
#include <vector>
#include "amber/amber.h"
@@ -28,10 +29,12 @@
namespace amber {
+class VirtualFileStore;
+
/// EngineData stores information used during engine execution.
struct EngineData {
/// The timeout to use for fences, in milliseconds.
- uint32_t fence_timeout_ms = 1000;
+ uint32_t fence_timeout_ms = 10000;
};
/// Abstract class which describes a backing engine for Amber.
@@ -53,6 +56,16 @@ struct EngineData {
/// 5. Engine destructor is called.
class Engine {
public:
+ /// Debugger is the interface to the engine's shader debugger.
+ class Debugger : public debug::Events {
+ public:
+ ~Debugger() override;
+
+ /// Flush waits for all the debugger commands issued to complete, and
+ /// returns a Result that includes any debugger test failure.
+ virtual Result Flush() = 0;
+ };
+
/// Creates a new engine of the requested |type|.
static std::unique_ptr<Engine> Create(EngineType type);
@@ -88,6 +101,9 @@ class Engine {
/// Execute the draw rect command
virtual Result DoDrawRect(const DrawRectCommand* cmd) = 0;
+ /// Execute the draw grid command
+ virtual Result DoDrawGrid(const DrawGridCommand* cmd) = 0;
+
/// Execute the draw arrays command
virtual Result DoDrawArrays(const DrawArraysCommand* cmd) = 0;
@@ -106,6 +122,11 @@ class Engine {
/// This covers both Vulkan buffers and images.
virtual Result DoBuffer(const BufferCommand* cmd) = 0;
+ /// GetDebugger returns the shader debugger from the engine.
+ /// If the engine does not support a shader debugger then the Result will be a
+ /// failure.
+ virtual std::pair<Debugger*, Result> GetDebugger(VirtualFileStore*) = 0;
+
/// Sets the engine data to use.
void SetEngineData(const EngineData& data) { engine_data_ = data; }