diff options
-rw-r--r-- | BUILD.md | 29 | ||||
-rwxr-xr-x | README.md | 12 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
-rwxr-xr-x | vk_helper.py | 66 |
4 files changed, 53 insertions, 58 deletions
@@ -1,6 +1,6 @@ # Build Instructions This project fully supports Linux today. -Support for Windows is for the loader, layers, and the Glave debugger (additional info below). Additional Windows support will be coming in Q1'15. +Support for Windows is for the loader, layers, and the VkTrace trace/replay tools. Support for Android is TBD. ## Git the Bits @@ -18,21 +18,21 @@ Ubuntu 14.10 needed for DRI 3 sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev libmagickwand-dev qt5-default libpciaccess-dev libpthread-stubs0-dev libudev-dev sudo apt-get build-dep mesa ``` -Warning: Recent versions of 14.10 have **REMOVED** DRI 3. -Version: 2:2.99.914-1~exp1ubuntu4.1 is known to work. +Warning: Recent versions of 14.10 have **REMOVED** DRI 3. +Version: 2:2.99.914-1~exp1ubuntu4.1 is known to work. To see status of this package: ``` dpkg -s xserver-xorg-video-intel ``` -Note: -Version 2:2.99.914-1~exp1ubuntu4.2 does not work anymore. -To install the working driver from launchpadlibrarian.net: -- Remove the current driver: +Note: +Version 2:2.99.914-1~exp1ubuntu4.2 does not work anymore. +To install the working driver from launchpadlibrarian.net: +- Remove the current driver: ``` sudo apt-get purge xserver-xorg-video-intel ``` -- Download the old driver: +- Download the old driver: ``` wget http://launchpadlibrarian.net/189418339/xserver-xorg-video-intel_2.99.914-1%7Eexp1ubuntu4.1_amd64.deb ``` @@ -45,8 +45,8 @@ sudo dpkg -i xserver-xorg-video-intel_2.99.914-1~exp1ubuntu4.1_amd64.deb sudo bash -c "echo $'Package: xserver-xorg-video-intel\nPin: version 2:2.99.914-1~exp1ubuntu4.1\nPin-Priority: 1001' > /etc/apt/preferences.d/xserver-xorg-video-intel" ``` -- Either restart Ubuntu or just X11. - +- Either restart Ubuntu or just X11. + ## Clone the repository To create your local git repository: @@ -132,11 +132,11 @@ Windows 7+ with additional required software packages: - Microsoft Visual Studio 2013 Professional. Note: it is possible that lesser/older versions may work, but that has not been tested. - CMake (from http://www.cmake.org/download/). Notes: - - In order to build the Glave debugger, you need at least version 3.0. + - In order to build the VkTrace tools, you need at least version 3.0. - Tell the installer to "Add CMake to the system PATH" environment variable. - Python 3 (from https://www.python.org/downloads). Notes: - Select to install the optional sub-package to add Python to the system PATH environment variable. - - Need python3.3 or later to get the Windows py.exe launcher that is used to get pyhton3 rather than python2 if both are installed on Windows + - Need python3.3 or later to get the Windows py.exe launcher that is used to get python3 rather than python2 if both are installed on Windows - Git (from http://git-scm.com/download/win). - Note: If you use Cygwin, you can normally use Cygwin's "git.exe". However, in order to use the "update_external_sources.bat" script, you must have this version. - Tell the installer to allow it to be used for "Developer Prompt" as well as "Git Bash". @@ -150,11 +150,6 @@ Windows 7+ with additional required software packages: Optional software packages: -- Qt 5.3 (from http://www.qt.io/download/). Notes: - - Qt 5.3 is required in order to build the Glave debugger (GUI). The Glave trace and replay tools can be built without Qt, but the debugger/GUI is built on top of Qt 5.3. Various dependencies, from the Qt package are copied to the directory where the Glave debugger and its libraries are built. In order to copy and run the debugger in another directory, these libraries must also be copied. Other notes: - - While there are commercial licenses, you can also use the "Community" (free) license. - - By default, the installer will select the latest version (e.g. Qt 5.4) as well as some other components. You must select "Qt 5.3"! You can have multiple versions installed (e.g. Qt 5.2.1, 5.3, and 5.4). - - Installing Qt takes a long time. - Cygwin (from https://www.cygwin.com/). Notes: - Cygwin provides some Linux-like tools, which are valuable for obtaining the source code, and running CMake. Especially valuable are the BASH shell and git packages. @@ -22,8 +22,8 @@ The following components are available: - VK Library and header files, which include:
- [*ICD Loader*](loader) and [*Layer Manager*](layers/README.md)
- Snapshot of *VK* and *BIL* header files from [*Khronos*](www.khronos.org)
-
-- [*GLAVE Debugger*](tools/glave)
+
+- [*VKTRACE tools*](tools/vktrace)
![ScreenShot](docs/images/Vktrace-Small.png)
@@ -37,14 +37,14 @@ The following components are available: Supports new resource binding model, memory allocation, pixel FORMATs and
other updates.
APIDump layer is working with these new API elements.
- Glave can trace and replay the cube and tri demos.
+ VkTrace can trace and replay the cube and tri demos.
Other layers in progress.
-- Warning: Recent versions of 14.10 have **REMOVED** DRI 3.
- Version: 2:2.99.914-1~exp1ubuntu4.1 is known to work.
+- Warning: Recent versions of 14.10 have **REMOVED** DRI 3.
+ Version: 2:2.99.914-1~exp1ubuntu4.1 is known to work.
## Prior updates
-- VK API trace and capture tools. See tools/glave/README.md for details.
+- VK API trace and capture tools. See tools/vktrace/README.md for details.
- Sample driver now supports multiple render targets. Added TriangleMRT to test that functionality.
- Added VK_SLOT_SHADER_TEXTURE_RESOURCE to vulkan.h as a descriptor slot type to work around confusion in GLSL
between textures and buffers as shader resources.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1d1803d89..258220079 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -95,11 +95,11 @@ else() FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/golden GOLDEN) FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/_run_all_tests.ps1 RUN_ALL) FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/_run_all_tests_with_layers.ps1 RUN_ALL_WITH_LAYERS) - FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/_vktracereplay.ps1 VKGLAVETRACEREPLAY) + FILE(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/_vktracereplay.ps1 VKTRACEREPLAY) add_custom_target(binary-dir-symlinks ALL COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RUN_ALL} run_all_tests.ps1 COMMAND ${CMAKE_COMMAND} -E copy_if_different ${RUN_ALL_WITH_LAYERS} run_all_tests_with_layers.ps1 - COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VKGLAVETRACEREPLAY} vktracereplay.ps1 + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VKTRACEREPLAY} vktracereplay.ps1 COMMAND IF NOT EXIST golden mklink /J golden ${GOLDEN} VERBATIM ) diff --git a/vk_helper.py b/vk_helper.py index 352afb41f..4becc7d42 100755 --- a/vk_helper.py +++ b/vk_helper.py @@ -36,7 +36,7 @@ from source_line_info import sourcelineinfo def handle_args(): parser = argparse.ArgumentParser(description='Perform analysis of vogl trace.') parser.add_argument('input_file', help='The input header file from which code will be generated.') - parser.add_argument('--rel_out_dir', required=False, default='glave_gen', help='Path relative to exec path to write output files. Will be created if needed.') + parser.add_argument('--rel_out_dir', required=False, default='vktrace_gen', help='Path relative to exec path to write output files. Will be created if needed.') parser.add_argument('--abs_out_dir', required=False, default=None, help='Absolute path to write output files. Will be created if needed.') parser.add_argument('--gen_enum_string_helper', required=False, action='store_true', default=False, help='Enable generation of helper header file to print string versions of enums.') parser.add_argument('--gen_struct_wrappers', required=False, action='store_true', default=False, help='Enable generation of struct wrapper classes.') @@ -91,7 +91,7 @@ class HeaderFileParser: self.typedef_rev_dict = {} self.types_dict = {} self.last_struct_count_name = '' - + def setHeaderFile(self, header_file): self.header_file = header_file @@ -201,7 +201,7 @@ class HeaderFileParser: if ';' in line: self._add_struct(line, base_type, member_num) member_num = member_num + 1 - + # populate enum dicts based on enum lines def _add_enum(self, line_txt, enum_type, def_enum_val): #print("Parsing enum line %s" % line_txt) @@ -372,22 +372,22 @@ class CommonFileGen: self.filename = filename self.contents = {'copyright': copyright_txt, 'header': header_txt, 'body': body_txt, 'footer': footer_txt} # TODO : Set a default copyright & footer at least - + def setFilename(self, filename): self.filename = filename - + def setCopyright(self, c): self.contents['copyright'] = c - + def setHeader(self, h): self.contents['header'] = h - + def setBody(self, b): self.contents['body'] = b - + def setFooter(self, f): self.contents['footer'] = f - + def generate(self): #print("Generate to file %s" % self.filename) with open(self.filename, "w") as f: @@ -429,7 +429,7 @@ class StructWrapperGen: #print(self.header_filename) self.header_txt = "" self.definition_txt = "" - + def set_include_headers(self, include_headers): self.include_headers = include_headers @@ -446,18 +446,18 @@ class StructWrapperGen: def get_class_name(self, struct_name): class_name = struct_name.strip('_').lower() + "_struct_wrapper" return class_name - + def get_file_list(self): return [os.path.basename(self.header_filename), os.path.basename(self.class_filename), os.path.basename(self.string_helper_filename)] - # Generate class header file + # Generate class header file def generateHeader(self): self.hfg.setCopyright(self._generateCopyright()) self.hfg.setHeader(self._generateHeader()) self.hfg.setBody(self._generateClassDeclaration()) self.hfg.setFooter(self._generateFooter()) self.hfg.generate() - + # Generate class definition def generateBody(self): self.cfg.setCopyright(self._generateCopyright()) @@ -539,10 +539,10 @@ class StructWrapperGen: header.append("//#includes, #defines, globals and such...\n") header.append("#include <stdio.h>\n#include <%s>\n#include <%s_enum_string_helper.h>\n" % (os.path.basename(self.header_filename), self.api_prefix)) return "".join(header) - + def _generateClassDefinition(self): class_def = [] - if 'vk' == self.api: # Mantle doesn't have pNext to worry about + if 'vk' == self.api: class_def.append(self._generateDynamicPrintFunctions()) for s in sorted(self.struct_dict): class_def.append("\n// %s class definition" % self.get_class_name(s)) @@ -550,7 +550,7 @@ class StructWrapperGen: class_def.append(self._generateDestructorDefinitions(s)) class_def.append(self._generateDisplayDefinitions(s)) return "\n".join(class_def) - + def _generateConstructorDefinitions(self, s): con_defs = [] con_defs.append("%s::%s() : m_struct(), m_indent(0), m_dummy_prefix('\\0'), m_origStructAddr(NULL) {}" % (self.get_class_name(s), self.get_class_name(s))) @@ -558,10 +558,10 @@ class StructWrapperGen: con_defs.append("%s::%s(%s* pInStruct) : m_indent(0), m_dummy_prefix('\\0')\n{\n m_struct = *pInStruct;\n m_origStructAddr = pInStruct;\n}" % (self.get_class_name(s), self.get_class_name(s), typedef_fwd_dict[s])) con_defs.append("%s::%s(const %s* pInStruct) : m_indent(0), m_dummy_prefix('\\0')\n{\n m_struct = *pInStruct;\n m_origStructAddr = pInStruct;\n}" % (self.get_class_name(s), self.get_class_name(s), typedef_fwd_dict[s])) return "\n".join(con_defs) - + def _generateDestructorDefinitions(self, s): return "%s::~%s() {}" % (self.get_class_name(s), self.get_class_name(s)) - + def _generateDynamicPrintFunctions(self): dp_funcs = [] dp_funcs.append("\nvoid dynamic_display_full_txt(const void* pStruct, uint32_t indent)\n{\n // Cast to APP_INFO ptr initially just to pull sType off struct") @@ -1039,7 +1039,7 @@ class StructWrapperGen: sh_funcs.append(" }") sh_funcs.append("}") return "\n".join(sh_funcs) - + def _genStructMemberPrint(self, member, s, array, struct_array): (p_out, p_arg) = self._get_struct_print_formatted(self.struct_dict[s][member], pre_var_name="&m_dummy_prefix", struct_var_name="m_struct", struct_ptr=False, print_array=True) extra_indent = "" @@ -1131,7 +1131,7 @@ class StructWrapperGen: class_num += 1 disp_def.append("}\n") return "\n".join(disp_def) - + def _generateStringHelperHeader(self): header = [] header.append("//#includes, #defines, globals and such...\n") @@ -1345,7 +1345,7 @@ class StructWrapperGen: for f in self.include_headers: header.append("#include <%s>\n" % f) return "".join(header) - + # Declarations def _generateConstructorDeclarations(self, s): constructors = [] @@ -1353,13 +1353,13 @@ class StructWrapperGen: constructors.append(" %s(%s* pInStruct);\n" % (self.get_class_name(s), typedef_fwd_dict[s])) constructors.append(" %s(const %s* pInStruct);\n" % (self.get_class_name(s), typedef_fwd_dict[s])) return "".join(constructors) - + def _generateDestructorDeclarations(self, s): return " virtual ~%s();\n" % self.get_class_name(s) - + def _generateDisplayDeclarations(self, s): return " void display_txt();\n void display_single_txt();\n void display_full_txt();\n" - + def _generateGetSetDeclarations(self, s): get_set = [] get_set.append(" void set_indent(uint32_t indent) { m_indent = indent; }\n") @@ -1371,7 +1371,7 @@ class StructWrapperGen: if not self.struct_dict[s][member]['const']: get_set.append(" void set_%s(%s inValue) { m_struct.%s = inValue; }\n" % (self.struct_dict[s][member]['name'], self.struct_dict[s][member]['full_type'], self.struct_dict[s][member]['name'])) return "".join(get_set) - + def _generatePrivateMembers(self, s): priv = [] priv.append("\nprivate:\n") @@ -1381,7 +1381,7 @@ class StructWrapperGen: priv.append(" const char m_dummy_prefix;\n") priv.append(" void display_struct_members();\n") return "".join(priv) - + def _generateClassDeclaration(self): class_decl = [] for s in sorted(self.struct_dict): @@ -1394,7 +1394,7 @@ class StructWrapperGen: class_decl.append(self._generatePrivateMembers(s)) class_decl.append("};\n") return "\n".join(class_decl) - + def _generateFooter(self): return "\n//any footer info for class\n" @@ -1408,7 +1408,7 @@ class EnumCodeGen: self.eshfg = CommonFileGen(self.out_sh_file) self.out_vh_file = out_vh_file self.evhfg = CommonFileGen(self.out_vh_file) - + def generateStringHelper(self): self.eshfg.setHeader(self._generateSHHeader()) self.eshfg.setBody(self._generateSHBody()) @@ -1450,7 +1450,7 @@ class EnumCodeGen: body.append(' case %s:\n return "%s";' % (e, e)) body.append(' default:\n return "Unhandled %s";\n }\n}\n\n' % (fet)) return "\n".join(body) - + def _generateSHHeader(self): header = [] header.append('#pragma once\n') @@ -1459,7 +1459,7 @@ class EnumCodeGen: header.append('#endif\n') header.append('#include <%s>\n\n\n' % self.in_file) return "\n".join(header) - + class CMakeGen: def __init__(self, struct_wrapper=None, out_dir=None): @@ -1469,11 +1469,11 @@ class CMakeGen: self.out_dir = out_dir self.out_file = os.path.join(self.out_dir, "CMakeLists.txt") self.cmg = CommonFileGen(self.out_file) - + def generate(self): self.cmg.setBody(self._generateBody()) self.cmg.generate() - + def _generateBody(self): body = [] body.append("project(%s)" % os.path.basename(self.out_dir)) @@ -1742,7 +1742,7 @@ class GraphVizGen: # hdr.append('node [\nfontsize = "16"\nshape = "plaintext"\n];') # hdr.append('edge [\n];\n') # return "\n".join(hdr) -# +# # def _generateBody(self): # body = [] # for s in sorted(self.struc_dict): |