Skip to content

Commit

Permalink
MemoryLayout: swap struct/array table header align & size
Browse files Browse the repository at this point in the history
  • Loading branch information
sciecode authored and greggman committed Apr 17, 2024
1 parent 6dc7408 commit 360913f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webgpu/lessons/uk/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ struct Ex4 {
</style>
<table class="wgsl-types">
<thead>
<tr><th>type</th><th>size</th><th>align</th><tr>
<tr><th>type</th><th>align</th><th>size</th><tr>
</thead>
<tbody>
<tr><td><code>struct</code> S with members M<sub>1</sub>...M<sub>N</sub></td><td>max(AlignOfMember(S,1), ... , AlignOfMember(S,N))</td><td>roundUp(AlignOf(S), justPastLastMember)
Expand Down
2 changes: 1 addition & 1 deletion webgpu/lessons/webgpu-memory-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ even though the array is a single `vec3f` and the `Ex4a` struct is also a single
</style>
<table class="wgsl-types">
<thead>
<tr><th>type</th><th>size</th><th>align</th><tr>
<tr><th>type</th><th>align</th><th>size</th><tr>
</thead>
<tbody>
<tr><td><code>struct</code> S with members M<sub>1</sub>...M<sub>N</sub></td><td>max(AlignOfMember(S,1), ... , AlignOfMember(S,N))</td><td>roundUp(AlignOf(S), justPastLastMember)
Expand Down

0 comments on commit 360913f

Please sign in to comment.