<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp, branch dev</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>Quick/Scenegraph/Adaptions: Add default security headers (QUIP-23)</title>
<updated>2026-02-20T06:04:27+00:00</updated>
<author>
<name>Axel Spoerl</name>
<email>axel.spoerl@qt.io</email>
</author>
<published>2026-02-18T20:42:53+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=29ef411e181bc2ff540ae5340e49bd506563de5e'/>
<id>29ef411e181bc2ff540ae5340e49bd506563de5e</id>
<content type='text'>
QUIP-23: Mark files with default security headers,
unless marked already.

Change-Id: I154021bac6750af1b49f421cf3af593613622ec1
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QUIP-23: Mark files with default security headers,
unless marked already.

Change-Id: I154021bac6750af1b49f421cf3af593613622ec1
Reviewed-by: Richard Moe Gustavsen &lt;richard.gustavsen@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use SPDX license identifiers</title>
<updated>2022-06-11T06:05:15+00:00</updated>
<author>
<name>Lucie Gérard</name>
<email>lucie.gerard@qt.io</email>
</author>
<published>2022-05-13T13:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0dc4fd240a2897c5c443a0ef6d84c416843e4938'/>
<id>0dc4fd240a2897c5c443a0ef6d84c416843e4938</id>
<content type='text'>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Port QQuickShaderEffectSource format to Qt 6</title>
<updated>2022-03-18T21:56:54+00:00</updated>
<author>
<name>Laszlo Agocs</name>
<email>laszlo.agocs@qt.io</email>
</author>
<published>2022-03-11T19:03:57+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8308f9f443cabd63786738be25f630d537a84c20'/>
<id>8308f9f443cabd63786738be25f630d537a84c20</id>
<content type='text'>
The values there are ignored completely starting with Qt 6.0, the actual
texture format is always RGBA8.

Keep the existing values so that existing QML code still works, but
document that some of these do not do what the name would imply.

Introduce properly named values, including the floating point formats in
addition to RGBA8; these are actually useful as they allow doing high
dynamic range rendering, and, more importantly, the same format enum
can now be used by Quick3D's View3D as well, thus sharing one common way
to configure the backing texture for all three of ShaderEffect(Source),
Item.layer, and View3D.

[ChangeLog][QtQuick][ShaderEffect] ShaderEffect and Item layers can now
request using a floating point texture format for their backing texture.
ShaderEffectSource::format has been revised with values that have an
actual effect on the underlying texture.

Change-Id: I1d06d5541aeb943517e93c925b1b3ef2996a0b26
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The values there are ignored completely starting with Qt 6.0, the actual
texture format is always RGBA8.

Keep the existing values so that existing QML code still works, but
document that some of these do not do what the name would imply.

Introduce properly named values, including the floating point formats in
addition to RGBA8; these are actually useful as they allow doing high
dynamic range rendering, and, more importantly, the same format enum
can now be used by Quick3D's View3D as well, thus sharing one common way
to configure the backing texture for all three of ShaderEffect(Source),
Item.layer, and View3D.

[ChangeLog][QtQuick][ShaderEffect] ShaderEffect and Item layers can now
request using a floating point texture format for their backing texture.
ShaderEffectSource::format has been revised with values that have an
actual effect on the underlying texture.

Change-Id: I1d06d5541aeb943517e93c925b1b3ef2996a0b26
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add type safe native texture accessors</title>
<updated>2020-08-03T14:32:30+00:00</updated>
<author>
<name>Laszlo Agocs</name>
<email>laszlo.agocs@qt.io</email>
</author>
<published>2020-06-29T14:09:46+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=fb96109bbc2ec5d83171a70d6c164d79695d2ddd'/>
<id>fb96109bbc2ec5d83171a70d6c164d79695d2ddd</id>
<content type='text'>
Following the pattern from QtGui.

Task-number: QTBUG-85239
Change-Id: I07b4456028d0f45223ad10e55ce65f423bab6a9b
Reviewed-by: Tor Arne Vestbø &lt;tor.arne.vestbo@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following the pattern from QtGui.

Task-number: QTBUG-85239
Change-Id: I07b4456028d0f45223ad10e55ce65f423bab6a9b
Reviewed-by: Tor Arne Vestbø &lt;tor.arne.vestbo@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove OpenGL dependency from QSGTexture</title>
<updated>2020-06-08T07:55:53+00:00</updated>
<author>
<name>Laszlo Agocs</name>
<email>laszlo.agocs@qt.io</email>
</author>
<published>2020-06-04T19:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=3f5e21a0cc9f41f1747e5c431695e7798ee489db'/>
<id>3f5e21a0cc9f41f1747e5c431695e7798ee489db</id>
<content type='text'>
The QSGTexture API is now clean, the OpenGL-specific functions are
removed.

Docs are to be updated in a separate patch.

QSGPlainTexture, and a number of texture related places have to follow
suit.

The OpenGL atlas texture implementation is now removed.

Task-number: QTBUG-84717
Task-number: QTBUG-84623
Change-Id: I1aab3b8b9145bb74ad39ef836ce540fc851292c5
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The QSGTexture API is now clean, the OpenGL-specific functions are
removed.

Docs are to be updated in a separate patch.

QSGPlainTexture, and a number of texture related places have to follow
suit.

The OpenGL atlas texture implementation is now removed.

Task-number: QTBUG-84717
Task-number: QTBUG-84623
Change-Id: I1aab3b8b9145bb74ad39ef836ce540fc851292c5
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adjust QSGTexture comparisonKey type</title>
<updated>2020-05-27T09:19:25+00:00</updated>
<author>
<name>Laszlo Agocs</name>
<email>laszlo.agocs@qt.io</email>
</author>
<published>2020-05-26T13:31:42+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=08f56c9830c12f6b443649e3e4f51b3cea69d79b'/>
<id>08f56c9830c12f6b443649e3e4f51b3cea69d79b</id>
<content type='text'>
The original choice was int, simply following textureId(). This was later
deemed insufficient: instead of a GLuint, the value is now often a 64-bit
value (on 64 bit systems), based on a pointer, since the identity of a texture
in the RHI world is the QRhiTexture* itself. In a custom texture implementation
it is likely that the value here is the value of a native object handle, either
a pointer or some 32 or 64 bit integer.

Inspired by the recent QSGTexture::NativeTexture struct change (void* -&gt; quint64),
switch to a qint64 which is big enough to hold all these without truncation.

We choose a signed value here, in order to allow for the following pattern that
is widespread in material compare() implementations:
if (qint64 diff = m_texture-&gt;comparisonKey() - other-&gt;texture()-&gt;comparisonKey())
  return diff;

Fixes: QTBUG-83769
Change-Id: I8bdae8cd835282358ded53b3703142b8f26e4400
Reviewed-by: Christian Strømme &lt;christian.stromme@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The original choice was int, simply following textureId(). This was later
deemed insufficient: instead of a GLuint, the value is now often a 64-bit
value (on 64 bit systems), based on a pointer, since the identity of a texture
in the RHI world is the QRhiTexture* itself. In a custom texture implementation
it is likely that the value here is the value of a native object handle, either
a pointer or some 32 or 64 bit integer.

Inspired by the recent QSGTexture::NativeTexture struct change (void* -&gt; quint64),
switch to a qint64 which is big enough to hold all these without truncation.

We choose a signed value here, in order to allow for the following pattern that
is widespread in material compare() implementations:
if (qint64 diff = m_texture-&gt;comparisonKey() - other-&gt;texture()-&gt;comparisonKey())
  return diff;

Fixes: QTBUG-83769
Change-Id: I8bdae8cd835282358ded53b3703142b8f26e4400
Reviewed-by: Christian Strømme &lt;christian.stromme@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make comparisonKey() a pure virtual in QSGTexture</title>
<updated>2020-04-16T07:59:09+00:00</updated>
<author>
<name>Laszlo Agocs</name>
<email>laszlo.agocs@qt.io</email>
</author>
<published>2020-04-07T13:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=76f783c23fa2fd11c5cef6031f59ad5a1a6c7545'/>
<id>76f783c23fa2fd11c5cef6031f59ad5a1a6c7545</id>
<content type='text'>
In Qt 5.14 this was a virtual in QSGTexturePrivate due to having had
to maintain binary compatibility. In 6.0 it becomes a pure virtual in
QSGTexture.

Task-number: QTBUG-82997
Change-Id: I26a42169b071fe8d413f5c89ef45850fa7222006
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Qt 5.14 this was a virtual in QSGTexturePrivate due to having had
to maintain binary compatibility. In 6.0 it becomes a pure virtual in
QSGTexture.

Task-number: QTBUG-82997
Change-Id: I26a42169b071fe8d413f5c89ef45850fa7222006
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the graphics api independent scenegraph port</title>
<updated>2019-07-04T08:44:26+00:00</updated>
<author>
<name>Laszlo Agocs</name>
<email>laszlo.agocs@qt.io</email>
</author>
<published>2019-04-23T07:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=341ab7708049b1a3f559b76f16393e688951a938'/>
<id>341ab7708049b1a3f559b76f16393e688951a938</id>
<content type='text'>
Opt in via environment variables:
QSG_RHI=1 -&gt; enable using QRhi instead of GL
QSG_RHI_BACKEND -&gt; set to vulkan, metal, d3d11, gl to override the default
(the default is d3d11 on Windows, metal on Mac, gl elsewhere)

Or force a given rhi backend via the existing
QQuickWindow::setSceneGraphBackend().

Otherwise the default behavior is the same as before, the rhi code path
is never active by default.

-no-opengl builds are supported in the sense that they work and default
to the software backend. However, the rhi code path cannot currently be
used in such builds, even though QRhi from qtbase is fully functional
with Vulkan, D3D, or Metal even when qtbase was configured with
-no-opengl. This cannot be utilized by Quick atm due to OpenGL usage
being all over the place in the sources corresponding to the default
backend, and those host the rhi code path as well. This will be cleaned up
hopefully in Qt 6, with the removal all direct OpenGL usage.

Other env.vars.:
QSG_RHI_DEBUG_LAYER=1 -&gt; enable D3D debug or Vulkan validation layer
(assuming the system is set up for this)
QSG_RHI_SHADEREFFECT_DEBUG=1 -&gt; print stuff from ShaderEffect
QSG_SAMPLES=1,2,4,... -&gt; MSAA sample count (but QSurfaceFormat works too)
QT_D3D_ADAPTER_INDEX=0,1,... -&gt; D3D adapter index
QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -&gt; Vulkan physical device index
QSG_RHI_UINT32_INDEX=1 -&gt; always use uint index data (both
merged/unmerged, convert when needed - with some rhi backends this is
implicit)
QSG_RENDER_LOOP -&gt; to override the render loop as usual. The default
with RHI is threaded for Metal, threaded for Vulkan on Windows, basic
for Vulkan on Linux and Android (to be checked later), while the existing
rules apply for OpenGL.

Not supported when running with QRhi:
  - particles
  - compressed atlases (though this is transparent to the apps)
  - QSGRenderNode
  - QQuickRenderControl
  - QQuickFramebufferObject
  - certain QQuickWindow functionality that depends directly on OpenGL
  - anisotropic filtering for textures
  - native text may lack some gamma correction
  - QSGEngine applicability unclear
  - some QML profiler logs may be incorrect or irrelevant

Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521
Reviewed-by: Lars Knoll &lt;lars.knoll@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Opt in via environment variables:
QSG_RHI=1 -&gt; enable using QRhi instead of GL
QSG_RHI_BACKEND -&gt; set to vulkan, metal, d3d11, gl to override the default
(the default is d3d11 on Windows, metal on Mac, gl elsewhere)

Or force a given rhi backend via the existing
QQuickWindow::setSceneGraphBackend().

Otherwise the default behavior is the same as before, the rhi code path
is never active by default.

-no-opengl builds are supported in the sense that they work and default
to the software backend. However, the rhi code path cannot currently be
used in such builds, even though QRhi from qtbase is fully functional
with Vulkan, D3D, or Metal even when qtbase was configured with
-no-opengl. This cannot be utilized by Quick atm due to OpenGL usage
being all over the place in the sources corresponding to the default
backend, and those host the rhi code path as well. This will be cleaned up
hopefully in Qt 6, with the removal all direct OpenGL usage.

Other env.vars.:
QSG_RHI_DEBUG_LAYER=1 -&gt; enable D3D debug or Vulkan validation layer
(assuming the system is set up for this)
QSG_RHI_SHADEREFFECT_DEBUG=1 -&gt; print stuff from ShaderEffect
QSG_SAMPLES=1,2,4,... -&gt; MSAA sample count (but QSurfaceFormat works too)
QT_D3D_ADAPTER_INDEX=0,1,... -&gt; D3D adapter index
QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -&gt; Vulkan physical device index
QSG_RHI_UINT32_INDEX=1 -&gt; always use uint index data (both
merged/unmerged, convert when needed - with some rhi backends this is
implicit)
QSG_RENDER_LOOP -&gt; to override the render loop as usual. The default
with RHI is threaded for Metal, threaded for Vulkan on Windows, basic
for Vulkan on Linux and Android (to be checked later), while the existing
rules apply for OpenGL.

Not supported when running with QRhi:
  - particles
  - compressed atlases (though this is transparent to the apps)
  - QSGRenderNode
  - QQuickRenderControl
  - QQuickFramebufferObject
  - certain QQuickWindow functionality that depends directly on OpenGL
  - anisotropic filtering for textures
  - native text may lack some gamma correction
  - QSGEngine applicability unclear
  - some QML profiler logs may be incorrect or irrelevant

Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521
Reviewed-by: Lars Knoll &lt;lars.knoll@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make QSGLayer::grab work correctly in software renderer</title>
<updated>2018-04-11T14:22:00+00:00</updated>
<author>
<name>Jan Marker</name>
<email>jan.marker@kdab.com</email>
</author>
<published>2018-04-08T15:40:36+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=10c56615d1418c155648e2a150b45b6cb768b33e'/>
<id>10c56615d1418c155648e2a150b45b6cb768b33e</id>
<content type='text'>
Fix three separate issues:
1. It was possible that the QSGSoftwarePixmapRenderer's
   background image's rectangle was set to a non-normalized
   rectangle. That would have led to the damage area detection
   creating an empty QRegion for the damage area and
   QQuickItem::grabToImage would grab an empty image.
2. The QSGSoftwarePixmapRenderer was rendering the image vertically
   mirrored compared to what its equivalent in the OpenGL backend
   was doing. Therefore QSGLayer::grab was vertically mirrored, too,
   so QQuickItem::grabToImage would grab a mirrored image, too.
   Additionally QSGSoftwareInternalImageNode (used by
   QQuickShaderEffectSource) now has to mirror its internal texture
   if that one is a QSGSoftwareLayer.
3. QSGSoftwareInternalImageNode (used by QQuickShaderEffectSource)
   was not updating correctly when mirroring (with the fix for 2
   also in case of a QSGSoftwareLayer as texture).

Related to QTBUG-63185 and QTBUG-65975.

Change-Id: I0d0ead7fb1c839a8ff427ff7881d8a881e538409
Reviewed-by: Eirik Aavitsland &lt;eirik.aavitsland@qt.io&gt;
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix three separate issues:
1. It was possible that the QSGSoftwarePixmapRenderer's
   background image's rectangle was set to a non-normalized
   rectangle. That would have led to the damage area detection
   creating an empty QRegion for the damage area and
   QQuickItem::grabToImage would grab an empty image.
2. The QSGSoftwarePixmapRenderer was rendering the image vertically
   mirrored compared to what its equivalent in the OpenGL backend
   was doing. Therefore QSGLayer::grab was vertically mirrored, too,
   so QQuickItem::grabToImage would grab a mirrored image, too.
   Additionally QSGSoftwareInternalImageNode (used by
   QQuickShaderEffectSource) now has to mirror its internal texture
   if that one is a QSGSoftwareLayer.
3. QSGSoftwareInternalImageNode (used by QQuickShaderEffectSource)
   was not updating correctly when mirroring (with the fix for 2
   also in case of a QSGSoftwareLayer as texture).

Related to QTBUG-63185 and QTBUG-65975.

Change-Id: I0d0ead7fb1c839a8ff427ff7881d8a881e538409
Reviewed-by: Eirik Aavitsland &lt;eirik.aavitsland@qt.io&gt;
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>use nullptr consistently (clang-tidy)</title>
<updated>2018-02-26T07:13:18+00:00</updated>
<author>
<name>Shawn Rutledge</name>
<email>shawn.rutledge@qt.io</email>
</author>
<published>2018-02-21T09:41:54+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=499ec43937e926e4f2fa57a9baa455fcb3862262'/>
<id>499ec43937e926e4f2fa57a9baa455fcb3862262</id>
<content type='text'>
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann &lt;simon.hausmann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.

Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).

Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann &lt;simon.hausmann@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
