Flutter Engine
The Flutter Engine
Typedefs | Functions
GrVkRenderPass.cpp File Reference
#include "src/gpu/ganesh/vk/GrVkRenderPass.h"
#include "src/gpu/KeyBuilder.h"
#include "src/gpu/ganesh/GrProcessor.h"
#include "src/gpu/ganesh/vk/GrVkFramebuffer.h"
#include "src/gpu/ganesh/vk/GrVkGpu.h"
#include "src/gpu/ganesh/vk/GrVkRenderTarget.h"
#include "src/gpu/ganesh/vk/GrVkUtil.h"
#include "src/gpu/vk/VulkanUtilsPriv.h"

Go to the source code of this file.

Typedefs

typedef GrVkRenderPass::AttachmentsDescriptor::AttachmentDesc AttachmentDesc
 

Functions

void setup_vk_attachment_description (VkAttachmentDescription *attachment, const AttachmentDesc &desc, VkImageLayout startLayout, VkImageLayout endLayout)
 

Typedef Documentation

◆ AttachmentDesc

Definition at line 20 of file GrVkRenderPass.cpp.

Function Documentation

◆ setup_vk_attachment_description()

void setup_vk_attachment_description ( VkAttachmentDescription attachment,
const AttachmentDesc desc,
VkImageLayout  startLayout,
VkImageLayout  endLayout 
)

Definition at line 22 of file GrVkRenderPass.cpp.

25 {
26 attachment->flags = 0;
27 attachment->format = desc.fFormat;
29 switch (startLayout) {
33 attachment->loadOp = desc.fLoadStoreOps.fLoadOp;
34 attachment->storeOp = desc.fLoadStoreOps.fStoreOp;
37 break;
41 attachment->stencilLoadOp = desc.fLoadStoreOps.fLoadOp;
42 attachment->stencilStoreOp = desc.fLoadStoreOps.fStoreOp;
43 break;
44 default:
45 SK_ABORT("Unexpected attachment layout");
46 }
47
48 attachment->initialLayout = startLayout;
49 attachment->finalLayout = endLayout == VK_IMAGE_LAYOUT_UNDEFINED ? startLayout : endLayout;
50}
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
#define SK_ABORT(message,...)
Definition: SkAssert.h:70
static constexpr bool SampleCountToVkSampleCount(uint32_t samples, VkSampleCountFlagBits *vkSamples)
VkAttachmentLoadOp loadOp
Definition: vulkan_core.h:3804
VkAttachmentStoreOp stencilStoreOp
Definition: vulkan_core.h:3807
VkSampleCountFlagBits samples
Definition: vulkan_core.h:3803
VkAttachmentDescriptionFlags flags
Definition: vulkan_core.h:3801
VkAttachmentStoreOp storeOp
Definition: vulkan_core.h:3805
VkImageLayout initialLayout
Definition: vulkan_core.h:3808
VkImageLayout finalLayout
Definition: vulkan_core.h:3809
VkAttachmentLoadOp stencilLoadOp
Definition: vulkan_core.h:3806
@ VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL
Definition: vulkan_core.h:1334
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
Definition: vulkan_core.h:1336
@ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL
Definition: vulkan_core.h:1333
@ VK_IMAGE_LAYOUT_UNDEFINED
Definition: vulkan_core.h:1331
@ VK_IMAGE_LAYOUT_GENERAL
Definition: vulkan_core.h:1332
@ VK_ATTACHMENT_LOAD_OP_DONT_CARE
Definition: vulkan_core.h:2150
@ VK_ATTACHMENT_STORE_OP_DONT_CARE
Definition: vulkan_core.h:2157