Skip to content

task(core): resolve packaged engine assets independently of working directory #833

Description

@JeanPhilippeKernel

Problem

Editor startup currently derives the engine asset root from the process working directory (current_path()/ZodiacEngine). A valid Debug package therefore crashes when launched outside its output directory: packaged SPIR-V is not found, CompileShader leaves all stage filenames empty, and the Depth Pre-Pass reaches PSO baking with stageCount == 0.

The Debug package contains the required files under Obelisk/Debug/ZodiacEngine/Shaders/Cache; launching from that directory succeeds. The package must be relocatable and launchable from any current working directory.

Scope

  • Resolve the engine asset root relative to the executable/package location, rather than current_path().
  • Preserve an explicit, documented override suitable for tests and development tooling if one is needed.
  • Validate the packaged asset root and required shader stages before render-graph compilation.
  • Return a clear startup error naming the missing asset root or shader files; do not defer the error to a zero-stage PSO assertion.
  • Keep project workspace mounting independent from engine-package asset mounting.

Acceptance criteria

  • The Debug editor launches with the same project config when invoked from the repository root, the executable output directory, and another arbitrary directory.
  • /ZodiacEngine/Shaders/Cache/depth_prepass_scene_vertex.spv and _fragment.spv resolve in each case.
  • A deliberately incomplete package exits gracefully with a diagnostic that identifies the package root and missing paths.
  • Add automated coverage for asset-root resolution and missing-package validation.
  • Do not change generated SampleProject/project.json.

Trace

Depth Pre-Pass -> GraphicPipeline::Bake -> PSOCache::MakeGraphicsPipelineKey, with depth_prepass_scene and stageCount == 0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P0Production-critical work that blocks foundational engine or editor correctnessenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions