1947848281280631267
This commit is contained in:
1 parent
ae5592fc1c
commit
ab7639672c
2 files changed
+50
-13
No files matched your search
+1
-1
@@ -8,7 +8,7 @@ handle: Karyuutensei
|
|||||||
post_id: "1948052805647782109"
|
post_id: "1948052805647782109"
|
||||||
date: 2025-07-23
|
date: 2025-07-23
|
||||||
archived: 2026-08-23
|
archived: 2026-08-23
|
||||||
draft: true
|
draft: false
|
||||||
tags:
|
tags:
|
||||||
- archive
|
- archive
|
||||||
- twitter
|
- twitter
|
||||||
|
|||||||
+49
-12
@@ -1,39 +1,76 @@
|
|||||||
---
|
---
|
||||||
title: "@Karyuutensei I don't use standard C libs or anything like that."
|
title: "\"nobody self includes with defines to reorder C code\" ..."
|
||||||
type: archive
|
type: archive
|
||||||
source: twitter
|
source: twitter
|
||||||
source_url: "https://x.com/NOTimothyLottes/status/1948009807161721332"
|
source_url: "https://x.com/NOTimothyLottes/status/1947848281280631267"
|
||||||
author: "NOTimothyLottes"
|
author: "NOTimothyLottes"
|
||||||
handle: NOTimothyLottes
|
handle: NOTimothyLottes
|
||||||
post_id: "1948009807161721332"
|
post_id: "1947848281280631267"
|
||||||
date: 2025-07-23
|
date: 2025-07-23
|
||||||
archived: 2026-08-23
|
archived: 2026-08-24
|
||||||
draft: true
|
draft: false
|
||||||
tags:
|
tags:
|
||||||
- archive
|
- archive
|
||||||
- twitter
|
- twitter
|
||||||
- NOTimothyLottes
|
- NOTimothyLottes
|
||||||
description: "@Karyuutensei I don't use standard C libs or anything like that."
|
description: "\"nobody self includes with defines to reorder C code\" ..."
|
||||||
in_reply_to: ""
|
in_reply_to: ""
|
||||||
---
|
---
|
||||||
|
|
||||||
## Source
|
## Source
|
||||||
|
|
||||||
- URL: https://x.com/NOTimothyLottes/status/1948009807161721332
|
- URL: https://x.com/NOTimothyLottes/status/1947848281280631267
|
||||||
- Author: NOTimothyLottes (@NOTimothyLottes)
|
- Author: NOTimothyLottes (@NOTimothyLottes)
|
||||||
- Posted: 2025-07-23 13:18:24
|
- Posted: 2025-07-23 02:36:34
|
||||||
|
|
||||||
## Thread
|
## Thread
|
||||||
|
|
||||||
**1/**
|
**1/**
|
||||||
|
|
||||||
@Karyuutensei I don't use standard C libs or anything like that. I just write my own stuff. For 'printf' style debugging I have macros that write to a memory mapped log file. They give {[restartNumber]|[msSinceLaunch]|[sourceLine]|[hex]|[dec]|[comment]}. Keeping multiple restarts in same log
|
"nobody self includes with defines to reorder C code" ... Haha, apparently I'm not the only one, the File Pilot guy does it too :)
|
||||||
|
|
||||||

|

|
||||||
Branches: [[archive/threads/NOTimothyLottes/2025-07-23-i-dont-use-standard-c-libs-or-anything-like-that/2025-07-23-Karyuutensei-where-does-the-restart-number-come-from-i-assume]]
|
|
||||||
|
|
||||||
**2/**
|
**2/**
|
||||||
|
|
||||||
|
@NOTimothyLottes Do you also automatically generate the include files or do you just write them yourself?
|
||||||
|
|
||||||
|
**3/**
|
||||||
|
|
||||||
|
@Karyuutensei I only include __FILE__ (self). For WIN32 and VK even, I recreate the parts of external headers I need (use) inside the 'one source file', typically with structural type changes to switch back to simple types like 64 bit intergers instead of pointers. Trying to get to C--
|
||||||
|
|
||||||
|
**4/**
|
||||||
|
|
||||||
|
@Karyuutensei One side effect, even with C code the compilation is perceptually instant for the whole program. The other thing I do is mix the GLSL and C all in the same file, so I share defines. I do have one external include for the compiled SPIR-V ...
|
||||||
|
|
||||||
|
**5/**
|
||||||
|
|
||||||
|
@Karyuutensei For the SPIR-V, I also have one program, but I use specialization constants set at PSO generation to select the code path for a specific 'shader'. This requires spriv opt as a pre-processor else the IHV compilers tend to be 10x or more slower.
|
||||||
|
|
||||||
|
**6/**
|
||||||
|
|
||||||
|
@Karyuutensei During dev time I use 2 terminals each with their own shell scripts. The first is to just loop and keep regenerating the SPIR-V if anything in the 'one file' changes. This is unfortunately a mess to do in a batch file (below)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**7/**
|
||||||
|
|
||||||
|
@Karyuutensei The second does the same for the C program, loops recompiling and running the program. So when I'm editing source I can just fast exit the program and it restarts [with instant restart/reload it is quite fast to restart]
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**8/**
|
||||||
|
|
||||||
|
@Karyuutensei I'm using GCC on Windows, because why bother with having to install Visual Studio or it's compiler tool chain mess. I just do MINGW64 and be done with it. My debugger is the instant restart for C code, and shader reload for GLSL
|
||||||
|
|
||||||
|
**9/**
|
||||||
|
|
||||||
|
@Karyuutensei I don't use standard C libs or anything like that. I just write my own stuff. For 'printf' style debugging I have macros that write to a memory mapped log file. They give {[restartNumber]|[msSinceLaunch]|[sourceLine]|[hex]|[dec]|[comment]}. Keeping multiple restarts in same log
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**10/**
|
||||||
|
|
||||||
@Karyuutensei That log example is a simple test program, it starts in 0.3 ms for that run. The log tells all about how it pipelines start up {doing memory page warming, kart load, window setup, VK setup in parallel, getting to PSO gen as fast as possible [get layout done first]}
|
@Karyuutensei That log example is a simple test program, it starts in 0.3 ms for that run. The log tells all about how it pipelines start up {doing memory page warming, kart load, window setup, VK setup in parallel, getting to PSO gen as fast as possible [get layout done first]}
|
||||||
|
|
||||||

|

|
||||||
Reference in new issue
Block a user