Skip to content

Commit

Permalink
Split out VulkanSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
serenity4 committed Oct 3, 2023
1 parent 09d1965 commit 463b066
Show file tree
Hide file tree
Showing 58 changed files with 130 additions and 1,957 deletions.
4 changes: 3 additions & 1 deletion generator/.JuliaFormatter.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ align_struct_field = true
align_conditional = true
align_assignment = true
align_pair_arrow = true
margin = 120
margin = 5000
verbose = true
indent = 2
join_lines_based_on_soruce = true
5 changes: 4 additions & 1 deletion generator/Project.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name = "VulkanGen"
uuid = "a1e12450-decb-4c3e-a000-968e74262140"
authors = ["Cédric Belmant"]
version = "0.2.1"
version = "1.3.207"

[deps]
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
EzXML = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
ForwardMethods = "5fe2550f-d27e-4649-9aea-fdf9a83a1aa9"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
StructArrays = "09ab397b-f2b6-538f-b94a-2f83cf4a842a"
VulkanSpec = "99a7788f-8f0f-454f-8f6c-c6cf389551ae"
Vulkan_Headers_jll = "8d446b21-f3ad-5576-a034-752265b9b6f9"

[compat]
Expand Down
85 changes: 82 additions & 3 deletions generator/src/VulkanGen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ using DocStringExtensions
using Reexport
using Dictionaries
using .Meta: isexpr
using Pkg: project
@reexport using VulkanSpec

@template (FUNCTIONS, METHODS, MACROS) = """
$(DOCSTRING)
Expand All @@ -22,11 +24,88 @@ using .Meta: isexpr
$(SIGNATURES)
"""

const VULKAN_API = Ref{VulkanAPI}()

__init__() = VULKAN_API[] = VulkanAPI(project().version)

include("types.jl")
include("exprs.jl")
include("type_conversions.jl")
include("naming_conventions.jl")
include("conventions.jl")
include("config.jl")
include("wrap.jl")
include("dependency_resolution.jl")
include("write.jl")

export
# Naming Conventions
### Convention types
CamelCaseLower,
CamelCaseUpper,
SnakeCaseLower,
SnakeCaseUpper,

### Convention utilities
detect_convention,
nc_convert,
remove_parts,
remove_prefix,
struct_name,

# Expr
name,
category,
deconstruct,
reconstruct,
rmlines,
striplines,
unblock,
prettify,
concat_exs,
broadcast_ex,
is_broadcast,
to_expr,

# Wrapping
WrapperConfig,
Platform,
Linux,
Windows,
MacOS,
BSD,
extensions,
filter_specs,
VulkanWrapper,
wrap,
resolve_types,
resolve_dependencies,

### Utility
is_flag,
is_returnedonly,
contains_api_structs,
promote_hl,

include("spec/VulkanSpec.jl")
@reexport using .VulkanSpec
### Wrapper types
WrapperNode,
Definition,
ConstantDefinition,
EnumDefinition,
BitmaskDefinition,
StructDefinition,
HandleDefinition,
Constructor,
Documented,
MethodDefinition,
AliasDeclaration,
FromVk,
Convert,
GetProperty,
APIFunction,
Parent,
exports,

include("wrapper.jl")
VULKAN_API

end # module VulkanGen
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
191 changes: 0 additions & 191 deletions generator/src/spec/VulkanSpec.jl

This file was deleted.

58 changes: 0 additions & 58 deletions generator/src/spec/aliases.jl

This file was deleted.

Loading

0 comments on commit 463b066

Please sign in to comment.