Skip to content

BsfImportTool depends on pre-built assets, crashes without them #387

@nemerle

Description

@nemerle

I've encountered this problem when working on the VertexDataDecl PR, when the VertexDataDecl was used in some places that caused the serialized structure layout to change in GpuProgramBytecode. I can force it to work by reverting a few changes around there, but I think that this problem can make any future changes to serialized shader asset layout quite painful? Below is the analysis of the issue:

The import tool cannot be started if the compiled shader assets are missing. Even if we want to create compiled shader assets 😄

This is caused by the following reduced chain of calls:

  • Running bsfImportTool on "IrradianceComputeSH.bsl" executes:
  • Application::startUp which calls
  • RenderBeast::initializeCore which calls
  • RenderBeastIBLUtility::filterCubemapForIrradiance which requires that BuiltinResources::getShader returned a proper shader for "IrradianceComputeSH.bsl"
  • and that requires the asset to already exist.

This looks very much like a bootstrap problem encountered when a compiler is written in a language it's meant to compile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions