libnx 1.4.0 and a huge surprise!

Latest devkitPro news and announcements
Post Reply
User avatar
( ͡° ͜ʖ ͡°)
Posts: 92
Joined: Mon Jul 12, 2010 9:45 pm
Location: Seville, Spain

libnx 1.4.0 and a huge surprise!

Post by fincs » Sun Sep 09, 2018 9:06 pm

devkitPro is proud to announce our strongest yet update to the Switch homebrew tools and libraries:
  • libnx 1.4.0 is now available via pacman. Use sudo (dkp-)pacman -Syu to update or sudo (dkp-)pacman -S libnx to install.
  • The initial version of the mesa/nouveau port for Switch is now available! With this, we now provide support for OpenGL 4.3 (Core Profile), which means Switch homebrew can now take advantage of the GPU for graphics rendering. OpenGL ES 2.x and 3.x are also additionally available. You can use sudo (dkp-)pacman -S switch-mesa to install this package. Please note that this is the first (beta) release and there might be issues. Please don't hesitate to come visit us at #switchdev @ EFnet if you find anything not working as it should.
  • switch-examples were updated with brand new OpenGL examples. An audren example, as well as a sharedfont example have also been added. Use (dkp-)pacman -Syu to update or sudo (dkp-)pacman -S switch-examples to install.
  • Finally, several portlibs were added that make it easier to use the new OpenGL support: switch-glm, switch-glad. These are required for building the OpenGL examples mentioned above.
libnx 1.4.0

  • Added support for C11 threads, which are preemptively multitasked and load balanced across cores.
  • Added Event object, which wraps kernel revent/wevent handles with optional autoclear.
  • Changed CondVar interface to have the mutex be passed to condvarWait* instead of condvarInit, which is consistent with both the concept of a condition variable and with other common threading APIs.
  • Added armGetSystemTick (which supersedes svcGetSystemTick), and armGetSystemTickFreq.
  • Added rwlockInit.
  • Added kernelAbove600.
  • Added system calls: svcGetThreadCoreMask, svcSetThreadCoreMask.
  • Added MOD0 header to binaries compiled with libnx.
  • Fixed semaphoreTryWait.
  • Fixed a memory leak in tmemCreate.
  • Added bpc service (used for rebooting and shutting down the console).
  • Added psm service (needed to get the battery status).
  • Added ns commands: nsListApplicationRecord, nsListApplicationContentMetaStatus.
  • Minor enhancements to applet service:
    • Added missing AppletType_SystemApplet initialization in applet code.
    • Added appletBeginBlockingHomeButton and appletEndBlockingHomeButton.
  • The Event object is now used to return system events from service wrappers when possible, also providing the correct autoclear mode.
  • Corrected fsOpenFileSystem and fsOpenFileSystemWithId.
  • Corrected a bug in hidInitializeVibrationDevices.
  • Corrected a bug in socket error conversion.
  • Fixed nifm not initializing properly for < 3.0.0.
  • Service manager (sm) session now closes properly.
  • hid, irs, vi and nv services now acquire a reference to applet services.
  • Added audren:u service wrapper (presently requiring 3.0.0+, will be addressed in a future update).
  • Added AudioDriver wrapper around audren, providing a higher level interface that can be used to mix and play sounds.
  • Major rewrite and refactoring work in the gfx wrapper which brings reliability and usability improvements:
    • Removed GfxMode_TiledSingle mode due to it causing problems and potential (temporary) hardware damage.
    • The default transform behavior no longer vertically flips the framebuffer.
    • Removed gfxSetDrawFlip since it's no longer needed thanks to the change in the default transform behavior.
    • It is not necessary to call gfxWaitForVsync in most situations because gfxSwapBuffers already implicitly synchronizes with the display (this is mandated by the Android surface compositor and buffer producer system).
    • Dequeue fatal errors should be solved.
    • Simplified and streamlined logic.
    • nvgfx stripped down to the minimum that is actually necessary to allocate framebuffers.
    • Binder logic now more closely matches both Android code and official software.
    • Proper fence and event wait code is now used.
  • Console code no longer performs a forced flush/swap/vblank wait when printing a newline due to performance reasons. Users of the console device must make sure that gfxFlushBuffers and
  • gfxSwapBuffers are periodically called, preferably in the main loop of the application.
  • Added experimental wrapper objects for the Nvidia driver, needed in order to use the GPU. These wrappers are still in RE phase and will be subject to change in a future release.
  • Major redesign of the VI service wrapper that allows future users to use VI directly to create a display layer.
  • Binder services & buffer producer wrappers were enhanced and redesigned.
    • Binder now holds less state and always uses the VI binder relay service session.
    • Added Module_LibnxBinder error codes.
    • IGraphicBufferProducer binder service wrappers now have the bq prefix and explicitly accept a Binder object.
    • Added bqCancelBuffer.
    • bqGraphicBufferInit was renamed to bqSetPreallocatedBuffer.
  • Enhancements and additions to nvidia ioctl wrappers.
  • Added definitions for some more Android enumerations.
  • The ALIGN macro was removed in favor of the C11/C++11 alignas attribute.
  • Further improvements to overall system stability and other minor adjustments to enhance the user experience.

This release wouldn't have been possible without the sterling work done in the past by Armada to build and port mesa and libdrm_nouveau to the Switch, and for giving extremely valuable insight on the workings of mesa, nouveau and OpenGL.

Last but not least, a special mention to plutoo for starting the libnx GPU refactoring work and for his work on reverse engineering the Maxwell GPU used by the Switch; as well as to Subv for also working on Maxwell reverse engineering, debugging and giving advice.
Donate to devkitPro - help us stay alive!

Posts: 1
Joined: Mon Sep 10, 2018 1:35 pm

Re: libnx 1.4.0 and a huge surprise!

Post by Hamcha » Mon Sep 10, 2018 1:38 pm

Wow! I've been waiting for GPU support and I can't believe it's finally here! Amazing work as always from everyone!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests