OpenGL 4.6 request list

Multi devices and multi display support done a magnitude better then on OpenGL.

First, a rock could do that better than OpenGL, so that’s not expecting much :wink:

Second, Vulkan already does. You can query what devices are available. These devices have string names, but they also come with a vendorId field that Khronos actually manages. Each ID uniquely identifies a particular vendor of Vulkan implementations. They also have driver versions, unique identifiers for a specific device, etc.

As for multiple displays, Vulkan’s WSI handles that just fine. Each display can have its own properties, swap chains, etc.

[QUOTE=Alfonse Reinheart;1282909]First, a rock could do that better than OpenGL, so that’s not expecting much :wink:
[/QUOTE]
You see how not much is needed to make somebody happy :).

[QUOTE=Alfonse Reinheart;1282909]
Second, Vulkan already does. You can query what devices are available. These devices have string names, but they also come with a vendorId field that Khronos actually manages. Each ID uniquely identifies a particular vendor of Vulkan implementations. They also have driver versions, unique identifiers for a specific device, etc.
As for multiple displays, Vulkan’s WSI handles that just fine. Each display can have its own properties, swap chains, etc.[/QUOTE]

Thanks for confirmation how can be it done in Vulkan. But I forgot to add that synchronisation for all displays is needed too. Like in NV_swap_group.
But I hope it will can be done without support from specialised hardware. Can I dream about it ? :slight_smile:

Would adopting descriptor sets in OpenGL improve functionality and performance?
Would putting descriptor sets in place of current OpenGL HW abstractions in but not limited to bindless functionality and bindless extensions a good idea and provide (an) advantage(s)?
Could descriptor sets be added in such a way it replaces what’s used in current bindless extensions without changing the functions form? Becoming an under the hood drop-in replacement? A transparent change for application programmers?
How do the current techniques including but not limited to bindless extensions stack up against descriptor sets?
Would descriptor sets allow better performance and programming flexibility/ease/techniques than other extensions including but not limited to bindless functionality?

Would bringing the WSI or some of the WSI stuff in Vulkan to OpenGL (ES) be a good idea?
Would bringing SPIR-V 1.1 (release this summer) to OpenGL be a good idea?
Would it be a good idea to bring other Vulkan features to OpenGL?

[QUOTE=Alfonse Reinheart;1282907]
The more I look at Vulkan’s API, the worse I see that being.

Despite Vulkan being lower-level, it is still an abstraction of the hardware. And a very different one from OpenGL. Consider pipeline objects and render passes. If you built an OpenGL implementation on top of Vulkan, you would have to develop a complex system of caching for pipelines and render passes. Whereas if you built your OpenGL implementation on top of the actual hardware directly, you could probably simplify a lot of things, because you can make assumptions about what that specific hardware would be doing. With Vulkan, you have to cache big pipeline objects. When implementing directly to hardware, if a render pass changes, you won’t necessarily rebuild the shader code. Or if you do, it will be for hardware-specific reasons.

At best, what you would have is an API that has a huge number of performance traps, but can work perhaps slightly faster if you do everything exactly like the underlying Vulkan implementation wants.

There is a way to build a safer and easier-to-use API on top of Vulkan. But it wouldn’t be as free-wheeling as OpenGL.[/QUOTE]

Interesting considerations.
Is there in your opinion room in Vulkan for some additional and higher-level constructs (with good defaults) instead of extra layers?

Sounds like Vulkan and OpenGL will never unify into a layered architecture.
It also sounds like you hint at there being room for some feature cross-pollination between the API’s.
What features would you like to see appear in OpenGL from Vulkan?

[QUOTE=Alfonse Reinheart;1282909]First, a rock could do that better than OpenGL, so that’s not expecting much :wink:

Second, Vulkan already does. You can query what devices are available. These devices have string names, but they also come with a vendorId field that Khronos actually manages. Each ID uniquely identifies a particular vendor of Vulkan implementations. They also have driver versions, unique identifiers for a specific device, etc.

As for multiple displays, Vulkan’s WSI handles that just fine. Each display can have its own properties, swap chains, etc.[/QUOTE]

Can each application window (full-screen and windowed/non full-screen) inside a display also have it’s own properties (refresh rate, independent synchronization) when supported with graceful fallback?
I’m asking because of Multi-Stream Transport (MST).
https://en.wikipedia.org/wiki/DisplayPort#Multiple_displays_on_single_DisplayPort_connector

multiple independent video streams (daisy-chain connection with multiple monitors) called Multi-Stream Transport

https://en.wikipedia.org/wiki/DisplayPort#1.2

You could possibly get some performance improvement out of it.

No. Bindless texturing and especially the buffer stuff is all about avoiding context state. Descriptor sets are context state.

I see no reason not to adopt SPIR-V 1.0. It has more or less everything OpenGL needs already.

You could implement OpenGL on top of Vulkan. But it would have even more performance traps than pure OpenGL does. Though at least the implementation would be available, so that bugs could be fixed.

[QUOTE=Gedolo2;1282934]It also sounds like you hint at there being room for some feature cross-pollination between the API’s.
What features would you like to see appear in OpenGL from Vulkan?[/QUOTE]

Only hardware capabilities that are actually missing from Vulkan: conditional rendering and transform feedback. NVIDIA seems to think (PDF) that we need more dynamic state in pipelines, but I’m not sure how most of that would impact mobile platforms.

I have no idea why NVIDIA seems to think that shader subroutines are important…

Would bringing SPIR-V 1.1 (release this summer) to OpenGL be a good idea?

I just discovered this. SPIR-V 1.10 already exists; it was released in April.

And just about everything it added relative to 1.00 requires the Kernel capability. So it’s stuff that’s not appropriate for either Vulkan or OpenGL.

[QUOTE=Alfonse Reinheart;1282938]You could possibly get some performance improvement out of it.

No. Bindless texturing and especially the buffer stuff is all about avoiding context state. Descriptor sets are context state.[/QUOTE]
Got it, the descriptor sets and the bindless functionality are complementary.
Would it be good for OpenGL in the future in the next years, not this summer OpenGL 4.6 release, to move both bindless and descriptor sets in core for achieving maximum performance in applications?

[QUOTE=Alfonse Reinheart;1282940]I just discovered this. SPIR-V 1.10 already exists; it was released in April.

And just about everything it added relative to 1.00 requires the Kernel capability. So it’s stuff that’s not appropriate for either Vulkan or OpenGL.[/QUOTE]

Oops, looks like mixed up Vulkan and SPIR-V versions.
I meant the SPIR-V version that will be released this summer together with new Vulkan and OpenGL releases.

Would it be feasible to adopt the newer version of SPIR-V without any disadvantages for GPUs?
Making it not harmful for Vulkan and OpenGL to use the 1.1 version or do you see a need for a GPU profile for SPIR-V to avoid disadvantages for GPU API’s?
Although you say the SPIR-V 1.1 does not offer anything substantial for GPU’s.
Future SPIR-V releases might include features that substantially help GPUs.
A GPU profile would be ideal for taking care of this use case.

Got it, the descriptor sets and the bindless functionality are complementary.

No, they’re not complementary. They’re different. You don’t need or want both.

Although you say the SPIR-V 1.1 does not offer anything substantial for GPU’s.

No, I said it doesn’t offer anything for graphics. Kernels run on GPUs too; they just don’t run on graphics APIs.

I have question.
One of problems with OpenGL is that driver have no clue what and how many stuff will have to process.
This why in Vulkan there are command buffers.
So developing concept behind GL_NV_command_list can help driver a lot? (packing draw command and state will makes for driver less guessing)
Whats yours thoughts on this.

One of problems with OpenGL is that driver have no clue what and how many stuff will have to process.
This why in Vulkan there are command buffers.

Command buffers don’t solve that problem. At all. The problem that command buffers solve is being able to build sequences of commands asynchronously on multiple threads.

Correct me if I’m wrong, but when recording command buffer those commands are not executed immediately.
But rather when this command buffer is submited to the render queue. Only then driver process it and send it to the graphics card.
So not only " command buffers solve is being able to build sequences of commands asynchronously on multiple threads." But additional driver have more knowledge about “what to draw”.
One more plus that command buffers can be once bake and summited without recording them again. This is gain for CPU.
When a read GL_NV_command_list I see very similar ideas in it. So this is not a good way of development?
I’m not say that GL_NV_command_list must be add to the core but something base on it could be.

I fail to see how command buffers could give this knowledge.

If you were restricted to a single command buffer per-frame, it might make sense. But you’re not. So in any given frame, you’re either going to build another command buffer or you’re not, and because the decision takes place outside of the driver, the driver doesn’t have this knowledge. If you do build a command buffer, you’re either going to submit it or you’re not. Because you don’t have to submit command buffers as soon as you build them. You could, for example, record a command buffer for use in a future frame (which might be a performance win if the current frame is lightweight). and again, the driver can’t have advance knowledge of this.

So the driver is still dealing with rendering commands as they come in, and with no advance knowledge - same as it ever was.

Of course, this is how drivers already behave under traditional APIs anyway. You didn’t think that OpenGL calls went direct to the GPU, did you? The driver buffers them up, then submits the buffered-up commands at intervals - when it’s buffer is full, at the end of a frame, when you explicitly call glFlush or glFinish, whatever. All that command buffers do is expose this functionality to the programmer, but don’t get the idea that there’s any kind of deep voodoo going on. Think of command buffers as being broadly analogous to the old display list functionality instead.

What is my understanding I see command buffers (first and second layer) as a way for “packing” more information about rendering in one place.
So how you said [QUOTE=mhagain;1283062] The driver buffers them up, then submits the buffered-up commands at interval[/QUOTE] this time ( used for buffering-up commands ) can be used for something else e.g.
for analysis for efficient dispatch commands to GPU.
This “pack” information was that “a deeper knowledge” what to render.
With that “pack structure of commands” will help OpenGL driver a lot.

[QUOTE=jurgus;1283063]What is my understanding I see command buffers (first and second layer) as a way for “packing” more information about rendering in one place.
So how you said this time ( used for buffering-up commands ) can be used for something else e.g.
for analysis for efficient dispatch commands to GPU.
This “pack” information was that “a deeper knowledge” what to render.
With that “pack structure of commands” will help OpenGL driver a lot.[/QUOTE]

You’re not making much sense here.

The one thing which the new APIs (and NV_command_list) have which can allow this “deeper knowledge” is actually nothing to do with command buffers; it’s state objects. What state objects allow is for all potentially interacting state to be defined together, and for creation-time validation rather than draw-time validation.

But you can have state objects without command buffers. And you can have command buffers without state objects.

I honestly don’t understand the rest of what you’re saying.

Correct me if I’m wrong, but when recording command buffer those commands are not executed immediately.
But rather when this command buffer is submited to the render queue. Only then driver process it and send it to the graphics card.
So not only " command buffers solve is being able to build sequences of commands asynchronously on multiple threads." But additional driver have more knowledge about “what to draw”.

… so what?

What does the driver really know about what you’re doing with a command buffer? It only knows the sequence of commands in that buffer. It doesn’t know:

1: What commands were executed before that buffer.

2: What commands will be executed after that buffer.

So what does it really know about what you’re doing?

You might wonder why it matters what commands were executed before or after. But that’s very important.

Consider a vital concept in Vulkan: image layouts. Every image exists in a particular layout, which potentially restricts what operations it can be used with. Well, the layout an image “currently” is in is completely unknown to Vulkan. You, the user, are expected to keep up with that. After all, commands are built asynchronously and executed in a generally undefined order.

So when you’re building a command buffer, and you use an image in a descriptor set… what layout is it in? Even if the image is in the wrong layout when you’re building that CB, Vulkan cannot know if you will execute a command buffer before this one which will transition the layout to an appropriate one.

Therefore, Vulkan requires that you specify the layout of an image when you use it. And if, by the time that command executes, the image isn’t actually in that layout, you’re boned.

OpenGL doesn’t have image layouts or anything even remotely like them. Why? Because OpenGL’s execution model is essentially synchronous. Stuff like image layouts and transitions are an implementation detail to OpenGL, something the driver can handle behind the scenes. All thanks to the synchronous execution model.

If you attach an image to an FBO, render to it, then detach it and bind it as a sampler, OpenGL can see that you’re doing all of those things in order. If the implementation needs to do layout transitions, it can do them as needed between those operations. This is possible because OpenGL’s execution model requires all commands to behave as if they were executed synchronously.

The only way to make something like NV_command_list work is to make the execution model asychronous (and add other features like image layouts). At which point, why bother using OpenGL at all? It’s not like you can slowly transition to using this. You have to rewrite far too much code to be able to handle asynchronous execution effectively and efficiently. You have to deal with things like image layouts and async memory transfer operations. And so forth.

Just look at NV_command_list as it is. To use it, you have to use non-core APIs for vertex specification, uniform buffer binding, SSBOs, and texture and image binding. By the time you’re finished with all of this, how many OpenGL API calls are you using that don’t have an NV or ARB suffix on them?

By the end of this process, all you will have is OpenGL-in-name-only. Better to just use Vulkan and get it over with.

There is no low-hanging fruit to be picked from the Vulkan tree. You can’t just pull parts of Vulkan over and expect the result to make sense. Direct3D11 tried that with deferred contexts. Notice how NVIDIA implemented that in their hardware.

Ever notice that AMD didn’t? I’d bet that image layout issues were a huge part of the reason why. NVIDIA has no such concept in their hardware; they ignore all the Vulkan layout stuff. AMD’s hardware really relies on it.

SPIR-V makes sense to be able to be consumed by OpenGL. Descriptor sets might make sense for OpenGL, in some respects. And maybe push-constants & input attachments. Anything else requires fundamental changes to the very execution model of OpenGL before they can actually work.

And if you change that much, why are you using OpenGL? Because you don’t like writing vk in front of your function names?


As for more of the “what does the driver really know with CBs”, consider Vulkan’s complex render-pass system. Why does this system exist? To permit implementations to actually know something about how you’re going to render.

Pipelines are built based on being executed within a specific subpass of a render pass. At pipeline creation time, the implementation knows the numbers and formats of the images that are used as render targets. It knows when you’re going to do read/modify/write glTextureBarrier gymnastics. It knows this at compile time. It can therefore compile your shaders (particularly for tile-based architectures) into efficient forms to utilize this knowledge.

If command buffers were so useful for knowing something about what you’re rendering, why would render passes and subpasses exist? Surely, the command buffer building system could just read the current framebuffer attachments and make similar inferences based on them, right?

No. Because that happens at command submission time. Whereas the way Vulkan does things, it happens at pipeline creation time, a thing that is expected to be a heavyweight operation. Command submissions are expected to be lightweight operations, and Vulkan makes sure that implementations never have a reason to do things like recompile or reconfigure shaders based on various state.

So no, command buffers don’t exist to allow implementations to know more about what you’re trying to render. The thing Vulkan does to permit this is that it forces users to specify things up-front.

Multi devices and multi display support done a magnitude better then on OpenGL

OpenGL doesn’t handle these, the OS does.