summaryrefslogtreecommitdiff
path: root/tools/gfx/immediate-renderer-base.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2021-06-10 00:30:19 -0700
committerGitHub <noreply@github.com>2021-06-10 00:30:19 -0700
commit0d9bd79e8fd4d57e1a723ca6b6a45efec2b42872 (patch)
treed9e23abd1b51044b12b556cd063916f0b44362c0 /tools/gfx/immediate-renderer-base.h
parent86b0d74e58259c1a1c964acf18923303d9e93148 (diff)
Support timestamp queries in `gfx`. (#1880)
* Support timestamp queries in `gfx`. * Fix tab Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tools/gfx/immediate-renderer-base.h')
-rw-r--r--tools/gfx/immediate-renderer-base.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/gfx/immediate-renderer-base.h b/tools/gfx/immediate-renderer-base.h
index 3acceed15..b1e867edc 100644
--- a/tools/gfx/immediate-renderer-base.h
+++ b/tools/gfx/immediate-renderer-base.h
@@ -40,6 +40,11 @@ public:
void establishStrongReferenceToDevice() { m_renderer.establishStrongReference(); }
};
+struct CommandBufferInfo
+{
+ bool hasWriteTimestamps;
+};
+
class ImmediateRendererBase : public RendererBase
{
public:
@@ -75,6 +80,9 @@ public:
virtual void waitForGpu() = 0;
virtual void* map(IBufferResource* buffer, MapFlavor flavor) = 0;
virtual void unmap(IBufferResource* buffer, size_t offsetWritten, size_t sizeWritten) = 0;
+ virtual void writeTimestamp(IQueryPool* pool, SlangInt index) = 0;
+ virtual void beginCommandBuffer(const CommandBufferInfo&) {}
+ virtual void endCommandBuffer(const CommandBufferInfo&) {}
public:
Slang::RefPtr<ImmediateCommandQueueBase> m_queue;