Add Editor configs, refactor test core, DXC test
Added Debug_Editor/Release_Editor configs to all projects and solution. Refactored test utilities into Ghost.TestCore and updated references. Introduced DXCBindingTest for shader compilation. Updated conditional compilation to use GHOST_EDITOR. Improved platform mappings and performed minor code cleanup.
This commit is contained in:
@@ -176,7 +176,7 @@ namespace {info.TypeSymbol.ContainingNamespace.ToDisplayString()}
|
||||
[global::System.Runtime.InteropServices.StructLayout(global::System.Runtime.InteropServices.LayoutKind.Sequential, Pack = 4)]
|
||||
{info.TypeSymbol.DeclaredAccessibility.ToString().ToLower()} partial struct {info.TypeSymbol.Name}
|
||||
{{
|
||||
#if DEBUG || GHOST_EDITOR
|
||||
#if GHOST_EDITOR
|
||||
public const string HLSL_SOURCE = @""
|
||||
# ifndef {definedSymbol}
|
||||
# define {definedSymbol}
|
||||
@@ -199,17 +199,17 @@ struct {info.Name}
|
||||
var registerTypeName = "g_shaderproperty_registeration";
|
||||
var registerCode = $@"// <auto-generated/>
|
||||
|
||||
#if GHOST_EDITOR
|
||||
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)]
|
||||
internal static partial class {registerTypeName}
|
||||
{{
|
||||
#if DEBUG || GHOST_EDITOR
|
||||
[global::System.Runtime.CompilerServices.ModuleInitializer]
|
||||
internal unsafe static void RegisterShaderProperties()
|
||||
{{
|
||||
{registerBuilder}
|
||||
}}
|
||||
#endif
|
||||
}}";
|
||||
}}
|
||||
#endif";
|
||||
|
||||
context.AddSource($"{registerTypeName}.gen.cs", registerCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user