Skip to content

Commit c4429bc

Browse files
authored
Fix tiny typos (shader-slang#5944)
1 parent 478be54 commit c4429bc

10 files changed

+20
-20
lines changed

docs/user-guide/02-conventional-features.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ float3 a[3] = {1,2,3, 4,5,6};
995995

996996
### Initializer Lists - Struct
997997

998-
In most scenarios, using an initializer list to create a struct typed value is equivalent to calling the struct's constructor using the elements in the initilaizer list as arguments for the constructor, for example:
998+
In most scenarios, using an initializer list to create a struct typed value is equivalent to calling the struct's constructor using the elements in the initializer list as arguments for the constructor, for example:
999999
```csharp
10001000
struct GenerateCtorInner1
10011001
{
@@ -1061,7 +1061,7 @@ In addition, Slang also provides compatibility support for C-style initializer l
10611061

10621062
A struct is considered a C-style struct if:
10631063
1. User never defines a custom constructor with **more than** 0 parameters
1064-
2. All member variables in a `struct` have the same visibiliity (`public` or `internal` or `private`).
1064+
2. All member variables in a `struct` have the same visibility (`public` or `internal` or `private`).
10651065

10661066
#### Partial Initializer List's
10671067

docs/user-guide/06-interfaces-generics.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ struct MultiArrayFloatContainer : IFloatContainer
429429
}
430430
```
431431

432-
In summary, an `asssociatedtype` requirement in an interface is similar to other types of requirements: a method requirement means that an implementation must provide a method matching the interface signature, while an `associatedtype` requirement means that an implementation must provide a type in its scope with the matching name and interface constraint. In general, when defining an interface that is producing and consuming an object whose actual type is implementation-dependent, the type of this object can often be modeled as an associated type in the interface.
432+
In summary, an `associatedtype` requirement in an interface is similar to other types of requirements: a method requirement means that an implementation must provide a method matching the interface signature, while an `associatedtype` requirement means that an implementation must provide a type in its scope with the matching name and interface constraint. In general, when defining an interface that is producing and consuming an object whose actual type is implementation-dependent, the type of this object can often be modeled as an associated type in the interface.
433433

434434

435435
### Comparing Generics to C++ Templates
@@ -823,7 +823,7 @@ interface IEnumerator<T>
823823

824824
interface IEnumerable<T>
825825
{
826-
assoicatedtype Enumerator : IEnumerator<T>;
826+
associatedtype Enumerator : IEnumerator<T>;
827827
Enumerator getEnumerator();
828828
}
829829
```

docs/user-guide/07-autodiff.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ struct MyType
381381
R original(T0 p0, inout T1, p1, T2 p2);
382382
```
383383

384-
Sometimes the derivative function needs to be defined in a different module from the original function, or the derivative function cannot be made visible from the original function. In this case, we can use the `[ForwardDerivativeOf(originalFunnc)]` attribute to inform the compiler that `originalFunc` should be treated as a forward-differentiable function, and the current function is the derivative implementation of `originalFunc`. The following code will have the same effect to associate `derivative` and the forward-derivative implementation of `original`:
384+
Sometimes the derivative function needs to be defined in a different module from the original function, or the derivative function cannot be made visible from the original function. In this case, we can use the `[ForwardDerivativeOf(originalFunc)]` attribute to inform the compiler that `originalFunc` should be treated as a forward-differentiable function, and the current function is the derivative implementation of `originalFunc`. The following code will have the same effect to associate `derivative` and the forward-derivative implementation of `original`:
385385

386386
```csharp
387387
R original(T0 p0, inout T1, p1, T2 p2);
@@ -653,7 +653,7 @@ This may lead to unexpected results. For example:
653653
struct MyType : IDifferentiable
654654
{
655655
no_diff float member;
656-
float someOtherMemther;
656+
float someOtherMember;
657657
}
658658
[ForwardDifferentiable]
659659
float f(float x)

docs/user-guide/08-compiling.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ meanings of their `CompilerOptionValue` encodings.
924924

925925
|CompilerOptionName | Description |
926926
|:------------------ |:----------- |
927-
| MacroDefine | Specifies a prepreocessor macro define entry. `stringValue0` encodes macro name, `stringValue1` encodes the macro value.
927+
| MacroDefine | Specifies a preprocessor macro define entry. `stringValue0` encodes macro name, `stringValue1` encodes the macro value.
928928
| Include | Specifies an additional search path. `stringValue0` encodes the additional path. |
929929
| Language | Specifies the input language. `intValue0` encodes a value defined in `SlangSourceLanguage`. |
930930
| MatrixLayoutColumn | Use column major matrix layout as default. `intValue0` encodes a bool value for the setting. |
@@ -973,5 +973,5 @@ meanings of their `CompilerOptionValue` encodings.
973973
## Debugging
974974

975975
Slang's SPIRV backend supports generating debug information using the [NonSemantic Shader DebugInfo Instructions](https://github.com/KhronosGroup/SPIRV-Registry/blob/main/nonsemantic/NonSemantic.Shader.DebugInfo.100.asciidoc).
976-
To enable debugging information when targing SPIRV, specify the `-emit-spirv-directly` and the `-g2` argument when using `slangc` tool, or set `EmitSpirvDirectly` to `1` and `DebugInformation` to `SLANG_DEBUG_INFO_LEVEL_STANDARD` when using the API.
976+
To enable debugging information when targeting SPIRV, specify the `-emit-spirv-directly` and the `-g2` argument when using `slangc` tool, or set `EmitSpirvDirectly` to `1` and `DebugInformation` to `SLANG_DEBUG_INFO_LEVEL_STANDARD` when using the API.
977977
Debugging support has been tested with RenderDoc.

docs/user-guide/09-reflection.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ void printSize(
487487
}
488488
```
489489

490-
Note that the size of a type may be *unbounded* for a particluar layout unit; this case is encoded just like the unbounded case for the element count of an array type (`~size_t(0)`).
490+
Note that the size of a type may be *unbounded* for a particular layout unit; this case is encoded just like the unbounded case for the element count of an array type (`~size_t(0)`).
491491

492492
The layout units used by a particular type layout can be iterated over using `getCategoryCount()` and `getCategoryByIndex()`:
493493

@@ -1052,7 +1052,7 @@ That is, the binding information for the implicit constant buffer will be found
10521052
The `ProgramLayout` type has the appealingly-named `getParameterCount` and `getParameterByIndex()` methods, which seem to be the obvious way to navigate the global-scope parameters of a shader.
10531053
However, we recommend *against* using these functions in applications that want to be able to systematically and robustly reflect any possible input shader code.
10541054
1055-
While the reflection API implementation makes an effort to ensure that the information returned by `getParameterByIndex()` is not incorrect, it is very difficult when using those functions to account for how global-scope parameters might have been grouped into an automatically-introduced constnat buffer or parameter block.
1055+
While the reflection API implementation makes an effort to ensure that the information returned by `getParameterByIndex()` is not incorrect, it is very difficult when using those functions to account for how global-scope parameters might have been grouped into an automatically-introduced constant buffer or parameter block.
10561056
The `getGlobalConstantBufferBinding()` and `getGlobalConstantBufferSize()` methods can be used in some scenarios, but aren't the best way to get the relevant information.
10571057
10581058
While it would only matter in corner cases, we still recommend that applications use `getGlobalParamsVarLayout()` instead of `getGlobalParamsTypeLayout()`, to account for cases where the global-scope might have offsets applied to it (and also to handle the global scope and entry-point scopes more uniformly).
@@ -1405,13 +1405,13 @@ In contrast, the cumulative of offset of `c.b` in `t` registers is one, and the
14051405

14061406
Similarly, when calculating the cumulative offsets of variables inside a parameter block (for targets that can allocate each parameter block its own space), it is important not to sum contributions past an enclosing parameter block.
14071407

1408-
We can account for these subtleties by extending the representation of access paths in our example application to record the node coresponding to the deepest constant buffer or parameter block along the path:
1408+
We can account for these subtleties by extending the representation of access paths in our example application to record the node corresponding to the deepest constant buffer or parameter block along the path:
14091409

14101410
```c++
14111411
struct AccessPath
14121412
{
14131413
AccessPathNode* leaf = nullptr;
1414-
AccessPathNode* deepestConstantBufer = nullptr;
1414+
AccessPathNode* deepestConstantBuffer = nullptr;
14151415
AccessPathNode* deepestParameterBlock = nullptr;
14161416
};
14171417
```
@@ -1427,7 +1427,7 @@ case slang::TypeReflection::Kind::ShaderStorageBuffer:
14271427
// ...
14281428

14291429
AccumulatedOffsets innerAccessPath = accessPath;
1430-
innerAccessPath.deepestConstantBufer = innerAccessPath.leaf;
1430+
innerAccessPath.deepestConstantBuffer = innerAccessPath.leaf;
14311431

14321432
// ...
14331433
}
@@ -1495,7 +1495,7 @@ When a byte offset is being computed, relative offsets will only be summed up to
14951495
14961496
```c++
14971497
case slang::ParameterCategory::Uniform:
1498-
for (auto node = accessPath.leaf; node != accessPath.deepestConstantBufer; node = node->outer)
1498+
for (auto node = accessPath.leaf; node != accessPath.deepestConstantBuffer; node = node->outer)
14991499
{
15001500
result.offset += node->varLayout->getOffset(layoutUnit);
15011501
}

docs/user-guide/09-targets.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ On platforms that provide a CPU-like "flat" memory model with a single virtual a
6161
Current graphics APIs provide far more complicated and less uniform mechanisms for passing shader parameters.
6262

6363
A high-level language compiler like Slang handles the task of _binding_ each user-defined shader parameter to one or more of the parameter-passing resources defined by a target platform.
64-
For example, the Slang compiler might bindg a global `Texture2D` parameter called `gDiffuse` to the `t1` register defined by the Direct3D 11 API.
64+
For example, the Slang compiler might bind a global `Texture2D` parameter called `gDiffuse` to the `t1` register defined by the Direct3D 11 API.
6565

6666
An application is responsible for passing the argument data for a parameter using the using the corresponding platform-specific resource it was bound to.
6767
For example, an application should set the texture they want to use for `gDiffuse` to the `t1` register using Direct3D 11 API calls.
@@ -173,7 +173,7 @@ The D3D12 rasterization pipeline provides alternative geometry processing stages
173173

174174
- The optional `amplification` stage precedes the mesh stage and is responsible for determining how many mesh shader invocations should be run.
175175

176-
Compared to the D3D11 pipeline without tesselllation (hull and domain shaders), a mesh shader is kind of like a combined/generalized vertex and geometry shader.
176+
Compared to the D3D11 pipeline without tessellation (hull and domain shaders), a mesh shader is kind of like a combined/generalized vertex and geometry shader.
177177

178178
Compared to the D3D11 pipeline with tessellation, an amplification shader is kind of like a combined/generalized vertex and hull shader, while a mesh shader is kind of like a combined/generalized domain and geometry shader.
179179

docs/user-guide/10-link-time-specialization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permalink: /user-guide/link-time-specialization
77

88
Traditionally, graphics developers have been relying on the preprocessor defines to specialize their shader code for high-performance GPU execution.
99
While functioning systems can be built around preprocessor macros, overusing them leads to many problems:
10-
- Long compilation time. With preprocessors defines, specialzation happens before parsing, which is a very early stage in the compilation flow.
10+
- Long compilation time. With preprocessors defines, specialization happens before parsing, which is a very early stage in the compilation flow.
1111
This means that the compiler must redo almost all work from the scratch with every specialized variant, including parsing, type checking, IR generation
1212
and optimization, even when two specialized variants only differ in one constant value. The lack of reuse of compiler front-end work between
1313
different shader specializations contributes a significant portion to long shader compile times.

docs/user-guide/a1-03-obfuscation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ This method is currently only available on the `ICompileRequest` and not on the
193193

194194
The file system returned is held in memory, and the blob data held in the file system typically shared, so accessing items this way is typically very low overhead.
195195

196-
The conventions used for the file system representation could best be described as a work in progress, and may change in the future. Internally Slang stores compilation results as a hierarchy of "artifacts". An artifact consists of the main result, plus associated artifacts. An artifact can also be a container which can additionally hold children artifacts. In the current directory structure each artifact is a directory, with the root directory of the `ISlangMultableFileSystem` being the root artifact.
196+
The conventions used for the file system representation could best be described as a work in progress, and may change in the future. Internally Slang stores compilation results as a hierarchy of "artifacts". An artifact consists of the main result, plus associated artifacts. An artifact can also be a container which can additionally hold children artifacts. In the current directory structure each artifact is a directory, with the root directory of the `ISlangMutableFileSystem` being the root artifact.
197197

198198
Given a directory representing an artifact it can contain 2 special directories `children` and `associated`. The `children` directory contains the artifacts that are children of the current directories artifact. Similarly `associated` contains directories for artifacts that are associated with the current artifact.
199199

docs/user-guide/a1-04-interop.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ float modf(float x, out float ip)
182182
}
183183
```
184184
185-
Opcodes such as `OpCapbility`, `OpExtension` and type definitions are allowed inside a `spirv_asm` block. These instructions will be deduplicated and inserted into the correct sections defined by the SPIRV specification, for example:
185+
Opcodes such as `OpCapability`, `OpExtension` and type definitions are allowed inside a `spirv_asm` block. These instructions will be deduplicated and inserted into the correct sections defined by the SPIRV specification, for example:
186186
```cpp
187187
uint4 WaveMatch(T value)
188188
{

docs/user-guide/a2-01-spirv-target-specific.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ Another way to put, Slang treats column as row and row as column when targeting
291291

292292
Due to the swap of row and column in terminology, the matrix multiplication needs to be performed little differently. Slang translates a matrix multiplication, `mul(mat1, mat2)`, to `transpose(mul(transpose(mat2), transpose(mat1)))` when targeting SPIR-V.
293293

294-
Note that the matrix translation explained above is orthogoal to the memory layout of a matrix. The memory layout is related to how CPU places matrix values in the memory and how GPU reads them. It is like how `std140` or `std430` works. DXC by default uses `column_major` memory layout and Slang uses row-major memory layout. For more information about the matrix memory layout, please see [a1-01-matrix-layout](a1-01-matrix-layout.md).
294+
Note that the matrix translation explained above is orthogonal to the memory layout of a matrix. The memory layout is related to how CPU places matrix values in the memory and how GPU reads them. It is like how `std140` or `std430` works. DXC by default uses `column_major` memory layout and Slang uses row-major memory layout. For more information about the matrix memory layout, please see [a1-01-matrix-layout](a1-01-matrix-layout.md).
295295

296296

297297
Legalization

0 commit comments

Comments
 (0)