Skip to content

Commit 03e54ea

Browse files
author
amalxloop
committed
MSAA swapchain support, unity build file, sample_count tracking
- Per-swapchain MSAA color images with per-swapchain-image allocation and 2-attachment framebuffers (MSAA color + swapchain resolve) - Headless MSAA resolve target for offscreen rendering - Physical device sample count capability query in sc_vulkan_init - Add sample_count field to SCGfxContext, initialized in sc_gfx_init - Create src/sc_kernel.c as canonical unity build TU - Use src/sc_kernel.c in CMakeLists.txt instead of generated build-dir file
1 parent d7c88d9 commit 03e54ea

4 files changed

Lines changed: 352 additions & 176 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -88,33 +88,9 @@ include_directories(${CMAKE_SOURCE_DIR}/include)
8888
include_directories(${CMAKE_SOURCE_DIR}/tools)
8989

9090
# ---------------------------------------------------------------------------
91-
# Core implementation TU
92-
# ---------------------------------------------------------------------------
93-
# The kernel is a "unity build": each header with _IMPLEMENTATION defined
94-
# is #included from sc_kernel.c. This improves inlining across subsystems.
95-
file(WRITE ${CMAKE_BINARY_DIR}/sc_kernel.c
96-
"/* Auto-generated unity build TU */\n"
97-
"#define SC_GFX_IMPLEMENTATION\n"
98-
"#define SC_LAYOUT_IMPLEMENTATION\n"
99-
"#define SC_WIDGET_IMPLEMENTATION\n"
100-
"#define SC_RUNTIME_IMPLEMENTATION\n"
101-
"#define SC_FONT_IMPLEMENTATION\n"
102-
"#define ${SC_GFX_BACKEND_DEF}\n"
103-
"#include \"sc_types.h\"\n"
104-
"#include \"sc_math.h\"\n"
105-
"#include \"sc_arena.h\"\n"
106-
"#include \"sc_layout.h\"\n"
107-
"#include \"sc_gfx.h\"\n"
108-
"#include \"sc_font.h\"\n"
109-
"#include \"sc_widget.h\"\n"
110-
"#include \"sc_runtime.h\"\n"
111-
"#ifdef SC_GFX_BACKEND_VULKAN\n"
112-
"#define SC_BACKEND_VULKAN_IMPLEMENTATION\n"
113-
"#include \"sc_backend_vulkan.h\"\n"
114-
"#endif\n"
115-
)
116-
117-
set(KERNEL_SOURCES ${CMAKE_BINARY_DIR}/sc_kernel.c)
91+
# Core implementation TU (unity build: all _IMPLEMENTATION in one TU)
92+
# ---------------------------------------------------------------------------
93+
set(KERNEL_SOURCES ${CMAKE_SOURCE_DIR}/src/sc_kernel.c)
11894

11995
# ---------------------------------------------------------------------------
12096
# Static library

0 commit comments

Comments
 (0)