#Rosy
1 messages · Page 13 of 1
api is smelly
it's a real slog
finally
I have created a blas, and no vvls
following sascha's example led to VVLs
the tlas should be easier now that I have all the things to build an acceleration structure
tlas was ezpz
2.5 days for the first one, second one < 30 min
now for the pipeline
the first day was understanding just what all I had to build and what it did
and looking through all the structs
and then setting up the code to have a RT pipeline at all and be able to build it
as I was going through it I realized that while it all looked similar it was all different enough to need new helper methods
anyway
none of it works, but I am creating and destroying the things without VVLs
oh and I have to do the new descriptors thing
the descriptor for the AS is passed in as a pNext to descriptor set
and the shaders are bound completely differently
I bet Sascha's don't VVL since he's declaring VK 1.1
ok shaders done, pipeline done
I need to add the descriptor set and then build the render graph for it
I'm going to do that tomorrow, day 4
after this RT nonsense I'm going to work on my CPU software rasterizer for a bit and actually do something fun and not think about vulkan stuff for a minute
Actually I will do mesh shader then work on my cpu raster
the kind with 4 sides?
very rare triangle
it's a sign of good luck when you find one
I should have written a new way to render a triangle :P
VkStridedDeviceAddressRegionKHR is so weird
like wtf
for shaders
why
I already bound the pipeline
that has the shaders
what is the explanation
I have to create VkShaderModuleCreateInfo
I have to create VkPipelineShaderStageCreateInfo
I have to create VkRayTracingShaderGroupCreateInfoKHR
I pass these into the pipeline:
pl_create_info.stageCount = 3;
pl_create_info.pStages = shader_stages;
pl_create_info.groupCount = 3;
pl_create_info.pGroups = shader_groups;
why do I additionally have to pass a shader binding table?
are we absolutely sure the device doesn't have all the information it needs?
lets give it some more, sure
whatever
this is the last piece
I just don't understand what shader group handles are I guess
honestly, missed opportunity to have at least 5 more structs to describe the shaders, I should be lucky it's only 4
In a rasterizer we can batch objects by the shader they use and thus always know the set of shaders which must be called to render a set of objects. However, in a ray tracer we don’t know which object a ray will hit when we trace it, and thus need the entire scene available in memory (or some proxy of it) along with a function to call for each object which can process intersections with it. Our ray tracer needs access to all of the shaders which might be called for the scene, and a way to associate them with the objects in the scene. Each of the RTX APIs implements this using the Shader Binding Table.
The Shader Binding Table contains the entire set of shaders which may be called when ray tracing the scene, along with embedded parameters to be passed to these shaders. Each pair of shader functions and embedded parameters is referred to as a Shader Record. Since it’s common for geometries to share the same shader code but access different data, the embedded parameters in the record can be used to pass such data to the shaders. Thus, there should be at least one Shader Record in the table for each unique combination of shader functions and embedded parameters. It is possible to write the same shader record multiple times in the table, and this may be necessary depending on how the instances and geometries in the scene are setup. Finally, it is also possible to use the instance and geometry IDs available in the shaders to perform indirect access into other tables containing the scene data.
ok ok
that article is great
ok ok I get it
too may rays bouncing around hitting different things and you have to have all the shaders all at once
the Sascha example is a contrived single triangle example that doesn't really help at all with understanding RT, it's just a the minimum struct spam required to get a triangle
which I totally appreciate
but I get that it isn't even explaining a little bit about what any of this is for
I just want the triangle now, I'll figure it out later
you look at this example code and you could just copy and paste it in a few minutes and get it to work, but I have been going through it for days now building each struct, trying to understand how it works, it takes time
that was kinda hellish
this is with slang shaders
I will try vcc tomorrow
I did this with my miss shader to get that background
struct Payload
{
float3 hitValue;
};
[shader("miss")]
void main(inout Payload p)
{
float3 rayDir = normalize(WorldRayDirection());
float r = (rayDir.x + 0.75f);
float g = (rayDir.y + 0.75f);
float3 bgColor = float3(r, g, 0.5f);
p.hitValue = bgColor;
}
had no idea what I was doing
Posting https://poniesandlight.co.uk/reflect/debug_print_text/ here from Dodo's thread for UI ideas, since I have to build a UI myself #1311466891415519302 message
u can even make ur own special font on GIMP and easily export it for this
or so i read somewher
buying my kid a guitar when she was 6 was the best investment, now she's practicing singing and playing Pixies and Cranberries songs on her stratocaster and sounds amazing
get your kid into music when they're young
btw, are you an mtg player? I thought your discord theme stuff looked familiar
I love the cards for how they look but I don't play
lol you sound like deccer 😄
You play mtg @astral hinge ?
maybe I need to change it so I'm not mispresenting myself now
yeah
nah it's fine. keep it if you like it
is mtg pay 2 win?
it depends
if you only play with friends and they don't mind proxies (cards that aren't official prints, i.e. ones you printed yourself) then it's very cheap
you can also play magic online for free with programs like Cockatrice
but if you want to play with "real" cards, it's very expensive. not pay to win exactly, but close
you have to pay hundreds of dollars a few times a year if you want to have a competitive standard format deck
if you want a competitive modern or legacy deck, you'll have to pay way more ($500 to $2000+), but you rarely need to update your deck
pauper is a format where only common cards are allowed, so competitive decks are much cheaper
and all of them are free or cheap if you use the options I mentioned above
the most popular official format is Commander, which allows almost all cards, and most people play it casually so you're not strongly incentivized to spend a bunch on powerful cards
it's also designed as a multiplayer format so it's often played in groups of 3-4
great for social gatherings
oh yeah I neglected to mention limited formats
draft is awesome but I don't play it a lot
I just play commander and pauper with my homies
do you play Hearthstone?
I played it a little bit several years ago
I'm not a big fan of it being digital only
I like having physical cards
Its fun just to flip through them
With the nice artwork
yeah
I got a playmat with the art from this card that's signed by the artist
beautiful
I think I'm gonna focus on some other stuff for now and not put a lot more work into the vcc RT stuff atm
we need a :flag_ub: for moments like this
was great but we need more
the complete collection
🇺🇿 dam Uzbekistan is so close
@brisk chasm 
I don't think that chart is the same as whatever discord uses because 🇽🇰 is here
and that's supposedly deleted
What is bougainville gonna use?
(They will become independent from papua new guinea in 2027)
🇬🇵 GP is taken 
Is it Guadeloupe?
new plan, stage a coup and replace their flag with froge
I don't think I'd know how to do anything if it wasn't for Sascha's vulkan examples tbh
how do mesh shaders work? idk, let me check Sascha, he's got an example
oh
looks like a tesselation shader
sorta
this is sacha's example
it doesn't seem very certain
In late 2019, a non-binding independence referendum was held with 98% voting for independence rather than continued autonomy within Papua New Guinea. As a result, the regional authorities intend to become independent between 2025 and 2027, pending ratification by the Papua New Guinean government. If ratified, the capital may relocate from Buka back to the previous location of Arawa.
yeah that's no an SRGB render
the clear color sascha uses is clearValues[0].color = { { 0.0f, 0.0f, 0.2f, 1.0f } };;
I think that's a much brighter blue than that
oh
that's the color picker from PowerToys btw
yes
sascha's is not
ooh my vulkan guide book has mesh shaders
ah it uses the NV mesh extension
I am not going to use that
funny i was messing with that mesh shader example yesterday
ported it to my toy framework for my students
we only had two hours for me to explain MS, figure out the sample, port it to IMR and also fix some shady parsing errors
(i just use shady to do reflection on the shaders in the framework, shaders are left as glsl)
what class do you teach?
that's a great class
I bet students must look forward to it
this mastering vulkan book is using mesh shaders to render shadow maps to a cubemap
i had a lot of demand, far more than the 12 slots I offered
12 slots is a lot of workload
job security
as far as it's possible to have it as a graduate student, i have it
not a lot of people who do both compiler design and implementation, and also GPU/graphics stuff
what are you going to do after school?
i'd like to stick arround as a post-doc
but i've got a couple of people who reached out with offers
unfortunately not
there are a number of companies with centralia-type situations
most in-house compiler stacks look like that
unfortunate
for the mesh shader I think I will just use a normal graphics pipeline
I'm going to make a helper function make creating graphics pipelines generic since I'll have two now
hrm
I need helper functions for making shaders too, too much boilerplate
I'll probably have a nice mesh shader pipeline thing set up pretty quick and then I'll focus on CPU rasterizing
or well actually I need UI first
UI text and a slider
and buttons
you don't need much, give it a MS stage and don't give it a VS stage
you can add a TS stage too
yes, that's the plan
i ended up doing zero changes to the imr::GraphicsPipeline class since it already took a map from stage to module
oh nice
my current graphics pipeline code is just hard coding a static single pipeline so I will just make some simple changes for the parts that I'll want to pass in, shaders and the pipeline layout
and a pointer to grab the handle
I today caused the worst incident in my company's history. How is everyone else doing
what happened?
I shipped a change that caused a bunch of perfectly aligned dominos to fall
and cause a lot of problems for our customer
that we couldn't fix ourselves
that sucks but doesn't really sound like totally your fault. and even if it was, mistakes happen
and our execs have to fly to the customer's city and meet in person to make up for
damn
I definitely made multiple errors in judgement
live and learn I guess
I definitely learned a lot today
I hope you are doing alright
thank you, I am ok right now, everyone's been nice enough about it and we spent a lot of time talking about circuit breakers and structural changes that should have made this impossible
after we got out of incident
working on rendering games for a living sounds really nice right now
this, there's no such thing as a personal fuckup, only a process issue
if you fucked up well that's on you, but if your mistake actually had serious consequences that's a design failure, people screw up from time to time and every system needs to account for that
so yeah don't feel too bad about it
true
i certainly wouldn't feel bad for the execs 
i'm sure they'll give themselves a big fat bonus to make up for it
guy who makes way more than you do probably had to earn it today 
I took down our production and the production of others
we got it all working
we're good now, except that it happened
10x developer right there
my kid came home from school today, her second week of her senior year telling me she doesn't like her physics AP course because she is the only one in the class who hasn't taken calculus, (she was able to get in because she did really well in AP chem last year).
I asked her if she wanted to make a change and she said "I don't want to give up on something just because it's going to be hard."
it's kind of hard to describe how I feel about seeing your own child become an adult, and to be doing it well? better than I did
idk
back to mesh shader
I wish I could help her but it's not a strength I myself have
I can figure out math as I sort of need to use it
maybe you can ask her for help
she said ok, I just asked her
you I don't call my project or refer to my project as a "game" or as an "engine" anywhere
but when I ask AI about my project it calls it an "engine" or "game engine"
like coderabbit or copilot in edge
I don't use any AI when writing code on any of this
probably because all the other projects that look like yours call themselves an engine or game
it's just a bunch of C code with some vulkan api calls right now
I object to these names
I kind of want to build a game though, I'm trying to stay strong however
it is fun to ask AI what it thinks about my code, it's ridiculous, but a little bit fun
I did that once with rosy and it called a professional production ready game engine lol
it definitely wasn't anything of the sort
of course it doesn't think at all, it's a text generator
so already thinking ahead to my imgui
I'm going to have it be window based
like dearimgui
and I'll allocate bytes to write colors into the window bytes
it'll all be CPU side
so I'm not creating another a giant full swapchain size bitmap, just for the size of the ui window, which has to be specified
and then I'll draw buttons and sliders into that window and handle events over that window based on where it will be written to in screenspace
I'll copy it independently of whatever other thing I'm rendering, CPU raster, GPU Raster, Graphics Pipeline or RT Pipeline
to the draw image
I could allocate subwindows from a subset of the existing window, that'll be interesting, where it gets a rectangle inside a parent window
I won't do anything fancy like that at first
I actually think drag and resize would be easy to add
I'm pretty happy with my render graph, I made my pipeline/layout bind nodes more generic and am establishing a parameter/function pointers type pattern for static/dynamic configuration for a particular node type
it's getting easier to bulid and configure new render graphs, and since they're just a linked list they can update themselves at run time, and change what happens
it's evaluated by a giant switch right now, which seems fine
I should make it a tagged union instead of a fat struct, following what I saw in vcc
could you share a taste of the render graph API when you feel ready?
sure, it's probably not uh very good to someone more familiar with C or C++, but I can share
ok, most of it is still very static, I make it more configurable as I work on it over time https://gist.github.com/btipling/617769bab1d04669bdfcafd1db609f00
void render_gfx(AppContext *actx, Arena *arena) {
if (!arena)
fatal("render_gfx: null arena");
if (!actx)
fatal("render_gfx: null actx");
if (!actx->gctx)
fatal("render_gfx: null gctx");
if (actx->gctx->minimized)
return;
render_node_t *current_node = actx->gctx->render_graph;
do {
} while ((current_node = pump_graph(actx, arena, current_node)));
return;
}
is how I call it
each frame
I'm not sure it's fair to call it a render graph, it's more a render list right now I guess
it's a huge improvement over what was before just a giant monolith function
I have like a vision for how I'll make it better too, because while right now I have each of the different renders entirely isolated, eventually I'll combine them, where some of my render will be CPU rasterized, like the UI, some of it will be graphics pipeline, some of it will be RT
and that'll vary based on what is being rendered, like maybe the pause screen or start screen will be totally different than scene, or inventory, or whatever
maybe a sequence will just be entirely RT
nearly done with the mesh shader pipeline, gotta go exercise for a bit and then will probably finish later
I'm getting deja vu looking at this
a list is a 1-tree which is a kind of graph
If necessary it may grow in complexity but I am just building something that works and is practical I guess
the code looks good btw
Right now it’s just a single triangle in different flavors
Thanks! You know it is working
I really like not having to worry about getting barriers wrong anymore
The barrier is defined where dependency is needed and persists previous state for the next barrier
If I do get it wrong I read the details of the op I am doing
hey I have advanced from 1 triangle
there were a lot of bugs in that mesh graph init, I had copy pasted my RT stuff into it
It actually looks like this
void create_mg_graph(AppContext *actx, Arena *arena) {
if (!actx)
fatal("no actx");
if (!actx->gctx)
fatal("no gctx");
if (!actx->mgctx)
fatal("no mgctx");
actx->gctx->num_render_nodes = 1;
reset_arena(actx->gctx->graph_subarena);
render_node_t *head = init_new_node(actx->gctx->graph_subarena);
render_node_t *current_node = head;
current_node->render_node_type = render_node_type_noop;
current_node = prepare_frame_render_graph(actx, arena, current_node);
current_node = add_render_node(actx,
arena,
current_node,
"begin rendering mesh tasks",
render_node_type_begin_rendering,
(render_node_cfg_t){0});
render_node_cfg_t mg_pipeline_cfg = {0};
mg_pipeline_cfg.pipeline_bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
mg_pipeline_cfg.pipeline_layout = actx->mgctx->vk_mg_pipeline_layout;
mg_pipeline_cfg.pipeline = actx->mgctx->vk_mg_pipeline;
current_node = add_render_node(actx,
arena,
current_node,
"bind mesh pipeline",
render_node_type_bind_pipeline,
mg_pipeline_cfg);
current_node = add_render_node(actx,
arena,
current_node,
"set render viewport",
render_node_type_set_viewport,
(render_node_cfg_t){0});
current_node = add_render_node(actx,
arena,
current_node,
"bind mesh descriptor sets",
render_node_type_bind_descriptor_sets,
mg_pipeline_cfg);
current_node = add_render_node(actx,
arena,
current_node,
"mesh push constant",
render_node_type_push_constants,
mg_pipeline_cfg);
current_node = add_render_node(actx,
arena,
current_node,
"draw mesh tasks",
render_node_type_mesh_tasks,
(render_node_cfg_t){0});
current_node = add_render_node(actx,
arena,
current_node,
"end mesh tasks render",
render_node_type_end_rendering,
(render_node_cfg_t){0});
current_node = present_render_graph(actx, arena, current_node);
actx->gctx->render_graph = head;
}
also I noticed I have like no barriers for my RT so I bet if I turn on sync validation it will yell so I need to fix that tomorrow
I may have to work over the weekend, but I have time I will work on UI
that's probably why I had that UB yesterday
thats how my engine looks like
beautiful flame pictures, but no steering or front wheel : >
and the seat looks like where you would put the meat on a grill
also 🫂 i read what happened 🙂
and what is a ..mg..? besides the obvious german thing without the number
three trongles
now make them into a bigger trongle
mg means mesh graphics Gotta save on those characters
I have a limited budget
ok I got all the triangles a fella could want
time to work on my imgui
goals for this current initial iteration is a window, ASCII text, a button and sliders, and a checkbox
I will divide my UI up into rectangles and only update the rectangles that need to be updated
I should do the same thing with my software raster tbh, I don't need to be rendering it for the whole window, I think I will use it also for HUD stuff
I think I will use RT for the sky, and things in the sky like clouds, and distant terrain
and maybe GI once I figure out how to do GI
I think this going to be a game tbh eventually
I actually don't want to do sponza or bistro or any of that, I do want to work on fancy rendering however
I kinda don’t want to use any images or models
it's a surprising pain in the ass to lead with when putting UI together
I did naive full redraws only until very recently because state tracking gets you in the weeds with lots of annoying bugs
I only switched to minimize the number of calls to text relayout
I see hrm
May rely on a heuristic to exclude obvious not dirty ui and default to redraw
you should wait until you have your full featureset
it was annoying for me, but mildly less annoying because I just had to switch over existing functionality
I've been working all weekend due to the incident, that I caused
so haven't done much
I went through what was effectively deposition about everything that lead up to the incident and all the decisions and conversations
rough
wouldn't be surprised if I ended up without a job tbh
or worse
more time to work on my engine
worse ?
I should probably not go into anymore of it
okay 
don't employers understand that they just paid a bunch of money for training
we'll support you in whatever happens Bjorn
Stubbed out some UI code that doesn't do anything yet, but now just need to have it actually do something:
void render_ui(AppContext *actx, Arena *arena) {
if (!actx)
fatal("no actx");
if (!arena)
fatal("no arena");
if (!actx->uictx)
fatal("no uictx");
begin_ui(actx, arena);
{
// FPS & Performance Information Window
const u32 fps_window = ui_window(actx, arena, "performance");
actx->uictx->windows[fps_window]->pos = (uint2){50, 25};
actx->uictx->windows[fps_window]->width = 100;
actx->uictx->windows[fps_window]->height = 50;
actx->uictx->windows[fps_window]->theme.bg_color = (float4){0.2f, 0.2f, 0.2f, 1.f};
ui_text(actx, arena, fps_window, "fps: %d", actx->app_performance.fps);
}
end_ui(actx, arena);
}
C unity builds are fast af
by this time Rosy was already approaching a 10 second build time, and my first C++ app was taking like much much longer
@broken fog you write C in nvim on macos?
I got lsp working ok
but what I can't figure out is how to go to definitions or find references :<
I can shift+K to see get the little pop over that gives me type defs
and I see errors and can take actions on them
wish I could go from a function call to the function definition though
or to where I declared a variable
I'm sure it's just ignorance on my part
if I could figure that out it would make such a huge difference
oh!
I think I figured it out
nice nm I figured it out :D
you have to define keybinds for that
yeah!
i have leader gd for definition, gR for refs
vim.keymap.set('n', '<leader>ge', vim.diagnostic.open_float, { desc = 'Show error' })
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Previous diagnostic' })
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Next diagnostic' })
vim.keymap.set('n', '<leader>ga', vim.lsp.buf.code_action, { desc = 'Code action' })
vim.keymap.set('n', '<leader>gt', vim.lsp.buf.type_definition, { desc = 'Type definition' })
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition, { desc = 'Go to definition' })
vim.keymap.set('n', '<leader>gD', vim.lsp.buf.declaration, { desc = 'Go to definition' })
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, { desc = 'Go to references' })
vim.keymap.set('n', '<leader>gi', vim.lsp.buf.implementation, { desc = 'Go to implementation' })
vim.keymap.set('n', '<leader>gh', vim.lsp.buf.hover, { desc = 'lsp hover' })
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)
vim.keymap.set('n', ']d', vim.diagnostic.goto_next)
this works!
huh i don't think i got code actions working with clangd, what's your setup?
i need to rework my lsp keybinds tbh they're not super great
especially the definition vs declaration stuff
i think i have em the wrong way round from what i actually want

I'm new to nvim so might be cringe
oh yeah i'm no nvim wizard myself
my config is mostly stolen from a bunch of yt videos/forum posts mashed together and then edited
i spent most of the time on the colorscheme and statusline lol
I mostly don't use it since I apply formatting on save
my status line is just vanilla
yeah i do that too
i mean i have code actions working great on every other language
well at least i know ts, java and rust work
it's just clangd that shows nothing
telescope is great
I think now that I can actually jump to references and definitions my life is finally complete
ye
one thing I still open up vs code for at work is when I want to make big changes to directory structure
just drag stuff around
the one thing i should do is figure out how to add a nicer border to the popup windows for type info and such
also I guess I don't know how to search in just one sub directory
to make them stand out a bit more
that's another thing I'll do in vs code
yea sometimes I can't tell I'm looking at a popup window in nvim
nvim-tree
x/c/p are pretty handy for moving dirs around
ye, it's so good
i need to add a binding to jump directly to it
and back to the last panel
yeah I have "<leader>no" for that
hmm maybe i should add a tabline
vim.keymap.set('n', '<leader>no', ':NvimTreeToggle<CR>', { desc = 'Toggle file explorer' })
vim.keymap.set('n', '<leader>nf', ':NvimTreeFindFileToggle<CR>', { desc = 'Toggle file explorer' })
I actually don't know what the difference is between no and nf
oh I need a "highlight current file in tree" let me see if that's a thing
oh that's what nf does, nm
btw you can map :Telescope lsp_references to open refs in telescope directly instead of opening a buffer
hm so for me vim.lsp.buf.definition works fine for jumping to a function def, but in c it always goes to the declaration (in the header file) instead
otoh vim.lsp.buf.declaration opens a buffer with all declarations (usually both the header and implementation)
wait nvm i am actually retarded
i wasn't loading my lsp keymaps so they were just doing something else

yeah I was really struggling for some reason with all this too for months and I just spent sometime today and figured it out
I don't know why I had so much trouble last time
I had some conflicts with default vim format on save issues with conform that I have a hack for
that's still kinda unresolved
hm wait i must have removed the line at some point cause the telescope thing was working
oh shit
uh mine worked and is now borked for some reason 
just doing :Telescope gives me a Telescope UI for its commands 
ofc it does defs etc as well
yoo that's great
i haven't tried gitsigns stuff with it but i'm sure that's possible too
I guess I don't find anything for "implementations" because that's probably for interfaces and I am writing C
git_diff is nice
ok that's a lot of new key bindings have I to learn
I'll limit to just getting good with these
this is all a huge game changer
implementations will help me with go at work
maybe
ok maybe I have energy to do some ui code
yeah
do you have it working to jump to the actual definition of a function
like instead of the declaration in a header
I think so
hm
for whatever reason vim.lsp.buf.definition and vim.lsp.buf.declaration do the same for me in c
and they both open a new buffer where the same header declaration appears twice
hmm
not the vim.lsp
right that'll jump to the header for me as well
hrmm
I have a unity build
maybe that's why
idk
ohh
I bet it's my compile commands.json
well my definition is in another build so that could be it ye
[
{
"directory": "C:/Users/Bjorn/projects/code/palinode",
"command": "clang -x c -std=c2y -Wall -g -fenable-matrix -I include -I C:/VulkanSDK/1.4.313.2/Include src/main.c -L C:/VulkanSDK/1.4.313.2/Lib -lvulkan-1 -lUser32 -lGdi32",
"file": "src/main.c"
}
]
oh yea how do you deal with that
did you write it by hand
i never managed to get the cmake generated one working
I don't use cmake
yeah i'm using make now
I just use a bat file
time to write a shell script to generate it from my makefile :clueless
I was going to rewrite it in zig but then decided I didn't want to because I was lazy and it wasn't solving a real problem
I just really want to spend 0 time ever worring about a build system
bat files are super easy
and it works idc
if I ever decide to make a linux build I'll write a fish shell script
also shell scripts just dispell the whole magic of build systems
because you have to learn how the cli compiler commands actually work and what the options are
which is all the build systems mostly do
so you spend less time than you would with cmake, because you don't have to learn about a useless cmake feature, and you do learn the actual useful knowledge of how the compiler and linker work
so less time wasted over all and more things actually valuable learned, I spent less time writing my bat file than all the time looking gui things in msbuild or even looking up premake docs
I like premake though
I just don't need anything to generate a vs project, I can just write the bat file
make is actually good
magic single char variables 
anyway my nvim shtuff is now working great, it not jumping to defs in c is probably clangd issue
only thing i need to fix
for some reason when i do telescope lsp refs
it lags for like a second before actually opening
i don't think this happened before
oh and it's only with the keybind
great
oh I learned something about that
I always do <leader>AB <-- two chars
never 1 char
no <leader>A
because I think it doesn't know if a second character is coming
I think that's why it hangs?
ah so in this case i have just gr no leader
I use g for navigating
gg takes me to the top of the file
all my keyboard mappings start with <leader>
I think I have a couple that still start with cntrl
I need to fix those
go to reference etc is navigation imo, that's why i use g-
oh good point
yeah it's waiting for the next key I think
at the beginning of this project, I made two arenas, each 256MB each allocations which is way too much, but you know I haven't had to worry about memory allocation at all even once since
I have two for two different life times
yup
one for application life and one for per frame
that explains why i had it mapped to gR
ahh
but i don't like having to press shift lol
yeah that's like three key strokes
2.5
also regarding my arenas, I have creates this sub arena, so from my main application arena I have chunks of arena that can reset themselves, behave just like a regular arena only they allocated from the original arena
it works great
I love C man
i'm starting to like c as well
it's shrimple
ofc if you want any kind of type safety it's uhh not good
but that's not why i write c
yeah, I actually hate looking up slang types
because it requires a lot of brain usage to understand types
I wish I could just use vcc for everything
I'm not interested in decoding
float _Texture<T, Shape, isArray, isMS, sampleCount, access, isShadow, isCombined, format>.CalculateLevelOfDetailUnclamped(
vector<float, Shape.dimensions> location)
where T : ITexelElement
where Shape : __ITextureShape
where access == 0
where isCombined == 1;
I mean it's not that hard
I just don't want to
yeah msl types can get cumbersome as well
don't think they're quite as bad tho
haven't use slang yet
i wish shading langs would go away tbh
just let me write c on the gpu
or better yet rust 
oh and also why does telescope not keep my keymaps in normal mode 
now i have to figure out how to remap the cursor keys within telescope (i use jkl; instead of hjkl)
weird
I don't even know if I use ; for anything?
it's all muscle memory
; must have some functionality? it's directly under one of the fingers??
oh maybe because of :
yeah, ; does nothing but you do have :
but iirc the reason hjkl are the default cursor keys is they used to be the four keys under your fingers in oldschool terminal keyboards back when vi was written
you know, 50 years ago 
i just find it really awkward to shift my hand one key from its resting position on the home row for cursor movement which i do like 80% of the time
I'm going to set my imgui state to 0 arena memory usage every frame, just any ui state has to be tracked separately hrm
we'll how that goes
man I hope I render at least one pixel tonight
oh I have an idea how to stretch my arena allocation
so if the current allocation is still the most recent allocation from the arena, I can stretch it to grow a **pointer of the same type by more of that type
so I'lll track a stretch ptr
and I'll have to pass that stretch ptr into an arena_stretch function
and if the arena is like yup, that's the tail of the most recent memory allocation it will just stretch that allocation
but you can only do that if that allocation is the current tail, because once other memory has been allocated it's RIP
this works for this UI code though
it's like a nice way to have a little bit of dynamic memory in a function scope thing, I just can't use that arena for anything else while I do that, unless I slice out a subarena with a nice max
I'll just go with it
this is the idea
void *arena_alloc(Arena *arena, size_t size) {
if (!arena)
fatal("attempted to alloc from a null arena");
void *ptr = NULL;
ptr = arena->ptr;
size_t available = arena->end - arena->ptr;
// TODO: grow arena
if (available < size)
fatal("Arena overflow, available: %zu", available);
// Align pointer
arena->ptr = ALIGN_UP_PTR(arena->ptr + size, ARENA_ALIGNMENT);
// Validate pointer alignment
if (arena->ptr > arena->end)
fatal("Arena overflow after alignment, with available space: %zu", available);
void *expected_ptr = ALIGN_DOWN_PTR(arena->ptr, ARENA_ALIGNMENT);
if (arena->ptr != expected_ptr)
fatal("Unexpected new pointer alignment");
arena->stretch_handle = ptr;
return ptr;
}
void *arena_stretch(Arena *arena, char *stretch_handle, size_t size) {
if (stretch_handle != arena->stretch_handle) {
// Can only stretch with the most recently allocated pointer to memory
fatal("tried to stretch with invalid handle");
}
// Reset ptr to previous position. This will allow
// the caller to acquire more memory to grow a list
// for example.
arena->ptr = arena->stretch_handle;
return arena_alloc(arena, size);
}
hrmmmm
no this is weird
I just need a dynamic list
nah this is ok, I'm just going to create a sub arena for this, it's fine if this is criminal
I am not going to bikeshed this
actually it is dumb
nevermind, I will just allocate a max sized list and blow up if I go past it. This is happening per frame and I don't want to a malloc a dynamic list then
nice
now to draw the thing
I haven't figured out the text part yet
this is just to draw anything for a window
ok ok
I didn't get to a pixel
but
I think I figured it out
void render_cr(AppContext *actx, Arena *arena) {
if (!actx)
fatal("null appctx");
if (!actx->crctx)
fatal("null crctx");
if (!arena)
fatal("null arena");
begin_ui(actx, arena);
render_ui(actx, arena);
cr_draw(actx, arena);
end_ui(actx, arena);
}
this is my CPU rasterizer
so the CPU rasterizer will do all its rasterization business
but because it owns the bits
it takes the UI contexts and all its windows and whatever's in there
and knows how to draw them on its bits
the UI context will know how to draw itself to the bits I think, but the CPU raster is like what bits do you need, ok here they are, or something
I think I need the concept of fif for my cpu raster
I was close, I think I will have window pixels tomorrow
the UI context will also get events from user input
hrm, just want basic stuff at first
the cpu raster stuff all ends up on the gpu with all the graphics pipeline and RT stuff all together in one render eventually
and the ui will be fully CPU
huh, why's that?
do raytraced ui 
also ig i'm back to vimshedding some of my keymaps are randomly breaking 
fixed it, apparently a mason update quietly added auto-start lsp which breaks everything 
do people not know not to make breaking changes to the default config when they add a new feature
It kinda will be path traced UI since I am mapping it directly to the screen per pixel just on the CPU side.
Probably would be harder and more work to do it differently
It’s just a first attempt
pixels
that bar on the top left is a little window I defined
tomorrow I'll start figuring out how to render some text into it
with glRasterPos2i ofc 🙂
I have left all of the handmade associated discords I was in.
They are weird personality cults tbh. I just want to program.
Yesterday I improved my nvim tab and split key mappings, my editing is in a really good place now
I can easily switch and move tabs around and open up and jump around splits
welcome back to the bikeshed 🙂
I am glad I gave neovim a try I thought I was done with vim and TUI editors but so much has improved
yeah neovim is great
From the ASO discussion, didn’t want to post it in someone else’s thread
fully customizable in an actual programming language, extremely powerful, thriving plugin ecosystem, no ai bullshit ootb
what more could you want really
and it uses almost no system resources if you have to code on a potato for whatever reason
true gopls however jfc 30GB of ram
settings sync? dotfiles repo, ez settings sync with full version control
does go lsp have a massive skill issue
never written go idk

It has 32GB of ram
what the fuck
Yeah
riir
It’s not neovim though
yeah
It is go pls
Same
while on clion it would eat up 20gb+ every now and then and oom
What’s weird I run gopls on vs code on that same server
Idk
It just kills gopls then
Not vs code
But vs code runs like a client server thing
I blame linux
Or my linux skills
Probably
now i want to try gopls just to see if it ooms
are you working on some huge codebase?
You need a mammoth repo like my job probably
yeah that'll do it
We just have one massive repository
It creates like 29 executables
I did 
monorepos were a mistake
hey at least it's not webshit
some component libs do absolutely cursed shit with ts types
The response was 
to the point where if you make anything bigger than a todo list the ts lsp has a shit and dies every 20 minutes
massive skill issue
and people use those dogshit libs 
i hate webdev
Oh we vendor our dependencies also
So every dependency is checked in
It is massive
chungus repo
i mean
still a gopls skill issue for loading the entire codebase in memory at once
I tried adding the vendor repo to all the ignores
but it's also kind of an edge case
and a cheap boss issue 
yes we work with this chungus repo
no you're not getting more ram
mfw
at my last job we were given 8gb macbook airs 
tbf they were fantastic for most everything, macos is insanely good at swapping
but if you had the misfortune to work on a project that required you to run a bunch of docker containers you were dead
Wow
My work macbook has 64GB of RAM so I just edit on it and rsync
It’s a tiny bit of hassle
fwiw i never once oomd outside of the docker thing
and even then i switched docker desktop to orbstack and it magically cut mem usage by 90%
turns out docker desktop has a major skill issue on macs
so 8gb was kinda enough for web shit
it's still a joke in $current_year though glad they finally went to 16 on the base air lol
I have to build integrations for gitlab enterprise , jira datacenter etc, i will run them in docker
do yourself a favor and install orbstack
idk what kinda black magic they did but it's way more efficient than base docker
by a ridiculous amount
I will look thank you wow
also has a much nicer ui than docker desktop written natively in swift, if you use that
i mostly use cli so idc but it's nice
btw what mac is it
m3?
I have to look
if it's m3 or m4 you have hwrt in that gpu
and effectively 64gb of vram
you know what that means
moana island scene time
We are hiring btw if you want to work insane hours and learn go 
uh no thank you 
i'm game for learning go but i already have insane hours with uni and the occasional freelance gig 
i mean if i had the time and y'all took remote workers from outside the us i would be genuinely interested
but i don't think i'll be out of uni for another uhh
3 years 
Yeah we are all over the world, people work from the UK and India and Argentina
remote
oh hey i'm in argentina
Oh
what company? i might have heard of it
(bet the salaries here are a fraction of the us
)
We don’t have a presence as a company but we have a team working through clarolabs
A few are also in uni
They are great imo
Good team
I work at ConductorOne
huh, never heard of em
probably not mine 
working in uni is common here but people usually do like half the usual courses per semester
i'm trying to speedrun it so i can go study in europe 
Albany, CA? Is this a self-dox?
I haven’t hid anything about me
My name is easily searchable and because I own property so is my address lol
I'm pretty public but I try to avoid revealing my exact location. I have the advantage of living in a city of 6 million
Although one GP member already knows my address 
I don’t care. I am a grain of sand on the beach
It's up to you yeah
I couldn’t hide it if I wanted to
it’s impossible if you own a home
Best you can do is have a very common name
it's jaker isn't it
he is in your walls
Neither of us have one of those lol
This is true
tbh it seems like no big deal?
like idk
my github profile has my name, photo and i'm pretty sure you can find the uni i attend
which has three campus locations around the city
so like, if you wanted to find me off public information on my github you probably could
but why'd you want to do that
huh
I tried searching for me and couldn't find my address like I used to, I guess that service I tried paying for actually works
I gotta read that dodo thing about how to do texts
dodo's text looks great
second result for my name on ddg is a dead linkedin link with my approximate location (section of the city i live in) 
privacy is a lie
(first result is my website, yay)
nice
Yeah I mean I make YT vids so I'm pretty public
But the one thing I try to avoid revealing is my location
More narrowly than "Toronto"
Which doesn't narrow it down much
I've been nuked
I hate when that happens
wow imhex did not want to quit
I had to exit out of like 2 or 3 dialogs
uninstalling lol
I cannot stand applications that won't quit when I want to quit
if I want to save I'll save
I don't like having to deal with a font, I'm just going to make my own characters and sample those
i had the opposite problem
imhex quitting when i didn't want it to
(ie crashing
)
hehe
do you have a better hex editor btw cause i sure don't
I don't need a hex editor

I'm not mr robot
Meanwhile intellij idea just makes sure you want to close it
It already saved your work, it just doesn’t want you leaving
everyone needs a hex editor wdym
for what
I use IJ
hex editing 
There’s a plugin for it
what hex do I edit?
joe
what are you editing with a hex editor?
hexes
I’ve done bytecode engineering at points 
It’s more useful for reading than writing imo but 
maybe imhex is actually useful, but it looks like it takes an upfront fixed cost to learn how to use it for basic tasks
and nothing I want to do is motivating me enough to invest that kind of time
in fact
I rather spend what will probably be a bunch of time now
Hex editor I use (plugin to IJ) is just sorta
click on hex you want to edit, type
pretty intuitive
writing my own character bitmap using 0b notation
because of how unusable imhex looks to me
But yeah I’d say understandable to not want to do hex editing lol
like why
what did you use it for?
just for its own sake because it was cool?
when I was looking at dds headers
I just looked in the debugger
that was way easier
last i used it was to figure out icc profiles
Needed to double check compiler outputs manually, and there were a bunch of characters which don’t display
So displaying them as hex is easiest
imhex is actually super cool
negative
the spec wasn't super helpful
all I need is a debugger
yes until it crashes for the 87th time
mostly I use the Notepad++ hex plugin
Especially since the compiler I was testing, was for a language which has no such thing as a debugger 
i need a good nvim hex plugin or something
but yeah if you ever mess around with designing your own file formats, having a good hex editor is crucial
do you edit hex so much that you need a plugin?
I do have my own file format
the .rsy format
is it a binary format though?
this is a potentially quite bad idea, struct layout depends on your compiler & platform
well I only use one compiler and platform
I was probably also writing test files before making a compiler too actually
which… requires hand writing them 
and I don’t really mind hand writing stuff if it’s simple 
I think the C ABI types are pretty cross platform
They actually aren't
I believe you can also specify the ABI format you want?
yeah
you can force your compiler use remove padding, which is probably the way to go if you write to a file
you are right
idk
not a problem for me I guess
ok I guess imhex would be useful in that case, I agree
yeah you need to be able to confirm the thing being written is what you think it is
well I have also have a binary format, it's just not cross platform compatible
When you want to know exactly what is written
That’s where a hex editor is gold
oh
That and also when you don’t have a higher level tool
an editor written in jblow's language that you need access to compile with no plugin system, ecosystem, lsp support or even autocomplete, that you can fork and edit when needed
:P
I don't like imhex, and printing the bytes of a file in hexidecimal is not exactly hard
maybe I don't have all of the features
(https://github.com/focus-editor/focus, I use it for odin and unironically like it for odin)
maybe I have 0.01% of the features
but maybe that's all I need and I don't have to use someone elses app
if it works, it works
notepad++ hex plugin, is another simpler option
I will take a look, I love notepad++
NP++ is great
not my preference for text editor but it is definitely great
I use my phone for that 
Either that or github on my desktop/laptop
which is the same thing I use on my phone
I use notepad++ like one big list of session persistent buffers
clear it once a month or so, and open so many unrelated things there. having a different app from my regular coding environment helps a lot
oh
I use notepad for that
const u8 p_char_0[] = {
0b00000000,
0b00000000,
0b00000000,
0b01111110,
0b01111110,
0b01100110,
0b01100110,
0b01100110,
0b01100110,
0b01100110,
0b01100110,
0b01111110,
0b01111110,
0b00000000,
0b00000000,
0b00000000,
};
my 0 :/
I have a 1 as well
const u8 p_char_1[] = {
0b00000000,
0b00000000,
0b00000000,
0b00111000,
0b01111000,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b00011000,
0b01111110,
0b00000000,
0b00000000,
0b00000000,
};
now I need to render one of these
I envy that you can find so many fun stuff to work on :P
it's just trying to render text
can't do anything without debug texts
what are you working on?
I think if I wasn't doing graphics programming I think my work stress would probably do me real harm
I sort of have to do this
ooh I miss doing programming for a reason similar to that
lately trying to learn how to do game design by iterating ideas quickly, try to find solutions to issues by game design, abandoning them to try again
this is like my 5th project in a year
I'm doing that too
I think I will stick to this one though
unless it turns out I get access to jai and like it
I hope neither of those two are true 😨
jai?
||jblow's language||
I put myself to NIH because I thought I can overcome game design issues by ignoring them and focusing on technical stuff, leaving them as last resort
so... I finally bit the bullet
relying on someone else's proprietary bikeshed project seems to me like an insane proposition
If he made it open source it would be another story
quickly prototyping ideas I think of, sometimes play them in my head, think what are main gameplay mechanics and what are potential issues. doing that over and over again and making scope smaller each time until I'm satisfied
I watched a q&a about it, it sounded interesting
iirc he'll do that after release, maybe not open source open source but at least source available
like he's building things into the language that I am building myself, like a configurable allocator
if it ever releases
The only language I rely on has an open standard and 3 different good compilers
thats how languages should be
agree
sorry I'm a rustacean
I use a language where the runtime ships with a compiler, and the compiled code can run on just about any runtime, anywhere
even simcards?
But I am actually inclined to agree with this
idk how sim cards exactly work, but I know java card exists :P
well if you remove "card"
you have the language I am talking about 
jababooey
alright, I think I got scaling and character position down
now I just have to make the rest of the alphabet
I'm active in your walls still
But yeah it's the twilight as Americans start to go to sleep and Europeans start to wake up
it's like 10pm on a friday, prime graphics programming time
True
hoi
I'm not at my home though, so no GP for me
traveling is nice
I should be asleep as of at least an hour ago probably
why am I still using this keyboard layout with y and z flipped on my phone 
missing coordinate space transformation
the order
will need tweaking
alright I got the numbers, now I make those work and then I will do the rest
maybe someday I'll do proper glyphs
this reminds me of custom cursor masks from the good old dos era
It's exactly how I initialize a font texture with 0-9 digits for debugging my shaders 
I may dump shaders all together and just write C code that emits spirv
isn't that what vcc does
vcc enables you to write shaders in C and C++ or whatever frontend is supported
I am talking about application runtime generate spirv
No frontend at all and no compile step
Complete one off just for my works on my machine project
Just a minimal IR just for what I need I guess
Not trying to reproduce C
you could use shady directly, use its IR API to build programs
Yes at the very least would be heavily inspired by Shady
I really don’t like slang after writing vcc shaders
I am spoiled now
Just feels bad
Also my project compiles faster
Maybe a compile options skill issue
Slang’s compiler has a lot of them
I don’t want to bother gob with all the dumb shit I want to do that vcc doesn’t support yet and would require me quitting my full time job and making compiler dev my complete focus to learn how to do in a way that aligns with the projects broad goals to do myself or create a fork or whatever
sounds like an absolute nightmare 
but also fun if you want to go there
fwiw it's probably great for vcc to get issues from actual users
I also at the same time really enjoyed learning about SPIRV
Also how from scratch is my project if I am relying on a shader compiler
I should write my on C compiler
create my on OS 
build my own hardware
mine my own rare earth minerals
I mean I have to find a place on the spectrum from 0 to just use a game engine, and right now it's like "what can I feasibly do myself within the time I have"
and if I can't do it myself just don't do it?
maybe there's a least works on my machine effort once I get to the point where I'm like fuck I need texture compression
I'm just going to solve problems I actually have, and not build a generic thing that doesn't help unblock what I need right now
