From 45b4893326c84756876ca9e706052ace67af9da6 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Mon, 28 Mar 2022 18:38:14 +0000 Subject: [PATCH] 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 Commit-Queue: Corentin Wallez Reviewed-by: Loko Kung --- src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp | 12 +++--------- src/dawn/native/vulkan/BindGroupLayoutVk.cpp | 4 ---- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp index 80d4ea4e71..4e586a0947 100644 --- a/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp +++ b/src/dawn/native/d3d12/BindGroupLayoutD3D12.cpp @@ -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++ diff --git a/src/dawn/native/vulkan/BindGroupLayoutVk.cpp b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp index 20a8e1bcfd..8ed4340ae9 100644 --- a/src/dawn/native/vulkan/BindGroupLayoutVk.cpp +++ b/src/dawn/native/vulkan/BindGroupLayoutVk.cpp @@ -100,8 +100,6 @@ namespace dawn::native::vulkan { VkDescriptorSetLayoutBinding vkBinding; vkBinding.binding = static_cast(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 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.