Skip to content

Track structured GLSL diagnostics in playground error reports #76

Description

@devallibus

Follow-up from PR #75 review.

Context:

  • The current playground error pipeline preserves structured error kinds for TSL, but GLSL still collapses diagnostics to plain string arrays in the browser-facing report path.
  • apps/web/src/lib/webgl-shader-errors.ts already emits ShaderDiagnostic entries with kind values that map directly onto PlaygroundError.

Goal:

  • Preserve GLSL structured diagnostics end-to-end so the playground and API can report glsl-compile and glsl-link through PlaygroundErrorReport, not only raw message strings.

Suggested scope:

  • Add a conversion step from ShaderDiagnostic[] to PlaygroundError[] near the existing GLSL error reporting path.
  • Update PlaygroundCanvas to send structured GLSL errors alongside plain error strings.
  • Keep existing plain-message behavior for UI compatibility while enriching the structured payload.
  • Add tests covering both compile and link diagnostics flowing through the error report layer.

Acceptance criteria:

  • GLSL compile failures surface at least one structured error with kind glsl-compile.
  • GLSL link failures surface at least one structured error with kind glsl-link.
  • Existing consumers of report.errors continue to receive readable messages.
  • Tests cover the structured GLSL fallback/reporting path.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions