Remove TODOs that BGLD3D/Vk need updates for external textures

External textures are handled purely in the frontend so there is no need
to update the backend BGL to handle them. The TODOs can just be removed.

Bug: dawn:728
Change-Id: I319cf2a79bdc06a1457f3ec5746b07b5d05eef62
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/84767
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
This commit is contained in:
Corentin Wallez 2022-03-28 18:38:14 +00:00 committed by Dawn LUCI CQ
parent db68059da8
commit 45b4893326
2 changed files with 3 additions and 13 deletions

View File

@ -78,21 +78,15 @@ namespace dawn::native::d3d12 {
D3D12_DESCRIPTOR_RANGE_TYPE descriptorRangeType =
WGPUBindingInfoToDescriptorRangeType(bindingInfo);
// TODO(dawn:728) In the future, special handling will be needed for external textures
// here because they encompass multiple views.
mShaderRegisters[bindingIndex] = uint32_t(bindingInfo.binding);
if (bindingIndex < GetDynamicBufferCount()) {
continue;
}
// For dynamic resources, Dawn uses root descriptor in D3D12 backend. So there is no
// need to allocate the descriptor from descriptor heap or create descriptor ranges.
if (bindingIndex < GetDynamicBufferCount()) {
continue;
}
ASSERT(!bindingInfo.buffer.hasDynamicOffset);
// TODO(dawn:728) In the future, special handling will be needed for external textures
// here because they encompass multiple views.
mDescriptorHeapOffsets[bindingIndex] =
descriptorRangeType == D3D12_DESCRIPTOR_RANGE_TYPE_SAMPLER
? mSamplerDescriptorCount++

View File

@ -100,8 +100,6 @@ namespace dawn::native::vulkan {
VkDescriptorSetLayoutBinding vkBinding;
vkBinding.binding = static_cast<uint32_t>(bindingIndex);
// TODO(dawn:728) In the future, special handling will be needed for external textures
// here because they encompass multiple views.
vkBinding.descriptorType = VulkanDescriptorType(bindingInfo);
vkBinding.descriptorCount = 1;
vkBinding.stageFlags = VulkanShaderStageFlags(bindingInfo.visibility);
@ -126,8 +124,6 @@ namespace dawn::native::vulkan {
std::map<VkDescriptorType, uint32_t> descriptorCountPerType;
for (BindingIndex bindingIndex{0}; bindingIndex < GetBindingCount(); ++bindingIndex) {
// TODO(dawn:728) In the future, special handling will be needed for external textures
// here because they encompass multiple views.
VkDescriptorType vulkanType = VulkanDescriptorType(GetBindingInfo(bindingIndex));
// map::operator[] will return 0 if the key doesn't exist.