mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Merge pull request #1642 from vlj/d3d12
d3d12: Move sampler DescriptorHeap selection in D3D12GSRender
This commit is contained in:
commit
7542d38681
@ -345,6 +345,19 @@ void D3D12GSRender::end()
|
||||
size_t texture_count = std::get<2>(m_current_pso);
|
||||
if (texture_count > 0)
|
||||
{
|
||||
if (get_current_resource_storage().current_sampler_index + 16 > 2048)
|
||||
{
|
||||
get_current_resource_storage().sampler_descriptors_heap_index = 1;
|
||||
get_current_resource_storage().current_sampler_index = 0;
|
||||
|
||||
ID3D12DescriptorHeap *descriptors[] =
|
||||
{
|
||||
get_current_resource_storage().descriptors_heap.Get(),
|
||||
get_current_resource_storage().sampler_descriptor_heap[get_current_resource_storage().sampler_descriptors_heap_index].Get(),
|
||||
};
|
||||
get_current_resource_storage().command_list->SetDescriptorHeaps(2, descriptors);
|
||||
}
|
||||
|
||||
upload_textures(get_current_resource_storage().command_list.Get(), texture_count);
|
||||
|
||||
m_device->CopyDescriptorsSimple(16,
|
||||
|
@ -361,19 +361,6 @@ void D3D12GSRender::upload_textures(ID3D12GraphicsCommandList *command_list, siz
|
||||
.Offset((UINT)i, m_descriptor_stride_srv_cbv_uav)
|
||||
);
|
||||
|
||||
if (get_current_resource_storage().current_sampler_index + 16 > 2048)
|
||||
{
|
||||
get_current_resource_storage().sampler_descriptors_heap_index = 1;
|
||||
get_current_resource_storage().current_sampler_index = 0;
|
||||
|
||||
ID3D12DescriptorHeap *descriptors[] =
|
||||
{
|
||||
get_current_resource_storage().descriptors_heap.Get(),
|
||||
get_current_resource_storage().sampler_descriptor_heap[get_current_resource_storage().sampler_descriptors_heap_index].Get(),
|
||||
};
|
||||
command_list->SetDescriptorHeaps(2, descriptors);
|
||||
}
|
||||
|
||||
m_device->CreateSampler(&get_sampler_desc(textures[i]),
|
||||
CD3DX12_CPU_DESCRIPTOR_HANDLE(m_current_sampler_descriptors->GetCPUDescriptorHandleForHeapStart())
|
||||
.Offset((UINT)i, m_descriptor_stride_samplers));
|
||||
|
Loading…
Reference in New Issue
Block a user