[Development] Qt Shader Tools as proper Qt module for Qt 6.0

Laszlo Agocs laszlo.agocs at qt.io
Tue Dec 10 15:38:00 CET 2019


Hi Simon,

After qtbase and before others. I do not foresee examples in qtbase relying on it in the near future, simply because that would mean examples using QRhi, and that’s all private API so such examples are unlikely to appear. Internally, there are QRhi-related manual/auto tests in qtbase, but those all come with the generated output in place (in form of .qsb files) – the same thing what Qt Quick does in 5.14/5.15 – and so they do not rely on shadertools being present at build/run time.

There are some gray areas at the moment (for instance, to what extent widgets will be affected by the Qt 6 graphics work (think of the OpenGL-based compositor thing for Q(Quick|OpenGL)Widget)), which can eventually lead to a change of situation, but hopefully that can then be handled with some appropriate restructuring. And, as with the tests, for the typical, static (so non-dynamically generated) shader code the option of just pre-generating and checking in the output of the shadertools machinery is always there.

Best regards,
Laszlo


From: Simon Hausmann <Simon.Hausmann at qt.io>
Sent: Tuesday, December 10, 2019 3:05 PM
To: Laszlo Agocs <laszlo.agocs at qt.io>
Cc: development at qt-project.org
Subject: Re: [Development] Qt Shader Tools as proper Qt module for Qt 6.0

Hi,

Great :)

In the chain of dependencies, do you see this right after qtbase and before for example qtdeclarative?

Or do you foresee any use of the shader compiler in qtbase itself? I suppose at least for some examples it would make sense, which makes me wonder if those examples should move out or qtbase or shader tools going straight into qtbase. What do you think?
Simon


Am 10.12.2019 um 14:56 schrieb Laszlo Agocs <laszlo.agocs at qt.io<mailto:laszlo.agocs at qt.io>>:

Hi all,

I would like to suggest promoting Qt Shader Tools (currently qt-labs/qtshadertools [1]) into a proper Qt module for Qt 6.0.

Qt 5.x is not in scope, meaning the new qt/qtshadertools repo would start with a dev branch only, and is to be ignored for Qt 5.x builds and releases.

As described in this earlier blog post [2], the APIs and tools in this module provide the producer functionality for the new shader pipeline that allows Qt Quick, and, eventually, Qt Quick 3D, to operate on Vulkan, Metal, and Direct3D, in addition to OpenGL. The consumer bits are part of QtGui in 5.14 already.

In order to open up the possibility for Qt modules and applications to perform the necessary conditioning steps on their shaders either offline or at run time, the module has to be part of and ship with Qt in 6.0. (build system integration is planned as well, but that is a separate future exercise)

Additionally, some of the on-going Qt 6.0 graphics work, such as, the enabling of Qt Quick 3D to operate on top of the QRhi graphics abstraction, requires linking to the qtshadertools module (for the time being at least). And so in order to allow that work to happen in dev, qtshadertools needs to be present as a proper module.

Best regards,
Laszlo

[1] https://codereview.qt-project.org/gitweb?p=qt-labs/qtshadertools.git;a=summary

[2] https://www.qt.io/blog/qt-quick-on-vulkan-metal-and-direct3d-part-3

_______________________________________________
Development mailing list
Development at qt-project.org<mailto:Development at qt-project.org>
https://lists.qt-project.org/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20191210/55809eb3/attachment-0001.html>


More information about the Development mailing list