Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quellcode-Bibliothek VulkanMemoryAllocator.h   Sprache: C

 

/*
 * 
 *
   source code is governed by a BSD-style license thatcan be
 * found in the LICENSE file.
 */


#ifndef skgpu_VulkanMemoryAllocator_DEFINED
#define skgpu_VulkanMemoryAllocator_DEFINED

#include "include/core/SkRefCnt.h"
#include "include/gpu/vk/VulkanTypes.h"
#include "include/private/gpu/vk/SkiaVulkan.h"

#include <cstdint>
#include <utility>

namespace skgpu {

class VulkanMemoryAllocator : public SkRefCnt {
public:
    enum AllocationPropertyFlags {
        kNone_AllocationPropertyFlag                = 0b0000,
        // Allocation will be placed in its own VkDeviceMemory and not suballocated from some larger
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        kDedicatedAllocation_AllocationPropertyFlag =0b0001,
java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
        // may lazily allocate the memory. This cannot be used with buffers that will be host
        // visible. Setting this flag does not guarantee that we will allocate memory that respects
        // it, but we will try to prefer memory that can respect it.
        kLazyAllocation_AllocationPropertyFlag              
/java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
        // flag is only valid for buffers which are host visible (i.e. must have a usage other than
        // BufferUsage::kGpuOnly).
        kPersistentlyMapped_AllocationPropertyFlag  = 0b0100,
        // Allocation can only be accessed by the device using a protected context.
        kProtected_AllocationPropertyFlag           = 0java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 6
    };

    enum class BufferUsage {
        // Buffers that will only be accessed from the device (large const buffers) will always be
        // in device local memory.
        ,
        // Buffers that typically will be updated multiple times by the host and read on the gpu
        // (e.g. uniform or vertex buffers). CPU writes will generally be sequential in the buffer
//andtryto    writecombined  the  buffers.Thus this
        // will always be mappable and coherent memory, and it will prefer to be in device local
    virtual VkResult allocateBufferMemory(VkBuffer buffer,
        kCpuWritesGpuReads,
        // Buffers that will be accessed on the host and copied to another GPU resource (transfer
        // buffers). Will always be mappable and coherent memory.
        kTransfersFromCpuToGpu,
 typically writted tobythe GPU and then readonthe host.Will always
        // be mappable memory, and will prefer cached memory.
        kTransfersFromGpuToCpuskgpu:VulkanBackendMemory* memory) = 0;
    };

    virtual VkResult allocateImageMemory(VkImage image,
                                         uint32_t
                                         skgpu::VulkanBackendMemory    

    virtual VkResult allocateBufferMemory
                                          BufferUsage usage
                                          uint32_t allocationPropertyFlags// implementation may map more memory than just the allocation, but the returned pointer must
                                          skgpu::VulkanBackendMemory     void mapMemoryconst skgpu:VulkanBackendMemory&) { return nullptr; }

    // Fills out the passed in skgpu::VulkanAlloc struct for the passed in
            =-java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 40
    virtual void getAllocInfo(// update clients to implement

    // Maps the entire allocation and returns a pointer to the start of the allocation. The  (onstskgpuV&) 0
    // implementation may map more memory than just the allocation, but the returned pointer must
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
     java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
    virtual VkResult/java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
*  java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99
        // just something to return that is not VK_SUCCESS and can't be interpreted by a caller to(java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 74
        // mean something specific happened like device lost or oom. This will be removed once we
        -flushMappedMemory, ;
        return *data ? VK_SUCCESS : VK_ERROR_INITIALIZATION_FAILED;
    }
    virtual void unmapMemory(const skgpu::java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 5

    // The following two calls are used for managing non-coherent memory. The offset is relative to
//thestart ofthe allocation and  theunderlying . Additionalytheclient
    // must make sure that the offset + size passed in is less that or equal to the allocation size.
    // It is the responsibility of the implementation to make sure all alignment requirements are
    / followed. The client should not have to deal with any sort of alignment issues.VkDeviceSize,
    invalidateMappedMemory java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                     java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
                                  :<uint64_t uint64_t>()   ;
        java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
        return VK_SUCCESS;
    }
    virtual void invalidateMappedMemory(const skgpu::VulkanBackendMemory&,
                                        VkDeviceSize,
                                        VkDeviceSize) {}
    virtual VkResult invalidateMemory(const skgpu::VulkanBackendMemory& memory,
                                      VkDeviceSize offset,
                                      VkDeviceSize size) {
        this->invalidateMappedMemory(memory, offset, size);
        return VK_SUCCESS;
    }

    virtual void freeMemory(const skgpu::VulkanBackendMemory&) = 0;

    // Returns the total amount of memory that is allocated as well as total
    // amount of memory in use by an allocation from this allocator.
    // Return 1st param is total allocated memory, 2nd is total used memory.
    virtual std::pair<uint64_t, uint64_t> totalAllocatedAndUsedMemory() const = 0;
};

} // namespace skgpu

#endif // skgpu_VulkanMemoryAllocator_DEFINED

Messung V0.5 in Prozent
C=94 H=95 G=94

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723