-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shader reflection, store info inside compiled mshdr files
- Loading branch information
Showing
9 changed files
with
314 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
namespace Mocha.Common; | ||
using Mocha.Glue; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Mocha.Common; | ||
|
||
public enum ShaderReflectionType | ||
{ | ||
Unknown, | ||
|
||
Buffer, | ||
Texture, | ||
Sampler | ||
} | ||
|
||
[StructLayout( LayoutKind.Sequential )] | ||
public struct ShaderReflectionBinding | ||
{ | ||
public int Set { get; set; } | ||
public int Binding { get; set; } | ||
public ShaderReflectionType Type { get; set; } | ||
public string Name { get; set; } | ||
} | ||
|
||
public struct ShaderReflectionInfo | ||
{ | ||
public UtilArray Bindings { get; set; } | ||
} | ||
|
||
public struct ShaderStageInfo | ||
{ | ||
public int[] Data { get; set; } | ||
public ShaderReflectionInfo Reflection { get; set; } | ||
} | ||
|
||
public struct ShaderInfo | ||
{ | ||
public int[] VertexShaderData { get; set; } | ||
public int[] FragmentShaderData { get; set; } | ||
public int[] ComputeShaderData { get; set; } | ||
public ShaderStageInfo Vertex { get; set; } | ||
public ShaderStageInfo Fragment { get; set; } | ||
public ShaderStageInfo Compute { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.