!MjUIxNYXpTUoCYSsUn:haskell-game.dev

Keid

18 Members
Double-A game engine https://keid.haskell-game.dev7 Servers

Load older messages


SenderMessageTime
25 Mar 2024
@ic.rbow:matrix.orgic.rbowIt is possible to keep contents from a previous frames, you just don't use clear/discard flags.08:27:43
@ic.rbow:matrix.orgic.rbowI think with every frame getting updated there should be two renderpasses called with attachments crossed to each other.08:28:54
@tristanc_:matrix.orgtristanCThat looks great, thank you!11:20:31
26 Mar 2024
@tristanc_:matrix.orgtristanC Well, I don't get why dynamap is using Compose instead of the ForwardMsaa render pass. I tried duplicating my fullscreen pipeline but running it with the Offscreen pass results in the display getting stuck (with the following in dmesg: [drm] Resetting rcs0 for preemption time out, [drm] animation-fract[1537234 context reset due to GPU hang, [drm] GPU HANG: ecode 12:1:85dffffb, in animation-fract [1537234]). 01:13:01
@tristanc_:matrix.orgtristanCI must be doing something terribly wrong, and if I comment the following draw call, then the app runs fine (but the screen is dark): https://gitlab.com/TristanCacqueray/animation-fractal/-/blob/wip-postprocess/src/Stage/Fractal/Setup.hs?ref_type=heads#L47001:13:50
@tristanc_:matrix.orgtristanCLooking at this example, it seems like a single Offscreen pass can hold multiple framebuffers, but I'm not sure how to map such code to keid: https://github.com/SaschaWillems/Vulkan/blob/master/examples/bloom/bloom.cpp#L32502:50:49
@ic.rbow:matrix.orgic.rbowIndeed, a shader can write to multiple attachments. This would require a different renderpass to register all the buffers at right places.15:30:02
@tristanc_:matrix.orgtristanCI've reduced my bug to this simple commit that adds a dummy render pass, simply trying to re-render my offscreen texture to a new one. I was expecting this to work, but it get stuck with the same error I had earlier: https://gitlab.com/TristanCacqueray/animation-fractal/-/commit/fb8f6b0b9e705fa2a798327ccbc27f45b68ad1b417:19:54
@ic.rbow:matrix.orgic.rbowSo, using ForwardMsaa, then Offscreen works, but injecting another Offscreen them locks up?19:42:28
@tristanc_:matrix.orgtristanCIt seems like so, not sure what is locked because adding debug print around the new pass are only displayed after the process is unlocked. Though commenting the added triangle draw does fix the locks up.19:47:36
@ic.rbow:matrix.orgic.rbowAny hints from vulkan validators?..19:49:36
@ic.rbow:matrix.orgic.rbow * So, using Offscreen, then ForwardMsaa works, but injecting another Offscreen them locks up?19:49:56
@tristanc_:matrix.orgtristanCI was looking for those, is there a flag/env I need to use to get them?19:50:05
@ic.rbow:matrix.orgic.rbow I launch vk-config and enable it there. 19:50:34
@ic.rbow:matrix.orgic.rbowThere is a way to do it with env vars, but I always forget the details.19:51:32
@tristanc_:matrix.orgtristanCThere is! I got https://paste.debian.net/1312098/19:58:24
@tristanc_:matrix.orgtristanC Alright, using sSamples = Vk.SAMPLE_COUNT_4_BIT for the offscreen settings fixed the issue! 20:02:43
@tristanc_:matrix.orgtristanC These validation errors are so helpful, to get them without vk-config you just need to use: VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation cabal ... 20:04:08
@tristanc_:matrix.orgtristanC That's so cool, I can now tweak the fractal using an extra shader :) Now, onto using a copy of the last texture to smooth the diff... Thanks for the help ic.rbow ! 20:17:30
28 Mar 2024
@tristanc_:matrix.orgtristanC ic.rbow: How are the postprocess constants updated in dynamap? Isn't it missing a call to Vk.cmdPushConstants ? 01:26:10
@tristanc_:matrix.orgtristanCOh well, I was able to add a slider to tweak my post process pipeline using a push constant with https://gitlab.com/TristanCacqueray/animation-fractal/-/commit/8c99919a203cc4991bd84b8932835f81a1d1c253 . I guess keid is missing a wrapper for that call.02:00:05
@ic.rbow:matrix.orgic.rbow
In reply to @tristanc_:matrix.org
ic.rbow: How are the postprocess constants updated in dynamap? Isn't it missing a call to Vk.cmdPushConstants ?
Dynamap's postprocessing uses compile-time specialization. You pass a value when loading the shader and IR compiler strips all the conditionals, making the code branchless.
08:49:35
@ic.rbow:matrix.orgic.rbowThe PushConstants API is tricky. On a first look it is easy-peasy, write a value before draw call and done. However it very limited and breaks down in so many places.08:51:05
@ic.rbow:matrix.orgic.rbowPipelines with different push constant layouts have incompatible bindings according to the validation layers, so you lose the ability to bind top-level sets once per render pass.08:53:44
@ic.rbow:matrix.orgic.rbowFor shader globals you can have a piece of uniform buffer and for draws you'd better stick to instance buffers. Neither of those require writing data every frame.08:56:03
@ic.rbow:matrix.orgic.rbow * For shader globals you can have a piece of uniform buffer and for draws you'd better stick to instance buffers. Neither of those require writing same data every frame just to get it to work.08:56:21
@ic.rbow:matrix.orgic.rbowPush constants could've been useful with dynamic rendering, but its availability is not so great.08:57:21
@ic.rbow:matrix.orgic.rbow * Push constants could've been useful with renderpass-less dynamic rendering, but its availability is not so great.08:57:33
@ic.rbow:matrix.orgic.rbow
In reply to @tristanc_:matrix.org
ic.rbow: How are the postprocess constants updated in dynamap? Isn't it missing a call to Vk.cmdPushConstants ?
* Dynamap's postprocessing uses compile-time specialization. You pass a value when loading the shader and IR compiler strips all the conditionals, making the code branchless. This way you can ship "ubershader" code without incurring its costs of runtime switching.
08:58:35
@tristanc_:matrix.orgtristanC I see, thanks, I miss read constant_id as push_constant. I like them because they feels less magic, but you are right, I should be using an uniform buffer. 12:46:21

There are no newer messages yet.


Back to Room ListRoom Version: 6