Skip to content

Commit

Permalink
🎨 initial sprint-1 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarrr committed Dec 23, 2024
1 parent be68787 commit 6fc98f3
Show file tree
Hide file tree
Showing 110 changed files with 17,215 additions and 10,773 deletions.
8 changes: 4 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ ColumnLimit: 80
CommentPragmas: "^ IWYU pragma:"
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
Expand Down Expand Up @@ -124,7 +124,7 @@ SpaceBeforeParensOptions:
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpacesBeforeTrailingComments: 8
SpacesBeforeTrailingComments: 4
SpacesInAngles: Never
SpacesInContainerLiterals: false
SpacesInLineCommentPrefix:
Expand All @@ -138,4 +138,4 @@ SpacesInParensOptions:
InEmptyParentheses: false
SpacesInSquareBrackets: false
Standard: c++20
TabWidth: 4
TabWidth: 2
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ set(SDL_HAPTIC
OFF
CACHE BOOL "")


include(FetchContent)

set(ASH_VULKAN_VERSION "1.3.296.0")
Expand Down Expand Up @@ -215,7 +214,7 @@ add_library(
ashura/engine/font_impl.cc
ashura/engine/text.cc
ashura/engine/canvas.cc
ashura/engine/gpu_context.cc
ashura/engine/gpu_system.cc
ashura/engine/image_decoder.cc
ashura/engine/render_text.cc
ashura/engine/shader.cc
Expand Down
1 change: 1 addition & 0 deletions ashura/bench/bench.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// use cpu perf counters
41 changes: 20 additions & 21 deletions ashura/config.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
{
"$schema": "./config.schema.json",
"version": "0.0.1",
"gpu": {
"validation": false,
"vsync": true,
"preferences": [
"dgpu",
"vgpu",
"igpu",
"other",
"cpu"
],
"hdr": true,
"buffering": 2
},
"window": {
"resizable": true,
"full_screen": false,
"maximized": false,
"width": 1920,
"height": 1080
},
"gpu.validation": false,
"gpu.vsync": false,
"gpu.preferences": [
"dgpu",
"vgpu",
"igpu",
"other",
"cpu"
],
"gpu.hdr": true,
"gpu.buffering": 2,
"gpu.antialiasing": "msaa",
"gpu.msaa.level": 4,
"window.resizable": true,
"window.full_screen": false,
"window.maximized": false,
"window.borderless": false,
"window.width": 1500,
"window.height": 960,
"shaders": {
"Blur/DownSample:VS": "shaders/blur_downsample.vert.spv",
"Blur/DownSample:FS": "shaders/blur_downsample.frag.spv",
Expand All @@ -39,6 +38,6 @@
"Roboto": "fonts/Roboto/Roboto-Regular.ttf",
"RobotoMono": "fonts/RobotoMono/RobotoMono-Regular.ttf"
},
"default_font": "RobotoMono",
"fonts.default": "RobotoMono",
"images": {}
}
202 changes: 104 additions & 98 deletions ashura/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,105 +8,102 @@
"description": "Version of the engine this config file is made for. This will be used in inter-engine version conversion",
"type": "string"
},
"gpu": {
"description": "GPU Configuration",
"type": "object",
"properties": {
"validation": {
"description": "Enable GPU validation layers",
"type": "boolean",
"default": false
},
"vsync": {
"description": "Enable GPU VSync",
"type": "boolean",
"default": false
},
"preferences": {
"description": "Device preferences, selected in the specified order",
"type": "array",
"items": {
"enum": [
"dgpu",
"vgpu",
"igpu",
"other",
"cpu"
]
},
"minItems": 1,
"maxItems": 5,
"default": [
"dgpu",
"vgpu",
"igpu",
"other",
"cpu"
]
},
"hdr": {
"description": "Use HDR",
"type": "boolean",
"default": true
},
"buffering": {
"description": "GPU Swapchain Buffering",
"type": "integer",
"minimum": 0,
"maximum": 4,
"default": 2
}
"gpu.validation": {
"description": "Enable GPU validation layers",
"type": "boolean",
"default": false
},
"gpu.vsync": {
"description": "Enable GPU VSync",
"type": "boolean",
"default": false
},
"gpu.preferences": {
"description": "Device preferences, selected in the specified order",
"type": "array",
"items": {
"enum": [
"dgpu",
"vgpu",
"igpu",
"other",
"cpu"
]
},
"additionalProperties": false,
"required": [
"validation",
"vsync",
"preferences",
"hdr",
"buffering"
"minItems": 1,
"maxItems": 5,
"default": [
"dgpu",
"vgpu",
"igpu",
"other",
"cpu"
]
},
"window": {
"description": "Window configuration",
"type": "object",
"properties": {
"resizable": {
"description": "Enable window resizing",
"type": "boolean",
"default": true
},
"maximized": {
"description": "Maximize window during startup",
"type": "boolean",
"default": false
},
"full_screen": {
"description": "Set window to full-screen during startup",
"type": "boolean",
"default": false
},
"width": {
"description": "Initial width of the window",
"type": "integer",
"default": 1920,
"minimum": 0,
"maximum": 8192
},
"height": {
"description": "Initial height of the window",
"type": "integer",
"default": 1080,
"maximum": 8192
}
},
"additionalProperties": false,
"required": [
"resizable",
"maximized",
"width",
"height"
"gpu.hdr": {
"description": "Use HDR",
"type": "boolean",
"default": true
},
"gpu.buffering": {
"description": "GPU Swapchain Buffering",
"type": "integer",
"minimum": 0,
"maximum": 4,
"default": 2
},
"gpu.antialiasing": {
"description": "Antialiasing Technique to Use",
"type": "string",
"enum": [
"msaa"
]
},
"gpu.msaa.level": {
"description": "MSAA Sample Count",
"type": "number",
"enum": [
1,
2,
4,
8,
16
],
"default": 4
},
"window.resizable": {
"description": "Enable window resizing",
"type": "boolean",
"default": true
},
"window.maximized": {
"description": "Maximize window during startup",
"type": "boolean",
"default": false
},
"window.full_screen": {
"description": "Set window to full-screen during startup",
"type": "boolean",
"default": false
},
"window.borderless": {
"description": "Make window borderless",
"type": "boolean",
"default": false
},
"window.width": {
"description": "Initial width of the window",
"type": "integer",
"default": 1920,
"minimum": 0,
"maximum": 8192
},
"window.height": {
"description": "Initial height of the window",
"type": "integer",
"default": 1080,
"maximum": 8192
},
"shaders": {
"description": "Locations of the compiled shaders to be loaded at startup",
"type": "object"
Expand All @@ -115,7 +112,7 @@
"description": "Locations of the fonts to be loaded at startup",
"type": "object"
},
"default_font": {
"fonts.default": {
"description": "The default font for the Engine",
"type": "string"
},
Expand All @@ -127,11 +124,20 @@
"additionalProperties": false,
"required": [
"version",
"gpu",
"window",
"gpu.validation",
"gpu.vsync",
"gpu.preferences",
"gpu.hdr",
"gpu.buffering",
"gpu.msaa.level",
"window.resizable",
"window.maximized",
"window.borderless",
"window.width",
"window.height",
"shaders",
"fonts",
"default_font",
"fonts.default",
"images"
]
}
Loading

0 comments on commit 6fc98f3

Please sign in to comment.