Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
[D3DCompiler] Spell check
Browse files Browse the repository at this point in the history
  • Loading branch information
shoelzer authored and xoofx committed Jun 23, 2013
1 parent 3211c7a commit d4d2ea2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Source/SharpDX.D3DCompiler/IncludeShadow.cs
Expand Up @@ -53,7 +53,7 @@ public void Close()
}

/// <summary>
/// Return a pointer to the unamanged version of this callback.
/// Return a pointer to the unmanaged version of this callback.
/// </summary>
/// <param name="callback">The callback.</param>
/// <returns>A pointer to a shadow c++ callback</returns>
Expand Down
20 changes: 10 additions & 10 deletions Source/SharpDX.D3DCompiler/ShaderBytecode.cs
Expand Up @@ -755,13 +755,13 @@ public static ShaderBytecode Compress(params ShaderBytecode[] shaderBytecodes)
/// <summary>
/// Decompresses all shaders from a compressed set.
/// </summary>
/// <returns>Returns an array of decompresss shader bytecode.</returns>
/// <returns>Returns an array of decompress shader bytecode.</returns>
/// <unmanaged>HRESULT D3DDecompressShaders([In, Buffer] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] unsigned int uNumShaders,[In] unsigned int uStartIndex,[In, Buffer, Optional] unsigned int* pIndices,[In] unsigned int uFlags,[Out, Buffer] ID3D10Blob** ppShaders,[Out, Optional] unsigned int* pTotalShaders)</unmanaged>
public unsafe ShaderBytecode[] Decompress()
{
//First we call D3D.DecompressShaders with empty parameters to get the number of shaders in the compressed byte code (totalShadersRef)
//I set shadersBlobs to an array of one null blob just to make shadersOut_ parameter in DecompressShaders function valid
//which dosn't seem to accept zero pointer, I didn't find any other work around.
//which doesn't seem to accept zero pointer, I didn't find any other work around.
var shadersBlobs = new Blob[1];
int totalShadersRef;
fixed(void* bufferPtr = Data)
Expand All @@ -776,7 +776,7 @@ public unsafe ShaderBytecode[] Decompress()
/// </summary>
/// <param name="numShaders"><para>The number of shaders to decompress.</para></param>
/// <param name="startIndex"><para>The index of the first shader to decompress.</para></param>
/// <returns>Returns an array of decompresss shader bytecode.</returns>
/// <returns>Returns an array of decompress shader bytecode.</returns>
/// <unmanaged>HRESULT D3DDecompressShaders([In, Buffer] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] unsigned int uNumShaders,[In] unsigned int uStartIndex,[In, Buffer, Optional] unsigned int* pIndices,[In] unsigned int uFlags,[Out, Buffer] ID3D10Blob** ppShaders,[Out, Optional] unsigned int* pTotalShaders)</unmanaged>
public unsafe ShaderBytecode[] Decompress(int startIndex, int numShaders)
{
Expand All @@ -788,7 +788,7 @@ public unsafe ShaderBytecode[] Decompress(int startIndex, int numShaders)
D3D.DecompressShaders((IntPtr)bufferPtr, Data.Length, numShaders, startIndex, null, 0, shadersBlobs, out totalShadersRef);

//The size of shadersBlobs will not change
//if the compressed shader contains less than requested in numShaders, null entries will apear in the result array
//if the compressed shader contains less than requested in numShaders, null entries will appear in the result array
var shadersByteArr = new ShaderBytecode[shadersBlobs.Length];
for (int i = 0; i < shadersBlobs.Length; i++)
if (shadersBlobs[i] != null)
Expand All @@ -801,7 +801,7 @@ public unsafe ShaderBytecode[] Decompress(int startIndex, int numShaders)
/// Decompresses one or more shaders from a compressed set.
/// </summary>
/// <param name="indices"><para>An array of indexes that represent the shaders to decompress.</para></param>
/// <returns>Returns an array of decompresss shader bytecode.</returns>
/// <returns>Returns an array of decompress shader bytecode.</returns>
/// <unmanaged>HRESULT D3DDecompressShaders([In, Buffer] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] unsigned int uNumShaders,[In] unsigned int uStartIndex,[In, Buffer, Optional] unsigned int* pIndices,[In] unsigned int uFlags,[Out, Buffer] ID3D10Blob** ppShaders,[Out, Optional] unsigned int* pTotalShaders)</unmanaged>
public unsafe ShaderBytecode[] Decompress(int[] indices)
{
Expand All @@ -813,7 +813,7 @@ public unsafe ShaderBytecode[] Decompress(int[] indices)
D3D.DecompressShaders((IntPtr)bufferPtr, Data.Length, indices.Length, 0, indices, 0, shadersBlobs, out totalShadersRef);

//The size of shadersBlobs will not change
//if the compressed shader contains less than requested in numShaders, null entries will apear in the result array
//if the compressed shader contains less than requested in numShaders, null entries will appear in the result array
var shadersByteArr = new ShaderBytecode[shadersBlobs.Length];
for (int i = 0; i < shadersBlobs.Length; i++)
if (shadersBlobs[i] != null)
Expand Down Expand Up @@ -891,9 +891,9 @@ public unsafe string DisassembleRegion(DisassemblyFlags flags, string comments,
/// Gets the trace instruction offsets.
/// </summary>
/// <param name="isIncludingNonExecutableCode">if set to <c>true</c> [is including non executable code].</param>
/// <param name="startInstIndex">Start index of the inst.</param>
/// <param name="numInsts">The num insts.</param>
/// <param name="totalInstsRef">The total insts ref.</param>
/// <param name="startInstIndex">Start index of the instructions.</param>
/// <param name="numInsts">The number of instructions.</param>
/// <param name="totalInstsRef">The total instructions ref.</param>
/// <returns>An offset</returns>
/// <unmanaged>HRESULT D3DGetTraceInstructionOffsets([In, Buffer] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] unsigned int Flags,[In] SIZE_T StartInstIndex,[In] SIZE_T NumInsts,[Out, Buffer, Optional] SIZE_T* pOffsets,[Out, Optional] SIZE_T* pTotalInsts)</unmanaged>
public unsafe PointerSize GetTraceInstructionOffsets(bool isIncludingNonExecutableCode, PointerSize startInstIndex, PointerSize numInsts, out SharpDX.PointerSize totalInstsRef)
Expand Down Expand Up @@ -949,7 +949,7 @@ public static ShaderBytecode Load(Stream stream)
}

/// <summary>
/// Saves this bycode to the specified stream.
/// Saves this bytecode to the specified stream.
/// </summary>
/// <param name="stream">The stream.</param>
public void Save(Stream stream)
Expand Down
2 changes: 1 addition & 1 deletion Source/SharpDX.D3DCompiler/ShaderSignature.cs
Expand Up @@ -167,7 +167,7 @@ public unsafe static ShaderSignature GetOutputSignature(byte[] shaderBytecode)

public void Dispose()
{
// Obsolete, just here for backware compatibility
// Obsolete, just here for backward compatibility
}
}
}

0 comments on commit d4d2ea2

Please sign in to comment.