<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX ProcessorsのトピックRe: Graphical corruption when using Uniform Buffer Objects on iMX6</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680432#M105089</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I found that the situations is improved *a bit* if you include at least one more element in the struct, i.e.:&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;"struct VertexData {\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;" mat4 rotMatrix;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;" vec4 dummy;\n" //the iMX6 needs at least two struct members, otherwise graphical corruption&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;"};\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Using this setup, vData[0] contains the expected matrix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, vData[1] and all following elements are still corrupted.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Jun 2017 14:43:15 GMT</pubDate>
    <dc:creator>hartmutbehrensf</dc:creator>
    <dc:date>2017-06-14T14:43:15Z</dc:date>
    <item>
      <title>Graphical corruption when using Uniform Buffer Objects on iMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680431#M105088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've modified a Qt textures example (&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fdoc.qt.io%2Fqt-5%2Fqtopengl-textures-example.html" rel="nofollow" target="_blank"&gt;http://doc.qt.io/qt-5/qtopengl-textures-example.html&lt;/A&gt;&amp;nbsp;) to test out UBO functionality on the iMX6 (using a SABRE board with 6QP AP) - see attachment for the complete modifications. Below I have reproduced the shaders.&amp;nbsp;When the example is run, a lot of graphical corruption can be seen in the spinning cubes.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone else experienced this ? Do you know of any workarounds / fixes ?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt;QOpenGLShader *vshader = new QOpenGLShader(QOpenGLShader::Vertex, this);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; QString vsrc =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "in vec4 vertex;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "in vec2 texCoord;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "out vec2 texc;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "uniform int rotIndex;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "int getRotoationIndex(void);\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "mat4 getRotationMatrix(int Index);\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "mat4 getRotationMatrix(void);\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "struct VertexData {\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; " mat4 rotMatrix;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "};\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "layout(std140) uniform u_VertexData {\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; " VertexData vData[64];\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "};\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "int getRotationIndex(void) { return rotIndex; }\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "mat4 getRotationMatrix(int Index) { return vData[Index].rotMatrix; }\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "mat4 getRotationMatrix(void) { return getRotationMatrix(getRotationIndex()); }\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "void main(void)\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "{\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; " mat4 rotMatrix = getRotationMatrix(rotIndex);\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; " gl_Position = rotMatrix * vertex;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; " texc = texCoord;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "}\n";&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; QOpenGLShader *fshader = new QOpenGLShader(QOpenGLShader::Fragment, this);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; QString fsrc =&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "#ifdef GL_ES\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "#ifdef GL_FRAGMENT_PRECISION_HIGH\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "precision highp float;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "precision highp sampler2D;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "#else\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "precision mediump float;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "precision mediump sampler2D;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "#endif\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "#endif\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "in vec2 texc;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "out vec4 fragColor;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "uniform sampler2D tex;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "void main(void)\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "{\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; " fragColor = texture(tex, texc);\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: terminal, monaco, monospace;"&gt; "}\n";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336517"&gt;GLWidget.cpp.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336517"&gt;Window.cpp.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jun 2017 10:03:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680431#M105088</guid>
      <dc:creator>hartmutbehrensf</dc:creator>
      <dc:date>2017-06-08T10:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Graphical corruption when using Uniform Buffer Objects on iMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680432#M105089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I found that the situations is improved *a bit* if you include at least one more element in the struct, i.e.:&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;"struct VertexData {\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;" mat4 rotMatrix;\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;" vec4 dummy;\n" //the iMX6 needs at least two struct members, otherwise graphical corruption&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 12px;"&gt;"};\n"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Using this setup, vData[0] contains the expected matrix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, vData[1] and all following elements are still corrupted.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 14:43:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680432#M105089</guid>
      <dc:creator>hartmutbehrensf</dc:creator>
      <dc:date>2017-06-14T14:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: Graphical corruption when using Uniform Buffer Objects on iMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680433#M105090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hartmut,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tested on MX6Q not MX6QT and latest BSP, frankly I did not see any issue with your code. however y&lt;SPAN style="color: black; background: white;"&gt;our VBOs create buffer objects in memory and allow the GPU to directly access memory without CPU&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;intervention (DMA). The memory manager can optimize buffer placement using feedback from the application. I suggest &amp;nbsp;to&amp;nbsp;implement dynamic VBO depending on your preference, but one recommendation is to allocate a 2 MB&amp;nbsp;dynamic VBO block and upload data to using different offsets for each dynamic buffer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; background: white;"&gt;Hope this helps&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 15:42:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680433#M105090</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2017-06-14T15:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: Graphical corruption when using Uniform Buffer Objects on iMX6</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680434#M105091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Bio_TICFSL,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I made a small program to recreate the problem. It is attached - in source, and compiled form, ready to run on iMX6.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also attached is screenshot of graphical corruption seen on iMX6 SABRESDB board (IMG_20170623_140751.jpg)) as well as a screenshot when program is working correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see&amp;nbsp;the problem, run ./textures, then click on the first rotating red cube. It should change into a smaller, faster rotating blue cube (as shown in Screenshot from 2017-06-23.png), but instead graphical corruption appears.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 12:21:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Graphical-corruption-when-using-Uniform-Buffer-Objects-on-iMX6/m-p/680434#M105091</guid>
      <dc:creator>hartmutbehrensf</dc:creator>
      <dc:date>2017-06-23T12:21:12Z</dc:date>
    </item>
  </channel>
</rss>

