VTK  9.4.20241218
vtkWebGPUCommandEncoderDebugGroup.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
18#ifndef vtkWebGPUCommandEncoderDebugGroup_h
19#define vtkWebGPUCommandEncoderDebugGroup_h
20
21#include "vtkABINamespace.h" // for VTK_ABI_NAMESPACE macros
22#include "vtkRenderingWebGPUModule.h" // for export macro
23#include "vtk_wgpu.h" // for wgpu::RenderPassEncoder
24
25VTK_ABI_NAMESPACE_BEGIN
26
27class VTKRENDERINGWEBGPU_EXPORT vtkWebGPUCommandEncoderDebugGroup
28{
29public:
31 const wgpu::RenderPassEncoder& passEncoder, const char* groupLabel);
33 const wgpu::RenderBundleEncoder& passEncoder, const char* groupLabel);
35
37
38 // make this class non-copyable and non-movable.
43
44private:
45 const wgpu::RenderPassEncoder* PassEncoder = nullptr;
46 const wgpu::RenderBundleEncoder* BundleEncoder = nullptr;
47};
48
49#define vtkScopedEncoderDebugGroupConcatImpl(s1, s2) s1##s2
50#define vtkScopedEncoderDebugGroupConcat(s1, s2) vtkScopedEncoderDebugGroupConcatImpl(s1, s2)
51#define vtkScopedEncoderDebugGroupAnonymousVariable(x) vtkScopedEncoderDebugGroupConcat(x, __LINE__)
52// Use this macro to annotate a group of commands in an renderpass/bundle encoder.
53#define vtkScopedEncoderDebugGroup(encoder, name) \
54 ::vtkWebGPUCommandEncoderDebugGroup vtkScopedEncoderDebugGroupAnonymousVariable( \
55 encoderDebugGroup)(encoder, name)
56
57VTK_ABI_NAMESPACE_END
58#endif
Convenient class that inserts annotations around draw commands within a render pass/bundle.
void operator=(vtkWebGPUCommandEncoderDebugGroup &&)=delete
void operator=(const vtkWebGPUCommandEncoderDebugGroup &)=delete
vtkWebGPUCommandEncoderDebugGroup(const wgpu::RenderPassEncoder &passEncoder, const char *groupLabel)
vtkWebGPUCommandEncoderDebugGroup(const wgpu::RenderBundleEncoder &passEncoder, const char *groupLabel)
vtkWebGPUCommandEncoderDebugGroup(vtkWebGPUCommandEncoderDebugGroup &&)=delete
vtkWebGPUCommandEncoderDebugGroup(const vtkWebGPUCommandEncoderDebugGroup &)=delete