chromium/third_party/vulkan-validation-layers/src/layers/gpu/descriptor_validation/gpuav_descriptor_set.cpp

/* Copyright (c) 2023-2024 The Khronos Group Inc.
 * Copyright (c) 2023-2024 Valve Corporation
 * Copyright (c) 2023-2024 LunarG, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "gpu/descriptor_validation/gpuav_descriptor_set.h"

#include "gpu/core/gpuav.h"
#include "gpu/resources/gpuav_subclasses.h"
#include "gpu/resources/gpu_shader_resources.h"
#include "gpu/shaders/gpu_shaders_constants.h"

DescriptorClass;

namespace gpuav {

void AddressBuffer::MapMemory(const Location &loc, void **data) const {}

void AddressBuffer::UnmapMemory() const {}

void AddressBuffer::FlushAllocation(const Location &loc, VkDeviceSize offset, VkDeviceSize size) const {}

void AddressBuffer::InvalidateAllocation(const Location &loc, VkDeviceSize offset, VkDeviceSize size) const {}

void AddressBuffer::CreateBuffer(const Location &loc, const VkBufferCreateInfo *buffer_create_info,
                                 const VmaAllocationCreateInfo *allocation_create_info) {}

void AddressBuffer::DestroyBuffer() {}

// Returns the number of bytes to hold 32 bit aligned array of bits.
static uint32_t BitBufferSize(uint32_t num_bits) {}

DescriptorSet::DescriptorSet(const VkDescriptorSet handle, vvl::DescriptorPool *pool,
                             const std::shared_ptr<vvl::DescriptorSetLayout const> &layout, uint32_t variable_count,
                             ValidationStateTracker *state_data)
    :{}

DescriptorSet::~DescriptorSet() {}

VkDeviceAddress DescriptorSet::GetLayoutState(Validator &gpuav, const Location &loc) {}

static glsl::DescriptorState GetInData(const vvl::BufferDescriptor &desc) {}

static glsl::DescriptorState GetInData(const vvl::TexelDescriptor &desc) {}

static glsl::DescriptorState GetInData(const vvl::ImageDescriptor &desc) {}

static glsl::DescriptorState GetInData(const vvl::SamplerDescriptor &desc) {}

static glsl::DescriptorState GetInData(const vvl::ImageSamplerDescriptor &desc) {}

static glsl::DescriptorState GetInData(const vvl::AccelerationStructureDescriptor &ac) {}

static glsl::DescriptorState GetInData(const vvl::MutableDescriptor &desc) {}

template <typename Binding>
void FillBindingInData(const Binding &binding, glsl::DescriptorState *data, uint32_t &index) {}

// Inline Uniforms are currently treated as a single descriptor. Writes to any offsets cause the whole range to be valid.
template <>
void FillBindingInData(const vvl::InlineUniformBinding &binding, glsl::DescriptorState *data, uint32_t &index) {}

std::shared_ptr<DescriptorSet::State> DescriptorSet::GetCurrentState(Validator &gpuav, const Location &loc) {}

std::shared_ptr<DescriptorSet::State> DescriptorSet::GetOutputState(Validator &gpuav, const Location &loc) {}

std::map<uint32_t, std::vector<uint32_t>> DescriptorSet::State::UsedDescriptors(const Location &loc, const DescriptorSet &set,
                                                                                uint32_t shader_set) const {}

DescriptorSet::State::~State() {}

void DescriptorSet::PerformPushDescriptorsUpdate(uint32_t write_count, const VkWriteDescriptorSet *write_descs) {}

void DescriptorSet::PerformWriteUpdate(const VkWriteDescriptorSet &write_desc) {}

void DescriptorSet::PerformCopyUpdate(const VkCopyDescriptorSet &copy_desc, const vvl::DescriptorSet &src_set) {}

DescriptorHeap::DescriptorHeap(Validator &gpuav, uint32_t max_descriptors, const Location &loc)
    :{}

DescriptorHeap::~DescriptorHeap() {}

DescriptorId DescriptorHeap::NextId(const VulkanTypedHandle &handle) {}

void DescriptorHeap::DeleteId(DescriptorId id) {}

}  // namespace gpuav