<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[GraphicsPipelineState *ps changes back to default every time QSGMaterialShader::updateGraphicsPipelineState is invoked]]></title><description><![CDATA[<p dir="auto">We are trying to optimise function<br />
<code> updateGraphicsPipelineState(..)</code><br />
to make sure that we only return true only when pipeline state changed. But we found that GraphicsPipelineState *ps always pass in the default value even if we set the blend values inside this function.<br />
Also by looking at the source code <a href="https://github.com/qt/qtdeclarative/blob/dev/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp#L3003" target="_blank" rel="noopener noreferrer nofollow ugc">qsgbatchrender.cpp</a>, we found that <code>m_gstateStack.push(m_gstate);</code> is pushing the default values of <code>m_gstate</code> to <code>m_gstateStack</code>, is this correct? Shouldn't this push happen after <code>materialToRendererGraphicsState(&amp;m_gstate, &amp;shaderPs);</code> so that the changed values are pushed into the stack?<br />
Otherwise  <a href="https://github.com/qt/qtdeclarative/blob/dev/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp#L3142" target="_blank" rel="noopener noreferrer nofollow ugc">m_gstate = m_gstateStack.pop();</a> will just pop the default value right after new value is set to m_gstate, right?<br />
Thanks.</p>
]]></description><link>https://forum.qt.io/topic/139521/graphicspipelinestate-ps-changes-back-to-default-every-time-qsgmaterialshader-updategraphicspipelinestate-is-invoked</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 13:50:23 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/139521.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 23 Sep 2022 11:48:42 GMT</pubDate><ttl>60</ttl></channel></rss>