The Still New What Did You Last Do Thread
-
- Lead GZDoom+Raze Developer
- Posts: 49177
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: The Still New What Did You Last Do Thread
Still sounds better than these awful render pass objects. I never understood what their purpose was aside from making everything more complicated.
-
-
- Posts: 3130
- Joined: Sat May 28, 2016 1:01 pm
Re: The Still New What Did You Last Do Thread
Oh I agree. What annoys me is how I basically have to read their extension discussion/proposal to figure out what the thing is doing. Reason being that once something ends up in the spec it becomes completely unreadable as the text is scattered into 4 different sections and mixed in with every other struct or extension related to the same area of vulkan.
-
- Posts: 3391
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: The Still New What Did You Last Do Thread
All I know about render passes is that they came at the insistence of mobile tiler GPUs. I suppose it speaks to the super low level nature of the API that you have to explicitly optimize things yourself for tilers, but tilers always struck me as black magic. Normal GPUs are already enough, but tilers always seem to have a huge amount of rituals and things you can't do versus normal GPUs lest you want your program to run at 3 FPS.
Granted, I also recall AMD insisting that render pass objects would give them opportunities to optimize things better, but that must have never came to pass if they're busy contributing to an extension that outright bypasses this part of the API.
Granted, I also recall AMD insisting that render pass objects would give them opportunities to optimize things better, but that must have never came to pass if they're busy contributing to an extension that outright bypasses this part of the API.
-
-
- Posts: 3130
- Joined: Sat May 28, 2016 1:01 pm
Re: The Still New What Did You Last Do Thread
The way tilers work (which are all modern GPUs) is that they split the entire frame buffer into tiles. Let's say they are 64x64. For 1920x1080 that then gives you a grid of 30x17 tiles. When rasterizing the GPU first sorts the triangles into buckets for each tile based on whether the triangle covers it or not. Then each tile renders the triangles in the bucket for the tile. Because a tile only covers a small area it can keep the frame buffer pixels in chip local memory for each tile. This kind of memory is extremely fast.
Now, once it is done rendering the frame buffer pixels are still in the chip memory. If the frame buffer is to be read by anything else (present on screen, used as input for a sampler, etc.) it will have to write out the tile from chip memory to the main GPU memory where the actual frame buffer was allocated. This is expensive, especially for mobile GPUs.
Loading from the actual frame buffer is also expensive. If you can tell the tile it starts out with a cleared value, then it can skip the load and replace it with a memset of its chip local memory.
And last if it knows you are going to read 1:1 in deferred shading passes it can avoid storing the frame buffer data entirely as it will be the same tile reading from itself.
The render passes (now the flags you provide to vkCmdBeginRendering for each attachment) is how you hint to the tilers how it should load or store the tile frame buffer data. If you tell it DONT_CARE to load, then it won't do the load step. If you DONT_CARE for the store then it won't store. Mix all this together and you can avoid ever storing the gbuffers for a deferred renderer in the main GPU memory. This is where the performance gains are huge for mobile GPU's in particular.
Now, once it is done rendering the frame buffer pixels are still in the chip memory. If the frame buffer is to be read by anything else (present on screen, used as input for a sampler, etc.) it will have to write out the tile from chip memory to the main GPU memory where the actual frame buffer was allocated. This is expensive, especially for mobile GPUs.
Loading from the actual frame buffer is also expensive. If you can tell the tile it starts out with a cleared value, then it can skip the load and replace it with a memset of its chip local memory.
And last if it knows you are going to read 1:1 in deferred shading passes it can avoid storing the frame buffer data entirely as it will be the same tile reading from itself.
The render passes (now the flags you provide to vkCmdBeginRendering for each attachment) is how you hint to the tilers how it should load or store the tile frame buffer data. If you tell it DONT_CARE to load, then it won't do the load step. If you DONT_CARE for the store then it won't store. Mix all this together and you can avoid ever storing the gbuffers for a deferred renderer in the main GPU memory. This is where the performance gains are huge for mobile GPU's in particular.
-
- Lead GZDoom+Raze Developer
- Posts: 49177
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: The Still New What Did You Last Do Thread
dpJudas wrote:Oh I agree. What annoys me is how I basically have to read their extension discussion/proposal to figure out what the thing is doing. Reason being that once something ends up in the spec it becomes completely unreadable as the text is scattered into 4 different sections and mixed in with every other struct or extension related to the same area of vulkan.
OpenGL had the same problem. The spec was an unreadable disaster, and the way the extensions were written didn't make it easy understanding them either.
-
- Posts: 3391
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: The Still New What Did You Last Do Thread
This description of tilers is very helpful for understanding the decisions to include a structure to communicate the overall structure of rendering, thank you. Though it still leaves questions about why this design was picked in the first place..
At the moment I'm patiently waiting for updates to my drivers, volk, the sdk, and so on as I'd really like to be able to start using this with my test program, since I think I can dramatically simplify my code with it. The need for driver updates is a big pain, though, especially since anyone relying on Windows Update tend to get ancient drivers without newer extensions, as I found out the hard way...
At the moment I'm patiently waiting for updates to my drivers, volk, the sdk, and so on as I'd really like to be able to start using this with my test program, since I think I can dramatically simplify my code with it. The need for driver updates is a big pain, though, especially since anyone relying on Windows Update tend to get ancient drivers without newer extensions, as I found out the hard way...
-
-
- Posts: 3130
- Joined: Sat May 28, 2016 1:01 pm
Re: The Still New What Did You Last Do Thread
I believe the thought was that if you describe the entire render pass, including all the sub passes (draw scene to gbuffers, convert gbuffers to a color buffer, tonemap it) then the driver would be able to figure out exactly how long it could keep the frame buffer data in chip memory.InsanityBringer wrote:This description of tilers is very helpful for understanding the decisions to include a structure to communicate the overall structure of rendering, thank you. Though it still leaves questions about why this design was picked in the first place...
See it an overreaction to the OpenGL alternative where hint/usage flags was very difficult to understand. You had to follow some rules not particular well described for OpenGL and if you made the tiniest of mistake you lost a lot of performance. The new extension is a middle ground where you still inform it what kind of attachments the pipeline will get and if it should load/store the frame buffer when beginning/ending the render pass.
-
-
- Posts: 26558
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: The Still New What Did You Last Do Thread
Just played through Kava - a single player add on for Red Faction.
If you have Red Faction, then it's worth giving it a spin. It makes some mistakes IMO (like too many "what am I meant to do now" moments and several fights that flood you with enemies in a way that the original game didn't) but it is a very decent mod.
Nexus mods: https://www.nexusmods.com/redfaction/mods/14
ModDB: https://www.moddb.com/addons/kava-a-red-faction-prequel
Required the Dash Faction Engine to play (worth getting if you have Red Faction anyway): https://www.factionfiles.com/ff.php?action=file&id=5569
If you have Red Faction, then it's worth giving it a spin. It makes some mistakes IMO (like too many "what am I meant to do now" moments and several fights that flood you with enemies in a way that the original game didn't) but it is a very decent mod.
Nexus mods: https://www.nexusmods.com/redfaction/mods/14
ModDB: https://www.moddb.com/addons/kava-a-red-faction-prequel
Required the Dash Faction Engine to play (worth getting if you have Red Faction anyway): https://www.factionfiles.com/ff.php?action=file&id=5569
-
-
- Posts: 16891
- Joined: Tue Oct 02, 2012 2:20 am
- Location: An ancient Escape Shuttle(No longer active here anymore)
Re: The Still New What Did You Last Do Thread
Probably would look awesome in GZDoom engine or i'm saying this all over again
EDIT:
Made more anim.
Last edited by Captain J on Fri Dec 03, 2021 8:08 am, edited 2 times in total.
-
- Posts: 3391
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: The Still New What Did You Last Do Thread
In the intervening time since the extension was made official, Khronos has released a blog post talking a little about the new dynamic rendering extension, and the task list mentions that AMD has drivers available with the extension. Volk also supports it now, but the SDK doesn't, but I think I'm going to go ahead and start making my test program use it. A shame I have to do this after implementing classes designed to make making renderpasses less annoying, but I can't complain. I just wish they reached these conclusions in, I don't know, 2016 or something, rather than the latter end of 2021.
-
-
- Posts: 17462
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
-
-
- Posts: 17932
- Joined: Fri Jul 06, 2007 3:22 pm
Re: The Still New What Did You Last Do Thread
I can't tell if "advennture" is an accidental or a deliberate typo.
-
-
- Posts: 16891
- Joined: Tue Oct 02, 2012 2:20 am
- Location: An ancient Escape Shuttle(No longer active here anymore)
Re: The Still New What Did You Last Do Thread
Aaaaand it just gave me a flashback of drspam presenting his masterpiece and would mention both grezzo and buddhism for some reason.
Certainly that was an episode that made me feel smart as a minor at the time.
Certainly that was an episode that made me feel smart as a minor at the time.
Spoiler: also
-
- Posts: 853
- Joined: Mon May 10, 2021 8:08 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): EndeavorOS (basically Arch)
- Graphics Processor: Intel with Vulkan/Metal Support
Re: The Still New What Did You Last Do Thread
Trying to make a weapons mod that isn't a pile of nothing.
-
-
- Posts: 26558
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: The Still New What Did You Last Do Thread
Received one of those spam messages on my 'phone that read "hot single women in [insert name of village here] are waiting to meet you".
The thing is, I live in a village with 36 houses. I know everyone who lives here - regardless of whether they are hot, single or women. So it comes down to a possible list of one or two people - and they already know me (and the fact that I am married)!
Do you think that the spam may just be auto-generated?
The thing is, I live in a village with 36 houses. I know everyone who lives here - regardless of whether they are hot, single or women. So it comes down to a possible list of one or two people - and they already know me (and the fact that I am married)!
Do you think that the spam may just be auto-generated?