Skip to content

Commit

Permalink
snapshots: Consolidate path handling.
Browse files Browse the repository at this point in the history
Add a new type, `Input`, representing a particular Naga input file,
with methods to generate related paths - output files with a
particular extension, parameter files, and the input file itself.
Use this throughout `snapshots.rs` to generate paths.

Give `Input` utility methods for reading and writing files.
  • Loading branch information
jimblandy committed Sep 24, 2023
1 parent d303077 commit 8e3bbfa
Show file tree
Hide file tree
Showing 3 changed files with 226 additions and 102 deletions.
2 changes: 1 addition & 1 deletion tests/out/spv/debug-symbol-simple.spvasm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %24 "vs_main" %15 %18 %20 %22
OpEntryPoint Fragment %57 "fs_main" %51 %54 %56
OpExecutionMode %57 OriginUpperLeft
%3 = OpString "debug-symbol-simple"
%3 = OpString "debug-symbol-simple.wgsl"
OpSource Unknown 0 %3 "struct VertexInput {
@location(0) position: vec3<f32>,
@location(1) color: vec3<f32>,
Expand Down
2 changes: 1 addition & 1 deletion tests/out/spv/debug-symbol-terrain.spvasm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OpEntryPoint Fragment %587 "fs_main" %580 %582 %584 %586
OpExecutionMode %348 LocalSize 64 1 1
OpExecutionMode %470 OriginUpperLeft
OpExecutionMode %587 OriginUpperLeft
%3 = OpString "debug-symbol-terrain"
%3 = OpString "debug-symbol-terrain.wgsl"
OpSource Unknown 0 %3 "// Taken from https://github.com/sotrh/learn-wgpu/blob/11820796f5e1dbce42fb1119f04ddeb4b167d2a0/code/intermediate/tutorial13-terrain/src/terrain.wgsl
// ============================
// Terrain Generation
Expand Down
Loading

0 comments on commit 8e3bbfa

Please sign in to comment.