All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierluigi Passaro <pierluigi.passaro@phoenixsoftware.it>
To: Otavio Salvador <otavio@ossystems.com.br>,
	 Lauren Post <lauren.post@freescale.com>
Cc: "meta-freescale@yoctoproject.org" <meta-freescale@yoctoproject.org>
Subject: Re: 3D mesh rendering segmentation fault
Date: Sat, 24 May 2014 18:58:30 +0200	[thread overview]
Message-ID: <5380CFB6.7050105@phoenixsoftware.it> (raw)
In-Reply-To: <CAP9ODKqdmx5i+WtVSzj4=46Jb4=HbnpBMAgvVL-fyEbGuYEsMA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

Hi all,

On 22/05/2014 18:40, Otavio Salvador wrote:
> Hello,
>
> On Thu, May 22, 2014 at 6:55 AM, Pierluigi Passaro
> <pierluigi.passaro@phoenixsoftware.it> wrote:
>> Hi all,
>> I compiled daisy branch of meta-qt5 against daisy branch of meta-fsl-arm for
>> a SabreSD with iMX6 Dual Lite.
>> I need to import and render standard 3D mesh file formats as PLY, STL, OFF,
>> OBJ, 3DS, ...
>>
>> When I try the load_model qt3d demo, the application crash for a
>> segmentation fault: attached you can find the gdb trace.
>>
>> Do you have any suggestion on how to approach the problem?
> This seems to be a GPU driver issue. I am adding Lauren to Cc so she
> can comment if it is a known issue or not.
>
I'm still playing with the 3D mesh rendering and I have found a 
workaround to avoid the crash.
Attached you can find a patch that change the effect related to the 
"material" used for rendering the mesh.
I'm not smart enough with QT rendering framework to analyze how this 
patch can avoid the crash, but I hope could help someone to give me a 
suggestion on how to solve the original issue.

Best Regards
Gigi

[-- Attachment #2: load_model_workaround.patch --]
[-- Type: text/x-patch, Size: 1475 bytes --]

diff --git a/examples/qt3d/load_model/load_model.cpp b/examples/qt3d/load_model/load_model.cpp
index 4b65da0..17b55c2 100644
--- a/examples/qt3d/load_model/load_model.cpp
+++ b/examples/qt3d/load_model/load_model.cpp
@@ -125,7 +125,7 @@ void FixNodesRecursive(int matIndex, QGLSceneNode* pNode)
 {
     if (pNode) {
         pNode->setMaterialIndex(matIndex);
-        pNode->setEffect(QGL::FlatReplaceTexture2D);
+        pNode->setEffect(QGL::LitMaterial);
         foreach (QGLSceneNode* pCh, pNode->children()) {
             FixNodesRecursive(matIndex, pCh);
         }
@@ -149,7 +149,7 @@ void LoadModelView::loadModels()
         QGLSceneNode* pTeapotSceneRoot = m_pTeapotScene->mainNode();
         int matIndex = pTeapotSceneRoot->palette()->addMaterial(mat);
         pTeapotSceneRoot->setMaterialIndex(matIndex);
-        pTeapotSceneRoot->setEffect(QGL::FlatReplaceTexture2D);
+        pTeapotSceneRoot->setEffect(QGL::LitMaterial);
         FixNodesRecursive(matIndex,pTeapotSceneRoot);
     }
 
@@ -168,7 +168,7 @@ void LoadModelView::loadModels()
         QGLSceneNode* pLanderSceneRoot = m_pLanderScene->mainNode();
         int matIndex = pLanderSceneRoot->palette()->addMaterial(mat);
         pLanderSceneRoot->setMaterialIndex(matIndex);
-        pLanderSceneRoot->setEffect(QGL::FlatReplaceTexture2D);
+        pLanderSceneRoot->setEffect(QGL::LitMaterial);
         FixNodesRecursive(matIndex,pLanderSceneRoot);
     }
 }

      reply	other threads:[~2014-05-24 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  9:55 3D mesh rendering segmentation fault Pierluigi Passaro
2014-05-22 16:40 ` Otavio Salvador
2014-05-24 16:58   ` Pierluigi Passaro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5380CFB6.7050105@phoenixsoftware.it \
    --to=pierluigi.passaro@phoenixsoftware.it \
    --cc=lauren.post@freescale.com \
    --cc=meta-freescale@yoctoproject.org \
    --cc=otavio@ossystems.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.