Initial commit (should probably have done this earlier).
This commit is contained in:
parent
2774176fbd
commit
1d073c0256
117
.gitignore
vendored
117
.gitignore
vendored
@ -6,6 +6,7 @@
|
|||||||
*.slo
|
*.slo
|
||||||
*.lo
|
*.lo
|
||||||
*.o
|
*.o
|
||||||
|
*.os
|
||||||
*.obj
|
*.obj
|
||||||
|
|
||||||
# Precompiled Headers
|
# Precompiled Headers
|
||||||
@ -32,3 +33,119 @@
|
|||||||
*.out
|
*.out
|
||||||
*.app
|
*.app
|
||||||
|
|
||||||
|
# Byte-compiled / optimized / DLL files
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
|
||||||
|
# C extensions
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Distribution / packaging
|
||||||
|
.Python
|
||||||
|
build/
|
||||||
|
develop-eggs/
|
||||||
|
dist/
|
||||||
|
downloads/
|
||||||
|
eggs/
|
||||||
|
.eggs/
|
||||||
|
lib/
|
||||||
|
lib64/
|
||||||
|
parts/
|
||||||
|
sdist/
|
||||||
|
var/
|
||||||
|
wheels/
|
||||||
|
pip-wheel-metadata/
|
||||||
|
share/python-wheels/
|
||||||
|
*.egg-info/
|
||||||
|
.installed.cfg
|
||||||
|
*.egg
|
||||||
|
MANIFEST
|
||||||
|
|
||||||
|
# PyInstaller
|
||||||
|
# Usually these files are written by a python script from a template
|
||||||
|
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||||
|
*.manifest
|
||||||
|
*.spec
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
pip-delete-this-directory.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
htmlcov/
|
||||||
|
.tox/
|
||||||
|
.nox/
|
||||||
|
.coverage
|
||||||
|
.coverage.*
|
||||||
|
.cache
|
||||||
|
nosetests.xml
|
||||||
|
coverage.xml
|
||||||
|
*.cover
|
||||||
|
.hypothesis/
|
||||||
|
.pytest_cache/
|
||||||
|
|
||||||
|
# Translations
|
||||||
|
*.mo
|
||||||
|
*.pot
|
||||||
|
|
||||||
|
# Django stuff:
|
||||||
|
*.log
|
||||||
|
local_settings.py
|
||||||
|
db.sqlite3
|
||||||
|
|
||||||
|
# Flask stuff:
|
||||||
|
instance/
|
||||||
|
.webassets-cache
|
||||||
|
|
||||||
|
# Scrapy stuff:
|
||||||
|
.scrapy
|
||||||
|
|
||||||
|
# Sphinx documentation
|
||||||
|
docs/_build/
|
||||||
|
|
||||||
|
# PyBuilder
|
||||||
|
target/
|
||||||
|
|
||||||
|
# Jupyter Notebook
|
||||||
|
.ipynb_checkpoints
|
||||||
|
|
||||||
|
# IPython
|
||||||
|
profile_default/
|
||||||
|
ipython_config.py
|
||||||
|
|
||||||
|
# pyenv
|
||||||
|
.python-version
|
||||||
|
|
||||||
|
# celery beat schedule file
|
||||||
|
celerybeat-schedule
|
||||||
|
|
||||||
|
# SageMath parsed files
|
||||||
|
*.sage.py
|
||||||
|
|
||||||
|
# Environments
|
||||||
|
.env
|
||||||
|
.venv
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
env.bak/
|
||||||
|
venv.bak/
|
||||||
|
|
||||||
|
# Spyder project settings
|
||||||
|
.spyderproject
|
||||||
|
.spyproject
|
||||||
|
|
||||||
|
# Rope project settings
|
||||||
|
.ropeproject
|
||||||
|
|
||||||
|
# mkdocs documentation
|
||||||
|
/site
|
||||||
|
|
||||||
|
# mypy
|
||||||
|
.mypy_cache/
|
||||||
|
.dmypy.json
|
||||||
|
dmypy.json
|
||||||
|
|
||||||
|
# Pyre type checker
|
||||||
|
.pyre/
|
||||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "vulkan-docs"]
|
||||||
|
path = thirdparty/vulkan-docs
|
||||||
|
url = https://github.com/KhronosGroup/Vulkan-Docs.git
|
193
SConscript
Normal file
193
SConscript
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
|
||||||
|
Import('env')
|
||||||
|
env = env.Clone()
|
||||||
|
|
||||||
|
VK_FUNCTION_BLACKLIST = {'vkGetFramebufferTilePropertiesQCOM', 'vkGetDynamicRenderingTilePropertiesQCOM'}
|
||||||
|
|
||||||
|
def parse_cmd_node(node, vulkan_hpp):
|
||||||
|
proto_tag = node.find('proto')
|
||||||
|
cmd_name = proto_tag and proto_tag.find('name').text or node.attrib.get('name', '')
|
||||||
|
if not cmd_name or cmd_name in VK_FUNCTION_BLACKLIST:
|
||||||
|
return
|
||||||
|
if proto_tag is None:
|
||||||
|
vulkan_hpp['commands'][node.attrib['name']] = {
|
||||||
|
'name': node.attrib['name'],
|
||||||
|
'alias': node.attrib['alias'],
|
||||||
|
'extension': '',
|
||||||
|
'platform': ''
|
||||||
|
}
|
||||||
|
return
|
||||||
|
type_tag = proto_tag.find('type')
|
||||||
|
name_tag = proto_tag.find('name')
|
||||||
|
|
||||||
|
params = []
|
||||||
|
for param_tag in node.findall('param'):
|
||||||
|
param_type_tag = param_tag.find('type')
|
||||||
|
param_name_tag = param_tag.find('name')
|
||||||
|
params.append({
|
||||||
|
'type': ((param_tag.text or "") + param_type_tag.text + (param_type_tag.tail or "")).strip(),
|
||||||
|
'name': param_name_tag.text.strip(),
|
||||||
|
'name_type_suffix': (param_name_tag.tail or "").strip()
|
||||||
|
})
|
||||||
|
|
||||||
|
vulkan_hpp['commands'][name_tag.text.strip()] = {
|
||||||
|
'name': name_tag.text.strip(),
|
||||||
|
'return_type': type_tag.text,
|
||||||
|
'params': params,
|
||||||
|
'extension': '',
|
||||||
|
'platform': ''
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_type_node(node, vulkan_hpp):
|
||||||
|
alias_for = node.attrib.get('alias')
|
||||||
|
type_name = node.attrib.get('name', '')
|
||||||
|
if alias_for is not None:
|
||||||
|
vulkan_hpp['types'][type_name] = {
|
||||||
|
'name': type_name,
|
||||||
|
'alias': alias_for,
|
||||||
|
'extension': '',
|
||||||
|
'platform': ''
|
||||||
|
}
|
||||||
|
return
|
||||||
|
category = node.attrib.get('category')
|
||||||
|
if category in ('struct', 'union'):
|
||||||
|
parse_struct_type_node(node, vulkan_hpp)
|
||||||
|
elif category == 'handle':
|
||||||
|
parse_handle_type_node(node, vulkan_hpp)
|
||||||
|
|
||||||
|
def parse_struct_type_node(node, vulkan_hpp):
|
||||||
|
type_name = node.attrib['name']
|
||||||
|
category = node.attrib.get('category')
|
||||||
|
|
||||||
|
members = []
|
||||||
|
sType = ''
|
||||||
|
for member_tag in node.findall('member'):
|
||||||
|
member_type_tag = member_tag.find('type')
|
||||||
|
member_name_tag = member_tag.find('name')
|
||||||
|
members.append({
|
||||||
|
'type': ((member_tag.text or "") + member_type_tag.text + (member_type_tag.tail or "")).strip(),
|
||||||
|
'name': member_name_tag.text.strip(),
|
||||||
|
'name_type_suffix': (member_name_tag.tail or "").strip(),
|
||||||
|
'length': member_tag.attrib.get('len', '')
|
||||||
|
})
|
||||||
|
if member_name_tag.text == 'sType':
|
||||||
|
sType = member_tag.attrib.get('values', '').split(',')[0]
|
||||||
|
vulkan_hpp['types'][type_name] = {
|
||||||
|
'name': type_name,
|
||||||
|
'category': category,
|
||||||
|
'members': members,
|
||||||
|
'sType': sType,
|
||||||
|
'extension': '',
|
||||||
|
'platform': ''
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_handle_type_node(node, vulkan_hpp):
|
||||||
|
name_tag = node.find('name')
|
||||||
|
if name_tag is None:
|
||||||
|
return
|
||||||
|
type_name = name_tag.text
|
||||||
|
vulkan_hpp['types'][type_name] = {
|
||||||
|
'name': type_name,
|
||||||
|
'category': 'handle',
|
||||||
|
'objtypeenum': node.attrib['objtypeenum'],
|
||||||
|
'extension': '',
|
||||||
|
'platform': ''
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def parse_platform_node(platform_node, vulkan_hpp):
|
||||||
|
platform_name = platform_node.attrib['name']
|
||||||
|
vulkan_hpp['platforms'][platform_name] = {
|
||||||
|
'protect': platform_node.attrib['protect']
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_extension_node(extension_node, vulkan_hpp):
|
||||||
|
extension_name = extension_node.attrib['name']
|
||||||
|
platform_name = extension_node.attrib.get('platform', '')
|
||||||
|
require_node = extension_node.find('require')
|
||||||
|
for cmd_node in require_node.findall('command'):
|
||||||
|
cmd_name = cmd_node.attrib['name']
|
||||||
|
if cmd_name in vulkan_hpp['commands']:
|
||||||
|
vulkan_hpp['commands'][cmd_name]['extension'] = extension_name
|
||||||
|
vulkan_hpp['commands'][cmd_name]['platform'] = platform_name
|
||||||
|
for type_node in require_node.findall('type'):
|
||||||
|
type_name = type_node.attrib['name']
|
||||||
|
if type_name in vulkan_hpp['types']:
|
||||||
|
vulkan_hpp['types'][type_name]['extension'] = extension_name
|
||||||
|
vulkan_hpp['types'][type_name]['platform'] = platform_name
|
||||||
|
vulkan_hpp['extensions'][extension_name] = {
|
||||||
|
'platform': platform_name
|
||||||
|
}
|
||||||
|
|
||||||
|
def parse_vulkan_hpp():
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
|
vulkan_hpp = {
|
||||||
|
'commands': {},
|
||||||
|
'types': {},
|
||||||
|
'extensions': {},
|
||||||
|
'platforms': {}
|
||||||
|
}
|
||||||
|
|
||||||
|
tree = ET.parse('thirdparty/vulkan-docs/xml/vk.xml')
|
||||||
|
root = tree.getroot()
|
||||||
|
|
||||||
|
cmds_node = root.find('commands')
|
||||||
|
for cmd_node in cmds_node:
|
||||||
|
parse_cmd_node(cmd_node, vulkan_hpp)
|
||||||
|
|
||||||
|
types_node = root.find('types')
|
||||||
|
for type_node in types_node:
|
||||||
|
parse_type_node(type_node, vulkan_hpp)
|
||||||
|
|
||||||
|
platforms_node = root.find('platforms')
|
||||||
|
for platform_node in platforms_node:
|
||||||
|
parse_platform_node(platform_node, vulkan_hpp)
|
||||||
|
|
||||||
|
extensions_node = root.find('extensions')
|
||||||
|
for extension_node in extensions_node:
|
||||||
|
parse_extension_node(extension_node, vulkan_hpp)
|
||||||
|
|
||||||
|
return vulkan_hpp
|
||||||
|
|
||||||
|
vulkan_hpp = parse_vulkan_hpp()
|
||||||
|
|
||||||
|
def generate_source(target, source, env):
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from importlib.util import module_from_spec, spec_from_file_location
|
||||||
|
|
||||||
|
# allow the module to import from its current folder
|
||||||
|
sys.path.append(os.path.dirname(source[0].abspath))
|
||||||
|
python_spec = spec_from_file_location('source', source[0].abspath)
|
||||||
|
python_mod = module_from_spec(python_spec)
|
||||||
|
python_spec.loader.exec_module(python_mod)
|
||||||
|
python_mod.vulkan_hpp = vulkan_hpp
|
||||||
|
python_mod.generate(targets = [t.abspath for t in target])
|
||||||
|
|
||||||
|
# restore path
|
||||||
|
sys.path = sys.path[:-1]
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
pygen_builder = Builder(action = generate_source)
|
||||||
|
env.Append(BUILDERS = {'PyGen': pygen_builder})
|
||||||
|
env.Append(CPPPATH = ['include'])
|
||||||
|
|
||||||
|
source_files = Split("""
|
||||||
|
source/data_pool.cpp
|
||||||
|
source/dispatch_table.cpp
|
||||||
|
source/functions.cpp
|
||||||
|
source/layer.cpp
|
||||||
|
source/record_list.cpp
|
||||||
|
source/variant_pool.cpp
|
||||||
|
""")
|
||||||
|
|
||||||
|
# env.PyGen('source/functions.hpp', 'generators/functions.hpp.py')
|
||||||
|
env.PyGen('include/vk_function_ids.h', 'generators/vk_function_ids.h.py')
|
||||||
|
env.PyGen('source/functions.cpp', 'generators/functions.cpp.py')
|
||||||
|
env.PyGen('source/variant_wrap.hpp', 'generators/variant_wrap.hpp.py')
|
||||||
|
env.SharedLibrary(
|
||||||
|
target = 'VkLayer_capture',
|
||||||
|
source = source_files
|
||||||
|
)
|
14
VkLayer_capture.json
Normal file
14
VkLayer_capture.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"file_format_version": "1.2.0",
|
||||||
|
"layer": {
|
||||||
|
"name": "VK_LAYER_MEWIN_capture",
|
||||||
|
"type": "GLOBAL",
|
||||||
|
"library_path": "./libVkLayer_capture.so",
|
||||||
|
"api_version": "1.3.221",
|
||||||
|
"implementation_version": "1",
|
||||||
|
"description": "Layer for capturing Vulkan commands",
|
||||||
|
"functions": {
|
||||||
|
"vkNegotiateLoaderLayerInterfaceVersion": "vk_capture_vkNegotiateLoaderLayerInterfaceVersion"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
103
generators/common/__init__.py
Normal file
103
generators/common/__init__.py
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
|
||||||
|
FIRST_PARAM_BLACKLIST = {'VkInstance', 'VkPhysicalDevice'}
|
||||||
|
|
||||||
|
FUNC_BLACKLIST = {'vkCreateInstance', 'vkDestroyInstance', 'vkGetDeviceProcAddr', 'vkDestroyDevice', 'vkEnumerateInstanceVersion',
|
||||||
|
'vkEnumerateInstanceLayerProperties', 'vkEnumerateInstanceExtensionProperties', 'vkCmdDrawMeshTasksEXT',
|
||||||
|
'vkCmdDrawMeshTasksIndirectEXT', 'vkCmdDrawMeshTasksIndirectCountEXT', 'vkGetDeviceGroupSurfacePresentModes2EXT',
|
||||||
|
'vkGetShaderModuleIdentifierEXT', 'vkGetShaderModuleCreateInfoIdentifierEXT'}
|
||||||
|
|
||||||
|
# TODO: some of these could probably be handled better if I parsed the xml file correctly ...
|
||||||
|
TYPE_BLACKLIST = {'VkPhysicalDeviceMeshShaderFeaturesEXT', 'VkPhysicalDeviceMeshShaderPropertiesEXT',
|
||||||
|
'VkSurfaceFullScreenExclusiveWin32InfoEXT', 'VkPhysicalDeviceLegacyDitheringFeaturesEXT',
|
||||||
|
'VkAndroidHardwareBufferFormatProperties2ANDROID', 'VkPhysicalDeviceRasterizationOrderAttachmentAccessFeaturesEXT',
|
||||||
|
'VkImageViewSampleWeightCreateInfoQCOM', 'VkPhysicalDeviceImageProcessingFeaturesQCOM',
|
||||||
|
'VkPhysicalDeviceImageProcessingPropertiesQCOM', 'VkPhysicalDeviceTilePropertiesFeaturesQCOM', 'VkTilePropertiesQCOM',
|
||||||
|
'VkPhysicalDeviceAmigoProfilingFeaturesSEC', 'VkAmigoProfilingSubmitInfoSEC',
|
||||||
|
'VkPhysicalDeviceAttachmentFeedbackLoopLayoutFeaturesEXT', 'VkPhysicalDeviceDepthClampZeroOneFeaturesEXT',
|
||||||
|
'VkDrawMeshTasksIndirectCommandEXT'}
|
||||||
|
|
||||||
|
def func_name_to_caps(name):
|
||||||
|
assert(name[0:2] == "vk")
|
||||||
|
caps = [name[2]]
|
||||||
|
wasupper = True
|
||||||
|
for char in name[3:]:
|
||||||
|
if char.isupper():
|
||||||
|
if not wasupper:
|
||||||
|
caps.append("_")
|
||||||
|
wasupper = True
|
||||||
|
else:
|
||||||
|
wasupper = False
|
||||||
|
caps.append(char.upper())
|
||||||
|
return "".join(caps)
|
||||||
|
|
||||||
|
STRUCT_NAME_EXCEPTIONS = {
|
||||||
|
'VkPhysicalDeviceIDProperties': 'VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES'
|
||||||
|
}
|
||||||
|
|
||||||
|
def struct_name_to_enum(name):
|
||||||
|
assert(name[0:2] == "Vk")
|
||||||
|
exception = name in STRUCT_NAME_EXCEPTIONS
|
||||||
|
if exception:
|
||||||
|
return exception
|
||||||
|
caps = ["VK_STRUCTURE_TYPE_", name[2]]
|
||||||
|
wasupper = True
|
||||||
|
wasnumeric = False
|
||||||
|
for char in name[3:]:
|
||||||
|
if char.isupper():
|
||||||
|
if not wasupper:
|
||||||
|
caps.append("_")
|
||||||
|
wasupper = True
|
||||||
|
else:
|
||||||
|
wasupper = False
|
||||||
|
if char.isnumeric():
|
||||||
|
if not wasnumeric:
|
||||||
|
caps.append("_")
|
||||||
|
wasnumeric = True
|
||||||
|
else:
|
||||||
|
wasnumeric = False
|
||||||
|
caps.append(char.upper())
|
||||||
|
return "".join(caps)
|
||||||
|
|
||||||
|
def write_preamble(f, header_guard = None, includes = [], c_file = False):
|
||||||
|
f.write("""
|
||||||
|
// This file has been automatically generated. Do NOT edit edit manually, all your changes will be lost when it is regenerated.
|
||||||
|
""")
|
||||||
|
if header_guard is not None:
|
||||||
|
f.write(f"""
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined({header_guard})
|
||||||
|
#define {header_guard} 1
|
||||||
|
""")
|
||||||
|
|
||||||
|
for include in includes:
|
||||||
|
f.write(f"""
|
||||||
|
#include {include}""")
|
||||||
|
|
||||||
|
if c_file:
|
||||||
|
f.write("""
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
""")
|
||||||
|
else:
|
||||||
|
f.write("""
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
""")
|
||||||
|
|
||||||
|
def write_epilogue(f, header_guard = None, c_file = False):
|
||||||
|
if c_file:
|
||||||
|
f.write("""
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
||||||
|
""")
|
||||||
|
else:
|
||||||
|
f.write("""
|
||||||
|
} // namespace vk_capture
|
||||||
|
""")
|
||||||
|
if header_guard is not None:
|
||||||
|
f.write(f"""
|
||||||
|
#endif // {header_guard}
|
||||||
|
""")
|
83
generators/functions.cpp.py
Normal file
83
generators/functions.cpp.py
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
|
||||||
|
from common import func_name_to_caps, write_epilogue, write_preamble, FIRST_PARAM_BLACKLIST, FUNC_BLACKLIST
|
||||||
|
|
||||||
|
def write_funcdef(f, cmd):
|
||||||
|
if 'alias' in cmd or cmd["name"] in FUNC_BLACKLIST:
|
||||||
|
return
|
||||||
|
if len(cmd['params']) > 0 and cmd['params'][0]['type'] in FIRST_PARAM_BLACKLIST:
|
||||||
|
return
|
||||||
|
f.write(f"""{cmd["return_type"]} {cmd["name"]}(""")
|
||||||
|
f.write(", ".join([f"""{p['type']} {p['name']}{p['name_type_suffix']}""" for p in cmd['params']]))
|
||||||
|
|
||||||
|
func_name = f"VK_FUNCTION_{func_name_to_caps(cmd['name'])}_MWN"
|
||||||
|
param_list_pass = ", ".join([f"""{p['name']}""" for p in cmd['params']])
|
||||||
|
if cmd['return_type'] == 'void':
|
||||||
|
f.write(f""")
|
||||||
|
{{
|
||||||
|
g_dispatchTable.{cmd["name"][2:]}({param_list_pass});
|
||||||
|
recordVoidFunction({func_name}, {param_list_pass});
|
||||||
|
}}
|
||||||
|
""")
|
||||||
|
else:
|
||||||
|
f.write(f""")
|
||||||
|
{{
|
||||||
|
auto result = g_dispatchTable.{cmd["name"][2:]}({param_list_pass});
|
||||||
|
recordFunction({func_name}, result, {param_list_pass});
|
||||||
|
return result;
|
||||||
|
}}
|
||||||
|
""")
|
||||||
|
|
||||||
|
def write_funcgetter(f, cmd, alias_for = ''):
|
||||||
|
if cmd["name"] in FUNC_BLACKLIST:
|
||||||
|
return
|
||||||
|
if 'alias' in cmd:
|
||||||
|
write_funcgetter(f, vulkan_hpp['commands'][cmd['alias']], alias_for=cmd['name'])
|
||||||
|
return
|
||||||
|
if len(cmd['params']) > 0 and cmd['params'][0]['type'] in FIRST_PARAM_BLACKLIST:
|
||||||
|
return
|
||||||
|
f.write(f"""
|
||||||
|
if (std::strcmp(pName, "{alias_for or cmd['name']}") == 0) {{
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&{cmd['name']});
|
||||||
|
}} else""")
|
||||||
|
|
||||||
|
def generate(targets):
|
||||||
|
assert(len(targets) == 1)
|
||||||
|
with open(targets[0], 'w') as f:
|
||||||
|
write_preamble(f, includes = ['<cstring>', '"dispatch_table.hpp"', '"functions.hpp"', '"record_list.hpp"', '"vk_function_ids.h"'])
|
||||||
|
commands = list(vulkan_hpp['commands'].values())
|
||||||
|
commands.sort(key=lambda cmd: cmd['platform'])
|
||||||
|
plat = ''
|
||||||
|
for cmd in commands:
|
||||||
|
if plat != cmd['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = cmd['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
write_funcdef(f, cmd)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
|
||||||
|
f.write("""PFN_vkVoidFunction getWrappedFunctionPtr(const char* pName)
|
||||||
|
{
|
||||||
|
""")
|
||||||
|
plat = ''
|
||||||
|
for cmd in commands:
|
||||||
|
if plat != cmd['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = cmd['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
write_funcgetter(f, cmd)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
f.write("""
|
||||||
|
{{
|
||||||
|
return nullptr;
|
||||||
|
}}
|
||||||
|
}""")
|
||||||
|
write_epilogue(f)
|
31
generators/functions.hpp.py
Normal file
31
generators/functions.hpp.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
from common import write_epilogue, write_preamble, FUNC_BLACKLIST
|
||||||
|
|
||||||
|
HEADER_GUARD = 'VK_CAPTURE_FUNCTIONS_HPP_INCLUDED'
|
||||||
|
|
||||||
|
def write_funcsig(f, cmd):
|
||||||
|
if 'alias' in cmd or cmd["name"] in FUNC_BLACKLIST:
|
||||||
|
return
|
||||||
|
if len(cmd['params']) > 0 and cmd['params'][0]['type'] in ('VkInstance', 'VkPhysicalDevice'):
|
||||||
|
return
|
||||||
|
f.write(f"""{cmd["return_type"]} {cmd["name"]}(""")
|
||||||
|
f.write(", ".join([f"""{p['type']} {p['name']}{p['name_type_suffix']}""" for p in cmd['params']]))
|
||||||
|
f.write(");\n")
|
||||||
|
|
||||||
|
def generate(targets):
|
||||||
|
assert(len(targets) == 1)
|
||||||
|
with open(targets[0], 'w') as f:
|
||||||
|
write_preamble(f, header_guard=HEADER_GUARD, includes = ['<vulkan/vulkan.h>'])
|
||||||
|
# commands = list(vulkan_hpp['commands'].values())
|
||||||
|
# commands.sort(key=lambda cmd: cmd['platform'])
|
||||||
|
# plat = ''
|
||||||
|
# for cmd in commands:
|
||||||
|
# if plat != cmd['platform']:
|
||||||
|
# if plat != '':
|
||||||
|
# f.write(f"""#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
# plat = cmd['platform']
|
||||||
|
# f.write(f"""#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
# write_funcsig(f, cmd)
|
||||||
|
# # finish the final platform
|
||||||
|
# f.write(f"""#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
write_epilogue(f, header_guard=HEADER_GUARD)
|
216
generators/variant_wrap.hpp.py
Normal file
216
generators/variant_wrap.hpp.py
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
import binascii
|
||||||
|
from common import struct_name_to_enum, write_epilogue, write_preamble, FIRST_PARAM_BLACKLIST, TYPE_BLACKLIST
|
||||||
|
|
||||||
|
HEADER_GUARD = 'VK_CAPTURE_VARIANT_WRAP_HPP_INCLUDED'
|
||||||
|
|
||||||
|
LENGTH_EXCEPTIONS = {
|
||||||
|
('VkShaderModuleCreateInfo', 'pCode'): 'value.codeSize / 4',
|
||||||
|
('VkPipelineMultisampleStateCreateInfo', 'pSampleMask'): '(value.rasterizationSamples + 31) / 32',
|
||||||
|
('VkAccelerationStructureVersionInfoKHR', 'pVersionData'): '2 * VK_UUID_SIZE'
|
||||||
|
}
|
||||||
|
|
||||||
|
def write_copyfunc_definition(f, struct):
|
||||||
|
if 'alias' in struct or struct['name'] in TYPE_BLACKLIST or struct['category'] != 'struct':
|
||||||
|
return
|
||||||
|
f.write(f"""inline void copyIndirectData({struct['name']}& value);
|
||||||
|
""")
|
||||||
|
|
||||||
|
|
||||||
|
def write_copyfunc(f, struct):
|
||||||
|
if 'alias' in struct or struct['name'] in TYPE_BLACKLIST or struct['category'] != 'struct':
|
||||||
|
return
|
||||||
|
f.write(f"""
|
||||||
|
inline void copyIndirectData([[maybe_unused]] {struct['name']}& value)
|
||||||
|
{{""")
|
||||||
|
for member in struct['members']:
|
||||||
|
if 'void*' in member['type']:
|
||||||
|
if member['name'] == 'pNext':
|
||||||
|
f.write("""
|
||||||
|
value.pNext = copyNextPtr(value.pNext);""")
|
||||||
|
continue
|
||||||
|
if member['type'].endswith('**'):
|
||||||
|
pass
|
||||||
|
elif member['type'].endswith('*'):
|
||||||
|
f.write(f"""
|
||||||
|
if (value.{member['name']} != nullptr)
|
||||||
|
{{
|
||||||
|
using base_type_t = std::decay_t<{member['type'].strip('*')}>;""")
|
||||||
|
length_exception = LENGTH_EXCEPTIONS.get((struct['name'], member['name']))
|
||||||
|
if length_exception:
|
||||||
|
f.write(f"""
|
||||||
|
const std::size_t numElements = {length_exception};
|
||||||
|
""")
|
||||||
|
elif member['type'].endswith('char*'):
|
||||||
|
f.write(f"""
|
||||||
|
const std::size_t numElements = std::strlen(value.{member['name']}) + 1;""")
|
||||||
|
elif member['length']:
|
||||||
|
f.write(f"""
|
||||||
|
const std::size_t numElements = value.{member['length'].split(',')[0]};""")
|
||||||
|
else:
|
||||||
|
f.write(f"""
|
||||||
|
static constexpr std::size_t numElements = 1; // TODO""")
|
||||||
|
f.write(f"""
|
||||||
|
auto copy = allocType<base_type_t>(numElements);
|
||||||
|
std::memcpy(copy, value.{member['name']}, numElements * sizeof(base_type_t));
|
||||||
|
|
||||||
|
for (std::size_t ele = 0; ele < numElements; ++ele) {{
|
||||||
|
copyIndirectData(copy[ele]);
|
||||||
|
}}
|
||||||
|
value.{member['name']} = copy;
|
||||||
|
}}
|
||||||
|
""")
|
||||||
|
f.write(f"""
|
||||||
|
}}
|
||||||
|
""")
|
||||||
|
|
||||||
|
def write_structwrapper(f, struct):
|
||||||
|
if 'alias' in struct or struct['name'] in TYPE_BLACKLIST:
|
||||||
|
return
|
||||||
|
if(len(struct['members']) < 2 or struct['members'][1]['name'] != 'pNext'):
|
||||||
|
return # TODO
|
||||||
|
is_output = "const" not in struct['members'][1]['type']
|
||||||
|
f.write(f"""
|
||||||
|
inline void variantWrap(const {struct['name']}& value, VkVariantMWN& outVariant)
|
||||||
|
{{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_{is_output and "OUT" or "IN"}_STRUCTURE_MWN;
|
||||||
|
|
||||||
|
auto valueCopy = allocType<{struct['name']}>();
|
||||||
|
outVariant.{is_output and "out" or "in"}StructureValue = reinterpret_cast<VkBase{is_output and "Out" or "In"}Structure*>(valueCopy);
|
||||||
|
|
||||||
|
std::memcpy(valueCopy, &value, sizeof({struct['name']}));
|
||||||
|
copyIndirectData(*valueCopy);
|
||||||
|
}}
|
||||||
|
""")
|
||||||
|
|
||||||
|
def write_handlewrapper(f, handle):
|
||||||
|
if 'alias' in handle or handle['name'] in TYPE_BLACKLIST:
|
||||||
|
return
|
||||||
|
f.write(f"""
|
||||||
|
inline void variantWrap({handle['name']} value, VkVariantMWN& outVariant)
|
||||||
|
{{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_OBJECT_MWN;
|
||||||
|
outVariant.objectValue.type = {handle['objtypeenum']};
|
||||||
|
outVariant.objectValue.value = value;
|
||||||
|
}}
|
||||||
|
""")
|
||||||
|
|
||||||
|
def write_nextptrcase(f, struct):
|
||||||
|
if 'alias' in struct or struct['name'] in TYPE_BLACKLIST or struct['name'] in ('VkBaseOutStructure', 'VkBaseInStructure'):
|
||||||
|
return
|
||||||
|
if(len(struct['members']) < 2 or struct['members'][0]['name'] != 'sType'):
|
||||||
|
return
|
||||||
|
f.write(f"""
|
||||||
|
case {(struct['sType'])}:
|
||||||
|
pCopy = allocType<{struct['name']}>();
|
||||||
|
std::memcpy(pCopy, pNext, sizeof({struct['name']}));
|
||||||
|
copyIndirectData(*static_cast<{struct['name']}*>(pCopy));
|
||||||
|
break;""")
|
||||||
|
|
||||||
|
def generate(targets):
|
||||||
|
assert(len(targets) == 1)
|
||||||
|
with open(targets[0], 'w') as f:
|
||||||
|
write_preamble(f, includes = ['<cstring>', '<type_traits>', '<vulkan/vulkan.h>', '"common.hpp"', '"vk_capture.h"'], header_guard=HEADER_GUARD)
|
||||||
|
|
||||||
|
f.write("""
|
||||||
|
inline void* copyNextPtr(const void* pNext);
|
||||||
|
|
||||||
|
// do nothing by default
|
||||||
|
template<typename T>
|
||||||
|
inline void copyIndirectData(const T&) {}
|
||||||
|
|
||||||
|
inline void copyIndirectData(const char*& value)
|
||||||
|
{
|
||||||
|
const std::size_t len = std::strlen(value) + 1;
|
||||||
|
char* copy = allocType<char>(len);
|
||||||
|
std::memcpy(copy, value, len);
|
||||||
|
value = copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename TStruct>
|
||||||
|
inline void copyIndirectData(const TStruct*& value)
|
||||||
|
{
|
||||||
|
TStruct* copy = allocType<TStruct>();
|
||||||
|
std::memcpy(copy, value, sizeof(TStruct));
|
||||||
|
copyIndirectData(*copy);
|
||||||
|
value = copy;
|
||||||
|
}
|
||||||
|
""")
|
||||||
|
|
||||||
|
types = list(vulkan_hpp['types'].values())
|
||||||
|
types.sort(key=lambda tp: tp['platform'])
|
||||||
|
plat = ''
|
||||||
|
for tp in types:
|
||||||
|
if plat != tp['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = tp['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
if tp.get('category') in ('struct', 'union'):
|
||||||
|
write_copyfunc_definition(f, tp)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
|
||||||
|
plat = ''
|
||||||
|
for tp in types:
|
||||||
|
if plat != tp['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = tp['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
if tp.get('category') in ('struct', 'union'):
|
||||||
|
write_copyfunc(f, tp)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
|
||||||
|
plat = ''
|
||||||
|
for tp in types:
|
||||||
|
if plat != tp['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = tp['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
if tp.get('category') in ('struct', 'union'):
|
||||||
|
write_structwrapper(f, tp)
|
||||||
|
elif tp.get('category') == 'handle':
|
||||||
|
write_handlewrapper(f, tp)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
|
||||||
|
f.write("""
|
||||||
|
inline void* copyNextPtr(const void* pNext)
|
||||||
|
{
|
||||||
|
if (pNext == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
const VkStructureType sType = *static_cast<const VkStructureType*>(pNext);
|
||||||
|
void* pCopy = nullptr;
|
||||||
|
switch (sType)
|
||||||
|
{""")
|
||||||
|
plat = ''
|
||||||
|
for tp in types:
|
||||||
|
if plat != tp['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = tp['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
if tp.get('category') in ('struct', 'union'):
|
||||||
|
write_nextptrcase(f, tp)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
f.write("""
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
return pCopy;
|
||||||
|
}""")
|
||||||
|
|
||||||
|
write_epilogue(f, header_guard=HEADER_GUARD)
|
45
generators/vk_function_ids.h.py
Normal file
45
generators/vk_function_ids.h.py
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import binascii
|
||||||
|
from common import func_name_to_caps, write_epilogue, write_preamble, FIRST_PARAM_BLACKLIST, FUNC_BLACKLIST
|
||||||
|
|
||||||
|
HEADER_GUARD = 'VK_CAPTURE_FUNCTION_IDS_H_INCLUDED'
|
||||||
|
_dbg_hashes = set()
|
||||||
|
|
||||||
|
|
||||||
|
def write_funcid(f, cmd):
|
||||||
|
if 'alias' in cmd or cmd["name"] in FUNC_BLACKLIST:
|
||||||
|
return
|
||||||
|
if len(cmd['params']) > 0 and cmd['params'][0]['type'] in FIRST_PARAM_BLACKLIST:
|
||||||
|
return
|
||||||
|
funchash = binascii.crc32(cmd['name'].encode('utf8'))
|
||||||
|
f.write(f"""
|
||||||
|
VK_FUNCTION_{func_name_to_caps(cmd['name'])}_MWN = {funchash},""")
|
||||||
|
|
||||||
|
# just to make sure there are no hash collisions, we wouldn't want that
|
||||||
|
global _dbg_hashes
|
||||||
|
assert(funchash not in _dbg_hashes)
|
||||||
|
_dbg_hashes.add(funchash)
|
||||||
|
|
||||||
|
def generate(targets):
|
||||||
|
assert(len(targets) == 1)
|
||||||
|
with open(targets[0], 'w') as f:
|
||||||
|
write_preamble(f, includes = ['<vulkan/vulkan.h>'], header_guard=HEADER_GUARD, c_file=True)
|
||||||
|
commands = list(vulkan_hpp['commands'].values())
|
||||||
|
commands.sort(key=lambda cmd: cmd['platform'])
|
||||||
|
plat = ''
|
||||||
|
f.write("""
|
||||||
|
typedef enum VkFunctionMWN {""")
|
||||||
|
for cmd in commands:
|
||||||
|
if plat != cmd['platform']:
|
||||||
|
if plat != '':
|
||||||
|
f.write(f"""
|
||||||
|
#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
plat = cmd['platform']
|
||||||
|
f.write(f"""
|
||||||
|
#if defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
write_funcid(f, cmd)
|
||||||
|
# finish the final platform
|
||||||
|
f.write(f"""#endif // defined({vulkan_hpp['platforms'][plat]['protect']})\n""")
|
||||||
|
f.write("""
|
||||||
|
} VkFunctionMWN;
|
||||||
|
""")
|
||||||
|
write_epilogue(f, header_guard=HEADER_GUARD, c_file=True)
|
112
include/vk_capture.h
Normal file
112
include/vk_capture.h
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_H_INCLUDED)
|
||||||
|
#define VK_CAPTURE_H_INCLUDED 1
|
||||||
|
|
||||||
|
#include <vulkan/vulkan.h>
|
||||||
|
#include "vk_function_ids.h"
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
VK_DEFINE_HANDLE(VkRecordListMWN);
|
||||||
|
|
||||||
|
static const VkStructureType VK_STRUCTURE_TYPE_RECORD_LIST_ALLOCATE_INFO_MWN = (VkStructureType) 2000144777; // pretty random, but should be fine I guess
|
||||||
|
static const VkStructureType VK_STRUCTURE_TYPE_RECORD_INFO_MWN = (VkStructureType) 2000144778;
|
||||||
|
|
||||||
|
typedef enum VkRecordListAllocateFlagBitsMWN {
|
||||||
|
VK_RECORD_LIST_ALLOCATE_FLAG_BITS_NONE_MWN = 0,
|
||||||
|
VK_RECORD_LIST_ALLOCATE_FLAG_BITS_MAX_ENUM_MWN = 0x7FFFFFFF
|
||||||
|
} VkRecordListAllocateFlagBitsMWN;
|
||||||
|
typedef VkFlags VkRecordListAllocateFlagsMWN;
|
||||||
|
|
||||||
|
typedef enum VkRecordFlagBitsMWN {
|
||||||
|
VK_RECORD_FLAG_BITS_NONE_MWN = 0,
|
||||||
|
VK_RECORD_FLAG_BITS_MAX_ENUM_MWN = 0x7FFFFFFF
|
||||||
|
} VkRecordFlagBitsMWN;
|
||||||
|
typedef VkFlags VkRecordFlags;
|
||||||
|
|
||||||
|
typedef struct VkRecordListAllocateInfoMWN
|
||||||
|
{
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
VkRecordListAllocateFlagsMWN flags;
|
||||||
|
} VkRecordListAllocateInfoMWN;
|
||||||
|
|
||||||
|
typedef struct VkRecordInfoMWN
|
||||||
|
{
|
||||||
|
VkStructureType sType;
|
||||||
|
void* pNext;
|
||||||
|
VkRecordFlags flags;
|
||||||
|
VkRecordListMWN recordList;
|
||||||
|
} VkRecordInfoMWN;
|
||||||
|
|
||||||
|
typedef enum VkVariantTypeMWN {
|
||||||
|
VK_VARIANT_TYPE_UNKNOWN_MWN = 0,
|
||||||
|
VK_VARIANT_TYPE_NONE_MWN = 1,
|
||||||
|
VK_VARIANT_TYPE_BOOL_MWN = 2,
|
||||||
|
VK_VARIANT_TYPE_UINT8_MWN = 3,
|
||||||
|
VK_VARIANT_TYPE_INT8_MWN = 4,
|
||||||
|
VK_VARIANT_TYPE_UINT16_MWN = 5,
|
||||||
|
VK_VARIANT_TYPE_INT16_MWN = 6,
|
||||||
|
VK_VARIANT_TYPE_UINT32_MWN = 7,
|
||||||
|
VK_VARIANT_TYPE_INT32_MWN = 8,
|
||||||
|
VK_VARIANT_TYPE_UINT64_MWN = 9,
|
||||||
|
VK_VARIANT_TYPE_INT64_MWN = 10,
|
||||||
|
VK_VARIANT_TYPE_FLOAT_MWN = 11,
|
||||||
|
VK_VARIANT_TYPE_DOUBLE_MWN = 12,
|
||||||
|
VK_VARIANT_TYPE_STRING_MWN = 13,
|
||||||
|
VK_VARIANT_TYPE_VOID_POINTER_MWN = 14,
|
||||||
|
VK_VARIANT_TYPE_POINTER_MWN = 15,
|
||||||
|
VK_VARIANT_TYPE_ARRAY_MWN = 16,
|
||||||
|
VK_VARIANT_TYPE_IN_STRUCTURE_MWN = 17,
|
||||||
|
VK_VARIANT_TYPE_OUT_STRUCTURE_MWN = 18,
|
||||||
|
VK_VARIANT_TYPE_OBJECT_MWN = 19
|
||||||
|
} VkVariantTypeMWN;
|
||||||
|
|
||||||
|
typedef struct VkVariantObjectValueMWN {
|
||||||
|
void* value;
|
||||||
|
VkObjectType type;
|
||||||
|
} VkVariantObjectValueMWN;
|
||||||
|
|
||||||
|
typedef struct VkVariantArrayValueMWN {
|
||||||
|
size_t numElements;
|
||||||
|
struct VkVariantMWN* elements;
|
||||||
|
} VkVariantArrayValueMWN;
|
||||||
|
|
||||||
|
typedef struct VkVariantMWN {
|
||||||
|
VkVariantTypeMWN type;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
uint64_t uintValue;
|
||||||
|
int64_t intValue;
|
||||||
|
float floatValue;
|
||||||
|
double doubleValue;
|
||||||
|
const void* voidPointerValue;
|
||||||
|
VkVariantMWN* pointerValue;
|
||||||
|
VkVariantArrayValueMWN arrayValue;
|
||||||
|
VkBaseInStructure* inStructureValue;
|
||||||
|
VkBaseOutStructure* outStructureValue;
|
||||||
|
VkVariantObjectValueMWN objectValue;
|
||||||
|
};
|
||||||
|
} VkVariantMWN;
|
||||||
|
|
||||||
|
typedef struct VkRecordListItemMWN
|
||||||
|
{
|
||||||
|
VkFunctionMWN function;
|
||||||
|
VkVariantMWN returnValue;
|
||||||
|
uint32_t numParameters;
|
||||||
|
VkVariantMWN* pParameterValues;
|
||||||
|
} VkRecordListItemMWN;
|
||||||
|
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkAllocateRecordListMWN)(VkDevice device, const VkRecordListAllocateInfoMWN* pCreateInfo, VkRecordListMWN* pRecordList);
|
||||||
|
typedef void (VKAPI_PTR *PFN_vkFreeRecordListMWN)(VkDevice device, VkRecordListMWN recordList);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkBeginRecordingMWN)(VkDevice device, const VkRecordInfoMWN* pRecordInfo);
|
||||||
|
typedef void (VKAPI_PTR *PFN_vkEndRecordingMWN)(VkDevice device);
|
||||||
|
typedef VkResult (VKAPI_PTR *PFN_vkGetRecordListItemsMWN)(VkDevice device, VkRecordListMWN recordList, uint32_t* pItemCount, VkRecordListItemMWN** pItems);
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif //VK_CAPTURE_H_INCLUDED
|
457
include/vk_function_ids.h
Normal file
457
include/vk_function_ids.h
Normal file
@ -0,0 +1,457 @@
|
|||||||
|
|
||||||
|
// This file has been automatically generated. Do NOT edit edit manually, all your changes will be lost when it is regenerated.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_FUNCTION_IDS_H_INCLUDED)
|
||||||
|
#define VK_CAPTURE_FUNCTION_IDS_H_INCLUDED 1
|
||||||
|
|
||||||
|
#include <vulkan/vulkan.h>
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef enum VkFunctionMWN {
|
||||||
|
VK_FUNCTION_GET_DEVICE_QUEUE_MWN = 1801008959,
|
||||||
|
VK_FUNCTION_QUEUE_SUBMIT_MWN = 1197493870,
|
||||||
|
VK_FUNCTION_QUEUE_WAIT_IDLE_MWN = 1940615428,
|
||||||
|
VK_FUNCTION_DEVICE_WAIT_IDLE_MWN = 2002580487,
|
||||||
|
VK_FUNCTION_ALLOCATE_MEMORY_MWN = 2253521660,
|
||||||
|
VK_FUNCTION_FREE_MEMORY_MWN = 2468360846,
|
||||||
|
VK_FUNCTION_MAP_MEMORY_MWN = 3621835301,
|
||||||
|
VK_FUNCTION_UNMAP_MEMORY_MWN = 2338647589,
|
||||||
|
VK_FUNCTION_FLUSH_MAPPED_MEMORY_RANGES_MWN = 3558031893,
|
||||||
|
VK_FUNCTION_INVALIDATE_MAPPED_MEMORY_RANGES_MWN = 2887142980,
|
||||||
|
VK_FUNCTION_GET_DEVICE_MEMORY_COMMITMENT_MWN = 334806908,
|
||||||
|
VK_FUNCTION_GET_BUFFER_MEMORY_REQUIREMENTS_MWN = 3036355670,
|
||||||
|
VK_FUNCTION_BIND_BUFFER_MEMORY_MWN = 1840048986,
|
||||||
|
VK_FUNCTION_GET_IMAGE_MEMORY_REQUIREMENTS_MWN = 2835363504,
|
||||||
|
VK_FUNCTION_BIND_IMAGE_MEMORY_MWN = 1810199277,
|
||||||
|
VK_FUNCTION_GET_IMAGE_SPARSE_MEMORY_REQUIREMENTS_MWN = 1578405834,
|
||||||
|
VK_FUNCTION_QUEUE_BIND_SPARSE_MWN = 4028062444,
|
||||||
|
VK_FUNCTION_CREATE_FENCE_MWN = 1360193736,
|
||||||
|
VK_FUNCTION_DESTROY_FENCE_MWN = 3713526231,
|
||||||
|
VK_FUNCTION_RESET_FENCES_MWN = 3666245786,
|
||||||
|
VK_FUNCTION_GET_FENCE_STATUS_MWN = 997506943,
|
||||||
|
VK_FUNCTION_WAIT_FOR_FENCES_MWN = 875329429,
|
||||||
|
VK_FUNCTION_CREATE_SEMAPHORE_MWN = 4268486740,
|
||||||
|
VK_FUNCTION_DESTROY_SEMAPHORE_MWN = 2664671713,
|
||||||
|
VK_FUNCTION_CREATE_EVENT_MWN = 2270550839,
|
||||||
|
VK_FUNCTION_DESTROY_EVENT_MWN = 185653800,
|
||||||
|
VK_FUNCTION_GET_EVENT_STATUS_MWN = 3069640675,
|
||||||
|
VK_FUNCTION_SET_EVENT_MWN = 1748142302,
|
||||||
|
VK_FUNCTION_RESET_EVENT_MWN = 1072499137,
|
||||||
|
VK_FUNCTION_CREATE_QUERY_POOL_MWN = 2763305260,
|
||||||
|
VK_FUNCTION_DESTROY_QUERY_POOL_MWN = 3289180313,
|
||||||
|
VK_FUNCTION_GET_QUERY_POOL_RESULTS_MWN = 945300247,
|
||||||
|
VK_FUNCTION_RESET_QUERY_POOL_MWN = 1611793927,
|
||||||
|
VK_FUNCTION_CREATE_BUFFER_MWN = 3253311591,
|
||||||
|
VK_FUNCTION_DESTROY_BUFFER_MWN = 1282265235,
|
||||||
|
VK_FUNCTION_CREATE_BUFFER_VIEW_MWN = 1759615169,
|
||||||
|
VK_FUNCTION_DESTROY_BUFFER_VIEW_MWN = 3549063067,
|
||||||
|
VK_FUNCTION_CREATE_IMAGE_MWN = 2043073999,
|
||||||
|
VK_FUNCTION_DESTROY_IMAGE_MWN = 4119057616,
|
||||||
|
VK_FUNCTION_GET_IMAGE_SUBRESOURCE_LAYOUT_MWN = 2510335218,
|
||||||
|
VK_FUNCTION_CREATE_IMAGE_VIEW_MWN = 1339733099,
|
||||||
|
VK_FUNCTION_DESTROY_IMAGE_VIEW_MWN = 795012574,
|
||||||
|
VK_FUNCTION_CREATE_SHADER_MODULE_MWN = 4209023304,
|
||||||
|
VK_FUNCTION_DESTROY_SHADER_MODULE_MWN = 2545318000,
|
||||||
|
VK_FUNCTION_CREATE_PIPELINE_CACHE_MWN = 4045836824,
|
||||||
|
VK_FUNCTION_DESTROY_PIPELINE_CACHE_MWN = 3645471847,
|
||||||
|
VK_FUNCTION_GET_PIPELINE_CACHE_DATA_MWN = 593534222,
|
||||||
|
VK_FUNCTION_MERGE_PIPELINE_CACHES_MWN = 3775278370,
|
||||||
|
VK_FUNCTION_CREATE_GRAPHICS_PIPELINES_MWN = 2193739499,
|
||||||
|
VK_FUNCTION_CREATE_COMPUTE_PIPELINES_MWN = 3526437674,
|
||||||
|
VK_FUNCTION_GET_DEVICE_SUBPASS_SHADING_MAX_WORKGROUP_SIZE_HUAWEI_MWN = 129736554,
|
||||||
|
VK_FUNCTION_DESTROY_PIPELINE_MWN = 980737728,
|
||||||
|
VK_FUNCTION_CREATE_PIPELINE_LAYOUT_MWN = 394847638,
|
||||||
|
VK_FUNCTION_DESTROY_PIPELINE_LAYOUT_MWN = 3608864469,
|
||||||
|
VK_FUNCTION_CREATE_SAMPLER_MWN = 3993023298,
|
||||||
|
VK_FUNCTION_DESTROY_SAMPLER_MWN = 1415381263,
|
||||||
|
VK_FUNCTION_CREATE_DESCRIPTOR_SET_LAYOUT_MWN = 3936216980,
|
||||||
|
VK_FUNCTION_DESTROY_DESCRIPTOR_SET_LAYOUT_MWN = 3524710707,
|
||||||
|
VK_FUNCTION_CREATE_DESCRIPTOR_POOL_MWN = 620489314,
|
||||||
|
VK_FUNCTION_DESTROY_DESCRIPTOR_POOL_MWN = 3832146209,
|
||||||
|
VK_FUNCTION_RESET_DESCRIPTOR_POOL_MWN = 1613541836,
|
||||||
|
VK_FUNCTION_ALLOCATE_DESCRIPTOR_SETS_MWN = 318794980,
|
||||||
|
VK_FUNCTION_FREE_DESCRIPTOR_SETS_MWN = 3153914723,
|
||||||
|
VK_FUNCTION_UPDATE_DESCRIPTOR_SETS_MWN = 3773071573,
|
||||||
|
VK_FUNCTION_CREATE_FRAMEBUFFER_MWN = 1282047188,
|
||||||
|
VK_FUNCTION_DESTROY_FRAMEBUFFER_MWN = 3345985473,
|
||||||
|
VK_FUNCTION_CREATE_RENDER_PASS_MWN = 2541235822,
|
||||||
|
VK_FUNCTION_DESTROY_RENDER_PASS_MWN = 739496244,
|
||||||
|
VK_FUNCTION_GET_RENDER_AREA_GRANULARITY_MWN = 378226644,
|
||||||
|
VK_FUNCTION_CREATE_COMMAND_POOL_MWN = 220543643,
|
||||||
|
VK_FUNCTION_DESTROY_COMMAND_POOL_MWN = 2250303886,
|
||||||
|
VK_FUNCTION_RESET_COMMAND_POOL_MWN = 777004411,
|
||||||
|
VK_FUNCTION_ALLOCATE_COMMAND_BUFFERS_MWN = 3338007255,
|
||||||
|
VK_FUNCTION_FREE_COMMAND_BUFFERS_MWN = 1846113616,
|
||||||
|
VK_FUNCTION_BEGIN_COMMAND_BUFFER_MWN = 2575515866,
|
||||||
|
VK_FUNCTION_END_COMMAND_BUFFER_MWN = 2602013632,
|
||||||
|
VK_FUNCTION_RESET_COMMAND_BUFFER_MWN = 1950753224,
|
||||||
|
VK_FUNCTION_CMD_BIND_PIPELINE_MWN = 2681631005,
|
||||||
|
VK_FUNCTION_CMD_SET_VIEWPORT_MWN = 611416209,
|
||||||
|
VK_FUNCTION_CMD_SET_SCISSOR_MWN = 1908838255,
|
||||||
|
VK_FUNCTION_CMD_SET_LINE_WIDTH_MWN = 764516546,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_BIAS_MWN = 3754402555,
|
||||||
|
VK_FUNCTION_CMD_SET_BLEND_CONSTANTS_MWN = 1508866211,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_BOUNDS_MWN = 34716900,
|
||||||
|
VK_FUNCTION_CMD_SET_STENCIL_COMPARE_MASK_MWN = 3047889784,
|
||||||
|
VK_FUNCTION_CMD_SET_STENCIL_WRITE_MASK_MWN = 2182897628,
|
||||||
|
VK_FUNCTION_CMD_SET_STENCIL_REFERENCE_MWN = 2438412126,
|
||||||
|
VK_FUNCTION_CMD_BIND_DESCRIPTOR_SETS_MWN = 3144895685,
|
||||||
|
VK_FUNCTION_CMD_BIND_INDEX_BUFFER_MWN = 1707366535,
|
||||||
|
VK_FUNCTION_CMD_BIND_VERTEX_BUFFERS_MWN = 1119662941,
|
||||||
|
VK_FUNCTION_CMD_DRAW_MWN = 3029237212,
|
||||||
|
VK_FUNCTION_CMD_DRAW_INDEXED_MWN = 1374024729,
|
||||||
|
VK_FUNCTION_CMD_DRAW_MULTI_EXT_MWN = 694534688,
|
||||||
|
VK_FUNCTION_CMD_DRAW_MULTI_INDEXED_EXT_MWN = 4087296610,
|
||||||
|
VK_FUNCTION_CMD_DRAW_INDIRECT_MWN = 73174078,
|
||||||
|
VK_FUNCTION_CMD_DRAW_INDEXED_INDIRECT_MWN = 2845039994,
|
||||||
|
VK_FUNCTION_CMD_DISPATCH_MWN = 1021302334,
|
||||||
|
VK_FUNCTION_CMD_DISPATCH_INDIRECT_MWN = 3326151095,
|
||||||
|
VK_FUNCTION_CMD_SUBPASS_SHADING_HUAWEI_MWN = 4007053037,
|
||||||
|
VK_FUNCTION_CMD_COPY_BUFFER_MWN = 3269750429,
|
||||||
|
VK_FUNCTION_CMD_COPY_IMAGE_MWN = 3268551501,
|
||||||
|
VK_FUNCTION_CMD_BLIT_IMAGE_MWN = 369031726,
|
||||||
|
VK_FUNCTION_CMD_COPY_BUFFER_TO_IMAGE_MWN = 3430632791,
|
||||||
|
VK_FUNCTION_CMD_COPY_IMAGE_TO_BUFFER_MWN = 3463100572,
|
||||||
|
VK_FUNCTION_CMD_UPDATE_BUFFER_MWN = 4166030863,
|
||||||
|
VK_FUNCTION_CMD_FILL_BUFFER_MWN = 1227180894,
|
||||||
|
VK_FUNCTION_CMD_CLEAR_COLOR_IMAGE_MWN = 2860344020,
|
||||||
|
VK_FUNCTION_CMD_CLEAR_DEPTH_STENCIL_IMAGE_MWN = 626607859,
|
||||||
|
VK_FUNCTION_CMD_CLEAR_ATTACHMENTS_MWN = 3248052992,
|
||||||
|
VK_FUNCTION_CMD_RESOLVE_IMAGE_MWN = 3127045135,
|
||||||
|
VK_FUNCTION_CMD_SET_EVENT_MWN = 2285897557,
|
||||||
|
VK_FUNCTION_CMD_RESET_EVENT_MWN = 2593994370,
|
||||||
|
VK_FUNCTION_CMD_WAIT_EVENTS_MWN = 1151170789,
|
||||||
|
VK_FUNCTION_CMD_PIPELINE_BARRIER_MWN = 930214991,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_QUERY_MWN = 1060928638,
|
||||||
|
VK_FUNCTION_CMD_END_QUERY_MWN = 743888596,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_CONDITIONAL_RENDERING_EXT_MWN = 635529039,
|
||||||
|
VK_FUNCTION_CMD_END_CONDITIONAL_RENDERING_EXT_MWN = 4205254823,
|
||||||
|
VK_FUNCTION_CMD_RESET_QUERY_POOL_MWN = 1325891048,
|
||||||
|
VK_FUNCTION_CMD_WRITE_TIMESTAMP_MWN = 1176332583,
|
||||||
|
VK_FUNCTION_CMD_COPY_QUERY_POOL_RESULTS_MWN = 3870607162,
|
||||||
|
VK_FUNCTION_CMD_PUSH_CONSTANTS_MWN = 2905672087,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_RENDER_PASS_MWN = 1913985478,
|
||||||
|
VK_FUNCTION_CMD_NEXT_SUBPASS_MWN = 911216383,
|
||||||
|
VK_FUNCTION_CMD_END_RENDER_PASS_MWN = 1325099252,
|
||||||
|
VK_FUNCTION_CMD_EXECUTE_COMMANDS_MWN = 1434241781,
|
||||||
|
VK_FUNCTION_CREATE_SHARED_SWAPCHAINS_KHR_MWN = 833058384,
|
||||||
|
VK_FUNCTION_CREATE_SWAPCHAIN_KHR_MWN = 3291491461,
|
||||||
|
VK_FUNCTION_DESTROY_SWAPCHAIN_KHR_MWN = 2842086845,
|
||||||
|
VK_FUNCTION_GET_SWAPCHAIN_IMAGES_KHR_MWN = 3820567199,
|
||||||
|
VK_FUNCTION_ACQUIRE_NEXT_IMAGE_KHR_MWN = 912430364,
|
||||||
|
VK_FUNCTION_QUEUE_PRESENT_KHR_MWN = 3343619925,
|
||||||
|
VK_FUNCTION_DEBUG_MARKER_SET_OBJECT_NAME_EXT_MWN = 2629627847,
|
||||||
|
VK_FUNCTION_DEBUG_MARKER_SET_OBJECT_TAG_EXT_MWN = 3118774776,
|
||||||
|
VK_FUNCTION_CMD_DEBUG_MARKER_BEGIN_EXT_MWN = 391248749,
|
||||||
|
VK_FUNCTION_CMD_DEBUG_MARKER_END_EXT_MWN = 3909749052,
|
||||||
|
VK_FUNCTION_CMD_DEBUG_MARKER_INSERT_EXT_MWN = 3819984443,
|
||||||
|
VK_FUNCTION_CMD_EXECUTE_GENERATED_COMMANDS_NV_MWN = 611070094,
|
||||||
|
VK_FUNCTION_CMD_PREPROCESS_GENERATED_COMMANDS_NV_MWN = 3197291730,
|
||||||
|
VK_FUNCTION_CMD_BIND_PIPELINE_SHADER_GROUP_NV_MWN = 2281040777,
|
||||||
|
VK_FUNCTION_GET_GENERATED_COMMANDS_MEMORY_REQUIREMENTS_NV_MWN = 790028674,
|
||||||
|
VK_FUNCTION_CREATE_INDIRECT_COMMANDS_LAYOUT_NV_MWN = 920399246,
|
||||||
|
VK_FUNCTION_DESTROY_INDIRECT_COMMANDS_LAYOUT_NV_MWN = 3680797167,
|
||||||
|
VK_FUNCTION_CMD_PUSH_DESCRIPTOR_SET_KHR_MWN = 2383465383,
|
||||||
|
VK_FUNCTION_TRIM_COMMAND_POOL_MWN = 2372188109,
|
||||||
|
VK_FUNCTION_GET_MEMORY_FD_KHR_MWN = 2544923704,
|
||||||
|
VK_FUNCTION_GET_MEMORY_FD_PROPERTIES_KHR_MWN = 1460697854,
|
||||||
|
VK_FUNCTION_GET_MEMORY_REMOTE_ADDRESS_NV_MWN = 2331663334,
|
||||||
|
VK_FUNCTION_GET_SEMAPHORE_FD_KHR_MWN = 1643224081,
|
||||||
|
VK_FUNCTION_IMPORT_SEMAPHORE_FD_KHR_MWN = 3274366938,
|
||||||
|
VK_FUNCTION_GET_FENCE_FD_KHR_MWN = 248481722,
|
||||||
|
VK_FUNCTION_IMPORT_FENCE_FD_KHR_MWN = 1855486518,
|
||||||
|
VK_FUNCTION_DISPLAY_POWER_CONTROL_EXT_MWN = 1971130664,
|
||||||
|
VK_FUNCTION_REGISTER_DEVICE_EVENT_EXT_MWN = 1602726900,
|
||||||
|
VK_FUNCTION_REGISTER_DISPLAY_EVENT_EXT_MWN = 499717153,
|
||||||
|
VK_FUNCTION_GET_SWAPCHAIN_COUNTER_EXT_MWN = 3537170476,
|
||||||
|
VK_FUNCTION_GET_DEVICE_GROUP_PEER_MEMORY_FEATURES_MWN = 4099343621,
|
||||||
|
VK_FUNCTION_BIND_BUFFER_MEMORY2_MWN = 2433133068,
|
||||||
|
VK_FUNCTION_BIND_IMAGE_MEMORY2_MWN = 3288712634,
|
||||||
|
VK_FUNCTION_CMD_SET_DEVICE_MASK_MWN = 3569513564,
|
||||||
|
VK_FUNCTION_GET_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR_MWN = 391519764,
|
||||||
|
VK_FUNCTION_GET_DEVICE_GROUP_SURFACE_PRESENT_MODES_KHR_MWN = 1150912239,
|
||||||
|
VK_FUNCTION_ACQUIRE_NEXT_IMAGE2_KHR_MWN = 3876342299,
|
||||||
|
VK_FUNCTION_CMD_DISPATCH_BASE_MWN = 3501797912,
|
||||||
|
VK_FUNCTION_CREATE_DESCRIPTOR_UPDATE_TEMPLATE_MWN = 1338185187,
|
||||||
|
VK_FUNCTION_DESTROY_DESCRIPTOR_UPDATE_TEMPLATE_MWN = 2726017410,
|
||||||
|
VK_FUNCTION_UPDATE_DESCRIPTOR_SET_WITH_TEMPLATE_MWN = 872670538,
|
||||||
|
VK_FUNCTION_CMD_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_KHR_MWN = 2700669303,
|
||||||
|
VK_FUNCTION_SET_HDR_METADATA_EXT_MWN = 1205342361,
|
||||||
|
VK_FUNCTION_GET_SWAPCHAIN_STATUS_KHR_MWN = 1543585735,
|
||||||
|
VK_FUNCTION_GET_REFRESH_CYCLE_DURATION_GOOGLE_MWN = 3747314023,
|
||||||
|
VK_FUNCTION_GET_PAST_PRESENTATION_TIMING_GOOGLE_MWN = 1303203707,
|
||||||
|
VK_FUNCTION_CMD_SET_VIEWPORT_WSCALING_NV_MWN = 799373220,
|
||||||
|
VK_FUNCTION_CMD_SET_DISCARD_RECTANGLE_EXT_MWN = 2062852222,
|
||||||
|
VK_FUNCTION_CMD_SET_SAMPLE_LOCATIONS_EXT_MWN = 3093069744,
|
||||||
|
VK_FUNCTION_GET_BUFFER_MEMORY_REQUIREMENTS2_MWN = 2557063632,
|
||||||
|
VK_FUNCTION_GET_IMAGE_MEMORY_REQUIREMENTS2_MWN = 3508342199,
|
||||||
|
VK_FUNCTION_GET_IMAGE_SPARSE_MEMORY_REQUIREMENTS2_MWN = 1631224108,
|
||||||
|
VK_FUNCTION_GET_DEVICE_BUFFER_MEMORY_REQUIREMENTS_MWN = 2579930640,
|
||||||
|
VK_FUNCTION_GET_DEVICE_IMAGE_MEMORY_REQUIREMENTS_MWN = 2523790671,
|
||||||
|
VK_FUNCTION_GET_DEVICE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_MWN = 3262017727,
|
||||||
|
VK_FUNCTION_CREATE_SAMPLER_YCBCR_CONVERSION_MWN = 3472013538,
|
||||||
|
VK_FUNCTION_DESTROY_SAMPLER_YCBCR_CONVERSION_MWN = 3786619106,
|
||||||
|
VK_FUNCTION_GET_DEVICE_QUEUE2_MWN = 2899888647,
|
||||||
|
VK_FUNCTION_CREATE_VALIDATION_CACHE_EXT_MWN = 613407559,
|
||||||
|
VK_FUNCTION_DESTROY_VALIDATION_CACHE_EXT_MWN = 2004596965,
|
||||||
|
VK_FUNCTION_GET_VALIDATION_CACHE_DATA_EXT_MWN = 3821960649,
|
||||||
|
VK_FUNCTION_MERGE_VALIDATION_CACHES_EXT_MWN = 510162960,
|
||||||
|
VK_FUNCTION_GET_DESCRIPTOR_SET_LAYOUT_SUPPORT_MWN = 298165328,
|
||||||
|
VK_FUNCTION_GET_SHADER_INFO_AMD_MWN = 3476093854,
|
||||||
|
VK_FUNCTION_SET_LOCAL_DIMMING_AMD_MWN = 1419022688,
|
||||||
|
VK_FUNCTION_GET_CALIBRATED_TIMESTAMPS_EXT_MWN = 14945455,
|
||||||
|
VK_FUNCTION_SET_DEBUG_UTILS_OBJECT_NAME_EXT_MWN = 3052068665,
|
||||||
|
VK_FUNCTION_SET_DEBUG_UTILS_OBJECT_TAG_EXT_MWN = 907927425,
|
||||||
|
VK_FUNCTION_QUEUE_BEGIN_DEBUG_UTILS_LABEL_EXT_MWN = 4215750604,
|
||||||
|
VK_FUNCTION_QUEUE_END_DEBUG_UTILS_LABEL_EXT_MWN = 1467516025,
|
||||||
|
VK_FUNCTION_QUEUE_INSERT_DEBUG_UTILS_LABEL_EXT_MWN = 3084381869,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_DEBUG_UTILS_LABEL_EXT_MWN = 2267729576,
|
||||||
|
VK_FUNCTION_CMD_END_DEBUG_UTILS_LABEL_EXT_MWN = 1111649858,
|
||||||
|
VK_FUNCTION_CMD_INSERT_DEBUG_UTILS_LABEL_EXT_MWN = 4252247581,
|
||||||
|
VK_FUNCTION_GET_MEMORY_HOST_POINTER_PROPERTIES_EXT_MWN = 1107819012,
|
||||||
|
VK_FUNCTION_CMD_WRITE_BUFFER_MARKER_AMD_MWN = 199508757,
|
||||||
|
VK_FUNCTION_CREATE_RENDER_PASS2_MWN = 2957544060,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_RENDER_PASS2_MWN = 1755368593,
|
||||||
|
VK_FUNCTION_CMD_NEXT_SUBPASS2_MWN = 937492878,
|
||||||
|
VK_FUNCTION_CMD_END_RENDER_PASS2_MWN = 2689299296,
|
||||||
|
VK_FUNCTION_GET_SEMAPHORE_COUNTER_VALUE_MWN = 1175841333,
|
||||||
|
VK_FUNCTION_WAIT_SEMAPHORES_MWN = 4077631746,
|
||||||
|
VK_FUNCTION_SIGNAL_SEMAPHORE_MWN = 2734621155,
|
||||||
|
VK_FUNCTION_CMD_DRAW_INDIRECT_COUNT_MWN = 4232869586,
|
||||||
|
VK_FUNCTION_CMD_DRAW_INDEXED_INDIRECT_COUNT_MWN = 2748642117,
|
||||||
|
VK_FUNCTION_CMD_SET_CHECKPOINT_NV_MWN = 602460120,
|
||||||
|
VK_FUNCTION_GET_QUEUE_CHECKPOINT_DATA_NV_MWN = 2389627936,
|
||||||
|
VK_FUNCTION_CMD_BIND_TRANSFORM_FEEDBACK_BUFFERS_EXT_MWN = 4147325197,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_TRANSFORM_FEEDBACK_EXT_MWN = 54612038,
|
||||||
|
VK_FUNCTION_CMD_END_TRANSFORM_FEEDBACK_EXT_MWN = 1896230304,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_QUERY_INDEXED_EXT_MWN = 2150096661,
|
||||||
|
VK_FUNCTION_CMD_END_QUERY_INDEXED_EXT_MWN = 1489663839,
|
||||||
|
VK_FUNCTION_CMD_DRAW_INDIRECT_BYTE_COUNT_EXT_MWN = 2667217402,
|
||||||
|
VK_FUNCTION_CMD_SET_EXCLUSIVE_SCISSOR_NV_MWN = 417353787,
|
||||||
|
VK_FUNCTION_CMD_BIND_SHADING_RATE_IMAGE_NV_MWN = 949605291,
|
||||||
|
VK_FUNCTION_CMD_SET_VIEWPORT_SHADING_RATE_PALETTE_NV_MWN = 3390771085,
|
||||||
|
VK_FUNCTION_CMD_SET_COARSE_SAMPLE_ORDER_NV_MWN = 2141814502,
|
||||||
|
VK_FUNCTION_CMD_DRAW_MESH_TASKS_NV_MWN = 2370740991,
|
||||||
|
VK_FUNCTION_CMD_DRAW_MESH_TASKS_INDIRECT_NV_MWN = 1398964463,
|
||||||
|
VK_FUNCTION_CMD_DRAW_MESH_TASKS_INDIRECT_COUNT_NV_MWN = 1280937501,
|
||||||
|
VK_FUNCTION_COMPILE_DEFERRED_NV_MWN = 1762658299,
|
||||||
|
VK_FUNCTION_CREATE_ACCELERATION_STRUCTURE_NV_MWN = 3574510498,
|
||||||
|
VK_FUNCTION_CMD_BIND_INVOCATION_MASK_HUAWEI_MWN = 2556353319,
|
||||||
|
VK_FUNCTION_DESTROY_ACCELERATION_STRUCTURE_KHR_MWN = 1347961463,
|
||||||
|
VK_FUNCTION_DESTROY_ACCELERATION_STRUCTURE_NV_MWN = 3575771682,
|
||||||
|
VK_FUNCTION_GET_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_NV_MWN = 2261493858,
|
||||||
|
VK_FUNCTION_BIND_ACCELERATION_STRUCTURE_MEMORY_NV_MWN = 2682401199,
|
||||||
|
VK_FUNCTION_CMD_COPY_ACCELERATION_STRUCTURE_NV_MWN = 1769933246,
|
||||||
|
VK_FUNCTION_CMD_COPY_ACCELERATION_STRUCTURE_KHR_MWN = 2841494499,
|
||||||
|
VK_FUNCTION_COPY_ACCELERATION_STRUCTURE_KHR_MWN = 746927364,
|
||||||
|
VK_FUNCTION_CMD_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_KHR_MWN = 1690226191,
|
||||||
|
VK_FUNCTION_COPY_ACCELERATION_STRUCTURE_TO_MEMORY_KHR_MWN = 1835945012,
|
||||||
|
VK_FUNCTION_CMD_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_KHR_MWN = 2252662692,
|
||||||
|
VK_FUNCTION_COPY_MEMORY_TO_ACCELERATION_STRUCTURE_KHR_MWN = 2408867231,
|
||||||
|
VK_FUNCTION_CMD_WRITE_ACCELERATION_STRUCTURES_PROPERTIES_KHR_MWN = 3083780648,
|
||||||
|
VK_FUNCTION_CMD_WRITE_ACCELERATION_STRUCTURES_PROPERTIES_NV_MWN = 4220299820,
|
||||||
|
VK_FUNCTION_CMD_BUILD_ACCELERATION_STRUCTURE_NV_MWN = 3617635760,
|
||||||
|
VK_FUNCTION_WRITE_ACCELERATION_STRUCTURES_PROPERTIES_KHR_MWN = 2326859741,
|
||||||
|
VK_FUNCTION_CMD_TRACE_RAYS_KHR_MWN = 642627754,
|
||||||
|
VK_FUNCTION_CMD_TRACE_RAYS_NV_MWN = 479903586,
|
||||||
|
VK_FUNCTION_GET_RAY_TRACING_SHADER_GROUP_HANDLES_KHR_MWN = 2234315647,
|
||||||
|
VK_FUNCTION_GET_RAY_TRACING_CAPTURE_REPLAY_SHADER_GROUP_HANDLES_KHR_MWN = 32704974,
|
||||||
|
VK_FUNCTION_GET_ACCELERATION_STRUCTURE_HANDLE_NV_MWN = 495425266,
|
||||||
|
VK_FUNCTION_CREATE_RAY_TRACING_PIPELINES_NV_MWN = 383229838,
|
||||||
|
VK_FUNCTION_CREATE_RAY_TRACING_PIPELINES_KHR_MWN = 2415614937,
|
||||||
|
VK_FUNCTION_CMD_TRACE_RAYS_INDIRECT_KHR_MWN = 3772374059,
|
||||||
|
VK_FUNCTION_CMD_TRACE_RAYS_INDIRECT2_KHR_MWN = 1600607325,
|
||||||
|
VK_FUNCTION_GET_DEVICE_ACCELERATION_STRUCTURE_COMPATIBILITY_KHR_MWN = 3768745418,
|
||||||
|
VK_FUNCTION_GET_RAY_TRACING_SHADER_GROUP_STACK_SIZE_KHR_MWN = 4187714816,
|
||||||
|
VK_FUNCTION_CMD_SET_RAY_TRACING_PIPELINE_STACK_SIZE_KHR_MWN = 2224084205,
|
||||||
|
VK_FUNCTION_GET_IMAGE_VIEW_HANDLE_NVX_MWN = 2370104344,
|
||||||
|
VK_FUNCTION_GET_IMAGE_VIEW_ADDRESS_NVX_MWN = 3242720664,
|
||||||
|
VK_FUNCTION_ACQUIRE_PROFILING_LOCK_KHR_MWN = 3696002283,
|
||||||
|
VK_FUNCTION_RELEASE_PROFILING_LOCK_KHR_MWN = 1009450468,
|
||||||
|
VK_FUNCTION_GET_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT_MWN = 1111583318,
|
||||||
|
VK_FUNCTION_GET_BUFFER_OPAQUE_CAPTURE_ADDRESS_MWN = 3444523422,
|
||||||
|
VK_FUNCTION_GET_BUFFER_DEVICE_ADDRESS_MWN = 2165413050,
|
||||||
|
VK_FUNCTION_INITIALIZE_PERFORMANCE_API_INTEL_MWN = 3213306329,
|
||||||
|
VK_FUNCTION_UNINITIALIZE_PERFORMANCE_API_INTEL_MWN = 272945663,
|
||||||
|
VK_FUNCTION_CMD_SET_PERFORMANCE_MARKER_INTEL_MWN = 2664792030,
|
||||||
|
VK_FUNCTION_CMD_SET_PERFORMANCE_STREAM_MARKER_INTEL_MWN = 58256893,
|
||||||
|
VK_FUNCTION_CMD_SET_PERFORMANCE_OVERRIDE_INTEL_MWN = 1596194089,
|
||||||
|
VK_FUNCTION_ACQUIRE_PERFORMANCE_CONFIGURATION_INTEL_MWN = 881818662,
|
||||||
|
VK_FUNCTION_RELEASE_PERFORMANCE_CONFIGURATION_INTEL_MWN = 631194492,
|
||||||
|
VK_FUNCTION_QUEUE_SET_PERFORMANCE_CONFIGURATION_INTEL_MWN = 2412941192,
|
||||||
|
VK_FUNCTION_GET_PERFORMANCE_PARAMETER_INTEL_MWN = 2720461460,
|
||||||
|
VK_FUNCTION_GET_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_MWN = 1044173864,
|
||||||
|
VK_FUNCTION_GET_PIPELINE_EXECUTABLE_PROPERTIES_KHR_MWN = 2745491988,
|
||||||
|
VK_FUNCTION_GET_PIPELINE_EXECUTABLE_STATISTICS_KHR_MWN = 252749420,
|
||||||
|
VK_FUNCTION_GET_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATIONS_KHR_MWN = 3713473300,
|
||||||
|
VK_FUNCTION_CMD_SET_LINE_STIPPLE_EXT_MWN = 492579146,
|
||||||
|
VK_FUNCTION_CREATE_ACCELERATION_STRUCTURE_KHR_MWN = 3185634838,
|
||||||
|
VK_FUNCTION_CMD_BUILD_ACCELERATION_STRUCTURES_KHR_MWN = 3149283676,
|
||||||
|
VK_FUNCTION_CMD_BUILD_ACCELERATION_STRUCTURES_INDIRECT_KHR_MWN = 2130228375,
|
||||||
|
VK_FUNCTION_BUILD_ACCELERATION_STRUCTURES_KHR_MWN = 4267177606,
|
||||||
|
VK_FUNCTION_GET_ACCELERATION_STRUCTURE_DEVICE_ADDRESS_KHR_MWN = 49140511,
|
||||||
|
VK_FUNCTION_CREATE_DEFERRED_OPERATION_KHR_MWN = 2777485241,
|
||||||
|
VK_FUNCTION_DESTROY_DEFERRED_OPERATION_KHR_MWN = 3976704708,
|
||||||
|
VK_FUNCTION_GET_DEFERRED_OPERATION_MAX_CONCURRENCY_KHR_MWN = 4070044399,
|
||||||
|
VK_FUNCTION_GET_DEFERRED_OPERATION_RESULT_KHR_MWN = 966385575,
|
||||||
|
VK_FUNCTION_DEFERRED_OPERATION_JOIN_KHR_MWN = 293820119,
|
||||||
|
VK_FUNCTION_CMD_SET_CULL_MODE_MWN = 4093834086,
|
||||||
|
VK_FUNCTION_CMD_SET_FRONT_FACE_MWN = 1444353066,
|
||||||
|
VK_FUNCTION_CMD_SET_PRIMITIVE_TOPOLOGY_MWN = 617273307,
|
||||||
|
VK_FUNCTION_CMD_SET_VIEWPORT_WITH_COUNT_MWN = 895297042,
|
||||||
|
VK_FUNCTION_CMD_SET_SCISSOR_WITH_COUNT_MWN = 659999523,
|
||||||
|
VK_FUNCTION_CMD_BIND_VERTEX_BUFFERS2_MWN = 256716791,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_TEST_ENABLE_MWN = 3679209209,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_WRITE_ENABLE_MWN = 2809211598,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_COMPARE_OP_MWN = 274204163,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_BOUNDS_TEST_ENABLE_MWN = 2371893853,
|
||||||
|
VK_FUNCTION_CMD_SET_STENCIL_TEST_ENABLE_MWN = 2109230784,
|
||||||
|
VK_FUNCTION_CMD_SET_STENCIL_OP_MWN = 2767891761,
|
||||||
|
VK_FUNCTION_CMD_SET_PATCH_CONTROL_POINTS_EXT_MWN = 2856586336,
|
||||||
|
VK_FUNCTION_CMD_SET_RASTERIZER_DISCARD_ENABLE_MWN = 1751478540,
|
||||||
|
VK_FUNCTION_CMD_SET_DEPTH_BIAS_ENABLE_MWN = 3975236762,
|
||||||
|
VK_FUNCTION_CMD_SET_LOGIC_OP_EXT_MWN = 2487789106,
|
||||||
|
VK_FUNCTION_CMD_SET_PRIMITIVE_RESTART_ENABLE_MWN = 3406730423,
|
||||||
|
VK_FUNCTION_CREATE_PRIVATE_DATA_SLOT_MWN = 4263495810,
|
||||||
|
VK_FUNCTION_DESTROY_PRIVATE_DATA_SLOT_MWN = 285887147,
|
||||||
|
VK_FUNCTION_SET_PRIVATE_DATA_MWN = 1134828454,
|
||||||
|
VK_FUNCTION_GET_PRIVATE_DATA_MWN = 1018865873,
|
||||||
|
VK_FUNCTION_CMD_COPY_BUFFER2_MWN = 2494150042,
|
||||||
|
VK_FUNCTION_CMD_COPY_IMAGE2_MWN = 310006019,
|
||||||
|
VK_FUNCTION_CMD_BLIT_IMAGE2_MWN = 3323350328,
|
||||||
|
VK_FUNCTION_CMD_COPY_BUFFER_TO_IMAGE2_MWN = 4011196695,
|
||||||
|
VK_FUNCTION_CMD_COPY_IMAGE_TO_BUFFER2_MWN = 3819047898,
|
||||||
|
VK_FUNCTION_CMD_RESOLVE_IMAGE2_MWN = 2328936816,
|
||||||
|
VK_FUNCTION_CMD_SET_FRAGMENT_SHADING_RATE_KHR_MWN = 101088162,
|
||||||
|
VK_FUNCTION_CMD_SET_FRAGMENT_SHADING_RATE_ENUM_NV_MWN = 3850811256,
|
||||||
|
VK_FUNCTION_GET_ACCELERATION_STRUCTURE_BUILD_SIZES_KHR_MWN = 320509077,
|
||||||
|
VK_FUNCTION_CMD_SET_VERTEX_INPUT_EXT_MWN = 2635238551,
|
||||||
|
VK_FUNCTION_CMD_SET_COLOR_WRITE_ENABLE_EXT_MWN = 21998197,
|
||||||
|
VK_FUNCTION_CMD_SET_EVENT2_MWN = 22829937,
|
||||||
|
VK_FUNCTION_CMD_RESET_EVENT2_MWN = 435798327,
|
||||||
|
VK_FUNCTION_CMD_WAIT_EVENTS2_MWN = 3404805506,
|
||||||
|
VK_FUNCTION_CMD_PIPELINE_BARRIER2_MWN = 4236350456,
|
||||||
|
VK_FUNCTION_QUEUE_SUBMIT2_MWN = 2962788892,
|
||||||
|
VK_FUNCTION_CMD_WRITE_TIMESTAMP2_MWN = 3214480911,
|
||||||
|
VK_FUNCTION_CMD_WRITE_BUFFER_MARKER2_AMD_MWN = 1865885683,
|
||||||
|
VK_FUNCTION_GET_QUEUE_CHECKPOINT_DATA2_NV_MWN = 3021626429,
|
||||||
|
VK_FUNCTION_CREATE_CU_MODULE_NVX_MWN = 661546257,
|
||||||
|
VK_FUNCTION_CREATE_CU_FUNCTION_NVX_MWN = 1756930047,
|
||||||
|
VK_FUNCTION_DESTROY_CU_MODULE_NVX_MWN = 2892740100,
|
||||||
|
VK_FUNCTION_DESTROY_CU_FUNCTION_NVX_MWN = 1087861120,
|
||||||
|
VK_FUNCTION_CMD_CU_LAUNCH_KERNEL_NVX_MWN = 547196128,
|
||||||
|
VK_FUNCTION_SET_DEVICE_MEMORY_PRIORITY_EXT_MWN = 1030260359,
|
||||||
|
VK_FUNCTION_WAIT_FOR_PRESENT_KHR_MWN = 2271445703,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_RENDERING_MWN = 2884379966,
|
||||||
|
VK_FUNCTION_CMD_END_RENDERING_MWN = 1182385690,
|
||||||
|
VK_FUNCTION_GET_DESCRIPTOR_SET_LAYOUT_HOST_MAPPING_INFO_VALVE_MWN = 66268984,
|
||||||
|
VK_FUNCTION_GET_DESCRIPTOR_SET_HOST_MAPPING_VALVE_MWN = 4051636062,
|
||||||
|
VK_FUNCTION_GET_IMAGE_SUBRESOURCE_LAYOUT2_EXT_MWN = 3241952166,
|
||||||
|
VK_FUNCTION_GET_PIPELINE_PROPERTIES_EXT_MWN = 2463196004,
|
||||||
|
#if defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||||
|
|
||||||
|
VK_FUNCTION_GET_SWAPCHAIN_GRALLOC_USAGE_ANDROID_MWN = 770334981,
|
||||||
|
VK_FUNCTION_GET_SWAPCHAIN_GRALLOC_USAGE2_ANDROID_MWN = 1510497929,
|
||||||
|
VK_FUNCTION_ACQUIRE_IMAGE_ANDROID_MWN = 3886703442,
|
||||||
|
VK_FUNCTION_QUEUE_SIGNAL_RELEASE_IMAGE_ANDROID_MWN = 1928178446,
|
||||||
|
VK_FUNCTION_GET_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID_MWN = 3351560814,
|
||||||
|
VK_FUNCTION_GET_MEMORY_ANDROID_HARDWARE_BUFFER_ANDROID_MWN = 4117610260,
|
||||||
|
#endif // defined(VK_USE_PLATFORM_ANDROID_KHR)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_DIRECTFB_EXT)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_DIRECTFB_EXT)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_FUCHSIA)
|
||||||
|
|
||||||
|
VK_FUNCTION_GET_MEMORY_ZIRCON_HANDLE_FUCHSIA_MWN = 229516057,
|
||||||
|
VK_FUNCTION_GET_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA_MWN = 2759011490,
|
||||||
|
VK_FUNCTION_GET_SEMAPHORE_ZIRCON_HANDLE_FUCHSIA_MWN = 1354161685,
|
||||||
|
VK_FUNCTION_IMPORT_SEMAPHORE_ZIRCON_HANDLE_FUCHSIA_MWN = 1497141989,
|
||||||
|
VK_FUNCTION_CREATE_BUFFER_COLLECTION_FUCHSIA_MWN = 1939361836,
|
||||||
|
VK_FUNCTION_SET_BUFFER_COLLECTION_BUFFER_CONSTRAINTS_FUCHSIA_MWN = 2866373639,
|
||||||
|
VK_FUNCTION_SET_BUFFER_COLLECTION_IMAGE_CONSTRAINTS_FUCHSIA_MWN = 3146098621,
|
||||||
|
VK_FUNCTION_DESTROY_BUFFER_COLLECTION_FUCHSIA_MWN = 1941377452,
|
||||||
|
VK_FUNCTION_GET_BUFFER_COLLECTION_PROPERTIES_FUCHSIA_MWN = 3501860002,
|
||||||
|
#endif // defined(VK_USE_PLATFORM_FUCHSIA)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_GGP)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_GGP)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_IOS_MVK)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_IOS_MVK)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_MACOS_MVK)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_MACOS_MVK)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_METAL_EXT)
|
||||||
|
|
||||||
|
VK_FUNCTION_EXPORT_METAL_OBJECTS_EXT_MWN = 424680822,
|
||||||
|
#endif // defined(VK_USE_PLATFORM_METAL_EXT)
|
||||||
|
|
||||||
|
#if defined(VK_ENABLE_BETA_EXTENSIONS)
|
||||||
|
|
||||||
|
VK_FUNCTION_CREATE_VIDEO_SESSION_KHR_MWN = 2122860554,
|
||||||
|
VK_FUNCTION_DESTROY_VIDEO_SESSION_KHR_MWN = 2443037219,
|
||||||
|
VK_FUNCTION_CREATE_VIDEO_SESSION_PARAMETERS_KHR_MWN = 2368732644,
|
||||||
|
VK_FUNCTION_UPDATE_VIDEO_SESSION_PARAMETERS_KHR_MWN = 1590107430,
|
||||||
|
VK_FUNCTION_DESTROY_VIDEO_SESSION_PARAMETERS_KHR_MWN = 3078034566,
|
||||||
|
VK_FUNCTION_GET_VIDEO_SESSION_MEMORY_REQUIREMENTS_KHR_MWN = 1734238379,
|
||||||
|
VK_FUNCTION_BIND_VIDEO_SESSION_MEMORY_KHR_MWN = 3166741804,
|
||||||
|
VK_FUNCTION_CMD_DECODE_VIDEO_KHR_MWN = 668832445,
|
||||||
|
VK_FUNCTION_CMD_BEGIN_VIDEO_CODING_KHR_MWN = 1040122322,
|
||||||
|
VK_FUNCTION_CMD_CONTROL_VIDEO_CODING_KHR_MWN = 4253541250,
|
||||||
|
VK_FUNCTION_CMD_END_VIDEO_CODING_KHR_MWN = 3715928442,
|
||||||
|
VK_FUNCTION_CMD_ENCODE_VIDEO_KHR_MWN = 1562102888,
|
||||||
|
#endif // defined(VK_ENABLE_BETA_EXTENSIONS)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_SCREEN_QNX)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_SCREEN_QNX)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_VI_NN)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_VI_NN)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_WAYLAND_KHR)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_WAYLAND_KHR)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_WIN32_KHR)
|
||||||
|
|
||||||
|
VK_FUNCTION_GET_MEMORY_WIN32_HANDLE_NV_MWN = 1511382935,
|
||||||
|
VK_FUNCTION_GET_MEMORY_WIN32_HANDLE_KHR_MWN = 3957076313,
|
||||||
|
VK_FUNCTION_GET_MEMORY_WIN32_HANDLE_PROPERTIES_KHR_MWN = 1371298899,
|
||||||
|
VK_FUNCTION_GET_SEMAPHORE_WIN32_HANDLE_KHR_MWN = 3020734396,
|
||||||
|
VK_FUNCTION_IMPORT_SEMAPHORE_WIN32_HANDLE_KHR_MWN = 3566993533,
|
||||||
|
VK_FUNCTION_GET_FENCE_WIN32_HANDLE_KHR_MWN = 4073909616,
|
||||||
|
VK_FUNCTION_IMPORT_FENCE_WIN32_HANDLE_KHR_MWN = 4166764499,
|
||||||
|
VK_FUNCTION_ACQUIRE_FULL_SCREEN_EXCLUSIVE_MODE_EXT_MWN = 1030778345,
|
||||||
|
VK_FUNCTION_RELEASE_FULL_SCREEN_EXCLUSIVE_MODE_EXT_MWN = 2237615297,
|
||||||
|
#endif // defined(VK_USE_PLATFORM_WIN32_KHR)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_XCB_KHR)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_XCB_KHR)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_XLIB_KHR)
|
||||||
|
|
||||||
|
#endif // defined(VK_USE_PLATFORM_XLIB_KHR)
|
||||||
|
|
||||||
|
#if defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
|
||||||
|
#endif // defined(VK_USE_PLATFORM_XLIB_XRANDR_EXT)
|
||||||
|
|
||||||
|
} VkFunctionMWN;
|
||||||
|
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
} // extern "C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // VK_CAPTURE_FUNCTION_IDS_H_INCLUDED
|
39
source/common.hpp
Normal file
39
source/common.hpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_COMMON_HPP_INCLUDED)
|
||||||
|
#define VK_CAPTURE_COMMON_HPP_INCLUDED 1
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include "vk_capture.h"
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// public defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
VkVariantMWN* allocVariant(std::size_t num);
|
||||||
|
void* allocData(std::size_t bytes, std::size_t alignment = 1);
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
inline T* allocType(std::size_t count = 1) {
|
||||||
|
return static_cast<T*>(allocData(sizeof(T) * count, alignof(T)));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
#endif // !defined(VK_CAPTURE_COMMON_HPP_INCLUDED)
|
57
source/data_pool.cpp
Normal file
57
source/data_pool.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
#include "data_pool.hpp"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal variables
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal functions
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
void* DataPool::allocate(std::size_t bytes, std::size_t alignment)
|
||||||
|
{
|
||||||
|
assert(bytes > 0 && bytes <= PAGE_SIZE);
|
||||||
|
assert(alignment > 0 && alignment <= alignof(std::max_align_t));
|
||||||
|
|
||||||
|
if (offset % alignment != 0) {
|
||||||
|
offset += alignment - (offset % alignment);
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::size_t remainingOnPage = PAGE_SIZE - (offset % PAGE_SIZE);
|
||||||
|
if (remainingOnPage == PAGE_SIZE || remainingOnPage < bytes)
|
||||||
|
{
|
||||||
|
// next page
|
||||||
|
pages.push_back(std::make_unique<Page>());
|
||||||
|
offset = PAGE_SIZE * (pages.size() - 1);
|
||||||
|
}
|
||||||
|
const std::size_t page = offset / PAGE_SIZE;
|
||||||
|
const std::size_t localOffset = offset % PAGE_SIZE;
|
||||||
|
std::uint8_t* result = &(*pages[page])[localOffset];
|
||||||
|
offset += bytes;
|
||||||
|
assert(reinterpret_cast<std::uintptr_t>(result) % alignment == 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace vk_capture
|
50
source/data_pool.hpp
Normal file
50
source/data_pool.hpp
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_DATA_POOL_HPP_INCLUDED)
|
||||||
|
#define VK_CAPTURE_DATA_POOL_HPP_INCLUDED 1
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// public defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public types
|
||||||
|
//
|
||||||
|
|
||||||
|
struct DataPool
|
||||||
|
{
|
||||||
|
static constexpr std::size_t PAGE_SIZE = 4096 * 1024;
|
||||||
|
static_assert(PAGE_SIZE % alignof(std::max_align_t) == 0);
|
||||||
|
|
||||||
|
struct alignas(std::max_align_t) Page : std::array<std::uint8_t, PAGE_SIZE> {};
|
||||||
|
|
||||||
|
using page_ptr_t = std::unique_ptr<Page>;
|
||||||
|
|
||||||
|
std::vector<page_ptr_t> pages;
|
||||||
|
std::size_t offset = 0;
|
||||||
|
|
||||||
|
void* allocate(std::size_t bytes, std::size_t alignment = 1);
|
||||||
|
inline void reset() { offset = 0; }
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
#endif // !defined(VK_CAPTURE_DATA_POOL_HPP_INCLUDED)
|
39
source/dispatch_table.cpp
Normal file
39
source/dispatch_table.cpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
|
||||||
|
#include "dispatch_table.hpp"
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal variables
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal functions
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public variables
|
||||||
|
//
|
||||||
|
|
||||||
|
// TODO: this won't work for multi-device setups, we'd need a hashmap of sort then
|
||||||
|
VkLayerInstanceDispatchTable g_instanceDispatchTable;
|
||||||
|
VkLayerDispatchTable g_dispatchTable;
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
} // namespace sekiei
|
38
source/dispatch_table.hpp
Normal file
38
source/dispatch_table.hpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_DISPATCH_TABLE_HPP_INCLUDED)
|
||||||
|
#define VK_CAPTURE_DISPATCH_TABLE_HPP_INCLUDED 1
|
||||||
|
|
||||||
|
#include <vulkan/vk_dispatch_table_helper.h>
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// public defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public variables
|
||||||
|
//
|
||||||
|
|
||||||
|
// TODO: this won't work for multi-device setups, we'd need a hashmap of sort then
|
||||||
|
extern VkLayerInstanceDispatchTable g_instanceDispatchTable;
|
||||||
|
extern VkLayerDispatchTable g_dispatchTable;
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
#endif // !defined(VK_CAPTURE_DISPATCH_TABLE_HPP_INCLUDED)
|
3518
source/functions.cpp
Normal file
3518
source/functions.cpp
Normal file
File diff suppressed because it is too large
Load Diff
14
source/functions.hpp
Normal file
14
source/functions.hpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_FUNCTIONS_HPP_INCLUDED)
|
||||||
|
#define VK_CAPTURE_FUNCTIONS_HPP_INCLUDED 1
|
||||||
|
|
||||||
|
#include <vulkan/vulkan.h>
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
PFN_vkVoidFunction getWrappedFunctionPtr(const char* pName);
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
#endif // VK_CAPTURE_FUNCTIONS_HPP_INCLUDED
|
164
source/layer.cpp
Normal file
164
source/layer.cpp
Normal file
@ -0,0 +1,164 @@
|
|||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
|
#include <vulkan/vulkan.hpp>
|
||||||
|
#include <vulkan/vk_layer.h>
|
||||||
|
#include "dispatch_table.hpp"
|
||||||
|
#include "functions.hpp"
|
||||||
|
#include "record_list.hpp"
|
||||||
|
#include "vk_capture.h"
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
inline constexpr std::uint32_t LOADER_LAYER_VERSION = 2;
|
||||||
|
|
||||||
|
PFN_vkVoidFunction getLayerFunctionPtr(const char* pName);
|
||||||
|
|
||||||
|
VkResult vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance)
|
||||||
|
{
|
||||||
|
const VkLayerInstanceCreateInfo* layerCreateInfo = static_cast<const VkLayerInstanceCreateInfo*>(pCreateInfo->pNext);
|
||||||
|
|
||||||
|
// step through the chain of pNext until we get to the link info
|
||||||
|
while(layerCreateInfo && (layerCreateInfo->sType != VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO ||
|
||||||
|
layerCreateInfo->function != VK_LAYER_LINK_INFO))
|
||||||
|
{
|
||||||
|
layerCreateInfo = static_cast<const VkLayerInstanceCreateInfo*>(layerCreateInfo->pNext);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(layerCreateInfo == nullptr)
|
||||||
|
{
|
||||||
|
// No loader instance create info
|
||||||
|
return VK_ERROR_INITIALIZATION_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
PFN_vkGetInstanceProcAddr gpa = layerCreateInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr;
|
||||||
|
// move chain on for next layer
|
||||||
|
const_cast<VkLayerInstanceCreateInfo*>(layerCreateInfo)->u.pLayerInfo = layerCreateInfo->u.pLayerInfo->pNext;
|
||||||
|
|
||||||
|
PFN_vkCreateInstance createFunc = reinterpret_cast<PFN_vkCreateInstance>(gpa(VK_NULL_HANDLE, "vkCreateInstance"));
|
||||||
|
|
||||||
|
VkResult ret = createFunc(pCreateInfo, pAllocator, pInstance);
|
||||||
|
if (ret != VK_SUCCESS)
|
||||||
|
{
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// fetch our own dispatch table for the functions we need, into the next layer
|
||||||
|
layer_init_instance_dispatch_table(*pInstance, &vk_capture::g_instanceDispatchTable, gpa);
|
||||||
|
|
||||||
|
return VK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkResult vkCreateDevice(
|
||||||
|
VkPhysicalDevice physicalDevice,
|
||||||
|
const VkDeviceCreateInfo* pCreateInfo,
|
||||||
|
const VkAllocationCallbacks* pAllocator,
|
||||||
|
VkDevice* pDevice)
|
||||||
|
{
|
||||||
|
const VkLayerDeviceCreateInfo* layerCreateInfo = static_cast<const VkLayerDeviceCreateInfo*>(pCreateInfo->pNext);
|
||||||
|
|
||||||
|
// step through the chain of pNext until we get to the link info
|
||||||
|
while(layerCreateInfo && (layerCreateInfo->sType != VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO ||
|
||||||
|
layerCreateInfo->function != VK_LAYER_LINK_INFO))
|
||||||
|
{
|
||||||
|
layerCreateInfo = static_cast<const VkLayerDeviceCreateInfo*>(layerCreateInfo->pNext);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(layerCreateInfo == nullptr)
|
||||||
|
{
|
||||||
|
// No loader instance create info
|
||||||
|
return VK_ERROR_INITIALIZATION_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
PFN_vkGetInstanceProcAddr gipa = layerCreateInfo->u.pLayerInfo->pfnNextGetInstanceProcAddr;
|
||||||
|
PFN_vkGetDeviceProcAddr gdpa = layerCreateInfo->u.pLayerInfo->pfnNextGetDeviceProcAddr;
|
||||||
|
// move chain on for next layer
|
||||||
|
const_cast<VkLayerDeviceCreateInfo*>(layerCreateInfo)->u.pLayerInfo = layerCreateInfo->u.pLayerInfo->pNext;
|
||||||
|
|
||||||
|
PFN_vkCreateDevice createFunc = (PFN_vkCreateDevice)gipa(VK_NULL_HANDLE, "vkCreateDevice");
|
||||||
|
|
||||||
|
VkResult ret = createFunc(physicalDevice, pCreateInfo, pAllocator, pDevice);
|
||||||
|
|
||||||
|
if (ret != VK_SUCCESS)
|
||||||
|
{
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
layer_init_device_dispatch_table(*pDevice, &vk_capture::g_dispatchTable, gdpa);
|
||||||
|
|
||||||
|
return VK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
PFN_vkVoidFunction vkGetDeviceProcAddr(VkDevice device, const char* pName)
|
||||||
|
{
|
||||||
|
PFN_vkVoidFunction ptr = getLayerFunctionPtr(pName);
|
||||||
|
if (ptr) {
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return g_dispatchTable.GetDeviceProcAddr(device, pName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance, const char* pName)
|
||||||
|
{
|
||||||
|
PFN_vkVoidFunction ptr = getLayerFunctionPtr(pName);
|
||||||
|
if (ptr) {
|
||||||
|
return ptr;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return g_instanceDispatchTable.GetInstanceProcAddr(instance, pName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PFN_vkVoidFunction getLayerFunctionPtr(const char* pName)
|
||||||
|
{
|
||||||
|
if (std::strcmp(pName, "vkCreateInstance") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vk_capture::vkCreateInstance);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkCreateDevice") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vk_capture::vkCreateDevice);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkGetInstanceProcAddr") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vk_capture::vkGetInstanceProcAddr);
|
||||||
|
}
|
||||||
|
if (std::strcmp(pName, "vkGetDeviceProcAddr") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vkGetDeviceProcAddr);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkAllocateRecordListMWN") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vkAllocateRecordListMWN);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkFreeRecordListMWN") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vkFreeRecordListMWN);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkBeginRecordingMWN") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vkBeginRecordingMWN);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkEndRecordingMWN") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vkEndRecordingMWN);
|
||||||
|
}
|
||||||
|
else if (std::strcmp(pName, "vkGetRecordListItemsMWN") == 0) {
|
||||||
|
return reinterpret_cast<PFN_vkVoidFunction>(&vkGetRecordListItemsMWN);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return getWrappedFunctionPtr(pName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
|
||||||
|
VK_LAYER_EXPORT VkResult VKAPI_CALL vk_capture_vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface* pVersionStruct)
|
||||||
|
{
|
||||||
|
if (pVersionStruct->loaderLayerInterfaceVersion < vk_capture::LOADER_LAYER_VERSION) {
|
||||||
|
return VK_ERROR_INITIALIZATION_FAILED;
|
||||||
|
}
|
||||||
|
pVersionStruct->sType = LAYER_NEGOTIATE_INTERFACE_STRUCT;
|
||||||
|
pVersionStruct->pNext = nullptr;
|
||||||
|
pVersionStruct->loaderLayerInterfaceVersion = vk_capture::LOADER_LAYER_VERSION;
|
||||||
|
pVersionStruct->pfnGetInstanceProcAddr = &vk_capture::vkGetInstanceProcAddr;
|
||||||
|
pVersionStruct->pfnGetDeviceProcAddr = &vk_capture::vkGetDeviceProcAddr;
|
||||||
|
pVersionStruct->pfnGetPhysicalDeviceProcAddr = nullptr;
|
||||||
|
return VK_SUCCESS;
|
||||||
|
}
|
||||||
|
} // extern "C"
|
94
source/record_list.cpp
Normal file
94
source/record_list.cpp
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
|
||||||
|
#include "record_list.hpp"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal variables
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal functions
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public variables
|
||||||
|
//
|
||||||
|
|
||||||
|
VkRecordListMWN g_activeRecordList = nullptr; // TODO: per device and or per thread?
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
VkResult vkAllocateRecordListMWN(VkDevice /* device */, const VkRecordListAllocateInfoMWN* pAllocInfo, VkRecordListMWN* pRecordList)
|
||||||
|
{
|
||||||
|
(void) pAllocInfo;
|
||||||
|
|
||||||
|
VkRecordListMWN result = new VkRecordListMWN_T(); // TODO: use Vulkan allocators
|
||||||
|
if (result == nullptr) {
|
||||||
|
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||||
|
}
|
||||||
|
*pRecordList = result;
|
||||||
|
return VK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void vkFreeRecordListMWN(VkDevice /* device */, VkRecordListMWN recordList)
|
||||||
|
{
|
||||||
|
assert(recordList != g_activeRecordList);
|
||||||
|
delete recordList; // TODO: allocators
|
||||||
|
}
|
||||||
|
|
||||||
|
VkResult vkBeginRecordingMWN(VkDevice /* device */, const VkRecordInfoMWN* pRecordInfo)
|
||||||
|
{
|
||||||
|
assert(g_activeRecordList == nullptr);
|
||||||
|
assert(pRecordInfo && pRecordInfo->recordList);
|
||||||
|
g_activeRecordList = pRecordInfo->recordList;
|
||||||
|
return VK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void vkEndRecordingMWN(VkDevice /* device */)
|
||||||
|
{
|
||||||
|
assert(g_activeRecordList != nullptr);
|
||||||
|
g_activeRecordList = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkResult vkGetRecordListItemsMWN(VkDevice /* device */, VkRecordListMWN recordList, uint32_t* pItemCount, VkRecordListItemMWN** pItems)
|
||||||
|
{
|
||||||
|
assert(pItemCount);
|
||||||
|
assert(pItems);
|
||||||
|
|
||||||
|
*pItemCount = static_cast<std::uint32_t>(recordList->items.size());
|
||||||
|
*pItems = recordList->items.data();
|
||||||
|
return VK_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkVariantMWN* allocVariant(std::size_t num)
|
||||||
|
{
|
||||||
|
assert(g_activeRecordList);
|
||||||
|
return g_activeRecordList->values.allocate(num);
|
||||||
|
}
|
||||||
|
|
||||||
|
void* allocData(std::size_t bytes, std::size_t alignment)
|
||||||
|
{
|
||||||
|
assert(g_activeRecordList);
|
||||||
|
return g_activeRecordList->data.allocate(bytes, alignment);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace vk_capture
|
87
source/record_list.hpp
Normal file
87
source/record_list.hpp
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_RECORD_LIST_HPP_INCLUDED)
|
||||||
|
#define VK_CAPTURE_RECORD_LIST_HPP_INCLUDED 1
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <vector>
|
||||||
|
#include "data_pool.hpp"
|
||||||
|
#include "variant_pool.hpp"
|
||||||
|
#include "vk_capture.h"
|
||||||
|
#include "vk_function_ids.h"
|
||||||
|
|
||||||
|
typedef struct VkRecordListMWN_T {
|
||||||
|
std::vector<VkRecordListItemMWN> items; // TODO: use Vulkan allocators
|
||||||
|
vk_capture::VariantPool values;
|
||||||
|
vk_capture::DataPool data;
|
||||||
|
} VkRecordListMWN_T;
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// public defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public variables
|
||||||
|
//
|
||||||
|
|
||||||
|
extern VkRecordListMWN g_activeRecordList;
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
VkResult vkAllocateRecordListMWN(VkDevice device, const VkRecordListAllocateInfoMWN* pAllocInfo, VkRecordListMWN* pRecordList);
|
||||||
|
void vkFreeRecordListMWN(VkDevice device, VkRecordListMWN recordList);
|
||||||
|
VkResult vkBeginRecordingMWN(VkDevice device, const VkRecordInfoMWN* pRecordInfo);
|
||||||
|
void vkEndRecordingMWN(VkDevice device);
|
||||||
|
VkResult vkGetRecordListItemsMWN(VkDevice device, VkRecordListMWN recordList, uint32_t* pItemCount, VkRecordListItemMWN** pItems);
|
||||||
|
|
||||||
|
template<typename TResult, typename... TArgs>
|
||||||
|
void recordFunction(VkFunctionMWN function, const TResult& result, const TArgs&... args)
|
||||||
|
{
|
||||||
|
(void) result;
|
||||||
|
if (!g_activeRecordList) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkRecordListItemMWN& item = g_activeRecordList->items.emplace_back();
|
||||||
|
item.function = function;
|
||||||
|
item.numParameters = static_cast<std::uint32_t>(sizeof...(TArgs));
|
||||||
|
item.pParameterValues = g_activeRecordList->values.allocate(sizeof...(TArgs));
|
||||||
|
variantWrap(result, item.returnValue);
|
||||||
|
|
||||||
|
VkVariantMWN* variant = item.pParameterValues;
|
||||||
|
(variantWrap(args, *(variant++)), ...);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename... TArgs>
|
||||||
|
void recordVoidFunction(VkFunctionMWN function, const TArgs&... args)
|
||||||
|
{
|
||||||
|
if (!g_activeRecordList) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VkRecordListItemMWN& item = g_activeRecordList->items.emplace_back();
|
||||||
|
item.function = function;
|
||||||
|
item.numParameters = static_cast<std::uint32_t>(sizeof...(TArgs));
|
||||||
|
item.pParameterValues = g_activeRecordList->values.allocate(sizeof...(TArgs));
|
||||||
|
item.returnValue.type = VK_VARIANT_TYPE_NONE_MWN;
|
||||||
|
|
||||||
|
VkVariantMWN* variant = item.pParameterValues;
|
||||||
|
(variantWrap(args, *(variant++)), ...);
|
||||||
|
}
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
#endif // !defined(VK_CAPTURE_RECORD_LIST_HPP_INCLUDED)
|
50
source/variant_pool.cpp
Normal file
50
source/variant_pool.cpp
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
|
||||||
|
#include "variant_pool.hpp"
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal types
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal variables
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// internal functions
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
VkVariantMWN* VariantPool::allocate(std::size_t num)
|
||||||
|
{
|
||||||
|
assert(num > 0 && num <= PAGE_SIZE);
|
||||||
|
const std::size_t remainingOnPage = PAGE_SIZE - (nextIndex % PAGE_SIZE);
|
||||||
|
if (remainingOnPage == PAGE_SIZE || remainingOnPage < num)
|
||||||
|
{
|
||||||
|
// next page
|
||||||
|
pages.push_back(std::make_unique<page_t>());
|
||||||
|
nextIndex = PAGE_SIZE * (pages.size() - 1);
|
||||||
|
}
|
||||||
|
const std::size_t page = nextIndex / PAGE_SIZE;
|
||||||
|
const std::size_t localIndex = nextIndex % PAGE_SIZE;
|
||||||
|
VkVariantMWN* result = &(*pages[page])[localIndex];
|
||||||
|
nextIndex += num;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace v
|
146
source/variant_pool.hpp
Normal file
146
source/variant_pool.hpp
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#if !defined(VK_CAPTURE_VARIANT_POOL_HPP_INCLUDED)
|
||||||
|
#define VK_CAPTURE_VARIANT_POOL_HPP_INCLUDED 1
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <memory>
|
||||||
|
#include <vector>
|
||||||
|
#include "common.hpp"
|
||||||
|
#include "variant_wrap.hpp"
|
||||||
|
#include "vk_capture.h"
|
||||||
|
|
||||||
|
namespace vk_capture
|
||||||
|
{
|
||||||
|
|
||||||
|
//
|
||||||
|
// public defines
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public constants
|
||||||
|
//
|
||||||
|
|
||||||
|
//
|
||||||
|
// public types
|
||||||
|
//
|
||||||
|
|
||||||
|
struct VariantPool
|
||||||
|
{
|
||||||
|
static constexpr std::size_t PAGE_SIZE = 1024;
|
||||||
|
using page_t = std::array<VkVariantMWN, PAGE_SIZE>;
|
||||||
|
using page_ptr_t = std::unique_ptr<page_t>;
|
||||||
|
|
||||||
|
std::vector<page_ptr_t> pages;
|
||||||
|
std::size_t nextIndex = 0;
|
||||||
|
|
||||||
|
VkVariantMWN* allocate(std::size_t num = 1);
|
||||||
|
inline void reset() { nextIndex = 0; }
|
||||||
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// public functions
|
||||||
|
//
|
||||||
|
|
||||||
|
template<typename TValue>
|
||||||
|
inline void variantWrap(const TValue& /* value */, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_UNKNOWN_MWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(bool value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_BOOL_MWN;
|
||||||
|
outVariant.uintValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::uint8_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_UINT8_MWN;
|
||||||
|
outVariant.uintValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::int8_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_INT8_MWN;
|
||||||
|
outVariant.intValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::uint16_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_UINT16_MWN;
|
||||||
|
outVariant.uintValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::int16_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_INT16_MWN;
|
||||||
|
outVariant.intValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::uint32_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_UINT32_MWN;
|
||||||
|
outVariant.uintValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::int32_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_INT32_MWN;
|
||||||
|
outVariant.intValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::uint64_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_UINT64_MWN;
|
||||||
|
outVariant.uintValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(std::int64_t value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_INT64_MWN;
|
||||||
|
outVariant.intValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void variantWrap(const void* value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_VOID_POINTER_MWN;
|
||||||
|
outVariant.voidPointerValue = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename TPointed>
|
||||||
|
inline void variantWrap(const TPointed* value, VkVariantMWN& outVariant);
|
||||||
|
|
||||||
|
template<typename TEle, std::size_t count>
|
||||||
|
inline void variantWrap(const TEle (&value)[count], VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_ARRAY_MWN;
|
||||||
|
outVariant.arrayValue.numElements = count;
|
||||||
|
outVariant.arrayValue.elements = allocVariant(count);
|
||||||
|
|
||||||
|
for (std::size_t idx = 0; idx < count; ++idx) {
|
||||||
|
variantWrap(value[idx], outVariant.arrayValue.elements[idx]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename TPointed>
|
||||||
|
inline void variantWrap(const TPointed* value, VkVariantMWN& outVariant)
|
||||||
|
{
|
||||||
|
outVariant.type = VK_VARIANT_TYPE_POINTER_MWN;
|
||||||
|
if (value != nullptr)
|
||||||
|
{
|
||||||
|
outVariant.pointerValue = allocVariant(1);
|
||||||
|
variantWrap(*value, *outVariant.pointerValue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// TODO: now the type is missing ...
|
||||||
|
outVariant.pointerValue = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace vk_capture
|
||||||
|
|
||||||
|
#endif // !defined(VK_CAPTURE_VARIANT_POOL_HPP_INCLUDED)
|
19673
source/variant_wrap.hpp
Normal file
19673
source/variant_wrap.hpp
Normal file
File diff suppressed because it is too large
Load Diff
1
thirdparty/vulkan-docs
vendored
Submodule
1
thirdparty/vulkan-docs
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 09d120580acb942d9cc3a96c863815a05990893c
|
Loading…
x
Reference in New Issue
Block a user