-
Notifications
You must be signed in to change notification settings - Fork 0
/
const.go
61 lines (51 loc) · 2.86 KB
/
const.go
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
package khr_buffer_device_address
/*
#include <stdlib.h>
#include "../vulkan/vulkan.h"
*/
import "C"
import (
"github.com/vkngwrapper/core/v2/common"
"github.com/vkngwrapper/core/v2/core1_0"
"github.com/vkngwrapper/core/v2/core1_1"
)
const (
// ExtensionName is "VK_KHR_buffer_device_address"
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_buffer_device_address.html
ExtensionName string = C.VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME
// BufferCreateDeviceAddressCaptureReplay specifies that the Buffer object's address can
// be saved and reused on a subsequent run (e.g. for trace capture and replay)
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkBufferCreateFlagBits.html
BufferCreateDeviceAddressCaptureReplay core1_0.BufferCreateFlags = C.VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
// BufferUsageShaderDeviceAddress specifies that the Buffer can be used to retrieve a
// Buffer device address via Device.GetBufferDeviceAddress and use that address to
// access the Buffer object's memory from a shader
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkBufferUsageFlagBits.html
BufferUsageShaderDeviceAddress core1_0.BufferUsageFlags = C.VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_KHR
// MemoryAllocateDeviceAddress specifies that the memory can be attached to a Buffer object
// created with BufferUsageShaderDeviceAddress set in Usage, and that the DeviceMemory object
// can be used to retrieve an opaque address via Device.GetDeviceMemoryOpaqueCaptureAddress
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkMemoryAllocateFlagBits.html
MemoryAllocateDeviceAddress core1_1.MemoryAllocateFlags = C.VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR
// MemoryAllocateDeviceAddressCaptureReplay specifies that the memory's address can be saved
// and reused on a subsequent run (e.g. for trace capture and replay)
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkMemoryAllocateFlagBits.html
MemoryAllocateDeviceAddressCaptureReplay core1_1.MemoryAllocateFlags = C.VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR
// VkErrorInvalidOpaqueCaptureAddress indicates a Buffer creation or memory allocation failed
// because the requested address is not available
//
// https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkResult.html
VkErrorInvalidOpaqueCaptureAddress common.VkResult = C.VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR
)
func init() {
BufferCreateDeviceAddressCaptureReplay.Register("Device Address (Capture/Replay)")
BufferUsageShaderDeviceAddress.Register("Shader Device Address")
MemoryAllocateDeviceAddress.Register("Device Address")
MemoryAllocateDeviceAddressCaptureReplay.Register("Device Address (Capture/Replay)")
VkErrorInvalidOpaqueCaptureAddress.Register("invalid opaque capture address")
}