overte icon indicating copy to clipboard operation
overte copied to clipboard

Implement network serializer

Open daleglass opened this issue 2 years ago • 11 comments

This is the last part of the build warnings fix. It deals with the issue of glm classes not being trivially copyable, and therefore not being possible to correctly copy with memcpy.

It also makes the code a bit cleaner, by taking a bunch of fiddly offset-tracking code and moving it into a class.

The code was made with the aim to make it as amenable to inlining as possible.

daleglass avatar Jun 11 '22 18:06 daleglass

Here are some builds you may use for testing:

macOS-10.15, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.dmg

ubuntu-18.04, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.tar.Z
  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.sh
  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.tar.gz

self-hosted_debian-11_aarch64, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.sh
  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.tar.gz
  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.tar.Z

windows-2019, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-6ebed67.exe

AnimatedMannequin avatar Jun 11 '22 21:06 AnimatedMannequin

Here are some builds you may use for testing:

ubuntu-18.04, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.tar.gz
  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.tar.Z
  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.sh

self-hosted_debian-11_aarch64, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.tar.Z
  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.tar.gz
  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.sh

macOS-10.15, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.dmg

windows-2019, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-8b56ee6.exe

AnimatedMannequin avatar Jun 12 '22 01:06 AnimatedMannequin

Here are some builds you may use for testing:

ubuntu-18.04, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.sh
  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.tar.Z
  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.tar.gz

self-hosted_debian-11_aarch64, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.tar.Z
  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.sh
  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.tar.gz

macOS-10.15, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.dmg

windows-2019, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-63914b5.exe

AnimatedMannequin avatar Jun 12 '22 13:06 AnimatedMannequin

Main part is ready for test/review, test still needs updating, which I'll do soon.

daleglass avatar Jun 23 '22 19:06 daleglass

Here are some builds you may use for testing:

macOS-10.15, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-2f831d0.dmg

windows-2019, full

  • https://public.overte.org/build/overte/PR81/Overte-PR81-2f831d0.exe

AnimatedMannequin avatar Jun 24 '22 14:06 AnimatedMannequin

Dug this up, rebased and polished it up. There was an issue with KTX textures I fixed now. At this point, this should work.

This breaks compatibility with the old KTX format, so on first run expect a bunch of warnings about that. That should be fine, it just means the old version cache can't be used, and it'll be fixed by clearing the cache.

daleglass avatar Nov 28 '22 00:11 daleglass

This breaks compatibility with the old KTX format, so on first run expect a bunch of warnings about that. That should be fine, it just means the old version cache can't be used, and it'll be fixed by clearing the cache.

What about pre-baked assets?

JulianGro avatar Nov 28 '22 00:11 JulianGro

What about pre-baked assets?

That's a good point, I'll have to check that out.

daleglass avatar Nov 28 '22 18:11 daleglass

That was indeed a good point. This should be fixed now.

daleglass avatar Dec 02 '22 00:12 daleglass

Okay, this is still not quite right. It works, but something in the output still doesn't line up with how the original was.

daleglass avatar Dec 03 '22 18:12 daleglass

Dev meeting: fixing this could help with GLM issues in #641

daleglass avatar Mar 23 '24 19:03 daleglass

I know everyone is super busy, but since this is blocking the warnings as errors grant work, may I suggest just merging this as is since it works, and we can deal with the unimplemented test at a later time?

HifiExperiments avatar Dec 31 '24 08:12 HifiExperiments

Does it still break compatibility with older baked textures, or was that part resolved?

ksuprynowicz avatar Dec 31 '24 11:12 ksuprynowicz

I tried building and testing it, but it uses older protocol, so I can't test it properly. @daleglass Can you rebase this PR on current master?

ksuprynowicz avatar Dec 31 '24 11:12 ksuprynowicz

The current version hits an assert for me:

[12/31 12:50:11] [FATAL] [default] ASSERT failure in Q_UNREACHABLE(): "Q_UNREACHABLE was reached", file /home/ksuprynowicz/overte/overte/libraries/gpu-gl/src/gpu/gl45/GL45BackendTexture.cpp, line 113

Backtrace:

__pthread_kill_implementation 0x00007ffff049de5c
__pthread_kill_internal 0x00007ffff049debf
__GI_raise 0x00007ffff0449c82
__GI_abort 0x00007ffff04324f0
QMessageLogger::fatal(char const*, ...) const 0x00007ffff60922d1
qt_assert_x(char const*, char const*, char const*, int) 0x00007ffff6091408
gpu::gl45::GL45Backend::syncGPUObject GL45BackendTexture.cpp:113
gpu::gl::GLBackend::setResourceTexture GLBackendPipeline.cpp:304
gpu::gl::GLBackend::bindResourceTexture GLBackendPipeline.cpp:267
gpu::gl::GLBackend::do_setResourceTextureTable GLBackendPipeline.cpp:329
gpu::gl::GLBackend::renderPassDraw GLBackend.cpp:497
gpu::gl::GLBackend::render GLBackend.cpp:569
gpu::Context::executeFrame Context.cpp:146
OpenGLDisplayPlugin::present OpenGLDisplayPlugin.cpp:716
PresentThread::run OpenGLDisplayPlugin.cpp:198
<unknown> 0x00007ffff60de9e1
start_thread 0x00007ffff049c112
__GI___clone3 0x00007ffff051a8f8

ksuprynowicz avatar Dec 31 '24 11:12 ksuprynowicz

@ksuprynowicz ah apologies, there was still one bug leftover. I've rebased this and fixed that here: #1293

and it does maintain compatibility with old baked textures!

HifiExperiments avatar Jan 12 '25 04:01 HifiExperiments