コード例 #1
0
ファイル: dxgiretrace.py プロジェクト: slattann/apitrace
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            print(r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {')
            print(r'            d3dretrace::deviceRemoved(call, _this);')
            print(r'        }')

        Retracer.handleFailure(self, interface, methodOrFunction)
コード例 #2
0
    def handleFailure(self, interface, methodOrFunction):
        if methodOrFunction.name in self.createDeviceMethodNames:
            print r'        exit(EXIT_FAILURE);'
            return

        # https://msdn.microsoft.com/en-us/library/windows/desktop/bb324479.aspx
        if methodOrFunction.name in ('Present', 'PresentEx'):
            print r'        if (_result == D3DERR_DEVICELOST) {'
            print r'            exit(EXIT_FAILURE);'
            print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
コード例 #3
0
ファイル: dxgiretrace.py プロジェクト: janesma/apitrace
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
            if getDeviceRemovedReasonMethod is not None:
                print r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
                print r'            HRESULT _reason = _this->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
                print r'            exit(EXIT_FAILURE);'
                print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
コード例 #4
0
ファイル: dxgiretrace.py プロジェクト: abcSup/apitrace
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
            if getDeviceRemovedReasonMethod is not None:
                print r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
                print r'            HRESULT _reason = _this->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
                print r'            exit(EXIT_FAILURE);'
                print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
コード例 #5
0
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            print r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
            getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
            if getDeviceRemovedReasonMethod is not None:
                print r'            HRESULT _reason = _this->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
            getDeviceMethod = interface.getMethodByName("GetDevice")
            if getDeviceMethod is not None and len(getDeviceMethod.args) == 1:
                print r'            com_ptr<%s> _pDevice;' % getDeviceMethod.args[0].type.type.type
                print r'            _this->GetDevice(&_pDevice);'
                print r'            HRESULT _reason = _pDevice->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
            print r'            exit(EXIT_FAILURE);'
            print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)
コード例 #6
0
ファイル: dxgiretrace.py プロジェクト: p-podsiadly/apitrace
    def handleFailure(self, interface, methodOrFunction):
        # Catch when device is removed, and report the reason.
        if interface is not None:
            print r'        if (_result == DXGI_ERROR_DEVICE_REMOVED) {'
            getDeviceRemovedReasonMethod = interface.getMethodByName("GetDeviceRemovedReason")
            if getDeviceRemovedReasonMethod is not None:
                print r'            HRESULT _reason = _this->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
            getDeviceMethod = interface.getMethodByName("GetDevice")
            if getDeviceMethod is not None and len(getDeviceMethod.args) == 1:
                print r'            com_ptr<%s> _pDevice;' % getDeviceMethod.args[0].type.type.type
                print r'            _this->GetDevice(&_pDevice);'
                print r'            HRESULT _reason = _pDevice->GetDeviceRemovedReason();'
                print r'            retrace::failed(call, _reason);'
            print r'            exit(EXIT_FAILURE);'
            print r'        }'

        Retracer.handleFailure(self, interface, methodOrFunction)