chromium/third_party/angle/src/libANGLE/renderer/vulkan/Suballocation.h

//
// Copyright 2022 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Suballocation.h:
//    Defines class interface for BufferBlock and Suballocation and other related classes.
//

#ifndef LIBANGLE_RENDERER_VULKAN_SUBALLOCATION_H_
#define LIBANGLE_RENDERER_VULKAN_SUBALLOCATION_H_

#include "common/SimpleMutex.h"
#include "common/debug.h"
#include "libANGLE/angletypes.h"
#include "libANGLE/renderer/serial_utils.h"
#include "libANGLE/renderer/vulkan/vk_cache_utils.h"
#include "libANGLE/renderer/vulkan/vk_resource.h"
#include "libANGLE/renderer/vulkan/vk_utils.h"
#include "libANGLE/renderer/vulkan/vk_wrapper.h"

namespace rx
{
enum class MemoryAllocationType;

namespace vk
{
class Context;

// BufferBlock
class BufferBlock final : angle::NonCopyable
{};
BufferBlockPointer;
BufferBlockPointerVector;

class BufferBlockGarbageList final : angle::NonCopyable
{};

// BufferSuballocation
class BufferSuballocation final : angle::NonCopyable
{};

class BufferSuballocationGarbage
{};

// BufferBlock implementation.
ANGLE_INLINE VkMemoryPropertyFlags BufferBlock::getMemoryPropertyFlags() const
{}

ANGLE_INLINE VkDeviceSize BufferBlock::getMemorySize() const
{}

ANGLE_INLINE VkBool32 BufferBlock::isEmpty()
{}

ANGLE_INLINE bool BufferBlock::isHostVisible() const
{}

ANGLE_INLINE bool BufferBlock::isCoherent() const
{}

ANGLE_INLINE bool BufferBlock::isCached() const
{}

ANGLE_INLINE bool BufferBlock::isMapped() const
{}

ANGLE_INLINE uint8_t *BufferBlock::getMappedMemory() const
{}

// BufferSuballocation implementation.
ANGLE_INLINE BufferSuballocation::BufferSuballocation()
    :{}

ANGLE_INLINE BufferSuballocation::BufferSuballocation(BufferSuballocation &&other)
    :{}

ANGLE_INLINE BufferSuballocation &BufferSuballocation::operator=(BufferSuballocation &&other)
{}

ANGLE_INLINE bool BufferSuballocation::valid() const
{}

ANGLE_INLINE void BufferSuballocation::destroy(Renderer *renderer)
{}

ANGLE_INLINE void BufferSuballocation::init(BufferBlock *block,
                                            VmaVirtualAllocation allocation,
                                            VkDeviceSize offset,
                                            VkDeviceSize size)
{}

ANGLE_INLINE void BufferSuballocation::initWithEntireBuffer(
    Context *context,
    Buffer &buffer,
    MemoryAllocationType memoryAllocationType,
    uint32_t memoryTypeIndex,
    DeviceMemory &deviceMemory,
    VkMemoryPropertyFlags memoryPropertyFlags,
    VkDeviceSize size,
    VkDeviceSize allocatedBufferSize)
{}

ANGLE_INLINE const Buffer &BufferSuballocation::getBuffer() const
{}

ANGLE_INLINE VkDeviceSize BufferSuballocation::getSize() const
{}

ANGLE_INLINE const DeviceMemory &BufferSuballocation::getDeviceMemory() const
{}

ANGLE_INLINE VkMemoryMapFlags BufferSuballocation::getMemoryPropertyFlags() const
{}

ANGLE_INLINE bool BufferSuballocation::isHostVisible() const
{}
ANGLE_INLINE bool BufferSuballocation::isCoherent() const
{}
ANGLE_INLINE bool BufferSuballocation::isCached() const
{}
ANGLE_INLINE bool BufferSuballocation::isMapped() const
{}
ANGLE_INLINE uint8_t *BufferSuballocation::getMappedMemory() const
{}

ANGLE_INLINE void BufferSuballocation::flush(const VkDevice &device)
{}

ANGLE_INLINE void BufferSuballocation::invalidate(const VkDevice &device)
{}

ANGLE_INLINE VkDeviceSize BufferSuballocation::getOffset() const
{}

ANGLE_INLINE void BufferSuballocation::setOffsetAndSize(VkDeviceSize offset, VkDeviceSize size)
{}

ANGLE_INLINE uint8_t *BufferSuballocation::getBlockMemory() const
{}
ANGLE_INLINE VkDeviceSize BufferSuballocation::getBlockMemorySize() const
{}
ANGLE_INLINE BufferSerial BufferSuballocation::getBlockSerial() const
{}
}  // namespace vk
}  // namespace rx

#endif  // LIBANGLE_RENDERER_VULKAN_SUBALLOCATION_H_