The Still New What Did You Last Do Thread

If it's not ZDoom, it goes here.

Re: The Still New What Did You Last Do Thread

Postby Graf Zahl » Tue Nov 02, 2021 4:40 pm

Still sounds better than these awful render pass objects. I never understood what their purpose was aside from making everything more complicated.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: The Still New What Did You Last Do Thread

Postby dpJudas » Tue Nov 02, 2021 4:51 pm

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: The Still New What Did You Last Do Thread

Postby InsanityBringer » Tue Nov 02, 2021 5:00 pm

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.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: The Still New What Did You Last Do Thread

Postby dpJudas » Tue Nov 02, 2021 5:29 pm

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: The Still New What Did You Last Do Thread

Postby Graf Zahl » Wed Nov 03, 2021 12:31 am

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: The Still New What Did You Last Do Thread

Postby InsanityBringer » Wed Nov 03, 2021 1:30 pm

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...
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: The Still New What Did You Last Do Thread

Postby dpJudas » Wed Nov 03, 2021 2:08 pm

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...

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.

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.
dpJudas
 
 
 
Joined: 28 May 2016

Re: The Still New What Did You Last Do Thread

Postby Enjay » Mon Nov 08, 2021 2:08 pm

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
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: The Still New What Did You Last Do Thread

Postby Captain J » Sat Nov 13, 2021 8:53 am


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.
User avatar
Captain J
That's Amoreee
 
 
 
Joined: 02 Oct 2012
Location: A Year old Pizza Box
Discord: DiscussJ#3128

Re: The Still New What Did You Last Do Thread

Postby InsanityBringer » Wed Nov 24, 2021 12:47 pm

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.
User avatar
InsanityBringer
 
Joined: 05 Jul 2007
Location: opening the forbidden box
Discord: InsanityBringer#9908

Re: The Still New What Did You Last Do Thread

Postby Nash » Fri Dec 03, 2021 7:20 pm



Remember that mod Grezzo? Today I learned people are paying 12 grand for its sequel. Strange world we live in. :)
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: The Still New What Did You Last Do Thread

Postby Gez » Sat Dec 04, 2021 3:30 am

I can't tell if "advennture" is an accidental or a deliberate typo.
Gez
 
 
 
Joined: 06 Jul 2007

Re: The Still New What Did You Last Do Thread

Postby Captain J » Sat Dec 04, 2021 7:51 am

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.
Spoiler: "also"
User avatar
Captain J
That's Amoreee
 
 
 
Joined: 02 Oct 2012
Location: A Year old Pizza Box
Discord: DiscussJ#3128

Re: The Still New What Did You Last Do Thread

Postby yum13241 » Tue Dec 07, 2021 2:49 am

Trying to make a weapons mod that isn't a pile of nothing.
yum13241
 
Joined: 10 May 2021
Discord: yum13241#8226
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Previous

Return to Off-Topic

Who is online

Users browsing this forum: No registered users and 0 guests