News for hackers. Stuff that matters.
Re:Vulkan Memory Allocator by infogulch on Wednesday July 21, 2021 @09:17AM (#27905813)
> Extension spaghetti for starters

Extensions are a PITA to deal with, but they generally represent real disparate hardware features offered by individual GPUs which varies by manufacturer, model, and date. This reminds me of CPU features like SSE2, AVX, AES, etc, etc which general-purpose binary programs are forced to query for at runtime to either take advantage of or fall back to a software implementation. But GPUs have even more architectural change velocity than CPUs.

It seems like a hard problem in general. How do you think this could be done better?

Re:Vulkan Memory Allocator by skohan on Wednesday July 21, 2021 @10:01AM (#27906401)
Yeah exactly. How else can you support the wide range of hardware features out there without being stuck with a lowest-common-denominator?
Re:Vulkan Memory Allocator by ksec on Thursday July 22, 2021 @01:49PM (#27922034)
I think what pjmlp is trying to suggest is the API or Khronos instead of allowing extensions where it has limitless possibility, it should be courting and doing what Metal and Direct X are doing setting tiers of GPU Level. You either support RayTracing + N other features and call yourself Vulkan 2.0 GPU or you get back to Vulkan 1.x

This is exactly how is has been working in the PC world, and is working quite well as far as I can tell.

Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @11:04AM (#27907281)
Apple, Microsoft, Sony and Nintendo have such a hard time delivering high quality graphics with their proprietary APIs, pity them.
Re:Vulkan Memory Allocator by infogulch on Wednesday July 21, 2021 @01:44PM (#27909500)
"How do you support a wide variety of hardware with different features without API extensions?"

"Look at these companies that offer an API without extensions by not even trying to support hardware with different features."

Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @01:54PM (#27909636)
PC, iOS and console AAA game studios are doing just fine with those APIs.
Re:Vulkan Memory Allocator by skohan on Wednesday July 21, 2021 @11:07AM (#27907323)
How does DX12 do feature discovery for things like ray tracing which are supported on only some hardware?
Re:Vulkan Memory Allocator by flohofwoe on Wednesday July 21, 2021 @01:07PM (#27908990)
Haven't checked DX12 yet, but both D3D11 and Metal have a small number of "tiers" with guaranteed feature sets, which basically correspond to GPU generations. Usually you pick the lowest tier you can afford and write your code against that feature set.

In D3D11, the "tier" is basically the minor version number (D3D11.1, .2, etc...), while in Metal you have this handy reference:

https://developer.apple.com/metal/Metal-Feature-Set-Tables.p...

Both solutions prevent the "combinatorial explosion" of OpenGL or Vulkan extensions.

Re:Vulkan Memory Allocator by skohan on Wednesday July 21, 2021 @01:23PM (#27909227)
Ok I didn't know that, but it seems like a very sensible approach. I suppose you would lose some specificity in terms of very specific features, but probably this would be sufficient in most cases.

But couldn't you do something very similar in Vulkan? I.e. essentially bucket your render-paths into a couple tiers by checking for a set of extensions required to support each one?

Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @11:53AM (#27907891)
By requiring DX12 Ultimate support, done.
Re:Vulkan Memory Allocator by skohan on Wednesday July 21, 2021 @12:01PM (#27908007)
This is a very low-quality argument. Game developers quite clearly cannot only target DX12 Ultimate and have their product only work for a small percentage of users on PC.

If you want to target PC, you have to deal with hardware fragmentation. You can pretend this is a Vulkan issue, but it's just a reality of the platform.

Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @01:14PM (#27909099)
Nice story, except DirectX owns the PC market, period.
Re:Vulkan Memory Allocator by skohan on Wednesday July 21, 2021 @01:24PM (#27909242)
pjmlp I have been on this forum long enough to know you would eventually move the goalposts. Your claim was about the merit of extensions, I'm not sure why you're talking about marketshare now.
Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @01:55PM (#27909653)
What goalposts? The APIs that own the games market are doing just fine without Khronos mess.
Re:Vulkan Memory Allocator by fouric on Wednesday July 21, 2021 @12:44PM (#27908591)
This is not feature discovery, though - this is feature constraining, which is rather different, and doesn't work at all if you want to get a game out to a large audience while also taking advantage of different hardware configurations.
Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @01:15PM (#27909106)
It has done wonders for PC gaming so far.
Re:Vulkan Memory Allocator by fouric on Thursday July 22, 2021 @04:18PM (#27923792)
Feature discovery has done wonders for PC gaming. Not feature constraint, like you're advocating.
Re:Vulkan Memory Allocator by pjmlp on Wednesday July 21, 2021 @11:03AM (#27907257)
Like proprietary APIs do it, there is a limited feature set and it is set, done.

With extension spaghetti, not only are we back in GLAD and GLEW land, each set of extensions is yet another possible code path.

Re:Vulkan Memory Allocator by atq2119 on Wednesday July 21, 2021 @12:12PM (#27908148)
Extensions are the stick with which hardware vendors beat platform companies (in practice, Microsoft) into innovation. That's how we got raytracing, for example.
Re:Vulkan Memory Allocator by pjmlp on Thursday July 22, 2021 @07:50AM (#27917794)
Hardware raytracing was designed by NVidia and Microsoft together while creating DirectX 12 Ultimate, shown to the world in an Unreal engine based demo of a starwars lift scene, it has zero to do with Vulkan.
Re:Vulkan Memory Allocator by atq2119 on Thursday July 22, 2021 @08:00AM (#27917870)
I doubt either of us were in the relevant rooms, but the API is very obviously a DX-ification of Nvidia's OptiX (the software-based raytracing solution that they released long before HW raytracing). Furthermore, Nvidia released OpenGL and Vulkan extensions for raytracing long before the release of DX12 Ultimate. Do you think Microsoft would have allowed that if it was a genuine co-development by the two companies?