Hi Jordi,

I have reviewed your patch and Ulrich's and feel that Ulrich's a bit
cleaner so I have gone with his change. Could you please update to
latest svn/trunk and check that this works fine with your compiler.

Thanks,
Robert.

On 3 April 2012 11:51, Jordi Torres <[email protected]> wrote:
> Hi,
>
> Last changes breaks our linux compilation (Ubuntu 10.04 gcc 4.4.3), I guess
> you don't see these errors with gcc > 4.4.3:
>
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix2&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2149: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix3&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2157: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix2x3&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2173: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix2x4&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2181: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix3x2&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2189: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix3x4&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2197: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix4x2&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2205: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix4x3&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2213: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix2d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2259: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix3d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2267: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix2x3d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2287: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix2x4d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2295: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix3x2d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2303: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix3x4d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2311: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix4x2d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2319: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp: In member function
> ‘bool osg::Uniform::getElement(unsigned int, osg::Matrix4x3d&) const’:
> /home/jizquierdo/osg_testing/trunk/src/osg/Uniform.cpp:2327: error:
> ‘template<class T, unsigned int ColN, unsigned int RowN> class
> osg::MatrixTemplate’ used without template parameters
> make[2]: *** [src/osg/CMakeFiles/osg.dir/Uniform.o] Error 1
>
>  attached is a patch to fix the problems.
>
>
>
>
>
> 2012/3/30 David Callu <[email protected]>
>>
>> Hi Robert
>>
>>
>> I change in shader  "#version 420 compatibility" by required extensions
>> I change the hardware support test like in osgVolume
>>
>>
>> I try to optimize osgatomiccounter example in many way but I haven't got
>> better result.
>> - I try to disable VSync, didn't change the frame time,
>> - I try to do double/triple/... buffering of atomic counter buffer, didn't
>> change the frame time,
>>
>> To resume,  N=number of buffer
>> with N=2 ot N=3
>> if I write/use the Buffer N and I read the buffer N, Draw time ~= GPU time
>> I suppose application have to wait GL finish its work before read the
>> buffer
>>
>> if I write/use the Buffer N and I read the buffer N-1, Draw time ~= GPU
>> time
>> well, application is not blocked by GL, so what happen ?
>>
>> if I write/use the Buffer N and I read the buffer N+1, Draw time ~= GPU
>> time
>> same comment
>>
>> with N=4 and above
>> if I write/use the Buffer N and I read the buffer N+1, Draw time ~= 0,35
>> and GPU time ~= 14.5
>> so application can easily read the buffer, but GL take a while to bind
>> buffer for write/use in next frame.
>>
>>
>>
>> So if my brain is not too crazy after so many test,
>> Atomic counter buffer take a while to swap between read and write mode.
>> Read a buffer used in current frame or in previous frame take a while.
>> Read a buffer used 3 frame ago or above is really fast but next bind will
>> take a while.
>>
>> To reproduce my test, export OSG_NOTIFY_LEVEL=INFO and use options
>>   --num-buffer      Number of buffer use in buffer ring for read/write
>> usage.
>>   --num-read        Number of buffer readback in FinalDrawCallback.
>>   --offset          Number of buffer in buffer ring between buffer
>> write/use in
>>                     shader and buffer readback in FinalDrawCallback.
>>
>>
>> Perhaps an example without all this test stuff will be better to show
>> howto use Atomic Counter Buffer.
>> Thoughts ?
>>
>>
>> Cheers
>> David
>>
>>
>> 2012/3/29 Robert Osfield <[email protected]>
>>>
>>> Hi David,
>>>
>>> I have now merged and checked in all your changes, the OSG now support
>>> atomic counter buffer ;-)
>>>
>>> Robert.
>>> _______________________________________________
>>> osg-submissions mailing list
>>> [email protected]
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>>
>>
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>>
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>
>
>
> --
> Jordi Torres Fabra
>
> gvSIG 3D blog
> http://gvsig3d.blogspot.com
> Instituto de Automática e Informática Industrial
> http://www.ai2.upv.es
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to