载入中...
搜索中...
未找到
GraphicsShaderReload.cpp
浏览该文件的文档.
17 return Result<void>::failure(Diagnostic::error(DiagnosticCode::Unsupported, "SPIR-V shader replacement is unavailable on the WebGPU backend", "source", {},
28 return Result<void>::failure(Diagnostic::error(DiagnosticCode::StaleHandle, "shader is not a live resource owned by this Graphics instance", "shader", {},
31 return Result<void>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "fragment WGSL must not be empty", "fragWgsl", {},
40 return Result<void>::failure(Diagnostic::error(DiagnosticCode::StaleHandle, "shader GPU resource is no longer owned by this Graphics instance", "shader.gpuHandle", {},
51 return Result<void>::failure(Diagnostic::error(DiagnosticCode::PreconditionViolation, "shader has no reusable default vertex WGSL", "vertWgsl", {},
72 return Result<void>::failure(Diagnostic::error(DiagnosticCode::Failed, std::string("failed to prepare replacement pipeline: ") + error.what(), "pipeline", {},
75 return Result<void>::failure(Diagnostic::error(DiagnosticCode::Failed, "failed to prepare replacement pipeline", "pipeline", {},
90 return Result<void>::failure(Diagnostic::error(DiagnosticCode::Unsupported, "runtime GLSL replacement is unavailable on the WebGPU backend", "source", {},
Stable, structured diagnostics shared by engine modules.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Result< void > replaceShaderFromGlsl(Shader &shader, const std::string &vertGlsl, const std::string &fragGlsl) override
Replace shader from glsl.
Definition GraphicsShaderReload.cpp:88
Result< void > replaceShaderFromSpv(Shader &shader, const std::vector< uint32_t > &vertSpv, const std::vector< uint32_t > &fragSpv) override
Replace shader from spv.
Definition GraphicsShaderReload.cpp:15
Result< void > replaceShaderFromWgsl(Shader &shader, const std::string &vertWgsl, const std::string &fragWgsl) override
Replace shader from wgsl.
Definition GraphicsShaderReload.cpp:21
@ InvalidArgument
@ PreconditionViolation
@ Unsupported
@ Failed
@ StaleHandle
A compiled shader: one WebGPU pipeline + layout. Also holds the WGSL sources so custom shaders can be...
Definition Graphics.h:169
wgpu::RenderPipeline mesh3dPipeline
Definition Graphics.h:176
wgpu::RenderPipeline swapchainPipeline
Definition Graphics.h:170
wgpu::PipelineLayout pipelineLayout
Definition Graphics.h:180
wgpu::RenderPipeline mesh3dXrayPipeline
Definition Graphics.h:177
wgpu::RenderPipeline offscreenPipeline
Definition Graphics.h:171