Mike Gorchak
|
How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/26/2009 4:01 AM
post25278
|
How to unset surface which was set by gf_layer_set_surfaces() ?
Is is possible to unset surface which was set by gf_layer_set_surfaces() function ?
I ask this, because if surface was set by gf_layer_set_surfaces() function, and then it passed to gf_3d_target_create()
function, there is no any OpenGL ES output, just black screen.
If I do not set this surface to layer, all OpenGL ES stuff works fine.
|
|
|
Derek Leach
|
RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
03/26/2009 5:08 AM
post25286
|
RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Hmm ... was the return code from gf_layer_set_surfaces() is very simple routine, it cannot even fail ...
Did you create the surface with gf_surface_create_layer()?
If you pass NULL for the 'surfaces' parameter to gf_3d_target_create() , it uses gf_surface_create_layer() to create at
least surfaces[0].
Regards,
-Derek
________________________________
From: Mike Gorchak [mailto:community-noreply@qnx.com]
Sent: Thu 26/03/2009 4:01 AM
To: advanced-graphics
Subject: How to unset surface which was set by gf_layer_set_surfaces() ?
Is is possible to unset surface which was set by gf_layer_set_surfaces() function ?
I ask this, because if surface was set by gf_layer_set_surfaces() function, and then it passed to gf_3d_target_create()
function, there is no any OpenGL ES output, just black screen.
If I do not set this surface to layer, all OpenGL ES stuff works fine.
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post25278
|
|
|
Mike Gorchak
|
Re: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/26/2009 6:12 AM
post25292
|
Re: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
> Hmm ... was the return code from gf_layer_set_surfaces() is very simple
> routine, it cannot even fail ...
Who said that it fails ? It returns void :) But layer_update() did not failed.
> Did you create the surface with gf_surface_create_layer()?
Yes.
> If you pass NULL for the 'surfaces' parameter to gf_3d_target_create() , it
> uses gf_surface_create_layer() to create at least surfaces[0].
If I call gf_layer_set_surfaces() for main display layer, after this call there is no any output (visible output)
produced by OpenGL, it doesn't matter if I will pass NULL to gf_3d_target_create() or will pass real surface.
|
|
|
Derek Leach
|
RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
03/26/2009 6:24 AM
post25293
|
RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
[snip]
> Hmm ... was the return code from gf_layer_set_surfaces() is very simple
> routine, it cannot even fail ...
Who said that it fails ? It returns void :) But layer_update() did not failed.
[snip]
I knew this after I looked at the code, but I did not edit my answer enough :)
|
|
|
Mike Gorchak
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/26/2009 6:38 AM
post25296
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
So is the solution just not to call gf_layer_set_surfaces() if I want just OpenGL ES output without 2D operations ?
|
|
|
Derek Leach
|
RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
03/26/2009 6:40 AM
post25298
|
RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
short answer is: yes
________________________________
From: Mike Gorchak [mailto:community-noreply@qnx.com]
Sent: Thu 26/03/2009 6:38 AM
To: advanced-graphics
Subject: Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
So is the solution just not to call gf_layer_set_surfaces() if I want just OpenGL ES output without 2D operations ?
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post25296
|
|
|
Derek Leach
|
RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
03/26/2009 6:39 AM
post25297
|
RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
OK, I do not like this ... gf_layer_set_surfaces() should have a return value and fail if this operation is not
supported, but it basically just stuffs pointers into a structure. But since it does not have a return value, I digress
...
I don't understand the subtleties involved with gf_3d_target_t. Is there a particular reason you want to call
gf_layer_set_surfaces() ?
The demo applications let all the gf_3d_xxxx() calls handle the surface creations. Yes, I know those applications are
not posted yet. :) If you require it, I can post the code for gears for reference.
I will fwd this message, to get a better response.
Regards,
-Derek
________________________________
From: Mike Gorchak [mailto:community-noreply@qnx.com]
Sent: Thu 26/03/2009 6:12 AM
To: advanced-graphics
Subject: Re: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
> Hmm ... was the return code from gf_layer_set_surfaces() is very simple
> routine, it cannot even fail ...
Who said that it fails ? It returns void :) But layer_update() did not failed.
> Did you create the surface with gf_surface_create_layer()?
Yes.
> If you pass NULL for the 'surfaces' parameter to gf_3d_target_create() , it
> uses gf_surface_create_layer() to create at least surfaces[0].
If I call gf_layer_set_surfaces() for main display layer, after this call there is no any output (visible output)
produced by OpenGL, it doesn't matter if I will pass NULL to gf_3d_target_create() or will pass real surface.
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post25292
|
|
|
Mike Gorchak
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/26/2009 7:41 AM
post25303
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
> I don't understand the subtleties involved with gf_3d_target_t. Is there a
> particular reason you want to call gf_layer_set_surfaces() ?
Yes, I want to create 2D and 3D targetable surface and draw to it using OpenGL ES and GF. Like demo egl-intermix does.
> The demo applications let all the gf_3d_xxxx() calls handle the surface
> creations. Yes, I know those applications are not posted yet. :) If you
> require it, I can post the code for gears for reference.
It would be nice to have egl-intermix demo for my case.
|
|
|
Derek Leach
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
03/26/2009 9:13 AM
post25316
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Ah! egl-intermix kind of "cheats" by using ROPs. You could accomplish this by using two layers as well.
-Derek
|
|
|
Mike Gorchak
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/26/2009 12:19 PM
post25365
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
I have found where the problem is, thanks to egl-intermix demo source. My function sequence call is:
1) gf_layer_attach();
2) gf_surface_create_layer();
3) gf_layer_set_surfaces();
4) gl_layer_enable();
------------------------------
5) gf_surface_free()
6) gf_layer_disable()
7) gf_layer_detach()
after this initialization and shutdown I changed video mode using gf_display_set_mode() and then set layer settings
again:
8) gf_layer_attach();
9) gf_surface_create_layer();
10) gf_layer_set_surfaces();
11) gl_layer_enable();
After this point OpenGL ES initialization gives black screen only. Experimentally I've found that problem line has
number 3). If I comment out this line everything works properly until next video mode switch.
|
|
|
Mike Gorchak
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/27/2009 2:09 AM
post25419
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
> Ah! egl-intermix kind of "cheats" by using ROPs. You could accomplish this
> by using two layers as well.
>
> -Derek
This is modified main.c from egl-intermix test application, which reproduces the problem which described in the
beginning of this thread.
My code begins with comment:
/******************************************************************/
/* Here is my code, which causes black screen in OpenGL ES render */
/******************************************************************/
After this comment below present one more comment:
/**************************************************************************/
/* Comment out this line to get rid of bug */
/**************************************************************************/
gf_layer_set_surfaces(layer, &gfsurface[0], 1);
/**************************************************************************/
/* End of bug :) */
/**************************************************************************/
When you comment out the whole gf_layer_set_surfaces() line, egl-intermix application will work as usual.
|
|
|
Mike Gorchak
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/27/2009 7:10 AM
post25435
|
Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Derek, are you able to reproduce this problem using my patched egl-intermix source ?
|
|
|
Derek Leach
|
RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
03/27/2009 7:11 AM
post25436
|
RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
I don't have time just yet to try it, but I will ...
________________________________
From: Mike Gorchak [mailto:community-noreply@qnx.com]
Sent: Fri 27/03/2009 7:10 AM
To: advanced-graphics
Subject: Re: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Derek, are you able to reproduce this problem using my patched egl-intermix source ?
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post25435
|
|
|
Mike Gorchak
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
03/27/2009 7:21 AM
post25437
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
|
|
Mike Gorchak
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
04/01/2009 4:32 PM
post25802
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
I have an additional information. This bug can't be reproduced on devg-radeon graphics driver, but on devg-extreme2 (on
82852GM, 82865G, etc) it could be reproduced without any problem.
|
|
|
Derek Leach
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
04/07/2009 4:58 AM
post26170
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Hi Mike,
Can you please try the attached version with the Intel chipsets, and see if there is any difference? The the problem
persists, my best guess is that the Intel drivers are still referencing the free'd surface even though the layer had
been disabled and detached.
Thanks,
-Derek
|
|
|
Mike Gorchak
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
04/07/2009 5:39 AM
post26178
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
> Hi Mike,
>
> Can you please try the attached version with the Intel chipsets, and see if
> there is any difference? The the problem persists, my best guess is that the
> Intel drivers are still referencing the free'd surface even though the layer
> had been disabled and detached.
>
> Thanks,
> -Derek
I have no hardware to test right now, but I'll test it this evening. Thanks.
|
|
|
Mike Gorchak
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
04/07/2009 1:57 PM
post26256
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
> Can you please try the attached version with the Intel chipsets, and see if
> there is any difference? The the problem persists, my best guess is that the
> Intel drivers are still referencing the free'd surface even though the layer
> had been disabled and detached.
I cannot see any difference in behavior of egl-intermix. Problem still persist.
P.S. This issue is very critical for me, since it stops development.
|
|
|
Derek Leach
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
04/08/2009 5:08 AM
post26320
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Hi Mike,
I will forward this message to someone else for comment, and decide on a course of action from there. I used the devg-
vmware.so driver and the test application, and with my modications, ran OK. It suspect though, that devg-extreme2 may
still be referencing the released surface memory.
Kind regards,
-Derek
|
|
|
Mike Gorchak
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
04/13/2009 5:41 AM
post26735
|
Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
|
|
Derek Leach
|
RE: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Derek Leach
04/13/2009 5:54 AM
post26736
|
RE: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Yes, but not good, appears to be an issue solely with devg-extreme2.so. I have filed PR67274 on your behalf. Please
escalate it with your techsupport/sales rep.
________________________________
From: Mike Gorchak [mailto:community-noreply@qnx.com]
Sent: Mon 13/04/2009 5:41 AM
To: advanced-graphics
Subject: Re: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
Any news ?
_______________________________________________
Advanced Graphics
http://community.qnx.com/sf/go/post26735
|
|
|
Mike Gorchak
|
Re: RE: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
Mike Gorchak
04/13/2009 6:12 AM
post26739
|
Re: RE: RE: RE: RE: How to unset surface which was set by gf_layer_set_surfaces() ?
|
|
|
|