-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathindirect_commands.hlsl
More file actions
64 lines (53 loc) · 1.55 KB
/
indirect_commands.hlsl
File metadata and controls
64 lines (53 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (C) 2023 - DevSH Graphics Programming Sp. z O.O.
// This file is part of the "Nabla Engine".
// For conditions of distribution and use, see copyright notice in nabla.h
#ifndef _NBL_BUILTIN_HLSL_INDIRECT_COMMANDS_INCLUDED_
#define _NBL_BUILTIN_HLSL_INDIRECT_COMMANDS_INCLUDED_
#include "nbl/builtin/hlsl/cpp_compat.hlsl"
namespace nbl
{
namespace hlsl
{
struct DrawArraysIndirectCommand_t
{
uint32_t count;
uint32_t instanceCount;
uint32_t first;
uint32_t baseInstance;
};
struct DrawElementsIndirectCommand_t
{
uint32_t count;
uint32_t instanceCount;
uint32_t firstIndex;
uint32_t baseVertex;
uint32_t baseInstance;
};
struct DispatchIndirectCommand_t
{
uint32_t num_groups_x;
uint32_t num_groups_y;
uint32_t num_groups_z;
};
// in vulkan this struct is distinct from DispatchIndirect, but has the same data - https://docs.vulkan.org/refpages/latest/refpages/source/VkDrawMeshTasksIndirectCommandEXT.html
using DrawMeshTasksIndirectCommand_t = DispatchIndirectCommand_t;
struct TraceRaysIndirectCommand_t
{
uint64_t raygenShaderRecordAddress;
uint64_t raygenShaderRecordSize;
uint64_t missShaderBindingTableAddress;
uint64_t missShaderBindingTableSize;
uint64_t missShaderBindingTableStride;
uint64_t hitShaderBindingTableAddress;
uint64_t hitShaderBindingTableSize;
uint64_t hitShaderBindingTableStride;
uint64_t callableShaderBindingTableAddress;
uint64_t callableShaderBindingTableSize;
uint64_t callableShaderBindingTableStride;
uint32_t width;
uint32_t height;
uint32_t depth;
};
}
}
#endif