Guild icon
DDraceNetwork
Development / developer
Development discussion. Logged to https://ddnet.tw/irclogs/ Connected with DDNet's IRC channel, Matrix room and GitHub repositories — IRC: #ddnet on Quakenet | Matrix: #ddnet-developer:matrix.org GitHub: https://github.com/ddnet
Between 2022-08-04 00:00:00Z and 2022-08-05 00:00:00Z
Avatar
Learn about eBPF, Aya, how Deepfence leverages those technologies to reliably detect real customer security issues
00:07
maybe this interests you
Avatar
@Ryozuki ho lol this is completly new & looks cool
00:59
maybe if I have time I can dive more into kprobes & tracepoints, it'sv very interesting
Avatar
Will aarch64 support on Linux ever be added? 🥺
Avatar
am i missing a library (either wavpack or openssl crypto) for cross compiling?
Avatar
Avatar
Chairn
am i missing a library (either wavpack or openssl crypto) for cross compiling?
https://github.com/def-/ddnet/blob/master/README.md Note that when you build and develop locally, you should ideally use your system's package manager to install the dependencies, instead of relying on ddnet-libs submodule, which does not contain all dependencies anyway (e.g. openssl, vulkan).
04:08
I don't know if this information helps, which was recently added to the readme.
Avatar
i searched of ssl cross build, couldn't find it
04:08
in apt i mean
Avatar
sudo apt install libcurl4-openssl-dev libssl-dev
Avatar
i already have it installed, but it needs windows version of the library
Avatar
sudo apt-get install -y libcurl4-openssl-dev I guess this should be enough
04:10
uh
Avatar
Avatar
Chairn
am i missing a library (either wavpack or openssl crypto) for cross compiling?
why does discord offer a spoiler button but u still cant see the whole text xD, so bad
06:44
ah there are arrows
06:45
ok then its fine
Avatar
Avatar
Chairn
am i missing a library (either wavpack or openssl crypto) for cross compiling?
whats ur OS, ubuntu 18?
06:46
it says u are using gcc 7
Avatar
ubuntu 18.04 yes
Avatar
yeah just dont compile on this machine xD
Avatar
Avatar
Jupstar ✪
why does discord offer a spoiler button but u still cant see the whole text xD, so bad
no spoiler, when text too long it offers to submit as file
06:55
i compiled openssl with mingw, but still doesn't work
Avatar
u wont need to compile ssl
Avatar
i wonder if cmake is not broken for cross compiling
Avatar
are your ddnet-libs up to date?
Avatar
yes they are
Avatar
yeah i assume its just bcs u have an outdated OS and smth is broken with it
06:56
most probably cmake
06:56
just dont waste ur time and dont use this computer to compile xd
Avatar
if you buy me a new one, ok
Avatar
sudo nano /etc/apt/source.list buster -> sid sudo apt update sudo apt dist-upgrade
06:57
ah wait ubuntu, well the ubuntu names xd
Avatar
yeah but no
06:57
not yet
06:58
i still need this computer before i experiment with it
Avatar
dual boot
06:58
or VM
Avatar
no disk space
Avatar
external disk
06:58
an USB stick xD
Avatar
/dev/mapper/xubuntu--vg-root 144G 120G 18G 88% /
Avatar
some minimal OS
06:59
u dont even need anything, can just use a OS without desktop environment xD
Avatar
ah, you commented my pr
07:01
any other return?
Avatar
what return?
Avatar
bad translation i guess
07:02
feedback 🙂
Avatar
i am not against ur pr, just wanted to give a quick solution xd
Avatar
in general, not hiding standard function call is probably better for more profund compiler diagnostics
07:05
i edited my comment, i found the second mem_zero that fails
Avatar
Avatar
Patiga
@Jupstar ✪ could you try out if https://gitlab.com/Patiga/twgpu/-/tree/matrix-optimization increases fps for you over master?
its basically no difference, maybe a few FPS but nothing i can meassure with my eyes... I guess the compiler sees through ur changes ^^
Avatar
actually, it also fails in network_client.cpp
Avatar
ah yeah we mem_zero there too, i remember seeing it
07:06
why does it fail tho?
07:07
i mean which member variable causes it
Avatar
cstaticringbuffer
07:07
hidden in cnetconnection
Avatar
does it also tell why its failing?
07:08
it doesnt have any vtable
Avatar
its neither trivial nor standard_layout with my assert
07:08
it means it has a default constructor that we are overriding
Avatar
ah i isee
Avatar
cstaticringbuffer initialize some pointers
07:09
with mem_zero, it has null pointers
Avatar
yeah i mean for basically all stuff u just need to add parenthesis to have the same effect as mem_zero
Avatar
except in variable declaration where you need {}
Avatar
can u give an example?
Avatar
bcs we provide a custom constructor tho
Avatar
Avatar
Jupstar ✪
can u give an example?
if you do CMyClass MyVar(); it declares a function MyVar taking no parameter and returning an object of CMyclass
Avatar
but u could probs still do m_Snap = decltype(m_Snap)();
07:13
should zero it too
Avatar
yup, based on heinrich comment i will hide all this in mem_zero function
07:13
i was just waiting for more comment 🙂
Avatar
IMHO try to minimize custom constructors anyway 😄
07:14
i mean sometimes they can make sense, not gonna deny
Avatar
im not doing any constructor there
Avatar
but cgameclient has one right?
Avatar
just using default compiler generated
Avatar
yeah ok
Avatar
for once, i'll be on your side to push for c++20 as well 😄
Avatar
i just mean if u donst have custom constructor, i dont see any reason to use CLass()
07:15
instead of mem_zero
Avatar
so that we can also have comparison operator generated by compiler
Avatar
is that so with c++20?
07:15
should surprise me actually
07:18
u for example mean operator== right?
Avatar
Avatar
Jupstar ✪
i just mean if u donst have custom constructor, i dont see any reason to use CLass()
until someone adds a member that changes this, cf recent addition of std::set byt C0d3d3v
Avatar
thats usually a friend operator and not part of the class itself
Avatar
Avatar
Jupstar ✪
u for example mean operator== right?
any operator actually
Avatar
Avatar
Chairn
until someone adds a member that changes this, cf recent addition of std::set byt C0d3d3v
yeah but std::set has no custom constructor either
Avatar
any comparison operator*
Avatar
so u could still do CClass()
Avatar
it does?
07:19
just like any stl member
Avatar
Avatar
Chairn
any comparison operator*
let me find it in the spec, I'm actually surprise if c++20 has that
Avatar
search for space ship operator 😄 <=>
07:20
but you can also use bool operator==(const CClass&) = default;
Avatar
ah but only for classes, but not struct?
Avatar
struct are classes
Avatar
Avatar
Jupstar ✪
yeah but std::set has no custom constructor either
Avatar
mh yeah
07:21
u right
Avatar
all STL classes have default constructor becuase internal working is implementation defined
Avatar
weird that i thought u need a friend operator, maybe im getting old too
Avatar
that's why it crashed on windows and not on linux
07:21
for our specific case dating back from start of june
Avatar
but even if, how does that change that u can just call CClass()? makes zero sense
07:23
CClass has no custom constructor
07:23
so only the custom constructor for std::set is explicitly called
07:23
rest is compiler provided
Avatar
but custom constructor might set up some pointers and internal structs. This all get erased with mem_zero
Avatar
yeah but where did i say smth about mem_zero xD
07:24
m_Snap = decltype(m_Snap)();
07:24
i said, lets minimize custom constructors and rely on the compiler
Avatar
and as i said as well, i don't write any custom constructor in my pr, i only use and trust the compiler to do its job
Avatar
but u do use std::copy and stuff?
07:25
u can copy arrays by just using std::array
07:25
instead of c like arrays
Avatar
well, that's another problem and probably another PR
Avatar
ok, well i dont want to judge on your PR, but if i'd rewrite it, i'd try to get away from c style probably
Avatar
i didn't want to change too much of the code
Avatar
replacing std::array with something self defined that does some checks(which gcc lib probably ships) is easier too 😄
Avatar
i don't think replacing all arrays with std::array is worth it, especially with my PR where copy is also compiler generated (which would also be the case with std::array) (edited)
Avatar
well anyway, i dont see why not using std::copy over mem_copy or whatever we use
07:29
for mem_zero i'd rely on constructor, if u do that its fine i guess
Avatar
std::copy also uses copy constructor if existing
07:31
but in our codebase, it doesn't change anything (for now)
Avatar
i saw u added some
07:32
maybe just typedef if 2 classes use the same internals
Avatar
nah, typedef is error prone once someone changes one of the struct
07:34
that's why sometimes i also added a static_assert
Avatar
add a comment where its used ^^
Avatar
just to be sure if someone changes something 😄
Avatar
c++ new(m_aQueue) std::remove_pointer<decltype(m_aQueue)>::type{}; thats an uff tho
Avatar
will be moved and hidden in mem_zero 😉 (edited)
Avatar
for classes std::array should default initialize
07:38
and std::array also has fill()
07:40
but m_aQueue = {} looks nicer for sure xD
Avatar
but isn't std::array heavier assembly wise?
Avatar
why
07:41
bcs of the c++ is zero abstraction lie?
07:42
zero cost*
07:42
cost abstraction to be precise xd
Avatar
i think it adds a check for operator[]
Avatar
if you dont use functions like at(..) that do boundary checks it should be same
07:43
[] has no extra checks
07:44
at (C++11) access specified element with bounds checking
07:44
operator[] (C++11) access specified element
Avatar
Returns a reference to the element at specified location pos. No bounds checking is performed.
07:45
it duplicates code a lil bit, but i hope -O3 inline most of it
Avatar
tbh if this is what makes our code slow, then we really have the most optimized app ever xD
07:46
i bet there are problems that would easily outshadow almost anything that comes with abstractions
Avatar
probably 🙂
07:47
i just like the attention to details
Avatar
me too
07:48
but i prefer to rely on compiler.. better write an app that works with O3 native lto whatever squeezes the 5 extra fps, than other ways ^^ (edited)
Avatar
@Patiga can i set "real" fullscreen?
07:58
i can force it in KDE, but its only desktop fullscreen
Avatar
Avatar
Jupstar ✪
its basically no difference, maybe a few FPS but nothing i can meassure with my eyes... I guess the compiler sees through ur changes ^^
hm interesting. I also ran the different versions through valgrind and it appears as if my own code makes out only a very small portion of the cpu work. Because of this I'm very confused by the your new cpu bottleneck. maybe the wgpu code does some weird stuff with the scissor things, I don't know
07:59
lemme check
08:00
yes, haven't tried that yet
08:00
does ddnet do that?
Avatar
in fullscreen the GPU overhead defs kicks in
08:01
ddnet basically constant on 10k fps
Avatar
but I don't understand why the bounding box optimization changed the bottleneck at all. According to the profiling I did the impact of my own code is super minimal
Avatar
Avatar
Patiga
does ddnet do that?
ok just checked, KDE's fullscreen is just as fast as using fullscreen inside ddnet directly
08:03
so can just use that ^^
Avatar
Avatar
Patiga
but I don't understand why the bounding box optimization changed the bottleneck at all. According to the profiling I did the impact of my own code is super minimal
well yeah maybe the bounding box thing was less of a problem than u thought
08:04
did you profile in debug mode?
08:04
is there smth like releasewithdebinfo in cargo?
08:04
i can look what it reports for me
08:04
does valgrind work with rust compiled stuff? 😄
08:05
in release mode
Avatar
it contains debug info according to "file",so i guess that should work
Avatar
yeah there is
08:06
I actually have a compile profile for that in twgpu :D
08:06
cargo build --profile=release-with-debug
08:07
hm my messages are kinda out of sync with yours ^^
08:08
thats the callgraph for me
Avatar
yes, seems about right
Avatar
looks like 97% wgpu work to me tho (edited)
08:09
ok 92 xd
08:09
5% are "your" overhead only?
Avatar
ah, one thing could be that I should reduce the amount of set_scissor_rect
08:09
you can rightclick and select a lower threshold than 5% so that you see more elements
08:10
inside of the GpuEnvelopesData::update, its also mostly wgpu
08:10
maybe I should next optimize wgpu thonk
Avatar
yeah i guess wgpu's fault xdd
Avatar
I mean I won't complain on native where we get enough fps anyways, but would be cool for webgl
Avatar
even with mini window i cannot get to 10k fps xdd ddnet does
Avatar
well mini window also only makes it easier for gpu, not cpu, right? ^^
Avatar
yes, i hoped the rendercalls are faster then
08:13
but almost no difference, so 100% cpu bound
Avatar
yeah, but then at least I can happily say that my renderer seems well optimized for you :)
Avatar
i ddnet fullscreen with 800x600 i get more than 11k fps for example
08:13
so gives at least a slight boost
Avatar
maybe I could still look into decreasing the amount of my wgpu calls (yes first thing maybe set_scissor_rect coz I did that a lot for bounding box)
08:15
for example currently I also always set the pipeline in each layer, irregardless of what layer was rendered before
Avatar
worth a try
Avatar
I kinda hoped wgpu would just easily deduplicate those
Avatar
else native vk hehehe
Avatar
heh, I like my portability :p
Avatar
irregardless adverb 1) regardless […] 😄
Avatar
1k lines to draw a triangle xd
Avatar
I'm longing for the day where one can get frame timings so you can do ~60 fps on a 60 fps screen. why is that not a thing?
Avatar
Avatar
Jupstar ✪
1k lines to draw a triangle xd
I wrote something with https://docs.rs/vulkano/latest/vulkano/ once
Avatar
bcs its simply too hard
08:17
to time it perfectly
Avatar
that abstraction made it quite pleasant actually, wrote a ray tracer with it
Avatar
Avatar
Jupstar ✪
to time it perfectly
is there a way to get when the screen refreshes?
Avatar
without the ray tracing extension though, my gpu doesnt support it
Avatar
we need 100% perf, write own driver
Avatar
at 10k fps, you could surely optimize it a little for 60 fps
Avatar
Avatar
heinrich5991
is there a way to get when the screen refreshes?
even then the frames wont look 100% consistent to your eye
Avatar
wdym?
Avatar
if a frame is 1ms slower, the next 1ms faster
08:18
it already looks janky
Avatar
okay, so you could do the following:
Avatar
humans might have bad reflexes
08:19
but we still see stuff like this
Avatar
AMD Ryzen 7000 series to be unveiled this month According to Wccftech, AMD has set the date for hard launch of the new desktop Zen4 CPUs. This is a follow-up to official confirmation to AMD releasing Ryzen 7000 series this quarter. AMD CEO Lisa Su narrowed down the release date during the Q&A session regarding […]
Avatar
I'd like a citation for the 1 ms, if you know one
08:19
10k fps means your frames take 0.1 ms and you have a budget of 16.7 ms
Avatar
5.5ghz
08:19
Rumored
Avatar
that means you could render one frame straight after your old one, then maybe 8 ms before the next frame, 4ms, 2 ms, 1 ms, 0.5 ms, 0.2 ms, 0.1 ms
08:20
this means you only render 8 frames per frame shown
08:20
vs 167 per frame shown
Avatar
Avatar
heinrich5991
10k fps means your frames take 0.1 ms and you have a budget of 16.7 ms
yes, i know what you are about to say, but when do you start your frame, when do u stop it?, even 0.2ms difference might feel weird if u just run it (wihtout vsync) u get partial frames
Avatar
which would be an improvement of like 20x
Avatar
everytime vsync is involved u basically rip
Avatar
you want to have 10k fps to make screen tearing less bad?
Avatar
yes
08:21
thats basically the idea
08:21
u have 10k fps and it looks insanly smooth
08:22
btw, i clamp my fps to 1400 fps
Avatar
isn't there such a thing as triple buffering for that?
Avatar
at around 700 fps i can visually notice a difference
Avatar
it sounds like a really inefficient solution to screen tearing (edited)
08:22
i want one xd
08:22
for 15k fps xd
Avatar
Avatar
heinrich5991
it sounds like a really inefficient solution to screen tearing (edited)
it is indeed
08:23
and yet all solutions to screen tearing that exists, freesync and shit are "syncs" so u get delay
08:23
that u also notice
08:23
even at 240hz
08:23
its not unplayable dont get me wrong
08:23
its just the edge of the sword
Avatar
a delay of 0.1ms should be unnoticeable, right?
08:24
with triple buffering and 10k fps
Avatar
hard to say, i never had a 100k fps yet ^^
Avatar
^^
Avatar
as said i start to notice it under 700 fps for sure
08:24
then it really starts to look laggier
Avatar
but only from screen tearing?
08:24
or also from input delay?
Avatar
yes visually only
08:25
input delay is probs the same
Avatar
so you're noticing that it's less than 700 fps when freesync is enabled?
Avatar
with freesync i notice it even with 10k fps, bcs with freesync it renders the whole screen at once
Avatar
can you explain?
08:26
in theory, it should at most have 0.1 ms delay, right?
08:26
how do displays work? ^^
08:26
they don't refresh everything at once?
Avatar
yes, but it fells slightly delay displays basically update the buffer every 20% of the screen
08:27
smth like that
08:27
so it renders 10% of the screen, gets new data, renders next 10%
Avatar
ah
08:27
so '60 fps' is a simplification
Avatar
smth like that, cannot say ofc, no high refresh rate camera here xD
08:27
yes
08:27
its basically a lie xD
Avatar
I see, then I'll need to rethink it I guess
08:27
^^
08:27
thanks
Avatar
maybe in theory, if the industry would invent smth new u could estimate in what time frame the first 10% of the screen are always output and spam more frames only in this time frame so basically render 10% of the screen on the GPU for +- 0.1ms in the time window the display accepts new input
08:30
but i could not do that in teeworlds, that's smth the driver would need to do
Avatar
Avatar
Jupstar ✪
so it renders 10% of the screen, gets new data, renders next 10%
wtf? I've never heard this?
Avatar
well how else does tearing occur?
Avatar
by just drawing a full frame when its being updated
Avatar
its 2 frames on the same screen
08:31
2 or more
Avatar
it could also occur by getting the whole buffer at a time where the rendering isn't finished
Avatar
do you have a reference for 10% screen rendering?
Avatar
that would break the concept of framebuffers i guess ^^ its not aware what fragments are rendered
08:31
u basically render offscreen GPU wise
08:32
only give the finished frame to the display
Avatar
Avatar
Jupstar ✪
only give the finished frame to the display
I thought that was vsync
Avatar
but the display as said accepts new buffers already, which might get updated then 😄
Avatar
that you only give full frames to the display
Avatar
thats just u wait for the display to finish the full framebuffer
08:32
u dont push new data
08:32
until the display is 100% finished
08:32
u still always push full frames to it
Avatar
Avatar
Jupstar ✪
maybe in theory, if the industry would invent smth new u could estimate in what time frame the first 10% of the screen are always output and spam more frames only in this time frame so basically render 10% of the screen on the GPU for +- 0.1ms in the time window the display accepts new input
^ thus this could theoretically work
08:33
but i also newer made GPU/display hardware to judge about it
Avatar
i searched for 10% screen rendering or "partial screen rendering" and didn't find anything about that
08:35
well its not 10% exactly
08:35
i have no idea how muhc it is
08:35
i bet 240 hz monitors update more often than 60hz
08:36
but in this video u really see how top frames advance first
08:36
before the other ones xd
Avatar
but you have no proof this is not just the screen making this instead of the gpu
08:45
it's probably a way to prevent drawing too much power for the screen to only update part of it sequentially
Avatar
in fact i even claimed this is the screen
08:46
where did i say its the GPU XD
08:46
why should the GPU do weird stuff like this xD
08:47
so basically render 10% of the screen on the GPU
Avatar
yeah thats maybe solution
08:47
u basically do the same the screen does just on the GPU
08:48
so u only need to render frames for a few ms
08:48
and not the whole time
Avatar
Avatar
Yek
Will aarch64 support on Linux ever be added? 🥺
for official ddnet release? do you currently build ddnet yourself?
Avatar
Avatar
deen
for official ddnet release? do you currently build ddnet yourself?
I am the host of some noby's Fng like the ones from brazil or chile, there are higher performance servers but they are with arm processors and ddnet is not compatible (aarch64) So I would like to have a compatibility to be able to provide more consistent fng servers and maybe with ddnet if u want
Avatar
@Learath2 void f(int n, char _[( (n < 0) ? printf("negative!") : (n > 0) ? printf("positive!") : printf("zero!") , 1 )]) { } (edited)
15:59
valid c
Avatar
That's a bizarre use, but yes completely valid :D
Avatar
ddnet editor is still infested with crashes :(
Avatar
it will be, as long as it's going to be poorly supported
16:40
at this point, an external editor would be more useful and beneficial
Avatar
Avatar
Yek
I am the host of some noby's Fng like the ones from brazil or chile, there are higher performance servers but they are with arm processors and ddnet is not compatible (aarch64) So I would like to have a compatibility to be able to provide more consistent fng servers and maybe with ddnet if u want
Just compile it yourself. We already have very few Linux players, not worth it to build arm-specific binaries.
16:48
on these servers, you can follow the instructions from https://github.com/ddnet/ddnet/
DDraceNetwork, a free cooperative platformer game. Contribute to ddnet/ddnet development by creating an account on GitHub.
16:48
There might be some weird corner cases with physics because of floating point differences. I remember we had problems with an x86-based server
Avatar
I will check thx
Avatar
I also thought about using an arm machine for official ddnet servers, if a good offer comes around, might do it
Avatar
Avatar
louis
ddnet editor is still infested with crashes :(
Even on nightly? But yeah its really bad xd
Avatar
Avatar
Cellegen
it will be, as long as it's going to be poorly supported
nah, recently there have been much more
Avatar
Avatar
Jupstar ✪
Even on nightly? But yeah its really bad xd
ill try nightly later ig
Avatar
Avatar
louis
nah, recently there have been much more
So is it finally getting touched? perhaps we can use translations to the editor? Maybe a chance to add description txt files to entities...
Avatar
much more crashes
18:58
not features
18:58
and some features too ig
Avatar
could you bring the old ninja freeze back, at least as an option like cl_old_gun_position?
🙏 2
Avatar
@deen any idea of what i am missing for cross compiling? I cross compiled openssl 1.1.1q that was missing but i still got the same error
21:15
damn
21:15
finally
21:16
so many ppl relied on this crate
21:16
me included
21:16
chrono is one of the most popular date and time libraries for Rust.
Avatar
Avatar
Chairn
@deen any idea of what i am missing for cross compiling? I cross compiled openssl 1.1.1q that was missing but i still got the same error
what error?
Avatar
Avatar
Iza
could you bring the old ninja freeze back, at least as an option like cl_old_gun_position?
@c0d3d3v ^
Avatar
1. Open any map, including an empty one. 2. Select a brush, e.g. size 2x2. 3. Shift click to repeat the brush over a larger area, e.g. 10x10. 4. This causes a buffer-overflow / crash with ASAN: ``` ================================================================= ==4826==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6060000f5040 at pc 0x55db7d0aa743 bp 0x7fffe4e191f0 sp 0x7fffe4e191e0 READ of size 4 at 0x6060000f5040 thread T0 0 0x55db7d0aa742 in CLayerTiles::GetTil...
Avatar
maybe a cmake bug? I haven't seen this when cross-compiling
22:30
The magic scripts that make DDNet run. Contribute to ddnet/ddnet-scripts development by creating an account on GitHub.
Avatar
but do i need openssl or some cross compiled lib as well?
22:31
yes, this is the call to cmake i use: cmake -G Ninja -DDEV=ON -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/mingw64.toolchain ..
Avatar
they should be in ddnet-libs
22:31
try without -DDEV=ON
Avatar
same result 🙂
22:34
hmm, if i comment some lines in CMakeLists it works
22:35
and now obviously, my mingw gcc is too old for mutex 😄
Avatar
b1e4d60 Fix buffer-overflow in editor on shift-clicking brush - Robyt3 cb15d9d Merge #5701 - bors[bot]
Exported 368 message(s)