diff options
Diffstat (limited to 'sources/pyside6/doc')
-rw-r--r-- | sources/pyside6/doc/developer/add_tool.rst | 6 | ||||
-rw-r--r-- | sources/pyside6/doc/tools/index.rst | 13 | ||||
-rw-r--r-- | sources/pyside6/doc/tools/pyside6-qsb.rst | 39 |
3 files changed, 56 insertions, 2 deletions
diff --git a/sources/pyside6/doc/developer/add_tool.rst b/sources/pyside6/doc/developer/add_tool.rst index a894226c5..732e6b915 100644 --- a/sources/pyside6/doc/developer/add_tool.rst +++ b/sources/pyside6/doc/developer/add_tool.rst @@ -44,6 +44,8 @@ Add a Qt tool wrapper - Add the tool in ``sources/pyside-tools/pyside_tool.py``. - Add the tool in ``build_scripts/__init__.py`` to create the setuptools entry points i.e. this enable using the tool from the console as "pyside6-<tool_name>" -- Add an entry to ``sources/pyside6/doc/gettingstarted/package_details.rst``. +- Add an entry to ``sources/pyside6/doc/tools/index.rst`` and the detailed + documentation to ``sources/pyside6/doc/tools/<tool_name>.rst``. - Include the necessary Qt binaries explicitly on ``build_scripts/wheel_files.py`` -- Build with ``--standalone``, verify it is working. +- Add the necessary files to ``build_scripts/wheel_files.py``. +- Build with ``--standalone``, verify it is working. Also, check if the wheel bundles the tool. diff --git a/sources/pyside6/doc/tools/index.rst b/sources/pyside6/doc/tools/index.rst index dd51da65e..b82e3fd71 100644 --- a/sources/pyside6/doc/tools/index.rst +++ b/sources/pyside6/doc/tools/index.rst @@ -176,3 +176,16 @@ Deployment to deploy PySide6 application as an Android app targeting different Android platforms - aarch64, armv7a, i686, x86_64. + +Shader Tools +~~~~~~~~~~~~ + +.. grid:: 2 + :gutter: 3 3 4 5 + + .. grid-item-card:: ``pyside6-qsb`` + :link: pyside6-qsb + :link-type: ref + + a command line tool provided by the Qt Shader Tools module to + generate and inspect .qsb files. diff --git a/sources/pyside6/doc/tools/pyside6-qsb.rst b/sources/pyside6/doc/tools/pyside6-qsb.rst new file mode 100644 index 000000000..f6f1847d4 --- /dev/null +++ b/sources/pyside6/doc/tools/pyside6-qsb.rst @@ -0,0 +1,39 @@ +.. _pyside6-qsb: + +pyside6-qsb +=========== + +``pyside6-qsb`` is a tool that wraps the `qsb <QSB Manual>`_ tool. qsb is a +command line tool provided by the `Qt Shader Tools`_ module. It integrates +third-party libraries such as `glslang`_ and `SPIRV-Cross`_, optionally invokes +external tools, such as ``fxc`` or ``spirv-opt``, and generates .qsb files. +Additionally, it can be used to inspect the contents of a .qsb package. + +For more information on how to use this tool, read Qt's documentation +here: `QSB Manual`_. + +Usage +----- + +To create a qsb file from a shader file, e.g., ``shader.frag``, use the +following command: + +.. code-block:: bash + + pyside6-qsb -o shader.frag.qsb shader.frag + +To inspect the file produced, i.e., ``shader.frag.qsb``, use the following +command: + +.. code-block:: bash + + pyside6-qsb -d shader.frag.qsb + +This will print the reflection metadata (in JSON form) and the included shaders. + +For other modes of operation, refer to the `QSB Manual`_. + +.. _`glslang`: https://github.com/KhronosGroup/glslang +.. _`spirv-cross`: https://github.com/KhronosGroup/SPIRV-Cross +.. _`QSB Manual`: https://doc.qt.io/qt-6/qtshadertools-qsb.html +.. _`Qt Shader Tools`: https://doc.qt.io/qt-6/qtshadertools-index.html |