这篇教程C++ CHECK_HRESULT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CHECK_HRESULT函数的典型用法代码示例。如果您正苦于以下问题:C++ CHECK_HRESULT函数的具体用法?C++ CHECK_HRESULT怎么用?C++ CHECK_HRESULT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CHECK_HRESULT函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CHECK_HRESULTIAAFClassDefSP AxObject::GetDefinition(){ IAAFClassDefSP spIaafClassDef; CHECK_HRESULT( _spIaafObject->GetDefinition( &spIaafClassDef ) ); return spIaafClassDef;}
开发者ID:nevali,项目名称:aaf,代码行数:8,
示例2: CHECK_HRESULTIEnumAAFKLVDataDefsSP AxDictionary::GetKLVDataDefs(){ IEnumAAFKLVDataDefsSP spIEnumAAFKLVDataDefs; CHECK_HRESULT( _spIaafDictionary->GetKLVDataDefs( &spIEnumAAFKLVDataDefs ) ); return spIEnumAAFKLVDataDefs;}
开发者ID:UIKit0,项目名称:aaf,代码行数:8,
示例3: CHECK_HRESULTaafUInt32 AxMobSlot::GetPhysicalNum(){ aafUInt32 num; CHECK_HRESULT( _spIaafMobSlot->GetPhysicalNum( &num ) ); return num;}
开发者ID:UIKit0,项目名称:aaf,代码行数:8,
示例4: prepare_render_targetsvoid D3D12GSRender::clear_surface(u32 arg){ // Ignore clear if surface target is set to CELL_GCM_SURFACE_TARGET_NONE if (rsx::method_registers.surface_color_target() == rsx::surface_target::none) return; std::chrono::time_point<std::chrono::system_clock> start_duration = std::chrono::system_clock::now(); std::chrono::time_point<std::chrono::system_clock> rtt_duration_start = std::chrono::system_clock::now(); prepare_render_targets(get_current_resource_storage().command_list.Get()); std::chrono::time_point<std::chrono::system_clock> rtt_duration_end = std::chrono::system_clock::now(); m_timers.prepare_rtt_duration += std::chrono::duration_cast<std::chrono::microseconds>(rtt_duration_end - rtt_duration_start).count(); if (arg & 0x1 || arg & 0x2) { get_current_resource_storage().depth_stencil_descriptor_heap_index++; if (arg & 0x1) { u32 clear_depth = rsx::method_registers.z_clear_value(); u32 max_depth_value = get_max_depth_value(rsx::method_registers.surface_depth_fmt()); get_current_resource_storage().command_list->ClearDepthStencilView(m_rtts.current_ds_handle, D3D12_CLEAR_FLAG_DEPTH, clear_depth / (float)max_depth_value, 0, 1, &get_scissor(rsx::method_registers.scissor_origin_x(), rsx::method_registers.scissor_origin_y(), rsx::method_registers.scissor_width(), rsx::method_registers.scissor_height())); } if (arg & 0x2) get_current_resource_storage().command_list->ClearDepthStencilView(m_rtts.current_ds_handle, D3D12_CLEAR_FLAG_STENCIL, 0.f, get_clear_stencil(rsx::method_registers.stencil_clear_value()), 1, &get_scissor(rsx::method_registers.scissor_origin_x(), rsx::method_registers.scissor_origin_y(), rsx::method_registers.scissor_width(), rsx::method_registers.scissor_height())); } if (arg & 0xF0) { CD3DX12_CPU_DESCRIPTOR_HANDLE handle = CD3DX12_CPU_DESCRIPTOR_HANDLE(m_rtts.current_rtts_handle); size_t rtt_index = get_num_rtt(rsx::method_registers.surface_color_target()); get_current_resource_storage().render_targets_descriptors_heap_index += rtt_index; std::array<float, 4> clear_color = { rsx::method_registers.clear_color_r() / 255.f, rsx::method_registers.clear_color_g() / 255.f, rsx::method_registers.clear_color_b() / 255.f, rsx::method_registers.clear_color_a() / 255.f, }; for (unsigned i = 0; i < rtt_index; i++) get_current_resource_storage().command_list->ClearRenderTargetView(handle.Offset(i, m_descriptor_stride_rtv), clear_color.data(), 1, &get_scissor(rsx::method_registers.scissor_origin_x(), rsx::method_registers.scissor_origin_y(), rsx::method_registers.scissor_width(), rsx::method_registers.scissor_height())); } std::chrono::time_point<std::chrono::system_clock> end_duration = std::chrono::system_clock::now(); m_timers.draw_calls_duration += std::chrono::duration_cast<std::chrono::microseconds>(end_duration - start_duration).count(); m_timers.draw_calls_count++; if (g_cfg_rsx_debug_output) { CHECK_HRESULT(get_current_resource_storage().command_list->Close()); m_command_queue->ExecuteCommandLists(1, (ID3D12CommandList**)get_current_resource_storage().command_list.GetAddressOf()); get_current_resource_storage().set_new_command_list(); }}
开发者ID:KitoHo,项目名称:rpcs3,代码行数:58,
示例5: CHECK_HRESULTvoid resource_storage::init(ID3D12Device *device){ in_use = false; m_device = device; ram_framebuffer = nullptr; // Create a global command allocator CHECK_HRESULT(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(command_allocator.GetAddressOf()))); CHECK_HRESULT(m_device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, command_allocator.Get(), nullptr, IID_PPV_ARGS(command_list.GetAddressOf()))); CHECK_HRESULT(command_list->Close()); D3D12_DESCRIPTOR_HEAP_DESC descriptor_heap_desc = { D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 10000, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE }; CHECK_HRESULT(device->CreateDescriptorHeap(&descriptor_heap_desc, IID_PPV_ARGS(&descriptors_heap))); D3D12_DESCRIPTOR_HEAP_DESC sampler_heap_desc = { D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER , 2048, D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE }; CHECK_HRESULT(device->CreateDescriptorHeap(&sampler_heap_desc, IID_PPV_ARGS(&sampler_descriptor_heap[0]))); CHECK_HRESULT(device->CreateDescriptorHeap(&sampler_heap_desc, IID_PPV_ARGS(&sampler_descriptor_heap[1]))); D3D12_DESCRIPTOR_HEAP_DESC ds_descriptor_heap_desc = { D3D12_DESCRIPTOR_HEAP_TYPE_DSV , 10000}; device->CreateDescriptorHeap(&ds_descriptor_heap_desc, IID_PPV_ARGS(&depth_stencil_descriptor_heap)); D3D12_DESCRIPTOR_HEAP_DESC rtv_descriptor_heap_desc = { D3D12_DESCRIPTOR_HEAP_TYPE_RTV , 10000 }; device->CreateDescriptorHeap(&rtv_descriptor_heap_desc, IID_PPV_ARGS(&render_targets_descriptors_heap)); frame_finished_handle = CreateEventEx(nullptr, FALSE, FALSE, EVENT_ALL_ACCESS); fence_value = 0; CHECK_HRESULT(device->CreateFence(fence_value++, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(frame_finished_fence.GetAddressOf())));}
开发者ID:Majkel86,项目名称:rpcs3,代码行数:28,
示例6: CHECK_HRESULTvoid resource_storage::set_new_command_list(){ CHECK_HRESULT(command_list->Reset(command_allocator.Get(), nullptr)); ID3D12DescriptorHeap *descriptors[] = { descriptors_heap.Get(), sampler_descriptor_heap[sampler_descriptors_heap_index].Get(), }; command_list->SetDescriptorHeaps(2, descriptors);}
开发者ID:Endika,项目名称:rpcs3,代码行数:11,
示例7: CHECK_HRESULT void VssCopy::Init() { CHECK_HRESULT( ::CoInitialize(NULL) ); CHECK_HRESULT( ::CreateVssBackupComponents(&pBackupComponents_) ); CHECK_HRESULT( pBackupComponents_->InitializeForBackup() ); CComPtr<IVssAsync> pWriterMetadataStatus; CHECK_HRESULT( pBackupComponents_->GatherWriterMetadata(&pWriterMetadataStatus) ); WaitAndQueryStatus(pWriterMetadataStatus); GUID snapshotSetId = GUID_NULL; CHECK_HRESULT( pBackupComponents_->StartSnapshotSet(&snapshotSetId) ); wchar_t volumePathName[MAX_PATH]; if (! ::GetVolumePathName(sourcePath_, volumePathName, MAX_PATH)) { AtlThrowLastWin32(); } GUID snapshotId; CHECK_HRESULT( pBackupComponents_->AddToSnapshotSet(volumePathName, GUID_NULL, &snapshotId) ); CHECK_HRESULT( pBackupComponents_->SetBackupState(TRUE, FALSE, VSS_BT_FULL) ); CComPtr<IVssAsync> pPrepareForBackupResults; CHECK_HRESULT( pBackupComponents_->PrepareForBackup(&pPrepareForBackupResults) ); WaitAndQueryStatus(pPrepareForBackupResults); backupState_ = TRUE; CComPtr<IVssAsync> pDoSnapshotSetResults; CHECK_HRESULT( pBackupComponents_->DoSnapshotSet(&pDoSnapshotSetResults) ); WaitAndQueryStatus(pDoSnapshotSetResults); snapshotProperties_ = new VSS_SNAPSHOT_PROP; CHECK_HRESULT( pBackupComponents_->GetSnapshotProperties(snapshotId, snapshotProperties_) ); snapshotDeviceObject_ = snapshotProperties_->m_pwszSnapshotDeviceObject; return; }
开发者ID:z3v2cicidi,项目名称:ditsnap,代码行数:40,
示例8: WaitForSingleObjectExvoid resource_storage::wait_and_clean(){ if (in_use) WaitForSingleObjectEx(frame_finished_handle, INFINITE, FALSE); else CHECK_HRESULT(command_list->Close()); reset(); dirty_textures.clear(); ram_framebuffer = nullptr;}
开发者ID:Majkel86,项目名称:rpcs3,代码行数:13,
注:本文中的CHECK_HRESULT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CHECK_ID函数代码示例 C++ CHECK_HR函数代码示例 |