José Fonseca | ff0b1ee | 2012-10-25 12:17:39 +0100 | [diff] [blame] | 1 | ########################################################################## |
| 2 | # |
| 3 | # Copyright 2008-2009 VMware, Inc. |
| 4 | # All Rights Reserved. |
| 5 | # |
| 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | # of this software and associated documentation files (the "Software"), to deal |
| 8 | # in the Software without restriction, including without limitation the rights |
| 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | # copies of the Software, and to permit persons to whom the Software is |
| 11 | # furnished to do so, subject to the following conditions: |
| 12 | # |
| 13 | # The above copyright notice and this permission notice shall be included in |
| 14 | # all copies or substantial portions of the Software. |
| 15 | # |
| 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | # THE SOFTWARE. |
| 23 | # |
| 24 | ##########################################################################/ |
| 25 | |
| 26 | |
José Fonseca | 20aa935 | 2012-11-23 14:34:29 +0000 | [diff] [blame] | 27 | import sys |
José Fonseca | ff0b1ee | 2012-10-25 12:17:39 +0100 | [diff] [blame] | 28 | from dlltrace import DllTracer |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 29 | from trace import getWrapperInterfaceName |
José Fonseca | ff0b1ee | 2012-10-25 12:17:39 +0100 | [diff] [blame] | 30 | from specs import stdapi |
José Fonseca | 20aa935 | 2012-11-23 14:34:29 +0000 | [diff] [blame] | 31 | from specs.stdapi import API |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 32 | from specs import dxgi |
| 33 | from specs import d3d10 |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 34 | from specs import d3d11 |
Jose Fonseca | bab1921 | 2016-01-31 23:58:30 +0000 | [diff] [blame] | 35 | from specs import dcomp |
José Fonseca | e354d8d | 2015-02-06 10:30:01 +0000 | [diff] [blame] | 36 | from specs import d3d9 |
José Fonseca | ff0b1ee | 2012-10-25 12:17:39 +0100 | [diff] [blame] | 37 | |
| 38 | |
| 39 | class D3DCommonTracer(DllTracer): |
| 40 | |
| 41 | def serializeArgValue(self, function, arg): |
| 42 | # Dump shaders as strings |
| 43 | if isinstance(arg.type, stdapi.Blob) and arg.name.startswith('pShaderBytecode'): |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 44 | print(' DumpShader(trace::localWriter, %s, %s);' % (arg.name, arg.type.size)) |
José Fonseca | ff0b1ee | 2012-10-25 12:17:39 +0100 | [diff] [blame] | 45 | return |
| 46 | |
Jose Fonseca | 3dccc20 | 2018-12-04 12:29:00 +0000 | [diff] [blame] | 47 | # Serialize the swap-chain dimensions |
| 48 | if function.name.startswith('CreateSwapChain') and arg.name == 'pDesc' \ |
José Fonseca | 2b6d24e | 2013-02-22 15:00:26 +0000 | [diff] [blame] | 49 | or arg.name == 'pSwapChainDesc': |
Jose Fonseca | 3dccc20 | 2018-12-04 12:29:00 +0000 | [diff] [blame] | 50 | assert isinstance(arg.type, stdapi.Pointer) |
| 51 | descType = arg.type.type.mutable() |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 52 | print(r' %s *_pSwapChainDesc = nullptr;' % descType) |
| 53 | print(r' %s _SwapChainDesc;' % descType) |
| 54 | print(r' if (%s) {' % arg.name) |
| 55 | print(r' _SwapChainDesc = *%s;' % arg.name) |
Jose Fonseca | 3dccc20 | 2018-12-04 12:29:00 +0000 | [diff] [blame] | 56 | if self.interface is not None and self.interface.name.endswith('DWM'): |
| 57 | # Obtain size from the output |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 58 | print(r' assert(pOutput);') |
| 59 | print(r' DXGI_OUTPUT_DESC _OutputDesc;') |
| 60 | print(r' if (SUCCEEDED(pOutput->GetDesc(&_OutputDesc))) {') |
| 61 | print(r' _SwapChainDesc.BufferDesc.Width = _OutputDesc.DesktopCoordinates.right - _OutputDesc.DesktopCoordinates.left;') |
| 62 | print(r' _SwapChainDesc.BufferDesc.Height = _OutputDesc.DesktopCoordinates.bottom - _OutputDesc.DesktopCoordinates.top;') |
| 63 | print(r' }') |
Jose Fonseca | 3dccc20 | 2018-12-04 12:29:00 +0000 | [diff] [blame] | 64 | elif function.name == 'CreateSwapChainForHwnd': |
| 65 | # Obtain size from the window |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 66 | print(r' RECT _rect;') |
| 67 | print(r' if (GetClientRect(hWnd, &_rect)) {') |
| 68 | print(r' if (%s->Width == 0) {' % arg.name) |
| 69 | print(r' _SwapChainDesc.Width = _rect.right - _rect.left;') |
| 70 | print(r' }') |
| 71 | print(r' if (%s->Height == 0) {' % arg.name) |
| 72 | print(r' _SwapChainDesc.Height = _rect.bottom - _rect.top;') |
| 73 | print(r' }') |
| 74 | print(r' }') |
Jose Fonseca | 3dccc20 | 2018-12-04 12:29:00 +0000 | [diff] [blame] | 75 | elif function.name.startswith('CreateSwapChainFor'): |
| 76 | # TODO |
| 77 | pass |
| 78 | else: |
José Fonseca | 419d768 | 2013-02-22 10:24:31 +0000 | [diff] [blame] | 79 | # Obtain size from the window |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 80 | print(r' RECT _rect;') |
| 81 | print(r' if (GetClientRect(%s->OutputWindow, &_rect)) {' % arg.name) |
| 82 | print(r' if (%s->BufferDesc.Width == 0) {' % arg.name) |
| 83 | print(r' _SwapChainDesc.BufferDesc.Width = _rect.right - _rect.left;') |
| 84 | print(r' }') |
| 85 | print(r' if (%s->BufferDesc.Height == 0) {' % arg.name) |
| 86 | print(r' _SwapChainDesc.BufferDesc.Height = _rect.bottom - _rect.top;') |
| 87 | print(r' }') |
| 88 | print(r' }') |
| 89 | print(r' _pSwapChainDesc = &_SwapChainDesc;') |
| 90 | print(r' }') |
José Fonseca | 2b6d24e | 2013-02-22 15:00:26 +0000 | [diff] [blame] | 91 | self.serializeValue(arg.type, '_pSwapChainDesc') |
José Fonseca | 419d768 | 2013-02-22 10:24:31 +0000 | [diff] [blame] | 92 | return |
| 93 | |
José Fonseca | 04ffbed | 2014-07-23 13:57:14 +0100 | [diff] [blame] | 94 | # Serialize object names |
José Fonseca | 04ffbed | 2014-07-23 13:57:14 +0100 | [diff] [blame] | 95 | if function.name == 'SetPrivateData' and arg.name == 'pData': |
| 96 | iid = function.args[0].name |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 97 | print(r' if (%s == WKPDID_D3DDebugObjectName) {' % iid) |
| 98 | print(r' trace::localWriter.writeString(static_cast<const char *>(pData), DataSize);') |
| 99 | print(r' } else {') |
José Fonseca | 04ffbed | 2014-07-23 13:57:14 +0100 | [diff] [blame] | 100 | DllTracer.serializeArgValue(self, function, arg) |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 101 | print(r' }') |
José Fonseca | 04ffbed | 2014-07-23 13:57:14 +0100 | [diff] [blame] | 102 | return |
| 103 | |
José Fonseca | ff0b1ee | 2012-10-25 12:17:39 +0100 | [diff] [blame] | 104 | DllTracer.serializeArgValue(self, function, arg) |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 105 | |
| 106 | # Interfaces that need book-keeping for maps |
| 107 | mapInterfaces = ( |
| 108 | dxgi.IDXGISurface, |
| 109 | d3d10.ID3D10Resource, |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 110 | ) |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 111 | |
| 112 | def enumWrapperInterfaceVariables(self, interface): |
| 113 | variables = DllTracer.enumWrapperInterfaceVariables(self, interface) |
| 114 | |
| 115 | # Add additional members to track maps |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 116 | if interface.hasBase(*self.mapInterfaces): |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 117 | variables += [ |
José Fonseca | 6a94005 | 2014-10-07 21:39:06 +0100 | [diff] [blame] | 118 | ('_MAP_DESC', 'm_MapDesc', None), |
Jose Fonseca | 5057d10 | 2016-05-05 17:01:12 +0100 | [diff] [blame] | 119 | ('MemoryShadow', 'm_MapShadow', None), |
José Fonseca | 6a94005 | 2014-10-07 21:39:06 +0100 | [diff] [blame] | 120 | ] |
| 121 | if interface.hasBase(d3d11.ID3D11DeviceContext): |
| 122 | variables += [ |
| 123 | ('std::map< std::pair<ID3D11Resource *, UINT>, _MAP_DESC >', 'm_MapDescs', None), |
Jose Fonseca | 5057d10 | 2016-05-05 17:01:12 +0100 | [diff] [blame] | 124 | ('std::map< std::pair<ID3D11Resource *, UINT>, MemoryShadow >', 'm_MapShadows', None), |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 125 | ] |
Jose Fonseca | 91403b6 | 2016-05-19 15:10:03 +0100 | [diff] [blame] | 126 | if interface.hasBase(d3d11.ID3D11VideoContext): |
| 127 | variables += [ |
| 128 | ('std::map<UINT, std::pair<void *, UINT> >', 'm_MapDesc', None), |
| 129 | ] |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 130 | |
| 131 | return variables |
| 132 | |
| 133 | def implementWrapperInterfaceMethodBody(self, interface, base, method): |
Jose Fonseca | 4713c3b | 2015-08-12 11:06:34 +0100 | [diff] [blame] | 134 | if method.getArgByName('pInitialData'): |
| 135 | pDesc1 = method.getArgByName('pDesc1') |
| 136 | if pDesc1 is not None: |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 137 | print(r' %s pDesc = pDesc1;' % (pDesc1.type,)) |
Jose Fonseca | 4713c3b | 2015-08-12 11:06:34 +0100 | [diff] [blame] | 138 | |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 139 | if method.name in ('Map', 'Unmap'): |
| 140 | # On D3D11 Map/Unmap is not a resource method, but a context method instead. |
| 141 | resourceArg = method.getArgByName('pResource') |
| 142 | if resourceArg is None: |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 143 | print(' _MAP_DESC & _MapDesc = m_MapDesc;') |
| 144 | print(' MemoryShadow & _MapShadow = m_MapShadow;') |
| 145 | print(' %s *pResourceInstance = m_pInstance;' % interface.name) |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 146 | else: |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 147 | print(r' static bool _warned = false;') |
| 148 | print(r' if (_this->GetType() == D3D11_DEVICE_CONTEXT_DEFERRED && !_warned) {') |
| 149 | print(r' os::log("apitrace: warning: map with deferred context may not be realiably traced\n");') |
| 150 | print(r' _warned = true;') |
| 151 | print(r' }') |
| 152 | print(' _MAP_DESC & _MapDesc = m_MapDescs[std::pair<%s, UINT>(pResource, Subresource)];' % resourceArg.type) |
| 153 | print(' MemoryShadow & _MapShadow = m_MapShadows[std::pair<%s, UINT>(pResource, Subresource)];' % resourceArg.type) |
| 154 | print(' Wrap%spResourceInstance = static_cast<Wrap%s>(%s);' % (resourceArg.type, resourceArg.type, resourceArg.name)) |
José Fonseca | 5abf560 | 2013-05-30 14:00:44 +0100 | [diff] [blame] | 155 | |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 156 | if method.name == 'Unmap': |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 157 | print(' if (_MapDesc.Size && _MapDesc.pData) {') |
| 158 | print(' if (_shouldShadowMap(pResourceInstance)) {') |
| 159 | print(' _MapShadow.update(trace::fakeMemcpy);') |
| 160 | print(' } else {') |
José Fonseca | 6f0e303 | 2014-06-25 01:00:35 +0100 | [diff] [blame] | 161 | self.emit_memcpy('_MapDesc.pData', '_MapDesc.Size') |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 162 | print(' }') |
| 163 | print(' }') |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 164 | |
Jose Fonseca | 91403b6 | 2016-05-19 15:10:03 +0100 | [diff] [blame] | 165 | if interface.hasBase(d3d11.ID3D11VideoContext) and \ |
| 166 | method.name == 'ReleaseDecoderBuffer': |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 167 | print(' std::map<UINT, std::pair<void *, UINT> >::iterator it = m_MapDesc.find(Type);') |
| 168 | print(' if (it != m_MapDesc.end()) {') |
Jose Fonseca | 91403b6 | 2016-05-19 15:10:03 +0100 | [diff] [blame] | 169 | self.emit_memcpy('it->second.first', 'it->second.second') |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 170 | print(' m_MapDesc.erase(it);') |
| 171 | print(' }') |
Jose Fonseca | 91403b6 | 2016-05-19 15:10:03 +0100 | [diff] [blame] | 172 | |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 173 | DllTracer.implementWrapperInterfaceMethodBody(self, interface, base, method) |
| 174 | |
| 175 | if method.name == 'Map': |
| 176 | # NOTE: recursive locks are explicitely forbidden |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 177 | print(' if (SUCCEEDED(_result)) {') |
| 178 | print(' _getMapDesc(_this, %s, _MapDesc);' % ', '.join(method.argNames())) |
| 179 | print(' if (_MapDesc.pData && _shouldShadowMap(pResourceInstance)) {') |
Jose Fonseca | 5057d10 | 2016-05-05 17:01:12 +0100 | [diff] [blame] | 180 | if interface.name.startswith('IDXGI'): |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 181 | print(' (void)_MapShadow;') |
Jose Fonseca | 5057d10 | 2016-05-05 17:01:12 +0100 | [diff] [blame] | 182 | else: |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 183 | print(' bool _discard = MapType == 4 /* D3D1[01]_MAP_WRITE_DISCARD */;') |
| 184 | print(' _MapShadow.cover(_MapDesc.pData, _MapDesc.Size, _discard);') |
| 185 | print(' }') |
| 186 | print(' } else {') |
| 187 | print(' _MapDesc.pData = NULL;') |
| 188 | print(' _MapDesc.Size = 0;') |
| 189 | print(' }') |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 190 | |
Jose Fonseca | 91403b6 | 2016-05-19 15:10:03 +0100 | [diff] [blame] | 191 | if interface.hasBase(d3d11.ID3D11VideoContext) and \ |
| 192 | method.name == 'GetDecoderBuffer': |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 193 | print(' if (SUCCEEDED(_result)) {') |
| 194 | print(' m_MapDesc[Type] = std::make_pair(*ppBuffer, *pBufferSize);') |
| 195 | print(' } else {') |
| 196 | print(' m_MapDesc[Type] = std::make_pair(nullptr, 0);') |
| 197 | print(' }') |
Jose Fonseca | 91403b6 | 2016-05-19 15:10:03 +0100 | [diff] [blame] | 198 | |
Jose Fonseca | 982fa6b | 2016-04-09 14:09:57 +0100 | [diff] [blame] | 199 | def invokeMethod(self, interface, base, method): |
Andrii Simiklit | 3793ce3 | 2019-05-24 17:31:09 +0300 | [diff] [blame] | 200 | if method.name == 'CreateBuffer': |
| 201 | if interface.name.startswith('ID3D11'): |
| 202 | print(r' D3D11_SUBRESOURCE_DATA initialData;') |
| 203 | else: |
| 204 | print(r' D3D10_SUBRESOURCE_DATA initialData;') |
| 205 | print(r' if (!pInitialData) {') |
| 206 | print(r' pInitialData = &initialData;') |
| 207 | print(r' _initialBufferAlloc(pDesc, &initialData);') |
| 208 | print(r' }') |
| 209 | |
Jose Fonseca | 982fa6b | 2016-04-09 14:09:57 +0100 | [diff] [blame] | 210 | DllTracer.invokeMethod(self, interface, base, method) |
| 211 | |
| 212 | # When D2D is used on top of WARP software rasterizer it seems to do |
| 213 | # most of its rendering via the undocumented and opaque IWarpPrivateAPI |
| 214 | # interface. Althought hiding this interface will affect behavior, |
| 215 | # there's little point in traces that use it, as they lack enough |
| 216 | # information to replay correctly. |
| 217 | # |
| 218 | # Returning E_NOINTERFACE when for IID_IWarpPrivateAPI matches what |
| 219 | # happens when D2D is used with drivers other than WARP. |
| 220 | if method.name == 'QueryInterface': |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 221 | print(r' if (_result == S_OK && riid == IID_IWarpPrivateAPI && ppvObj && *ppvObj) {') |
| 222 | print(r' static_cast<IUnknown *>(*ppvObj)->Release();') |
| 223 | print(r' *ppvObj = nullptr;') |
| 224 | print(r' _result = E_NOINTERFACE;') |
| 225 | print(r' os::log("apitrace: warning: hiding IWarpPrivateAPI interface\n");') |
| 226 | print(r' }') |
Jose Fonseca | 982fa6b | 2016-04-09 14:09:57 +0100 | [diff] [blame] | 227 | |
Jose Fonseca | aaf4bb6 | 2020-05-08 09:23:24 +0100 | [diff] [blame] | 228 | if interface.name.startswith('ID3D11Device') and method.name == 'CheckFeatureSupport': |
| 229 | print(r' if (FORCE_D3D_FEATURE_LEVEL_11_0 &&') |
| 230 | print(r' _result == S_OK &&') |
| 231 | print(r' Feature >= D3D11_FEATURE_D3D11_OPTIONS) {') |
| 232 | print(r' ZeroMemory(pFeatureSupportData, FeatureSupportDataSize);') |
| 233 | print(r' }') |
| 234 | |
| 235 | if method.name == 'CheckMultisampleQualityLevels': |
| 236 | print(r' if (FORCE_D3D_FEATURE_LEVEL_11_0 &&') |
| 237 | print(r' _result == S_OK &&') |
| 238 | print(r' pNumQualityLevels && *pNumQualityLevels > 1) {') |
| 239 | print(r' *pNumQualityLevels = 1;') |
| 240 | print(r' }') |
| 241 | |
Jose Fonseca | 5057d10 | 2016-05-05 17:01:12 +0100 | [diff] [blame] | 242 | # Ensure buffers are initialized, otherwise we can fail to detect |
| 243 | # changes when unititialized data matches what the app wrote. |
| 244 | if method.name == 'CreateBuffer': |
Andrii Simiklit | 3793ce3 | 2019-05-24 17:31:09 +0300 | [diff] [blame] | 245 | print(r' if (pInitialData == &initialData) {') |
| 246 | print(r' _initialBufferFree(&initialData);') |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 247 | print(r' }') |
Jose Fonseca | 5057d10 | 2016-05-05 17:01:12 +0100 | [diff] [blame] | 248 | |
José Fonseca | 0168b51 | 2012-11-03 18:44:36 +0000 | [diff] [blame] | 249 | |
José Fonseca | 20aa935 | 2012-11-23 14:34:29 +0000 | [diff] [blame] | 250 | if __name__ == '__main__': |
Piotr Podsiadły | 0b8b019 | 2019-01-03 20:39:55 +0100 | [diff] [blame] | 251 | print(r'#include "guids_defs.hpp"') |
| 252 | print() |
| 253 | print(r'#include "trace_writer_local.hpp"') |
| 254 | print(r'#include "os.hpp"') |
| 255 | print() |
| 256 | print(r'#include "dxgitrace.hpp"') |
| 257 | print() |
José Fonseca | 20aa935 | 2012-11-23 14:34:29 +0000 | [diff] [blame] | 258 | |
Jose Fonseca | aaf4bb6 | 2020-05-08 09:23:24 +0100 | [diff] [blame] | 259 | # TODO: Expose this via a runtime option |
| 260 | print('#define FORCE_D3D_FEATURE_LEVEL_11_0 0') |
| 261 | |
José Fonseca | 20aa935 | 2012-11-23 14:34:29 +0000 | [diff] [blame] | 262 | api = API() |
José Fonseca | fc58d05 | 2014-06-13 12:47:19 +0100 | [diff] [blame] | 263 | api.addModule(dxgi.dxgi) |
| 264 | api.addModule(d3d10.d3d10) |
Jose Fonseca | a92e0c4 | 2015-03-14 10:49:23 +0000 | [diff] [blame] | 265 | api.addModule(d3d10.d3d10_1) |
José Fonseca | fc58d05 | 2014-06-13 12:47:19 +0100 | [diff] [blame] | 266 | api.addModule(d3d11.d3d11) |
Jose Fonseca | bab1921 | 2016-01-31 23:58:30 +0000 | [diff] [blame] | 267 | api.addModule(dcomp.dcomp) |
José Fonseca | e354d8d | 2015-02-06 10:30:01 +0000 | [diff] [blame] | 268 | api.addModule(d3d9.d3dperf) |
José Fonseca | 20aa935 | 2012-11-23 14:34:29 +0000 | [diff] [blame] | 269 | |
| 270 | tracer = D3DCommonTracer() |
| 271 | tracer.traceApi(api) |