[osg-users] [Toward DrawElementBaseVertex as drawcall]

Julien Valentin julienvalentin51 at gmail.com
Tue Feb 14 12:55:46 PST 2017


Hello Robert,
I achieve a basevertex example and debug with nvidia gl debugger.
It appears that glBindVertexArrayObject seams to have a cost 500ns when param!=0 !?

I added a check not to call glBindVertexArrayObject when currentbound doesn't change and achieve the same perf as my rejected submission (a near 0 draw submission overhead) 

Code:
void VertexArrayState::bindVertexArrayObject() const {
    if(_state->getCurrentBoundVAO()!=_vertexArrayObject){
        _state->setCurrentBoundVAO(_vertexArrayObject);
        _ext->glBindVertexArray (_vertexArrayObject);
    }
 }

void VertexArrayState::unbindVertexArrayObject() const {
     if(_state->getCurrentBoundVAO()!=0){
         _state->setCurrentBoundVAO(0);
         _ext->glBindVertexArray (0);
    }
 }
////and inlined getSetBoundVAO in osg/state



However, there should something I missed because with this mod, regular path (without bo factorization) exhibits few more gl calls

Cheers


robertosfield wrote:
> Hi Julien,
> 
> On 6 February 2017 at 10:33, Julien Valentin <> wrote:
> 
> > I remember your rejection, but it's not what I asked.
> > I would like your sentiment about what the book extract says about efficient draw submission and basevertex based drawcall....
> > 
> 
> Personally I have plenty of more pressing things to work on the OSG
> than chase after a possible small benefit.  For OSG-3.6 my focus will
> be completing my work on fixed function -> shader pipeline and fixing
> bugs.
> 
> Please remember these potential gains are in the wider context of real
> application with a wider range of different potential bottlenecks,
> typically the CPU and GPU bottlenecks be such that you may not see
> expected benefits.
> 
> The right way to optimize graphics applications is benchmark test
> cases that most closely follow the needs that your
> application/OS/hardware with require when dealing with real datasets.
> Narrow benchmarks won't typically reveal what bottlenecks the full
> application and full data will see so you have to be very careful
> about extrapolating possible bottlenecks.  With the full application
> and data tests you get a real picture of the what are the biggest
> bottlenecks and these are ones that you will see the most benefit from
> optimizing.
> 
> Given this context I would be sceptical about how much value will see
> in sharing VAO and using base vertex.  With anything that adds
> complexity to the API and implementation you need to make sure there
> is real value in added them to justify this complexity.
> 
> Robert.
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum

Code:




------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70192#70192








More information about the osg-users mailing list