From 560c75e59c1bb65020247264ff8a52829a36cf49 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 19 Nov 2024 13:35:47 +0100 Subject: [PATCH] Cleanup: Vulkan: Remove unused code Code is a left over and should not be used. It has been replaced by `VKResourceBinding` Pull Request: https://projects.blender.org/blender/blender/pulls/130507 --- .../blender/gpu/vulkan/vk_shader_interface.cc | 24 ------------------- .../blender/gpu/vulkan/vk_shader_interface.hh | 13 ---------- 2 files changed, 37 deletions(-) diff --git a/source/blender/gpu/vulkan/vk_shader_interface.cc b/source/blender/gpu/vulkan/vk_shader_interface.cc index ffc725369ac..872fac6eb16 100644 --- a/source/blender/gpu/vulkan/vk_shader_interface.cc +++ b/source/blender/gpu/vulkan/vk_shader_interface.cc @@ -353,30 +353,6 @@ const std::optional VKShaderInterface::descriptor_set return resource_binding.location; } -const VkAccessFlags VKShaderInterface::access_mask( - const shader::ShaderCreateInfo::Resource::BindType &bind_type, int binding) const -{ - const ShaderInput *shader_input = shader_input_get(bind_type, binding); - if (shader_input == nullptr) { - return VK_ACCESS_NONE; - } - const VKResourceBinding &resource_binding = resource_binding_info(shader_input); - if (resource_binding.bind_type != bind_type) { - return VK_ACCESS_NONE; - } - return resource_binding.access_mask; -} - -const VKImageViewArrayed VKShaderInterface::arrayed( - const shader::ShaderCreateInfo::Resource::BindType &bind_type, int binding) const -{ - const ShaderInput *shader_input = shader_input_get(bind_type, binding); - if (shader_input == nullptr) { - return VKImageViewArrayed::DONT_CARE; - } - return resource_binding_info(shader_input).arrayed; -} - const ShaderInput *VKShaderInterface::shader_input_get( const shader::ShaderCreateInfo::Resource &resource) const { diff --git a/source/blender/gpu/vulkan/vk_shader_interface.hh b/source/blender/gpu/vulkan/vk_shader_interface.hh index 413c5ae189a..8a567190bb6 100644 --- a/source/blender/gpu/vulkan/vk_shader_interface.hh +++ b/source/blender/gpu/vulkan/vk_shader_interface.hh @@ -50,19 +50,6 @@ class VKShaderInterface : public ShaderInterface { const std::optional descriptor_set_location( const shader::ShaderCreateInfo::Resource::BindType &bind_type, int binding) const; - /** - * Get the access mask for a binding. - * - * Is used to build the correct resource accesses in the render graph (dispatch/draw nodes). - * - * Will return VK_ACCESS_NONE when binding isn't found or not compatible with the given bind - * type. - */ - const VkAccessFlags access_mask(const shader::ShaderCreateInfo::Resource::BindType &bind_type, - int binding) const; - const VKImageViewArrayed arrayed(const shader::ShaderCreateInfo::Resource::BindType &bind_type, - int binding) const; - /** Get the Layout of the shader. */ const VKPushConstants::Layout &push_constants_layout_get() const {