[D3D12] Fix bindless sampler offset
This commit is contained in:
parent
d26f84b36b
commit
1d35ba9ee7
|
@ -572,15 +572,13 @@ uint64_t D3D12CommandProcessor::RequestSamplerBindfulDescriptors(
|
||||||
deferred_command_list_->SetDescriptorHeaps(view_bindful_heap_current_,
|
deferred_command_list_->SetDescriptorHeaps(view_bindful_heap_current_,
|
||||||
sampler_bindful_heap_current_);
|
sampler_bindful_heap_current_);
|
||||||
}
|
}
|
||||||
uint32_t descriptor_offset =
|
auto provider = GetD3D12Context()->GetD3D12Provider();
|
||||||
descriptor_index *
|
cpu_handle_out = provider->OffsetSamplerDescriptor(
|
||||||
GetD3D12Context()->GetD3D12Provider()->GetSamplerDescriptorSize();
|
sampler_bindful_heap_pool_->GetLastRequestHeapCPUStart(),
|
||||||
cpu_handle_out.ptr =
|
descriptor_index);
|
||||||
sampler_bindful_heap_pool_->GetLastRequestHeapCPUStart().ptr +
|
gpu_handle_out = provider->OffsetSamplerDescriptor(
|
||||||
descriptor_offset;
|
sampler_bindful_heap_pool_->GetLastRequestHeapGPUStart(),
|
||||||
gpu_handle_out.ptr =
|
descriptor_index);
|
||||||
sampler_bindful_heap_pool_->GetLastRequestHeapGPUStart().ptr +
|
|
||||||
descriptor_offset;
|
|
||||||
return current_heap_index;
|
return current_heap_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3729,7 +3727,7 @@ bool D3D12CommandProcessor::UpdateBindings(
|
||||||
sampler_index = sampler_bindless_heap_allocated_++;
|
sampler_index = sampler_bindless_heap_allocated_++;
|
||||||
texture_cache_->WriteSampler(
|
texture_cache_->WriteSampler(
|
||||||
sampler_parameters,
|
sampler_parameters,
|
||||||
provider->OffsetViewDescriptor(
|
provider->OffsetSamplerDescriptor(
|
||||||
sampler_bindless_heap_cpu_start_, sampler_index));
|
sampler_bindless_heap_cpu_start_, sampler_index));
|
||||||
texture_cache_bindless_sampler_map_.insert(
|
texture_cache_bindless_sampler_map_.insert(
|
||||||
{sampler_parameters.value, sampler_index});
|
{sampler_parameters.value, sampler_index});
|
||||||
|
@ -3761,7 +3759,7 @@ bool D3D12CommandProcessor::UpdateBindings(
|
||||||
sampler_index = sampler_bindless_heap_allocated_++;
|
sampler_index = sampler_bindless_heap_allocated_++;
|
||||||
texture_cache_->WriteSampler(
|
texture_cache_->WriteSampler(
|
||||||
sampler_parameters,
|
sampler_parameters,
|
||||||
provider->OffsetViewDescriptor(
|
provider->OffsetSamplerDescriptor(
|
||||||
sampler_bindless_heap_cpu_start_, sampler_index));
|
sampler_bindless_heap_cpu_start_, sampler_index));
|
||||||
texture_cache_bindless_sampler_map_.insert(
|
texture_cache_bindless_sampler_map_.insert(
|
||||||
{sampler_parameters.value, sampler_index});
|
{sampler_parameters.value, sampler_index});
|
||||||
|
|
Loading…
Reference in New Issue