Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
Mapping.h
Go to the documentation of this file.
1/* Copyright (C) 2025 Wildfire Games.
2 * This file is part of 0 A.D.
3 *
4 * 0 A.D. is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * 0 A.D. is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_MAPPING
19#define INCLUDED_RENDERER_BACKEND_VULKAN_MAPPING
20
21#include <cstdint>
22#include <glad/vulkan.h>
23
24namespace Renderer::Backend { enum class AttachmentLoadOp; }
25namespace Renderer::Backend { enum class AttachmentStoreOp; }
26namespace Renderer::Backend { enum class BlendFactor; }
27namespace Renderer::Backend { enum class BlendOp; }
28namespace Renderer::Backend { enum class CompareOp; }
29namespace Renderer::Backend { enum class CullMode; }
30namespace Renderer::Backend { enum class Format; }
31namespace Renderer::Backend { enum class PolygonMode; }
32namespace Renderer::Backend { enum class StencilOp; }
33namespace Renderer::Backend::Sampler { enum class AddressMode; }
34
35namespace Renderer
36{
37
38namespace Backend
39{
40
41namespace Vulkan
42{
43
44namespace Mapping
45{
46
47VkCompareOp FromCompareOp(const CompareOp compareOp);
48
49VkStencilOp FromStencilOp(const StencilOp stencilOp);
50
51VkBlendFactor FromBlendFactor(const BlendFactor blendFactor);
52
53VkBlendOp FromBlendOp(const BlendOp blendOp);
54
55VkColorComponentFlags FromColorWriteMask(const uint32_t colorWriteMask);
56
57VkPolygonMode FromPolygonMode(const PolygonMode polygonMode);
58
59VkCullModeFlags FromCullMode(const CullMode cullMode);
60
61VkFormat FromFormat(const Format format);
62
63VkSampleCountFlagBits FromSampleCount(const uint32_t sampleCount);
64
65VkSamplerAddressMode FromAddressMode(const Sampler::AddressMode addressMode);
66
67VkAttachmentLoadOp FromAttachmentLoadOp(const AttachmentLoadOp loadOp);
68
69VkAttachmentStoreOp FromAttachmentStoreOp(const AttachmentStoreOp storeOp);
70
71VkPipelineStageFlags FromPipelineStageMask(const uint32_t mask);
72
73VkAccessFlags FromAccessMask(const uint32_t mask);
74
75} // namespace Mapping
76
77} // namespace Vulkan
78
79} // namespace Backend
80
81} // namespace Renderer
82
83#endif // INCLUDED_RENDERER_BACKEND_VULKAN_MAPPING
Definition: Font.h:44
AddressMode
Definition: Sampler.h:39
VkAccessFlags FromAccessMask(const uint32_t mask)
Definition: Mapping.cpp:324
VkBlendFactor FromBlendFactor(const BlendFactor blendFactor)
Definition: Mapping.cpp:80
VkSampleCountFlagBits FromSampleCount(const uint32_t sampleCount)
Definition: Mapping.cpp:225
VkBlendOp FromBlendOp(const BlendOp blendOp)
Definition: Mapping.cpp:111
VkAttachmentStoreOp FromAttachmentStoreOp(const AttachmentStoreOp storeOp)
Definition: Mapping.cpp:280
VkColorComponentFlags FromColorWriteMask(const uint32_t colorWriteMask)
Definition: Mapping.cpp:125
VkPipelineStageFlags FromPipelineStageMask(const uint32_t mask)
Definition: Mapping.cpp:295
VkAttachmentLoadOp FromAttachmentLoadOp(const AttachmentLoadOp loadOp)
Definition: Mapping.cpp:262
VkFormat FromFormat(const Format format)
Definition: Mapping.cpp:163
VkCompareOp FromCompareOp(const CompareOp compareOp)
Definition: Mapping.cpp:42
VkStencilOp FromStencilOp(const StencilOp stencilOp)
Definition: Mapping.cpp:61
VkSamplerAddressMode FromAddressMode(const Sampler::AddressMode addressMode)
Definition: Mapping.cpp:241
VkCullModeFlags FromCullMode(const CullMode cullMode)
Definition: Mapping.cpp:146
VkPolygonMode FromPolygonMode(const PolygonMode polygonMode)
Definition: Mapping.cpp:139
Definition: Canvas2D.h:30
CompareOp
Definition: CompareOp.h:30
Format
Definition: Format.h:28
PolygonMode
Definition: PipelineState.h:138
AttachmentStoreOp
Store operation is set for each attachment, what should be done with its content on EndFramebufferPas...
Definition: IFramebuffer.h:54
StencilOp
Definition: PipelineState.h:37
BlendOp
Definition: PipelineState.h:106
BlendFactor
Definition: PipelineState.h:83
Backend
Definition: Backend.h:28
CullMode
Definition: PipelineState.h:144
AttachmentLoadOp
Load operation is set for each attachment, what should be done with its content on BeginFramebufferPa...
Definition: IFramebuffer.h:39
Definition: Canvas2D.h:30