载入中...
搜索中...
未找到
ShaderAsset.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
5#include "common/Value.h"
6
7#include <cstdint>
8#include <string>
9#include <vector>
10
11namespace eve::asset {
12
13class EvpackResourceReader;
14struct EvpackCapabilities;
15
18
21 std::string name;
22 std::vector<float> defaults;
23};
24
28 std::vector<std::uint32_t> vertex;
29 std::vector<std::uint32_t> fragment;
30 std::vector<ShaderAssetParameter> parameters;
31};
32
35 std::uint32_t maximumStageWords = 262144;
36};
37
49 const ShaderAssetLimits& limits = {});
50
59[[nodiscard]] EVENGINE_API_FOUNDATION Result<ShaderAsset> loadShaderAsset(const EvpackResourceReader& reader,
60 const AssetRef& asset,
61 const EvpackCapabilities& capabilities);
62
63} // namespace eve::asset
#define EVENGINE_API_FOUNDATION
每个链接组(link group)各自的导出宏。
Definition Export.h:106
Strong asset, definition, object and generic resource references.
const AssetImportLimits & limits
Owning, renderer-independent dynamic values.
Stable asset identity backed by PersistentId.
Definition ResourceRef.h:53
Move-only operation result carrying either a value or Status.
Definition Result.h:155
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
ShaderAssetInterface
Fixed graphics binding contract; this is not an arbitrary pipeline layout.
Definition ShaderAsset.h:17
EVENGINE_API_FOUNDATION Result< ShaderAsset > loadShaderAsset(const EvpackResourceReader &reader, const AssetRef &asset, const EvpackCapabilities &capabilities)
Read and decode one capability-selected eve.shader/1 from an admitted runtime package.
Result< ShaderAsset > decodeShaderAsset(const Value &definition, const ShaderAssetLimits &limits)
Decode strict eve.shader/1 metadata with SPIR-V 1.0 through 1.6 stages.
Admission bounds checked before copying stage words.
Definition ShaderAsset.h:34
One sequential float/vector push-constant parameter, owned by the definition.
Definition ShaderAsset.h:20
std::vector< float > defaults
Definition ShaderAsset.h:22
Owning CPU program snapshot; decoding does not prove GPU/descriptor compatibility.
Definition ShaderAsset.h:26
std::vector< std::uint32_t > vertex
Definition ShaderAsset.h:28
std::vector< ShaderAssetParameter > parameters
Definition ShaderAsset.h:30
std::vector< std::uint32_t > fragment
Definition ShaderAsset.h:29