#SPIRV
Explore tagged Tumblr posts
Text
What is SPIR-V? How SYCL Expands C++ Virtual Functions

Discover SPIR-V and how it lets SYCL support heterogeneous C++ virtual functions. This post covers two notions that take SYCL in different directions.
At the 13th IWOCL International Workshop on OpenCL and SYCL, Intel's Alexey Sachiko presented several experimental ideas to expand SYCL's use and scope as a cross-architecture framework for accelerated computing from edge to cloud and AI PC to supercomputer.
Virtual functions are discussed first. SYCL aims to make C++ to multiarchitecture computing a smooth transition. Virtual functions can be redefined in derived classes to offload kernels, so expanding them is consistent.
The second concept is abstraction, although not of base class functions. Increased SPIR-V backend abstraction support will help SYCL's low-level implementation interface with the wide range of hardware architectures and custom accelerators available. The purpose is to improve SYCL LLVM-SPIR-V collaboration.
In many ways, SYCL is becoming more general. SYCL abstraction, from low-level hardware abstraction to C++ virtual function objects, will be discussed as its development continues.
SYCL Virtual Functions
Virtual functions have been used in C++ program development since its inception. Popular backend abstractions like the Kokkos C++ performance portability interface, used in high-speed scientific computing, require it.
Even though the SYCL standard allows one-definition rule (ODR) virtual inheritance, device functions cannot invoke virtual member functions, making code migration difficult.
Alexey begins his talk with a simple base class with a few virtual methods, direct classes with overrides, and offload kernels.
Easy oneAPI kernel property addition for virtual class inheritance.
The experimental indirectly callable function properties from the sycl_ext_oneapi_kernel_properties GitHub sandbox are included first. A function or offload kernel can be identified as a device function and invoked indirectly.
Why do virtual functions need this?
Program objects have virtual class overrides tables. For each virtual function call, a pointer from this table is loaded to call the relevant derived function.
In the Base function, SYCL device code limitations are violated when foo throws an exception and allocates memory.
The indirectly_callable feature makes the virtual function a device function with all its limitations, like the SYCL_EXTERNAL macro.
For the same reason, assume_indirect_calls properties_tag is needed. Kernel virtual calls without this property fail.
Alexey then discusses more advanced topics and future projects like optional kernel feature support and reqd_sub_group_size.
Considering Implementation
When designing an app with this new functionality, consider these high-level factors:
SYCL applications with virtual function support should separate each virtual function set into a device image. If you use optional kernel features, duplicate with empty functions. This provides all link stage symbols without speculative compilation.
For kernel-equipped device images, connect all images with the same virtual function sets.
When targeting SPIR-V, this happens runtime. Otherwise, it happens during build link.
See the for more on technology implementation.
Ext_intel_virtual_functions is in Intel's LLVM GitHub.
Test cases for sycl_ext_oneapi_virtual_functions extension in the same source code tree.
Improve SYCL Code using Virtual Functions
Recent versions of the Intel DPC++ Compatibility Tool 2025.1 and the Intel oneAPI DPC++/C++ Compiler include experimental and evolving virtual function functionality.
SPIR-V Backend SYCL Application
SPIR-V, a binary intermediate language for compute kernels and graphical-shader stages, was specified by the Khronos Group, which regulates SYCL. Its portable format unifies intermediate representation and programming interface for heterogeneous accelerators.
A varied language and API environment supports it
This creates a duality of intermediate abstracted hardware backend representation for C++ compilers based on LLVM and LLVM Intermediate Representation, as with all CLANG project compilers.
The SPIR-V to LLVM Translator provides bidirectional translation, however it is not updated as part of the LLVM project tree, making it prone to rare incompatibilities and disconnects.
To remedy this, Intel's compiler development team recommends SPIR-V as a normal LLVM code generation target, like other hardware target runtimes. Thus, the LLVM project includes an SPIR-V backend to ensure thorough integration testing and allow it to be used with OpenAI Triton backends, graphics-oriented programming models like Vulkan or HLSL, and heterogeneous computing with OpenCL or SYCL.
With extensive documentation, an active and growing LLVM SPIR-V working group supports and maintains the Backend:
SPIR-V Target User Guide
Clang SPIR-V Support
Intel compiler developers help resolve LLVM IR semantics and specifications to SPIR-V mapping difficulties as part of Intel's commitment to the open source community.
In his presentation, Alexey Sachkov details them and Intel's solution.
Is Spir-V?
SPIR-V, a high-level binary intermediate language, defines compute kernels and graphics shaders. It was created by Khronos Group, an OpenGL, Vulkan, and OpenCL organisation.
What that means and why it matters:
IR: GPU assembly language universal. Developers utilise GLSL or HLSL instead of writing shader code for each GPU architecture, which is complicated. Compilers create SPIR-V from this source code.
SPIR-V comes as compiled binary, not source code. This has numerous benefits:
Application startup and shader loading are faster when drivers don't parse and compile text-based shader code.
IP Protection: Shader source code is hidden, making algorithm reverse-engineering harder.
Closer Hardware: SPIR-V's lower-level representation allows more direct control and performance adjustment than high-level languages.
Standard and Portable: Before SPIR-V, each graphics API (like OpenGL or DirectX) handled shaders differently, requiring several compilers and duplication. SPIR-V is a royalty-free, open standard for graphics and computing APIs.
New, low-overhead graphics API Vulkan leverages SPIR-V shaders.
Although optional, OpenGL 4.6 and later support SPIR-V.
OpenCL: GPU/processor parallelism.
In Shader Model 7.0, Microsoft aims to replace DXIL with SPIR-V for Direct3D interoperability. Important for graphics ecosystem unity.
SYCL Code Compilation Target: SPIR-V
The SPIR-V Backend for LLVM is still being developed, however it has been a project target since January 2025. Try it and comment on the LLVM project RFC page.
Use SPIR-V, oneAPI, and SYCL Now
To learn about these and other new features in LLVM-based C++ compilers and toolchains with SYCL support, see the Intel oneAPI DPC++ C++ Compiler and oneAPI Overview landing page.
#SPIRV#VirtualFunctionsinSYCL#SYCL#SYCLCode#LLVM#SPIRVbackend#SPIRVtool#technology#technews#technologynews#news#govindhtech
0 notes
Text
Compilers and IRs: LLVM IR, SPIR-V, and MLIR
https://www.lei.chat/posts/compilers-and-irs-llvm-ir-spirv-and-mlir/ Comments
0 notes
Text
Snes9x apk

SNES9X APK INSTALL
SNES9X APK DRIVERS
SNES9X APK UPDATE
SNES9X APK DRIVER
SNES9X APK ARCHIVE
Readd glFinish option as alternative to glFenceSync. Switch from autotools to Meson build system. Fixed an interaction slowdown with OpenGL and Blargg NTSC filters. Fixed TVMode filter in Direct3D and OpenGL modes. Cleaned up dialog boxes to be more consistently spaced.
SNES9X APK DRIVERS
Moved sound sync to drivers to be more reactive.
SNES9X APK DRIVER
Removed glitch-prone DirectSound audio driver in favor of a generic Wave Out Add support for libretro ".slang" shaders to OpenGL driver. Don't display Joypad 2 pressed keys if disabled. Changed APU clock to reflect nominal values for original hardware. Consistently handle interlacing when we skip frames. Refactored APU output code to buffer less on the client side. Only allow instant IRQ when toggling IRQ. Count clock cycles to synchronize SA1 with S-CPU properly.
SNES9X APK ARCHIVE
This can be done by extracting an archive from to that directory, or by creating a temporary git repository in the extracted Snes9x source by running git init and using the above command. slang support will be disabled unless you download the submodule.
SNES9X APK UPDATE
Git submodule update -init shaders/SPIRV-Cross slang support requires SPIRV-Cross, which is a git submodule of Snes9x.
SNES9X APK INSTALL
Install if you wish: meson install or sudo meson installĪ full list of options is in meson_options.txt.
Change to the build directory and run ninja: cd builddir ninja.
Run meson: meson builddir -prefix=/usr -buildtype=release.
Change to the gtk port directory: cd gtk.
Packagers will need to adapt, but most operating systems already have Meson available and being used in packages. The build system has been switched to Meson. See how2compile.txt in the win32/docs directory for details. More git subprojects have been added, so without git it will be more difficult to compile. XAudio2 is still available and recommended if your system supports it. There are only small differences between the two, but the main one is that WaveOut doesn't loop by default, which means we can use a push API and have Dynamic Rate Control. WaveOut is the most basic Windows method for outputting sound, and has used the same output path as DirectSound since Windows Vista. The DirectSound driver has been glitch-prone for a while, so it has removed and replaced with a WaveOut driver. A large set of shaders can be downloaded from: These can currently only be used with OpenGL on the Windows and GTK versions. The largest change is a refactoring of the sound handling, which means sound should work better than before and consume less CPU time. Fixed sound output that broke with APU refactor. Startup background can be changed in nf. Add the view menu to right-click when SNES mouse isn't used. Allow one key to be bound to many controller buttons on the same controller. Fixed accumulation of partial pixel data on mouse motion when we update the Changed glFenceSync option to an OML_sync option that works better. Added icons to the entries to clear binding assignments. Added option to use the software NTSC filter. Fixed deviation from proper libretro spec. Added ability to use Satellaview data in same directory as ROM. Added a hacks dialog to enable settings for older hacks to run. The automatic frame skip option no longer limits to 59.94Hz. Manager while in windowed or borderless windowed mode. Added a hidden option "DWMSync" that allows OpenGL to sync to the window Changed window flags to allow NVIDIA cards to auto-enable exclusive Fixed MSU1 track restarting on load state. Revert to measured APU clock speed instead of nominal speed. Optimized subscreen math with help from Dwedit. Save mipmap_input parameter with customized GLSL and slang shaders. Clamp MSU1 addition to max amplitude instead of wrapping. Reverted an IPL map optimization that misses a weird edge case that caused Fixed NMI timing when toggling enable bit. Fixed subscreen blending with master brightness

1 note
·
View note
Text
Updates for September 2021
This month was mostly just straightforward progress. Reorganized some stuff, and have plans for the next project, but nothing too huge.
Wolf v2.2.0-REL
Updated support for GLSLang/SPIRV libs.
Added preliminary support for MSVC22.
Support default textures in material templates.
Tons of emscripten fixes - now runs fine again.
Faster backtrace resolution on linux via an addr2line daemon : gives more capabiltiies to `WolfSystem::Process.
Much easier to allocate an object via Canis if you need to call the constructor seperately.
Endless
Supports loading maps from mods again - was broken due to the Wolfv2 transition.
Bunch of material updates.
Tek::Page is now canis safe so can easily be overridden in future projects.
Lojalmn
Lokak mno kofagh. Giahg mi jo u jam jaggol, jem yarr nuzo tilo is u celcifo.
0 notes
Text
Collabora and Microsoft introduce OpenCL 1.2 and OpenGL 3.3 on DirectX 12
Collabora has announced that it has partnered with Microsoft DirectX engineers to build OpenCL and OpenGL mapping layers, in order to bring OpenCL 1.2 and OpenGL 3.3 support to all Windows and DirectX 12 enabled devices.
According to the team, this work builds on a lot of previous work. First and foremost, it is building this by using Mesa 3D, with the Gallium interface as the base for the OpenGL layer, and NIR as the base for the OpenCL compiler. Collabora is also using LLVM and the SPIRV-LLVM-Translator from Khronos as the compiler front-end.
In addition, the team is taking advantage of Microsoft’s experience in creating their D3D12 Translation Layer. Moreover, it will take advantage of its own experience from developing Zink.
Mesa 3D is an open source implementation of several graphics technologies, including OpenCL and OpenGL. The OpenGL implementation in Mesa promises to be robust. It will also be used as the base for several industry-strength OpenGL drivers from multiple GPU vendors.
Among other things, Mesa consists of several API implementations (called state-trackers) as well as the Gallium low-level driver interface. It’s worth noting that the Gallium interface hides a lot of the legacy OpenGL details. It also translates OpenGL calls into something that looks more like modern GPU primitives.
Lastly, a GPU vendor only has to implement a D3D12 driver for their hardware in order to support all three APIs. This mapping layer will also serve as a starting point in porting older OpenCL and OpenGL applications over to D3D12.
You can read more about this on Collabora’s website!
The post Collabora and Microsoft introduce OpenCL 1.2 and OpenGL 3.3 on DirectX 12 appeared first on DSOGaming.
Collabora and Microsoft introduce OpenCL 1.2 and OpenGL 3.3 on DirectX 12 published first on https://touchgen.tumblr.com/
0 notes
Text
AMD Radeon Software Adrenalin 2019 Edition 19.11.1 released, optimized for Red Dead Redemption 2
Today is a big day as Red Dead Redemption 2 is finally coming out on the PC. And similarly to NVIDIA, AMD released a brand new driver for its graphics cards. So, as you may have guessed, the AMD Radeon Software Adrenalin 2019 Edition 19.11.1 is optimized for RDR2.
Moreover, this new driver adds support to some new Vulkan extensions. It also fixes a bug that could cause the framerate to remain limited to 60fps in some Vulkan API games.
This new driver also comes with two fixes for The Outer Worlds. For instance, it fixes an application crash when opening the characters inventory screen. It also fixes some rendering issues with the character models on the inventory screen.
AMD users can download this new driver from here. Below you can also find its complete changelog.
AMD Radeon Software Adrenalin 2019 Edition 19.11.1 Driver Release Notes
Support For
Red Dead: Redemption 2
Added Vulkan Support
VK_KHR_timeline_semaphore
This extension introduces a new semaphore type that uses an integer payload to identify a point in a timeline. The extension supports querying the semaphore, host wait/signal operations, and device wait/signal operations.
VK_KHR_shader_clock
This extension allows a shader to query a real-time or monotonically incrementing counter at the subgroup level or across the device level.
VK_KHR_shader_subgroup_extended_types
This extension enables the nonuniform group operations in SPIR-V to support 8-bit integer, 16-bit integer, 64-bit integer, 16-bit floating-point, and vectors of these types.
VK_KHR_pipeline_executable_properties
This extension allows debugging and performance tools and applications in general to query properties and statistics about the pipeline compilation process.
VK_KHR_spirv_1_4
This extension allows the use of SPIR-V 1.4 shader modules, which in turn allows easier translation from high level languages into spirv.
VK_EXT_subgroup_size_control
This extension enables an implementation to control the subgroup size by allowing a varying subgroup size and also specifying a required subgroup size. The optional feature to allow full compute subgroups is enabled.
Clustered Subgroup Operations
This feature bit allows invocations to perform cluster operations such as add, mul, min, max, and, or, xor among partitions of a subgroup. The operations are only performed within the subgroup invocations within a partition.
Fixed Issues
Some users may be unable to connect their Twitch™ account through the Connect page in Radeon Settings for live streaming.
The Outer Worlds™ may sometimes experience an application crash when opening the characters inventory screen.
The Outer Worlds™ may experience character models being rendered incorrectly on the inventory screen.
Frame Rate may cap or remain limited to 60 fps in some Vulkan® API games.
OBS streaming may experience heavy frame drops when using AMF encoding..
Known Issues
Radeon RX 5700 series graphics products may experience stutter in some games at 1080p and low game settings.
Performance Metrics Overlay may cause stutter or screen flashing on some applications.
Radeon RX 5700 series graphics products may experience display loss when resuming from sleep or hibernate when multiple displays are connected.
Toggling HDR may cause system instability during gaming when Radeon ReLive is enabled.
Stutter may be experienced when Radeon FreeSync is enabled on 240hz refresh displays with Radeon RX 5700 series graphics products.
AMD Radeon VII may experience elevated memory clocks at idle or on desktop.
Performance Metrics Overlay may report incorrect VRAM utilization.
Invoking Radeon Overlay may cause games to lose focus or become minimized when HDR is enabled within Windows®.
The post AMD Radeon Software Adrenalin 2019 Edition 19.11.1 released, optimized for Red Dead Redemption 2 appeared first on DSOGaming.
AMD Radeon Software Adrenalin 2019 Edition 19.11.1 released, optimized for Red Dead Redemption 2 published first on https://touchgen.tumblr.com/
0 notes