Permalink
Browse files

vktrace: Glave renaming -- removed all references to *glave* and *glv*

  • Loading branch information...
mark-lunarg committed Aug 27, 2015
1 parent 70fd085 commit 87220f80a643860b3332c0040f7ee2d81777fe08
Showing with 2,391 additions and 2,469 deletions.
  1. +12 −17 BUILD.md
  2. +6 −6 README.md
  3. +2 −2 tests/CMakeLists.txt
  4. +33 −33 vk_helper.py
  5. +1 −7 vktrace/CMakeLists.txt
  6. +66 −129 vktrace/README.md
  7. +3 −3 vktrace/TODO.md
  8. +12 −12 vktrace/src/vktrace_common/vktrace_common.h
  9. +25 −25 vktrace/src/vktrace_common/vktrace_filelike.c
  10. +9 −9 vktrace/src/vktrace_common/vktrace_filelike.h
  11. +93 −93 vktrace/src/vktrace_common/vktrace_interconnect.c
  12. +16 −16 vktrace/src/vktrace_common/vktrace_interconnect.h
  13. +15 −15 vktrace/src/vktrace_common/vktrace_memory.h
  14. +3 −3 vktrace/src/vktrace_common/vktrace_mhook.h
  15. +61 −61 vktrace/src/vktrace_common/vktrace_platform.c
  16. +48 −48 vktrace/src/vktrace_common/vktrace_platform.h
  17. +19 −19 vktrace/src/vktrace_common/vktrace_process.c
  18. +21 −21 vktrace/src/vktrace_common/vktrace_process.h
  19. +119 −119 vktrace/src/vktrace_common/vktrace_settings.c
  20. +29 −29 vktrace/src/vktrace_common/vktrace_settings.h
  21. +55 −59 vktrace/src/vktrace_common/vktrace_trace_packet_identifiers.h
  22. +49 −49 vktrace/src/vktrace_common/vktrace_trace_packet_utils.c
  23. +31 −31 vktrace/src/vktrace_common/vktrace_trace_packet_utils.h
  24. +46 −46 vktrace/src/vktrace_common/vktrace_tracelog.c
  25. +25 −25 vktrace/src/vktrace_common/vktrace_tracelog.h
  26. +46 −46 vktrace/src/vktrace_extensions/vktracevulkan/CMakeLists.txt
  27. +150 −150 vktrace/src/vktrace_extensions/vktracevulkan/layers/vktrace_snapshot.c
  28. +68 −68 vktrace/src/vktrace_extensions/vktracevulkan/layers/vktrace_snapshot.h
  29. +11 −11 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/CMakeLists.txt
  30. +33 −33 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay.cpp
  31. +10 −10 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay.h
  32. +14 −14 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay_settings.cpp
  33. +4 −4 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay_settings.h
  34. +9 −9 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay_vkdisplay.cpp
  35. +2 −2 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay_vkdisplay.h
  36. +158 −158 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay_vkreplay.cpp
  37. +6 −6 vktrace/src/vktrace_extensions/vktracevulkan/vkreplay/vkreplay_vkreplay.h
  38. +19 −19 vktrace/src/vktrace_extensions/vktracevulkan/vktrace/CMakeLists.txt
  39. +42 −42 vktrace/src/vktrace_extensions/vktracevulkan/vktrace/vktrace_lib.c
  40. +78 −78 vktrace/src/vktrace_extensions/vktracevulkan/vktrace/vktrace_lib_helpers.h
  41. +334 −334 vktrace/src/vktrace_extensions/vktracevulkan/vktrace/vktrace_lib_trace.c
  42. +32 −32 vktrace/src/vktrace_replay/vkreplay_factory.cpp
  43. +38 −38 vktrace/src/vktrace_replay/vkreplay_factory.h
  44. +72 −72 vktrace/src/vktrace_replay/vkreplay_main.cpp
  45. +5 −5 vktrace/src/vktrace_replay/vkreplay_main.h
  46. +5 −5 vktrace/src/vktrace_replay/vkreplay_seq.cpp
  47. +5 −5 vktrace/src/vktrace_replay/vkreplay_seq.h
  48. +8 −8 vktrace/src/vktrace_replay/vkreplay_window.h
  49. +119 −119 vktrace/src/vktrace_trace/vktrace.cpp
  50. +4 −4 vktrace/src/vktrace_trace/vktrace.h
  51. +38 −38 vktrace/src/vktrace_trace/vktrace_process.cpp
  52. +2 −2 vktrace/src/vktrace_trace/vktrace_process.h
  53. +280 −280 vktrace/vktrace_generate.py
View
@@ -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.
View
@@ -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.
View
@@ -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
)
View
@@ -36,7 +36,7 @@
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 @@ def __init__(self, header_file=None):
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 @@ def parse(self):
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 @@ def __init__(self, filename=None, copyright_txt="", header_txt="", body_txt="",
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 @@ def __init__(self, in_struct_dict, prefix, out_dir):
#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 @@ def set_no_addr(self, no_addr):
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,29 +539,29 @@ def _generateCppHeader(self):
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))
class_def.append(self._generateConstructorDefinitions(s))
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)))
# TODO : This is a shallow copy of ptrs
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 @@ def _generateStringHelperFunctionsCpp(self):
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 @@ def _generateDisplayDefinitions(self, s):
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,21 +1345,21 @@ def _generateHeader(self):
for f in self.include_headers:
header.append("#include <%s>\n" % f)
return "".join(header)
# Declarations
def _generateConstructorDeclarations(self, s):
constructors = []
constructors.append(" %s();\n" % self.get_class_name(s))
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 @@ def _generateGetSetDeclarations(self, s):
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 @@ def _generatePrivateMembers(self, s):
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 @@ def _generateClassDeclaration(self):
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 @@ def __init__(self, enum_type_dict=None, enum_val_dict=None, typedef_fwd_dict=Non
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 @@ def _generateSHBody(self):
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 @@ def _generateSHHeader(self):
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 @@ def __init__(self, struct_wrapper=None, out_dir=None):
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 @@ def _generateBody(self):
# 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):
View
@@ -25,12 +25,6 @@ if (NOT PYTHONINTERP_FOUND)
message(FATAL_ERROR "Missing PythonInterp. Install python interpreter 2.7 (on linux use cmd: sudo apt-get install python2.7)")
endif()
#set(CODE_GEN_DIR "vktrace_extensions/glave_vk_gen")
#execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/../../vk-helper.py --abs_out_dir ${CMAKE_CURRENT_SOURCE_DIR}/src/${CODE_GEN_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../../include/vulkan.h)
message("")
message("cmake options:")
message(" -DCMAKE_BUILD_TYPE='${CMAKE_BUILD_TYPE}': Build debug or release. (Debug|Release)")
@@ -41,7 +35,7 @@ message("")
#
# Components to build
#
set(GLV_VULKAN_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(VKTRACE_VULKAN_DIR ${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(src/vktrace_common)
add_subdirectory(src/vktrace_trace)
Oops, something went wrong.

0 comments on commit 87220f8

Please sign in to comment.