Пример #1
0
IAAFClassDefSP AxObject::GetDefinition()
{
    IAAFClassDefSP spIaafClassDef;

    CHECK_HRESULT( _spIaafObject->GetDefinition( &spIaafClassDef ) );

    return spIaafClassDef;
}
Пример #2
0
IEnumAAFPropertiesSP AxObject::GetProperties()
{
    IEnumAAFPropertiesSP spIEnumProperties;

    CHECK_HRESULT( _spIaafObject->GetProperties( &spIEnumProperties ) );

    return spIEnumProperties;
}
Пример #3
0
IEnumAAFKLVDataDefsSP AxDictionary::GetKLVDataDefs()
{
    IEnumAAFKLVDataDefsSP spIEnumAAFKLVDataDefs;

    CHECK_HRESULT( _spIaafDictionary->GetKLVDataDefs( &spIEnumAAFKLVDataDefs ) );

    return spIEnumAAFKLVDataDefs;
}
Пример #4
0
aafUInt32 AxMobSlot::GetPhysicalNum()
{
	aafUInt32 num;

	CHECK_HRESULT( _spIaafMobSlot->GetPhysicalNum( &num ) );

	return num;
}
Пример #5
0
IAAFTypeDefSP AxDictionary::LookupTypeDef( const aafUID_t& typeId )
{
	IAAFTypeDefSP spTypeDef;

	CHECK_HRESULT( _spIaafDictionary->LookupTypeDef( typeId, &spTypeDef ) );

	return spTypeDef;
}
Пример #6
0
aafUInt32 AxDictionary::CountOpaqueTypeDefs()
{
	aafUInt32 count;

	CHECK_HRESULT( _spIaafDictionary->CountOpaqueTypeDefs( &count ) );

	return count;
}
Пример #7
0
IAAFDictionarySP AxObject::GetDictionary()
{
    IAAFDictionarySP spIaafDictionary;

    CHECK_HRESULT( _spIaafObject->GetDictionary( &spIaafDictionary ) );

    return spIaafDictionary;
}
Пример #8
0
IEnumAAFTaggedValueDefsSP AxDictionary::GetTaggedValueDefs()
{
    IEnumAAFTaggedValueDefsSP spIEnumAAFTaggedValueDefs;

    CHECK_HRESULT( _spIaafDictionary->GetTaggedValueDefs( &spIEnumAAFTaggedValueDefs ) );

    return spIEnumAAFTaggedValueDefs;
}
Пример #9
0
IEnumAAFInterpolationDefsSP AxDictionary::GetInterpolationDefs()
{
    IEnumAAFInterpolationDefsSP spIEnumAAFInterpolationDefs;

    CHECK_HRESULT( _spIaafDictionary->GetInterpolationDefs( &spIEnumAAFInterpolationDefs ) );

    return spIEnumAAFInterpolationDefs;
}
Пример #10
0
IAAFDataDefSP AxMobSlot::GetDataDef()
{
	IAAFDataDefSP spIaafDataDef;

	CHECK_HRESULT( _spIaafMobSlot->GetDataDef( &spIaafDataDef ) );

	return spIaafDataDef;
}
Пример #11
0
IAAFCodecDefSP AxDictionary::LookupCodecDef( const aafUID_t& codecDefId )
{
	IAAFCodecDefSP spIaafCodecDef;

	CHECK_HRESULT( _spIaafDictionary->LookupCodecDef( codecDefId, &spIaafCodecDef ) );

	return spIaafCodecDef;
}
Пример #12
0
aafRational_t AxTimelineMobSlot::GetEditRate()
{
	aafRational_t rate;

	CHECK_HRESULT( _spIaafTimelineMobSlot->GetEditRate( &rate ) );

	return rate;
}
Пример #13
0
IAAFOperationDefSP AxDictionary::LookupOperationDef( const aafUID_t& opDefId )
{
	IAAFOperationDefSP spIaafOperationDef;

	CHECK_HRESULT( _spIaafDictionary->LookupOperationDef( opDefId, &spIaafOperationDef ) );

	return spIaafOperationDef;
}
Пример #14
0
IAAFInterpolationDefSP AxDictionary::LookupInterpolationDef( const aafUID_t& interpDefId )
{
	IAAFInterpolationDefSP spIaafInterpolationDef;

	CHECK_HRESULT( _spIaafDictionary->LookupInterpolationDef( interpDefId, &spIaafInterpolationDef ) );

	return spIaafInterpolationDef;
}
Пример #15
0
IAAFParameterDefSP AxDictionary::LookupParameterDef( const aafUID_t& opDefId )
{
	IAAFParameterDefSP spIaafParameterDef;

	CHECK_HRESULT( _spIaafDictionary->LookupParameterDef( opDefId, &spIaafParameterDef ) );

	return spIaafParameterDef;
}
Пример #16
0
IAAFDataDefSP AxDictionary::LookupDataDef( aafUID_constref  dataDefinitionId )
{
	IAAFDataDefSP spDataDef;

	CHECK_HRESULT( _spIaafDictionary->LookupDataDef( dataDefinitionId, &spDataDef ) );

	return spDataDef;
}
Пример #17
0
IAAFClassDefSP AxDictionary::LookupClassDef( aafUID_constref  classId )
{
	IAAFClassDefSP spIaafClassDef;

	CHECK_HRESULT( _spIaafDictionary->LookupClassDef( classId, &spIaafClassDef ) );

	return spIaafClassDef;
}
Пример #18
0
aafRational_t AxEventMobSlot::GetEditRate()
{
	aafRational_t rate;

	CHECK_HRESULT( _spIaafEventMobSlot->GetEditRate( &rate ) );

	return rate;
}
Пример #19
0
IEnumAAFParameterDefsSP AxDictionary::GetParameterDefs()
{
	IEnumAAFParameterDefsSP spIEnumAAFParameterDefs;

	CHECK_HRESULT( _spIaafDictionary->GetParameterDefs( &spIEnumAAFParameterDefs ) );

	return spIEnumAAFParameterDefs;
}
Пример #20
0
aafPosition_t AxTimelineMobSlot::GetUserPos()
{
    aafPosition_t pos;

    CHECK_HRESULT( _spIaafTimelineMobSlot->GetUserPos( &pos ) );

    return pos;
}
Пример #21
0
IEnumAAFCodecDefsSP AxDictionary::GetCodecDefs()
{
    IEnumAAFCodecDefsSP spIEnumAAFCodecDefs;

    CHECK_HRESULT( _spIaafDictionary->GetCodecDefs( &spIEnumAAFCodecDefs ) );

    return spIEnumAAFCodecDefs;
}
Пример #22
0
IAAFSegmentSP AxMobSlot::GetSegment()
{
	IAAFSegmentSP sp;

	CHECK_HRESULT( _spIaafMobSlot->GetSegment( &sp ) );

	return sp;
}
Пример #23
0
aafSlotID_t AxMobSlot::GetSlotID()
{
	aafSlotID_t id;

	CHECK_HRESULT( _spIaafMobSlot->GetSlotID( &id ) );

	return id;
}
Пример #24
0
void 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();
	}
}
Пример #25
0
void 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())));
}
Пример #26
0
IUnknownSP AxDictionary::CreateMetaInstance( const aafUID_t& auid,
				  				 		     const IID& iid )
{
	IUnknownSP spIUnknown;

	CHECK_HRESULT( _spIaafDictionary->CreateMetaInstance( auid, iid, &spIUnknown ) );

	return spIUnknown;
}
Пример #27
0
void 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);
}
Пример #28
0
void resource_storage::reset()
{
	descriptors_heap_index = 0;
	current_sampler_index = 0;
	sampler_descriptors_heap_index = 0;
	render_targets_descriptors_heap_index = 0;
	depth_stencil_descriptor_heap_index = 0;

	CHECK_HRESULT(command_allocator->Reset());
	set_new_command_list();
}
Пример #29
0
	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;
	}
Пример #30
0
void 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;
}