Selects the shader projection a device consumes from a family's linked artifact. More...
#include <string_view>#include "donner/base/Utils.h"#include "donner/gpu/Device.h"#include "donner/gpu/shader/CompiledShader.h"#include "donner/gpu/shader/LinkedProjection.h"Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| const gpu::shader::CompiledShaderView & | donner::geode::SelectShaderProjection (const gpu::Device &device, const gpu::shader::CompiledShaderView &linked) |
Selects one family's projection for device from the artifact this build links for it, named with DONNER_LINKED_SHADER_ARTIFACT. | |
| gpu::Result< gpu::ShaderModule > | donner::geode::CreateShaderModule (gpu::Device &device, const gpu::shader::CompiledShaderView &linked, std::string_view label) |
Creates one family's shader module from the projection device consumes. | |
Selects the shader projection a device consumes from a family's linked artifact.
|
inline |
Creates one family's shader module from the projection device consumes.
| device | GPU device receiving the prevalidated source and metadata. |
| linked | The family's linked artifact, named with DONNER_LINKED_SHADER_ARTIFACT. |
| label | Diagnostic shader label. |
|
inline |
Selects one family's projection for device from the artifact this build links for it, named with DONNER_LINKED_SHADER_ARTIFACT.
A native build links only the platform-native projection, which its Metal or Vulkan device consumes; the WebAssembly package links only the authored WGSL its browser device consumes. A test device that consumes another projection receives the one a test-only library registered, and otherwise an artifact that carries nothing in its kind, which gpu::Device::createShaderModule refuses rather than compiling nothing. See gpu::shader::SelectLinkedProjection.
Every projection of a family shares one reflected interface, so bindings, entry points and workgroup shapes may be read from either the returned view or linked.
| device | Device whose source kind selects the projection. |
| linked | The family's linked artifact. |