#Fwog and co.

1 messages Β· Page 9 of 1

long robin
golden schooner
#

xD

#

hologram sun

long robin
#

wait, there's more

golden schooner
#

oops

final cove
#

how will teardown ever recover

long robin
#

photo mode has some weird interactions

golden schooner
#

mayhaps tinkered together and not properly tested?

shell inlet
#

temporal motion blur

long robin
#

yeah it stops accumulating whenever the camera is moving

#

holding middle click (the button to change camera roll) will turn off temporal effects too

shell inlet
#

pretty fun way to do it tbh

#

most people do it as a post process

#

but here it's the ground truth

#

makes sense, since you want quality for photo mode

#

would have been possible to do it stochastically with ray tracing imo

long robin
shell inlet
#

so that there's noise instead of whole frames

long robin
#

not photo mode tho

shell inlet
#

this is ray traced right?

#

marched but whatever

long robin
#

kinda

shell inlet
#

the primary rays

#

so it should definitely be possible to do stochastic rendering

long robin
#

a box is drawn around each object, then a ray is traced into it

shell inlet
#

rasterization can't do this because it's glued together

long robin
#

well, a ray per rasterized fragment

shell inlet
#

but rt is embarrassingly parallel

long robin
#

ok so teardown apparently does some thing where it launches a new process or re-initializes the graphics context (I'm not even sure) right after loading. tl;dr it kills most debuggers attempting to connect to it at launch time

#

trying to figure out how to overcome this so I can connect nsight to it, as it's currently reporting that the connection was closed upon launch

#

Launch process exited. Searching for attachable child processes...
Searching for attachable processes on localhost:49152-49215...
Searching for attachable processes on localhost:49152-49215...
Failed to connect. The target process may have exited.

shell inlet
#

lmao

#

so the guy is not fine with people looking at his code

long robin
#

everyone in #gaming be saying that he is probably fine with it since he's an indie KEKW

#

anyways, I can already see all the shader sources with renderdoc. I just want to profile

heavy cipher
#

zink plus RGP pls

long robin
#

I want useful-er profiling results

shell inlet
#

btw you leaked your Ip I am now going to ddos localhost

long robin
#

lol I can find all the shaders in the executable if I dump all strings

shell inlet
#

fun fact if you look at a binary generated by godot you can find all the shaders there, and most of them will likely be unused

#

makes one realize that there is little care about storage efficiency in modern age

shell inlet
long robin
#

renderdoc will spill the beans anyways

shell inlet
#

what if teardown will look for processes and kill renderdoc-like ones

#

actually is there a way to tell that some dll was injected into the process?

#

that should be enough

long robin
#

maybe

#

it doesn't kill renderdoc if you use the global hook and then manually connect renderdoc ui to it

shell inlet
#

indiscriminately suiciding on dll injection is going to make the game unstable tho

#

also rip any video capture

long robin
#

yeah it survives injection for sure

#

I think it's just doing something wonky with the process which happens to neuter things that connect at launch time

#

I have to connect uprof after launching the game or it will fail

#

given that nsight tries and fails to find a child process after the main one terminates, idk what is even happening

shell inlet
#

is renderdoc able to show spirv decompiled?

long robin
#

yeah but the decompiled spir-v looks like ass

#

BUT it is enough that you can kinda tell what's happening and even modify+recompile it inside renderdoc

shell inlet
#

well once it's decompiled everything else including what you listed is a bonus

long robin
#

renderdoc is just getting the spir-v and using one of those spir-v libraries from khronos to decompile it

shell inlet
#

a free one

#

well there goes yet another way of obfuscation

long robin
#

heh, at least it won't preserve identifiers and such

#

unless you explicitly compile with debug info

#

ok, I think I haven't tried the classic trick of connecting nsight to steam and capturing its subprocesses

#

let's go

#

idk why I didn't try that sooner. it's my literal job to know how to do that

#

ladies and gentlefrogs, we're in

#

seems like the AO pass is the most expensive, then the reflections, then sunlight and fog

long robin
#

Lol the guy that made the other Teardown teardown is unhinged af. Do not check his Twitter

daring surge
#

*checking his twitter*

long robin
daring surge
#

I see your nitpick and raise you an even harder nitpick. A map that "literally stores light/dark values in texels" is not typically called a "shadow map", but a "light map".

A common "shadow map" is a 2D texture that stores depth, and it is queried using a depth compare operation against a known reference level (the pixel depth). For this reason, you cannot bilinearly filter shadow maps, rather, you use a PCF gather which does a compare for every texel and then bilinearly interpolates the result of that comparison.

Another way to look at this is that a 2D shadow map is just a "froxelization" of the world (as in frustum-voxel), with each texel forming a pillar from infinity/far-plane up to the surface.
this seems correct to me?

#

well

#

let me phrase it as, i don't know enough to call it incorrect

long robin
#

yeah, his counter-nitpick seems true, but I still think calling the 3D voxel world a shadow map is completely wrong

daring surge
#

oh, yeah in that sense i don't think it's actually a reason to call it a shadowmap assuming i understand

#

when i went to his twitter i saw a bunch of anti-AI circlejerk

#

which has been semi-funny, semi-sad to me as of recently

long robin
#

the more you scroll the more brain cells you lose

shell inlet
#

ye nitpick is true but he missed the point

#

it's like calling a keyboard a typewriter or something

#

and then defending that they both do similar thing

daring surge
#

yeah i didn't realize what he was calling a shadowmap initially

long robin
shell inlet
#

he's right wing

daring surge
#

?

#

i guess so

rugged notch
#

least unhinged twitter user

golden schooner
#

ignore that person, publish your thing

#

didnt even look at theirs and i wont

#

as i have more trust in one of my favorite amd peeps πŸ™‚

long robin
#

Their post is honestly quite good though

#

Anyways, I'll finish mine for sure. I just want to add profiling data to it since I figured out how to profile it finally ||and to differentiate our posts||

#

I can't work on it tonight since I'm tired af and cooking up a big bowl of mac and cheese before bed

daring surge
#

oh god i scrolled more void

#

this was me last time but instead of diamonds it was brain rot juice

long robin
#

however, the uniform name of its sampler is 🦐ly uVolTex

#

though tbf, other textures are bound to that sampler (such as the small per-object volumes)

#

wtf, the dude who made the other Teardown teardown is perpetuating the myth that it has global illumination

#

I actually think glTextureBarrier is something that Teardown could benefit from to remove this horrendous hacky soft-early-z abomination thing

#

as far as I'm aware, each draw renders to each pixel in its bounding volume exactly once and no more, making it a suitable candidate for a rendering feedback loop

shell inlet
#

it has global direct illumination

long robin
#

why is this

#

I feel like I overuse commas in my writing because I put commas where I would naturally pause in speech

rugged notch
#

yeah commas are hard

#

I tend to overuse them too

long robin
#

what's funny is that in the thing I'm looking at (commas for dummies), the first use case is to put a comma before coordinating conjunctions ("but" being one of them)

#

could this be true?

#

I think tomorrow I'll post the draft of this thing for you guys to read. It'll be missing a few sections, but oh well

shell inlet
#

who else became overly conscious of their grammar after reading this

golden schooner
shell inlet
#

I think pronouns form a new clause though

#

so there are 2 clauses separated by a comma in 1

daring surge
#

yeah i would've been docked in school for not writing a comma before "or"

#

there are also some teachers that would've docked for no oxford comma before the and but obviously that's not universal

long robin
long robin
#

ok I found "why" teardown has RGB16_FLOAT motion vectors

#

honestly quite incredible
outputMotion = vec3(cur.xy / (cur.w*2.0) - old.xy / (old.w*2.0), 0.0);

digital lion
#

it's for marking water areas supposedly

long robin
#

huh, you're right

#

mfw using a 16-bit float to store a boolean value

heavy cipher
#

to prevent cosmic radiation bitflips

digital lion
#

yeah at least put it in A channel of 8-bit normal texture

long robin
#

it seems overkill for everything in the material buffer to be f16

#

emissive, ok, but roughness and metallic surely suffice with 8 bits of precision

heavy cipher
#

seems indeed a bit loose with packing, esp all those wasted bits in A

long robin
#

yeah, I put my notes on that in a "bikeshed" section of my post

#

I'm not sure if it's in bad taste to put that kind of stuff in a frame breakdown, but oh well

heavy cipher
#

just think of this is as the evidence gathering phase for a trial

final cove
#

GP vs. Teardown

long robin
#

I obliterated the quality of the videos in my breakdown to not make this thing 100+ megabytes

golden schooner
#

replace them with dogjiff.gif

#

πŸ˜„

long robin
#

I just realized that, since you guys are my main audience for my posts, I should really amp up the shrimps, clams, and "honestly quite incredible"s in them

#

todo: fill out WIP sections, add table of contents

heavy cipher
#

posting it to pixelduck's linkedin

long robin
#

speaking of whoms't, @valid oriole

valid oriole
#

πŸ‘€

long robin
#

(I am abusing this thread to post non-fwog stuff)

long robin
valid oriole
#

i saw

long robin
#

I guess teardown^4 since that other guy posted it

valid oriole
#

i am currently examining said post

heavy cipher
#

gib clickable images

long robin
#

right click -> open in new tab

#

also only some of them are high res because I didn't actually expect people to want that KEKW

heavy cipher
#

jeebus

long robin
#

it's already 20mb of pics nervous

heavy cipher
#

ok a workaround: if the image you click is low res, resize the browser window when you open the image up

long robin
#

if I make them all HD, the post would be like 200mb

heavy cipher
long robin
#

I guess it's only really a problem with github if individual files are huge

#

ok, I will consider making the pics thiccer

#

another thing on my todo is to fix the gamma for the images in the first half of the post

heavy cipher
#

big smoke WIP

long robin
#

let me know if there are any images in particular that you wish to have a higher resolution

heavy cipher
#

Teardown features exclusively area lights, which is made possible thanks to ray tracing.
be sure to mention big ol' rock as a competitor tech

#

i will also leave helpful comments later btw

long robin
#

I had to think for a bit to understand that reference

#

might be a bit too obscure for the general audience KEKW

heavy cipher
#

. Spending 16 bits to store a boolean value is an interesting choice.
too passive-aggressive

#

say braindead instead, lean on the aggressive

long robin
#

yeah I'll try to frame that differently

heavy cipher
#

proposal: 1 dogjiff per perf warcrime

long robin
#

how about

Since the water flag is a boolean value, it could be allocated elsewhere to save some bandwidth. Maybe another value could be quantized to make room for this bit, but I'll leave determining that value as an exercise for the reader.

#

I tried to stay objective with my analysis of perf warcrimes, so I didn't get into the 8 uniforms + glBindTexture per draw call they are doing, nor the redundant state setting throughout the frame

#

maybe I'll save that for part 2 where I analyze driver overhead

heavy cipher
#

its a short section, no?

uses opengl instead of superior vulkan api, therefore driver overhead

valid oriole
#

driver overhead: yes

long robin
#

gob already told dennis to use vulkan on tw*tter

#

after he asked why you can't make gl calls from multiple threads

heavy cipher
#

what a wasted opportunity to say "skill issue" and refuse to elaborate

shell inlet
#

I would have pretended that teardown teardown didn't exist

#

instead of shouting it out and posting a slowpoke image

long robin
#

I don't mind giving the other one exposure

shell inlet
#

implies looking down

final cove
#

I instantly like it by virtue of the fact you don't :^)

long robin
#

my intent wasn't to look down at the other one

#

tbh I think it's better than mine in a number of ways

final cove
#

in all seriousness, from an """academic""" sense it seems most honest to cite prior work

heavy cipher
#

you could also say that the other one is rushed

final cove
#

esp. if you're aware of it

long robin
#

and if I'm going to post this on reddit (where the other one was already posted), then it would be weird if I didn't acknowledge the other one at all

#

I guess I could acknowledge it in a non-memey way, but that would be boring

final cove
#

its not formally academic, there's no rule you can't make it memey

#

although strictly speaking I think there's no rule against that in academia either, provided they accept your paper

long robin
#

identifying the audience has been difficult for me

final cove
#

its a technical blogpost in the year 2023, I think memes are fine

#

plus with how fast graphics moves, the technical aspect might age faster than the jokes

shell inlet
#

and jaker was first anyways

final cove
#

yeah I think that changes if you're made aware of something during writing

long robin
#

what does "first" mean in this context?

#

apparently even gob was writing a breakdown of teardown (long ago) and got as far as the post-processing stage

shell inlet
#

ok

#

yall are plagiarists copying gob

#

so why did he stop?

#

did he discover some deeply hidden unsettling thing that's better left undisclosed to the public?

long robin
#

I think he lost motivation or got bored or something

shell inlet
#

classic

#

the dilemma of having any side projects

long robin
#

yup

#

I had "November 2022" at the top of this thing until hours ago

#

I guess this game is popular to cover because it's relatable to indie graphics programmers in certain ways

#

and dennis is an actual person and not some faceless company with a huge team of rendering engineers

shell inlet
#

to me it makes an impression of shadertoy regular making an actual product to sell

long robin
#

claybook gave me that impression too

#

too bad cool graphics doesn't instantly equate to fun gameplay

shell inlet
#

yeah, but game design is also a thing that requires effort and study

final cove
#

makes me think of noita, like how in that one GDC talk he mention he basically screwed around with his falling sand sim for years

long robin
#

yeah that is some cool stuff

final cove
#

you know what they say, if all you have is a hammer everything starts looking like a nail

long robin
#

you can actually make a scuffed sand sim yourself in very few loc

final cove
#

I remember that being an advent of code puzzle at one point

shell inlet
#

would overgrowth be another example or a counterexample

#

they spent ungodly amount of time on tech

#

core mechanics were fun but as a finished product it's meh

long robin
#

it has pretty decent reviews on steam at least

shell inlet
#

they spent so much time on it their rendering became extremely outdated

#

well it has fun mechanics, but there is much more to a game than gameplay

final cove
#

the more I look at examples I like the more I realize there's no substitute to an ungodly number of artist manhours

shell inlet
#

they had so many ideas which they never implemented

#

the campaign ended up being basically

long robin
#

what's the interesting part of the tech?

shell inlet
#

you start at A, see slideshow cutscene, kill guys, next level

long robin
#

oh huh, the source code is on github

final cove
#

their GDC talk on the animation tech is really good

long robin
#

apache license even

final cove
#

idk what else it has to offer technologically, just looking at pictures of it right now it looks like pretty generic phong

long robin
#

those system reqs tho

OS: Windows 7 or later (64-bit)
Processor: Passmark CPU 1000 or better
Memory: 4 GB RAM
Graphics: Passmark GPU 500 or better with OpenGL 3.2 support
Storage: 35 GB available space

final cove
#

I think it was mainly their character animations/physics

shell inlet
#

they morph between poses

#

with spring constraints and physical forces or something like that

#

or it's what it appears to look like

final cove
#

I have a lot of appreciation for stuff like that, which tries to move tedious art-space problems into programmer-space

shell inlet
#

there is physics based combat

#

they probably spent most of their time on the editor and moddability

#

and I think game logic is all mostly hardcoded

#

so it's not even a general purpose engine

#

I haven't looked at the code but it might be hellish which would have caused tech debt issues

#

slowing down development

long robin
shell inlet
#

it started when C++ was bad as hell

heavy cipher
#

the code for their previous game was open sourced

shell inlet
#

compared to current standard

heavy cipher
#

that was... a sight

#

i think the terraria dev trained on it

long robin
#

I actually vaguely remember a post about overgrowth being open-sourced way back

#

except I think I didn't understand how to read code then

long robin
heavy cipher
#

my code is like a temple

shell inlet
heavy cipher
#

and by this i mean the sagrada familia

final cove
shell inlet
#

overgrowth's code looks close to C

long robin
final cove
#

absolute time capsule of a comment

long robin
#

tfw

Oct 5, 2021 @ 8:36am

#

but I agree nonetheless

final cove
#

no way

long robin
#

here's another top-tier comment

could you make more fps boostings? lol

shell inlet
final cove
#

what does this mean

shell inlet
#

lugaru story is not working

#

it's a campaign that remasters previous game of the series

#

in overgrowth

#

honestly I liked it better somehow

#

than overgrowth

golden schooner
#

i like how you explained the very first picture

#

typical for americans i guess

#

like those city shots of very well recognizable cities but just their skyline, when you write "Paris, France" on top of the Paris eiffeltower shot πŸ˜„

here: you see a shotgun
caption: shotgun

daring surge
#

(but I suppose great minds think alike)
what is this

#

hi deccer

#

is the albedo g-buffer NdotL'd or something?

#

actually it might just be a dirt decal or something

#

also, is it possible that he uses this term

raycastShadowVolume
as a "raycast shadow using volume"?

#

not "raycast into the shadow-volume"?

#

overall neat read nice

long robin
long robin
#

Which means they're used for non shadow tracing

golden schooner
long robin
#

Where

heavy cipher
#

thats an ingame text though

#

not jaker's caption

long robin
#

Ah

#

Yeah that's the game KEKW

#

Typical American Dennis

golden schooner
#

πŸ˜›

long robin
#

the seam is a result of the projection not being continuous as the angle changes

long robin
#

Btw @golden schooner I hope you liked the inclusion at the end of my article

#

The schlapp

golden schooner
#

i do indeed

#

made me schmeil when i saw that

long robin
#

In related news, it seems like only martty so far has complained about low res images

#

Therefore it's probably fine

golden schooner
#

i dont mind them

#

maybe the overall size of them within the blog could be bigger

#

given how much empty space you have left and right

#

otherwise even i as an uninitiated was able to somewhat follow the content

long robin
#

I'm not sure how to deal with the margins

#

ATM I think it's okayish

golden schooner
#

i just zoom in the whole website to 200%

long robin
#

But they don't scale with monitor size

#

What resolution is your monitor?

final cove
#

I like the wide margins

#

if that's what you mean

long robin
#

the only potential problem is that they are constant w.r.t. screen size

#

The content is always 800px unless on a small screen

golden schooner
#

1440p

#

it works

final cove
#

can you make it height relative

#

like, width = 1x screen height

#

or 80% screen height

long robin
#

interesting idea

#

I can try that

final cove
#

maybe something that's like min(80% screen height, 100% screen width)

#

to keep the fit on mobile

golden schooner
#

mobile at it again πŸ˜›

long robin
#

Hey, my site works on mobile

long robin
#

I was reading it on mobile this morning trying to figure out the caption thing you were referring to πŸ˜„

golden schooner
#

i apologise for my poor attempt of explaining what i meant

#

did you contact gustaffson yet?

long robin
#

I didn't realize I was supposed to 😳

long robin
#

Yes, but I don't recall there being a definite conclusion or making any promises

golden schooner
#

ye hence me asking whether you did or not πŸ™‚

#

shrimple yay or nay

long robin
#

Would I be asking him for source code access or something

golden schooner
#

not necessarily

long robin
#

Or just sending him my feedback

golden schooner
#

but exchanging thoughts and brainthinks

#

yay or ask him questions primarily, regarding the things which are puzzling you/us/cameup during bikeshedding it

long robin
#

I wish he was on this server, but I also know he would immediately be spammed by everyone here

golden schooner
#

yeah

#

i like the bluenoise favicon.ico

daring surge
#

would he

#

assuming he didn't do like (CREATOR OF TEARDOWN)

#

jasper, suslik, MJP all don't really get spammed

long robin
#

Tru

#

But there are probably like a dozen people here who have things they want to tell Dennis

daring surge
#

shoulda joined sooner so it didn't all pile up dogekek

long robin
#

Gob wants to shill Vulkan to him. Pixelduck and Jasper want source code access for profiling, etc.

#

Literal free labor if you think about it. Maybe he should do it

#

Of course, I have questions for him too KEKW

daring surge
#

you are the traffic πŸ™‚

golden schooner
#

the trafficker rather

long robin
#

Actually, my dad is from California and he never said this KEKW

daring surge
#

"you aren't in traffic, you are traffic"

long robin
#

Makes sense

#

I'm not in danger, I am the danger

golden schooner
#

another dredd quote almost

long robin
long robin
#

hmm what should I call the init function for fwog? πŸ˜„

golden schooner
#

what does the init do?

long robin
#

Fwog::Innitshallah()

golden schooner
#

Fwog::InitAndDrawEverything(makesureToDoItInaPerformantFashion: true)

long robin
rugged notch
#

Fwog::init(), innit();

#

Then you overload operator,

golden schooner
#

Fwog::Initialize()

#

reads like Decepticons::Mobilize()

long robin
#

I also keep thinking about using an object instead of hidden globals, but I think that will just make the API more annoying to use overall

golden schooner
#

oh?

rugged notch
#
{
   //your actual init here
}
golden schooner
#

that looks cursed πŸ˜„

long robin
#

auto ctx = Fwog::Context();

rugged notch
#

As in you have one api that passes context around

golden schooner
#

yeah

rugged notch
#

Then you make an api on top that just globals it

golden schooner
#

which also has the DrawXXX functions innit and all the other lose stuff flying around in Fwog

rugged notch
#

User has the choice

#

But eh maybe thats a bad idea

golden schooner
#

inspired by d3dXX

rugged notch
#

Tbh you're using opengl anyways, globals shouldnt be too bad innit

long robin
#

yeh

golden schooner
#

but you add a little type safety

long robin
#

fwog is kinda "stateless" so it's not the cancer kind of opengl globals

rugged notch
#

In haskell you wouldnt need to pass the context around, you'd just make a monad and:

do
   YourRenderingFunc
   YourOtherFunc
    Etc

froge

long robin
#

but to pretend to be stateless, it needs hidden state. quite the conundrum

#

the conundrummer

rugged notch
#

The do here passes the context around epic style

long robin
#

epic

final cove
#

having a context seems pretty standard for any graphics API ever

rugged notch
#

Bababooey as they say

final cove
#

so doesn't seem like a big deal

long robin
#

just cuz other APIs do it doesn't mean I see a clear reason to do it in mine

golden schooner
#
auto& ctx = Fwog::CreateContext(...);
auto& commutePipeline = ctx.CreateComputePipeline(...);
commutePipeline.BindImage(..., 42);
commutePipeline.DispatchIndirect();
long robin
#

at best, it makes it harder to accidentally call graphics functions

#

and it makes global state management a little easier since it's tied to an object

final cove
#

well you need a state blob, as all graphics APIs do, and having a context means that the user can create more than 1

golden schooner
#

it doesnt have to mean that

long robin
#

it doesn't make sense for there to be multiple contexts for fwog

#

I have no idea how I'd do that anyways since this is GL

golden schooner
#

Fwog::GetContext() could work too

final cove
#

it doesn't have to but its a benefit, and one of the reasons APIs choose this design

#

I thought you could have multiple contexts in GL as well

golden schooner
#

but you might want to create a context for aschleppyncly things, upload geometry/textures/compile shaders

long robin
#

multiple gl contexts is a meme feature

golden schooner
#

just saying

long robin
#

all that stuff requires integration with the OS/windowing system which I don't feel like doing since my perception is that multiple GL contexts offers almost zero benefit

golden schooner
#

::GetContext then πŸ™‚

long robin
#

now what does GetContext do

golden schooner
#

basically a singleton

final cove
#

make a different system for handling interaction with the windowing system

#

FWOG_EXT_Swapchain

long robin
#

bruv momento

long robin
#

what does the singleton do

golden schooner
#

creates the 1 context and returns it, if its created already, returns it

long robin
#

schleppy

final cove
#

if you're 100% confident you will only ever have 1 global state per process, just go with Fwog::Init()

long robin
#

currently, the user is expected to make the context

golden schooner
#

Initialize is fine too

#

does the very same

long robin
#

I wonder how I would design it to support multiple contexts

#

I haven't actually done multi-context gl

golden schooner
#

mayhaps via a dedicated context thing for aschleppyncisms

final cove
#

idk what the point of it is, but if it exists that means people probably use it

golden schooner
#

where you cant do ordinary contextisms, but only things you can or would actually use MT contexts for

long robin
golden schooner
long robin
#

I can just label multiple contexts as a bad feature and go on with my life

final cove
#

multicontext considered harmful

golden schooner
#

dont let derhass hear it

long robin
#

or neure

golden schooner
#

: >

long robin
#

my brainworm isn't deep enough to care about it

golden schooner
#

probably fine

#

otherwise it might be possible to create "a context for MTisms" from the main ctx, and you can only limited things on/with it

final cove
#

yeah, I think the important part is just playing nice with other GL contexts if they exist

long robin
#

remember devsh's multi-context brainworm?

golden schooner
#

yeah, since Fwog more or less hides all glIsms()

final cove
#

don't think I was there for that

golden schooner
long robin
#

he had to call glFlush/glFinish in weird places for things to work

#

I don't want that crap

golden schooner
#

ye

final cove
#

I was thinking more of a situation where you would say, have a GPU-accelerated physics engine that internally uses GL for whatever reason

golden schooner
#

but thats probably also due to mobile-isms

final cove
#

and you wouldn't wanna step on its toes

golden schooner
#

i dont think fwog is there yet πŸ™‚

final cove
#

nah I mean as a user, you have fwog + some random physics engine and they both have separate GL contexts

long robin
golden schooner
#

fair

final cove
#

you wouldn't want them to mess each other up

golden schooner
#

but thats not reading fwog's disclaimer

long robin
#

what physics engine creates a gl context thonk

#

whatever, not my problem

golden schooner
#

debug renderer mayhaps

long robin
#

well you shouldn't be making an app with multiple gl contexts, ever listenyoupieceofshit

final cove
#

I was thinking for doing GPU compute or something, but I guess most actually use cuda or opencl or something

golden schooner
#

valid concern

long robin
#

I imagine the expectation with most reasonable GL libs is that something else will create the context

#

fwog does not create the gl context, so it should play nicely with all the crap that does dumb stuff

golden schooner
#

indeed

#

just the fwog internal state it needs to track its schtuff

long robin
#

in the case where you have some dumb physics library that makes a GL context, you just need to give fwog the gl.h header and let the physics lib do its thing

golden schooner
#

taking otherisms into considerations is probably out of scope anyway, since we assume sane people using fwog know what they are doing and dont mix things

long robin
#

well it isn't too hard to make it compatible with other stuff due to its design

#

I just need a Fwog::InvalidateAssumptions of some sort after external GL calls are made

#

(assumptions = cached pipeline state, etc.)

final cove
#

Fwog::AssBarrier()

golden schooner
#

you could have some function on the main context where you pass in the aschleppynced one, to sync

long robin
#

example?

golden schooner
#

ctx->Synchronize(asyncCtx1); ?

long robin
#

hmmmm

#

methinks I'm going to forget about these asyncschleppyisms entirely for now

#

people who need that can use Fwog 2

#

hmm I wonder if objects can be shared between vulkan contexts

#

er, I mean devices

#

either one I guess πŸ˜„

#

there's not really any point since vulkan supports non-stupid multithreading already

final cove
#

yeah I think so

long robin
#

I remember when I first joined this server, I posted a pic of my friend calling khronos morons for the design of OpenGL

#

then I learned that the design made sense for its time

#

but with experience, I now know that the design is indeed horrible KEKW

golden schooner
#

how did you find the server in the first place?

long robin
#

I think I found it linked on reddit

golden schooner
#

ah

long robin
#

idk where the reddit link is now

#

I couldn't find it last time I checked, maybe they removed it

golden schooner
#

/r/GraphicsProgramming probalby

long robin
#

that's where I checked

golden schooner
#

dragon posted links there

long robin
#

no link in the sidebar :/

golden schooner
#

we dont own that section unfortunately

digital lion
#

My Fwog feature request:

  • add VXGI
    Thanks.
long robin
#

I actually would like to try that technique sometime

#

It wouldn't be part of Fwog though, since it only abstracts the graphics API

digital lion
#

but you also have the RSM stuff

long robin
#

What would be interesting is having a library of reusable effects

digital lion
#

thats examples right

long robin
#

Yeah that's part of the examples

#

VXGI would be made in that fashion

digital lion
#

nice. I am waiting

golden schooner
#

that will be after clustered volume rendering

long robin
#

I knew you were gonna say that when I saw you typing πŸ˜„

golden schooner
#

use the dreddjiff.gif πŸ˜„

golden schooner
#

hmm @long robin

#

i have a silly question πŸ™‚

#

in gpu_driven, when you define the vao

#

you use elaborate formats to describe the attributes... like rg16_unorm for the normals

#

isnt it just shrimple datatypes like byte/float/int etc? and the amount of components

long robin
#

that's just a silly oct-encoded normal

golden schooner
#

ye so GL_FLOAT x 2

long robin
#

it's rg16_unorm

#

which corresponds to two floats in the shader, ye

#

floats in the range [0, 1]

golden schooner
#

ye i can see that its 2

#

yes

#

but glVertexArrayAttribFormat takes GL_RG16_UNORM in as a type?

long robin
#

wut

#

glVertexAttribPointer?

#

oh nvm

#

glVertexAttribFormat(normalLocation, 2, GL_UNSIGNED_SHORT, GL_TRUE, offsetof(Vertex, normal));

golden schooner
#

ye you translate the format into those things, i feel dumb

golden schooner
#

ye im there

long robin
#

line 48 then πŸ˜„

golden schooner
#

yep thats exactly where my cursor is rn

long robin
#

do you understand it now

golden schooner
#

ofc

#

im just an idiot

long robin
#

np, wasn't sure if you were still conchfused

heavy cipher
#

ngl that function is boss, amazing how crufty gl is sometimes

long robin
#

hmm I think line 39 is a bug

#

shouldn't it be glEnableVertexArrayAttrib(vao, desc.binding)

golden schooner
#

in vertexcache still?

long robin
#

ye

golden schooner
#

yes it is

#

but since you described your attributes in the right order in your exshrimples it works by chance

long robin
#

I think the i just happens to work if you supply all of the bindings

#

ye

#

I'm glad I looked at this πŸ˜„

long robin
golden schooner
#

let me PR this

long robin
#

no I'll do it

golden schooner
#

binding is somewhat the wrong word here, its attribute index

long robin
#

oh wait

#

it should be desc.location

golden schooner
#

yes

heavy cipher
#

better

long robin
#

I think line 40 is also fooked

golden schooner
#
...
                    GL.VertexArrayAttribFormat(
                        _id,
                        vertexBinding.Location,
...
heavy cipher
#

and fix 48-50 too then

golden schooner
#

40 looks ok to me

long robin
#

yeh

#

40 is fook

#

48-50 are fook

golden schooner
#

did you merge exshrimples back to main already?

long robin
#

ye

#

I need to delete that branch

golden schooner
#

indeed 40 is fucked, for some reason i kept reading gl...(vao, desc.binding) and didnt see the i inbetween πŸ™‚

long robin
#

yeah i should only be used for getting the createinfo thing

golden schooner
#

ye

long robin
#

it just happens to perfectly line up with desc.location in many situations

golden schooner
#

nobody will ever find out

#

and i like your mekanism more, using Format

long robin
#

you're right. I won't even have to fix it

golden schooner
#

you better fix it

heavy cipher
golden schooner
#

mine looks like

                .AddAttribute(0, DataType.Float, 3, 0)
                .AddAttribute(1, DataType.Float, 2, 12)
                .AddAttribute(2, DataType.Float, 2, 20)
heavy cipher
#

the perfect heist

long robin
#

ok fix pushed

#

I just straight up copied vulkan with my format thing

heavy cipher
#

indeed

long robin
#

feels good, man

golden schooner
#

you are welcome

heavy cipher
#

actually designed instead of bolted on

long robin
#

the original gl one sucks

#

at least VertexAttribFormat and stuff make it easy to translate to vulkan

#

VertexAttribPointer means you have to do this whenever the format or buffer changes (courtesy of dennis)

heavy cipher
#

dennis the menace

long robin
#

old opengl has a way to specify a single value for vertex attribs, for some reason

#

I wonder what that could be useful for

golden schooner
#

its not THAT bad

long robin
golden schooner
#

i like our setup vao and schwitsch vao when necessary more

long robin
#

vao sounds like that nft scam "dao"

golden schooner
#

data access object

heavy cipher
#

its not as bad as drinking rotten acid from a raccoon corpse, but it is not exactly good

long robin
#

I was actually thinking of an analogy using a field of broken glass, but those work too

golden schooner
#

who walks barefoot?

golden schooner
#

hehe

#

fair

long robin
#

ok, I'll let you get back to your pbrisms

golden schooner
#

shit

daring surge
#

the imgui comment had me think, while dennis may not get spammed, ocornut absolutely would LMAO

#

don't think he could join any public discord though

long robin
#

didn't ocornut maintain a discord server at some point, but shut it down because of too much cancer

daring surge
#

yes, but that was another level of bad

#

the problem there was just the CS:GO cheater issues multiplied by 10

long robin
#

lol

#

damn cheaters

long robin
#

I can't decide which header to put the init function in πŸ˜„

#

none of the current ones really make sense for it, so I'll have to make a new one

#

maybe Context.h (inb4 an OS API already uses this)

#

Fwog.h sounds like something that includes all of the headers, like glm.hpp

long robin
#

GL_MAX_PROGRAM_TEXEL_OFFSET
data returns one value, the maximum texel offset allowed in a texture lookup, which must be at least 7.
can't tell if old shit

#

yes it is

#

epic

GL_MAX_UNIFORM_BUFFER_BINDINGS
GL_MAX_COMBINED_UNIFORM_BLOCKS
GL_MAX_VERTEX_UNIFORM_BLOCKS
GL_MAX_FRAGMENT_UNIFORM_BLOCKS
GL_MAX_GEOMETRY_UNIFORM_BLOCKS
GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS
GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS
GL_MAX_COMPUTE_UNIFORM_BLOCKS
#

I'm strategically ignoring a bunch of these to put in my own DeviceLimits struct

#

GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT
data returns a single value, the minimum required alignment for uniform buffer sizes and offset. The initial value is 1. See glUniformBlockBinding.
what does the bold text mean? the value is 256 on my GPU

#

"initial" implies that this value can somehow change at runtime

#

spec says this

The value of UNIFORM_BUFFER_OFFSET_ALIGNMENT is the maximum allowed,
not the minimum

#

but also this

#

wtf does it mean for it to be the "maximum allowed alignment"

#

what a horrible API

heavy cipher
#

Ie you can hardcode 256 alignment and it will work everywhere

long robin
#

is the "the initial value is 1" thing a fluke then

shell inlet
#

what a bad job is to write from specs

#

opengl driver devs must all have ptsd

#

wait... is writing specs even worse?

long robin
#

writing the driver is probably worse because you're dealing with an imprecise spec

heavy cipher
#

You looking at refpages?

#

Do I need to get the stick out

long robin
#

the refpages is where the sus "initial value is 1" thing is

#

it does not appear in the actual spec

shell inlet
#

what are you gonna do with the stick

heavy cipher
#

Make a fire to burn the refpages

shell inlet
#

you know it's socially unacceptable to get your stick out in public

long robin
#

yet another refpages L

#

I wonder how some of these errors happen. Shouldn't the refpages be auto-generated?

heavy cipher
#

seems like they aren't

#

But also unmaintained

#

I submitted a PR a year ago

golden schooner
#

that reminds me of something i wanted to do as well

daring surge
#

did you see this

long robin
#

Lol

golden schooner
#

see

#

dennis is probably very open for feedback and even questions

final cove
#

he who snoozeth loseth

long robin
#

16 bits to store 1 bit that's not used

long robin
#

funny inline location

  struct ContextState
  {
    // a bunch of stuff. seriously, don't worry about it
  }inline * context = nullptr;
heavy cipher
#

now i am worried

long robin
#

hello glGetString, my old enemy

#

good thing unsigned char can alias any type amirite

heavy cipher
#

reinterpret the function pointer of glGetString and plonk a random byte to prevent anyone calling it

long robin
#

apparently both GL_TEXTURE_MAX_ANISOTROPY and GL_MAX_TEXTURE_MAX_ANISOTROPY are a thing

#

ah, they are used in different contexts

#

I love how all enumerators are in the same namespace in gl

golden schooner
#

GL_EXTENSIONS is also funky

#

in legacy gl it gives you all extensions separated by space

#

today you have to use glGetStringi(GL_EXTENSIONS, i)

long robin
#

rate my struct

  struct DeviceFeatures
  {
    bool bindlessTextures{}; // GL_ARB_bindless_texture
  };
heavy cipher
#
struct DeviceFeatures
  {
    bool bindlessTextures : 1{}; // GL_ARB_bindless_texture
  };

pls

#

don't wanna waste the perf

long robin
#

the hidden static state is now hidden global state. much better

#

and now the user can get a vkPhysicalDevice{Properties, Features} struct for context info instead of using those yucky glGets

final cove
#

when is Fwulkan coming out

long robin
#

I don't think I can do better than the existing solutions out there

#

Plus I'm not experienced enough with Vulkan to make a great abstraction

#

That said, using Vulkan more is on my list

#

The other problem with making an abstraction for Vulkan is that there isn't as much low-hanging fruit (mostly just auto filling structs and hiding useless stuff like the allocator parameter)

#

Most things that are helpful when using Vulkan are difficult to implement and infinitely bikesheddable, like automatic barriers or automatic descriptor set creation

final cove
#

yeah and generally the popular wisdom seems to be that you shouldn't even try to do that

#

you'll likely never beat driver implementers at making a fully automated general purpose solution like GL/D3D11

long robin
#

Using OpenGL is nice because you don't have to screw around with API plumbing much. It's just sad that it's super mega crusty, and that's what Fwog is intended to fix

final cove
#

most of the stuff I see in vulkan abstractions/augmentations is stuff like framegraphs to help make explicit resource/sync management less verbose and more flexible

#

I think that could totally have its place in a GL abstraction too though, you can gain a lot of similar benefits from pass reordering and resource aliasing

long robin
#

It makes me sad that all the cool new features are only in the painful APIs

final cove
#

though I'm not sure if aliasing is as easy in GL as vulkan

#

guessing it's most likely not

long robin
#

Resource aliasing is definitely harder in gl

#

You can't access raw memory

#

At best you can use texture views to reinterpret a texture

#

Or suballocate buffers from a larger one (which requires an extra layer of buffer)

#

Resource aliasing seems like a huge brainworm that doesn't give much benefit tbh

#

Maybe it'll save a hundred MBs of VRAM if you have some MS 4k textures that can be reused

final cove
#

yeah thats how I felt initially because I have a pretty simple frame flow, but once you start to notice how many secondary textures you have from various techniques it starts to get more attractive

#

at least to me because its ez pz with vulkan and VMA

long robin
#

byeah

final cove
#

pretty hard to tell without actually measuring it, but I think the real wins probably come from improved cache hit rate moreso than the memory savings

#

but that also helps

long robin
#

if you're big brain in gl, you'd just allocate and delete textures when needed and let the driver alias memory

#

I don't see how aliasing would help anything other than memory consumption

final cove
#

I would assume if you're using the same region of memory more often, it's more likely that some of it would remain in the cache for longer

#

but that's 110% speculative

heavy cipher
#

its all about feeding that wurm

brisk narwhal
#

hi am a vulkan ambassador

#

Use vulkan, kthxbye

long robin
#

I finally found what the water mask in Teardown is used for

#

it's used to modify the t value in TAA

#

it seems kinda like the reactive mask for FSR 2, which is used to indicate un-reprojectable pixels (e.g., like a scrolling texture on an unmoving object)

#

hmm it's actually something else or is it

long robin
#

it's used to influence t in this computation, where minNewColor and maxNewColor are the mins and maxes of the local color in the current frame
oldColor = mix(oldColor, clamp(minNewColor, maxNewColor), t + waterMask);

#

so it seems like it's kinda a mask that tells you how little you can trust an old sample, and since the ocean is dynamic AF you can't trust the old sample at all (no clamp = you trust the old sample completely)

golden schooner
#

makes kinda sense

long robin
#

Fwog::SomeOpenglFunctionsHaveBeenCalledSoInvalidateAnyAssumptionsYouMightHave()

long robin
#

Fwog::ClearCachedState or Fwog::InvalidateCachedState maybe

golden schooner
#

im not a fan of this as free floating function

#

but name wise id go with InvalidateState

long robin
#

it doesn't invalidate all state though frogmas

golden schooner
#

"Cached" implies you are operating on a cache via other function calls

long robin
#

just some of it πŸ˜„

#

that's exactly what's happening

golden schooner
#

you could just invalidate all state tho, the ones you are in active control and reset the others to their defaults (ie could take a capture with nsight and look at all the state which you never touched)

rugged notch
#

fwog::Poop

long robin
#

I cache the last pipeline state (plus a few other bits) for state deduplication

#

but there's other state that shouldn't be touched, like the vao cache, the fbo cache, and the sampler cache

golden schooner
#

ok

#

InvalidatePipelineState

long robin
#

the state deduplication stuff is what I'm worried about since I want to allow a limited amount of fwog + raw gl (for masochists)

rugged notch
#

What would be the benefit of that over fwog/raw opengl

long robin
#

fwog can't do everything, so allowing some raw gl calls would be a sort of escape hatch

#

all the user has to do is tell fwog that they made some calls that changed pipeline state, then fwog can discard any assumptions it made about the current GL state

golden schooner
#

fwog could assume defaults for all state

long robin
#

if fwog can't make any assumptions then you end with a lot of duplicated state calls and it makes everyone unhappy

rugged notch
#

Hmm interesting, so so opengl drivers not have these kinds of caches already?

long robin
#

they probably do, but

  1. we can't trust the driver (opengl moment)
  2. some state calls can add validation overhead regardless
rugged notch
#

Like "oh they're asking for the same thing that's already set, lets do nothing"

#

I see

golden schooner
#

if you cover all of them then they can go into the cache and therefore wont be called πŸ˜‰

rugged notch
#

Whew

long robin
#

and 3. nsight gets cluttered AF when you duplicate state calls

long robin
#

and what does it mean for fwog to assume defaults

golden schooner
#

hang on

brisk narwhal
#

"In God Driver We Trust"

golden schooner
#

hehe

#

when you take a capture with nsight for instance

#

and you go through all the stages

#

you see state set to defaults

#

like here clip_depth_mode

#

oder _clamplicated_read_color

#

etc

#

if you expose them in your create/info structs

#

then you can toss the structs into a cache

#

frog eaters could change their values, most likely wont, some might even relate to FFP or otherwise old crap

#

but they are tracked and therefore can be cached

long robin
#

my cache basically holds a pipeline state struct already

golden schooner
#

and when you ::InvalidateState() you shrimply reset those values back to their "defaults"

long robin
#

so you want the user to be able to choose what state gets invalidated?

#

my idea was to set a shrimple pointer to null

golden schooner
#

when you call InvalidateState the idea is that all those parameters (if different to former default) get defaultified, if they are not different then they dont -> no api calls, but all state is covered and you dont have to expose invalidation in various forms/stages

#

idk if that makes sense the way i wrote it

long robin
#

so you want the user to themselves define what state has changed and put it in this struct?

golden schooner
#

im not exactly sure i follow

long robin
#

I'm not exposing any cache to the user fyi

golden schooner
#

ah

#

yes

long robin
#

this is all internal stuff

golden schooner
#

yes

long robin
#

the only external thing is the InvalidatePipelineStateCache() thingy

golden schooner
#

BindXXXPipeline will call Invaildate...

long robin
#

BindPipeline calls only invalidate the state that is different since the last pipeline was bound

golden schooner
#

exactly

long robin
#

the point is that if external GL calls were made, you can't assume anything, so you invalidate everything (which is exposed via this new function we're talking about)

golden schooner
#

if GL_PIXELSTORE_BLABLA was not changed then you wont be calling glPixelStorei(..., whateverdefaultvalueOrNewValue)

#

exactlyment, invalidate everything

#

with everything i also mean evrything πŸ™‚

long robin
#

that was already the plan 🐸

golden schooner
#

not just the 3 or 6 things fwog is covering/tracking right now

long robin
#

hmm

golden schooner
#

also the things you can find in a nvidia capture (looks like its showing quite a lot of things state wise)

long robin
#

the only things that need to be invalidated are explicitly what Fwog tracks

golden schooner
#

no idea if RGP will also show more things

long robin
#

this is to avoid having bugs where fwog erroneously deduplicates some state

golden schooner
#

if you allow arbitrary glcalls next to fwogisms, then fwog would need to track all state

long robin
heavy cipher
#

a state reset function? Fwog::revolucion()

golden schooner
#

c++ supports unicode, c with the tailthingy πŸ™‚

long robin
#

Fwog::☭()

heavy cipher
#

Γ‡++

long robin
#

honestly

long robin
#

it only needs to invalidate what it tracks for correctness

#

the arbitrary GLisms must assume that fwog has changed everything as well

golden schooner
#

as long as you dont call it "...Cache..."

long robin
#

InvalidatePipelineCash

golden schooner
#

you expose no other "...Cache..."ism in Fwog but that one XD

#

InvalidateJohnnyCash()

long robin
#

I can't think of an accurate name that doesn't use cache tbh

golden schooner
#

InvalidatePipelineState

long robin
#

good enough

brisk narwhal
#

Reset is shorter

golden schooner
#

your mom is shorter

long robin
#

Invalidate is moar descriptive

brisk narwhal
#

true

long robin
golden schooner
#

ResetPipelineState

#

hmm

#

sounds a little missleading

#

but not bad either

#

Fwog::Reset(ResetWhat::All); XD

long robin
#

nah I don't want to make it granular

#

that's more effort for both me and the user

golden schooner
#

ye i was just playing

long robin
#

I did consider it tho

golden schooner
#

mayhaps for things where you dont want to reset everything

#

but maybe just texturebindings/resourcebindings/bufferbindings

#

because you are in between 2 passes of sorts still within the same pipeline

long robin
#

fwog already doesn't deduplicate resource bindings

#

hehe

golden schooner
long robin
#

people shouldn't be binding the same resource in a pass multiple times anyways

golden schooner
#

i was finking about the ZeroThingyBindings() which could have been part of the invalidate/reset thing

#

ye but they might bind a different buffer

#

lets say you have in pass1 bind ubos to. 0, 1, 2... and in pass2 binds a different buffer to 0

#

ah no

#

makes no sense πŸ˜„

#

ignore what i said

long robin
#

the ZeroResourceBindings was just for debugging, but I think it does fit to put in the InvalidatePipelineState function

golden schooner
#

that would mean different shaders, and different shaders are different pipelines again which are covered by the deduplication

#

ZRB clutters the capture quite a bit, but its a useful tool

long robin
#

yeah I have it so that it's disabled in release mode

golden schooner
#

mwa ossi

long robin
#

there's about a thousand ways this can subtly fail so that's going to be fun

#

can't wait

golden schooner
#

hehe i dont think its going to be a probwem tbh

#

only people like martty who try to fuck with you will make a fuss about it

long robin
#

I've had many spoopy subtle bugs with state tracking already

golden schooner
#

and technically, over time fwog could still keep track of the other glisms as part of its state

#

and in the long run it covers all the toggles and bits

#

by exposing that functionality

#

pipelinestate doesnt handle packing/unpacking flags right now for instance

#

but pixelops are more or less covered

long robin
#

I think I can just set the pixel store alignment to 1 and assume it will never change except when the state is invalidated

#

since fwog will never touch it after that

golden schooner
#

ye thats what i meant with assuming defaults too

#

you either set them to a known value you think makes sense or go with the actual default value

#

there is only very few things not covered by fwog, from the looks of it

#

a handful of things from here

#

packing/unpacking flags, and thats it

long robin
golden schooner
#

GL_CLAMP_READ_COLOR where viewport/depthclamp is involved

#

ye derhass mentioned it somewhere as well iirc

#

i assume thats a reply from nicol bolas or him πŸ˜„ or reinhard

long robin
#

stinky image formats

golden schooner
#

ah it is πŸ˜„

long robin
#

I think I won't touch this and let the user deal with it

golden schooner
#

ye

long robin
#

maybe at some point I can add the rowPitch and whatever nonsense to the texture upload struct

golden schooner
#

and the 5 or 6 texture_view_isms can be treated the same or are irrelevant

#

that means fwog covers pretty much everything already

#

just the deduplication might not be perfect yet - i think thats why we are talking about it right now

long robin
#

tru

#

all these little details are annoying

#

I need an implicit-er API 😩

golden schooner
#

we have a few people who can reach into khronos committees, do we not?

#

OpenGL 5.0 FwogGL

long robin
#

yeah let's get @ Thomas to design OpenGL 5.0, the implicitest API 🀰

golden schooner
#

we could rename all the fwog calls to glBeginPipeline() etc πŸ˜›

#

enable it with GL_FWOG_modern_opengl

#

131313

long robin
#

lel

#

imagine being so crazy that you set GL_UNPACK_ROW_LENGTH to something other than 0

golden schooner
#

-1

long robin
#

I like how glPixelStoref exists but all it does is convert the arg to int

golden schooner
#

hehe

long robin
#

looking at the docs for glPixelStore make me feel like I aged 30 years in seconds

golden schooner
#

they really must have smoked moldy mushrooms back when

#

but

#

when i think about glBeginPipeline/glCreatePipeline/etc

#

a lot of the pseudo code exshrimples of things like MDI also do stuff under the hood

#

why not fwog's contribution to the opengl society

#

and turn it into an actual RFC like all the extensions are

long robin
#

hmmst

golden schooner
#

: D

long robin
#

uh except it uses crusty-ass GLisms still

#
    void CreateStatesNV(sizei n, uint *states);
    void DeleteStatesNV(sizei n, const uint *states);
    boolean IsStateNV(uint state);

    void StateCaptureNV(uint state, enum mode);

🀒

golden schooner
#

ye no

#

iirc thats workstation nonsense only as well

long robin
#

opengl just needs a full redesign

#

too much crust

long robin
golden schooner
#

true

long robin
#

you make them by capturing the GL state with those funcs πŸ˜„

golden schooner
#

yeah

#

shame its not in core

long robin
#

even the stuff that makes GL good (like this ext) reeks of GL

golden schooner
#

sometimes glPush/PopAttrib would be nice too

#

glPushAttribs(All); ImGuiDoesItsThing(); glPopAttribs();

#

anyway, ttyl

long robin
#

good t(alk)

#

fwog inches closer to absolute perfection

long robin
#

it's quite unimportant though. I'm just trying to cross stuff off the issues list

heavy cipher
#

well there is always the q of, ye this is weird/shit but is there a driver that likes that path

#

also the question of old windows

#

which had a problem with persistent maps

long robin
#

uh do you mean the one that can trash mapped buffers

#

not necessarily persistent ones btw

heavy cipher
#

they just get migrated

#

I think

long robin
#

I'm not even going to think about it tbh

#

iirc it's just windows xp which no one should be using

#

glUnmapBuffer returns GL_TRUE unless the data store contents have become corrupt during the time the data store was mapped. This can occur for system-specific reasons that affect the availability of graphics memory, such as screen mode changes. In such situations, GL_FALSE is returned and the data store contents are undefined. An application must detect this rare condition and reinitialize the data store.

#

yeah I'm never going to worry about that since it's completely absurd

#

How often does this happen? On Microsoft Windows 5.1 (XP) and below, video memory could get trashed anytime an application didn't have input focus. This is why alt-tabbing away from games takes a long time to recover from; the application/OpenGL has to reload all of this data back to video memory. Fortunately, on Windows 6.0 (Vista) and above, this is fixed; Windows itself manages video memory and will ensure that all video memory is retained. Thus, at least theoretically, this should never be a problem on Vista or above machines.

#

zamn, my zest for vulkan has been reinvigorated for some reason

heavy cipher
#

I can't find a source for my memory fragment

long robin
#

I just assumed we were talking about the same thing

heavy cipher
#

I may have spread fear and misinformation into your heart by careless cerebral query

long robin
#

misinfo (it caused me to google something and find maybe actual info frogapprove)

golden schooner
#

provide facilities to map/unmap and unmap implicitly on buffer destruction

long robin
#

It seems to me like regular (non persistent) buffer mapping is rather useless when you have get/sub data as well as persistent mapping

#

w.r.t. the issue I linked, I don't know exactly what happens under the hood when you map/unmap a persistently-mappable buffer, so maybe I won't bother with the auto mapping thing

final cove
#

that's basically what I do, I only have persistent mapping and unmap on destruction

#

what I also find convenient is having my map() return a uint8_t* by default instead of void*

long robin
#

what made you choose that over void*?

heavy cipher
#

i have std::byte*

#

No need to cast for doing address maf before memcpy

#

and if you do need to, it is the same

long robin
#

Yeah std byte sounds like a natural choice here

#

Taking a byte outta crime, if I may

final cove
#

basically that, not sure what makes std::byte better than uint8_t tho, but maybe that's just ultrabikeshedding

golden schooner
#

when measuring time on the gpu via gpu timers or tracy or whatever else you like using

#

would you just wrap the actual draw calls or the whole pass including binding resources/setting state?

long robin
#

I just wrap whole passes/scopes

#

putting a query on each draw call will generate too much noise

golden schooner
#

right

long robin
#

in all the ex🦐les

golden schooner
#

ye

#

i mean if all you use is glDrawIndexed, then it might get noisy

#

but if all you do is mdi

#

+- the fst draws

long robin
#

and right now I don't have automated timer query placement

golden schooner
#

but i get it

#

yeah

long robin
#

I don't think it's a good idea to automate that anyways

golden schooner
#

i was generally asking

#

indeed

long robin
#

ye, I was just thinking aloud

golden schooner
#

one could automate it the same way push/pop groups are placed, would cover the same scope

long robin
daring surge
#

@long robin just realized that the other teardown teardown guy is in this server PepeLaugh

#

not actually active though

#

#1064092953401905255 message

golden schooner
#

i was also finking about fwog

#

to bring it closer to vulkanisms, would it make sense to also have shader compilation go through a pre/postbuild pipeline via spirv and have fwog consume spirv only

long robin
#

it would make sense, except spirv isn't supported well enough

golden schooner
#

wasnt that one of the major selling points of gl4.8?

#

or because spirv has progressed a lot since that?

long robin
#

last time I tried spirv on AMD, some of my shaders randomly didn't work 😦

#

so I've given up on the concept

golden schooner
#

oi : (

#

what about some glsl->spirv->glsl then

long robin
#

hmm I'm not sure what the benefit is

golden schooner
#

to have post/pre compile pipeline going at least

#

and when you transition to vk, you disable the spirv->glsl part again

long robin
#

I'd have to embed a spirv compiler if I didn't want it to be painful to use

golden schooner
#

i wonder if that could be pulled via cmake, or one assumes vksdk is installed

long robin
#

I've used shaderc with gl for runtime spirv compilation before

golden schooner
#

its just an idea

long robin
#

4.7*

shell inlet
#

4.7?

golden schooner
#

opengl 4.8 added spirv support

#

lol

#

i see whats going on here

#

i meant 4.6

#

damn, OpenFwogL conchfused me