ProjectPhysX,

I found an interesting optimization for the marching-cubes algorithm today: Since vertex interpolation happens on axis-aligned edges of the unit cube, it's sufficient to interpolate in 1D instead of 3D. The faster interpolation makes the conditions for which edge to interpolate unnecessary, allowing to get rid of the edge table. That brings the implementation down to 73 lines, including the triangle table. 🖖🤠
https://github.com/ProjectPhysX/FluidX3D/commit/649fd40fa6270fbd0823a53b2a55f4194fc9510b#diff-464b1d19d4b616b9609031b48429081b2c215328d9f98bc5cbeac6b2b84fdbf3R456

nickserv,
@nickserv@mastodon.social avatar

@ProjectPhysX Do you have any thoughts on the Snapdragon 855 iGPU in this Chips and Cheese's FluidX3D test? Can you elaborate on the total failure by comparison to Intel?

https://chipsandcheese.com/2024/05/01/inside-the-snapdragon-855s-igpu/

ProjectPhysX,

@nickserv that's a bug in 's runtime: fused-multiply-add (fma) is somehow emulated with terrible performance. This is very similar to what @niconiconi found on Nvidia CMP 170HX, where fma was disabled in the driver.
I've just fixed this in , by macro-replacing fma with a*b+c. Performance went up by 8-13x on my Samsung S9+ (ARM Mali-G72 MP18) with this workaround.
https://github.com/ProjectPhysX/FluidX3D/commit/9ce2caecfc85e4fda50fed3350304b75b223b06b
cc @chipsandcheese

niconiconi,

@ProjectPhysX @nickserv @chipsandcheese Could it be possible that the GPU only supports mad() but not fma()? That may explain the poor-performance emulation by the driver. It's perhaps worth trying to provide three options: unfused, mad, and fma.

ProjectPhysX,

@niconiconi @chipsandcheese @nickserv mad is equally slow as fma 🐌

niconiconi,

@ProjectPhysX @chipsandcheese @nickserv ​:blobcatfacepalm:​

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines