Modern OpenGL (3+) and state sorting

Dear All,

let me have a general question, and confirmation:

In my game engine, I have a state graph to minimize the state changes.
Each mesh knows what ShaderProgram, and what Texture it uses,
and based on this info all of them are inserted into a simple graph, like below:
(sorry for the ascii art)

               ....
                /
      ShaderProgram1
         /           \
        /             \
     Texture1     Texture2
       /    \                  \
      /      \                  \
   Mesh1   Mesh2       Mesh3





My questions is:
This is my simple (and maybe bad) solution for state sorting, but in general,
is the state sorting stuff is still relevant on today’s GPU?

Should I still sort my meshes according to their Shader/Texture/Material whatever properties?

Or should I just simply draw the meshes, and let each mesh bind the ShaderProgram, and Texture it uses.
In that case a mesh would bind (glBindTexture) a texture which might be already bound,
or maybe it was already bound before by another similar mesh.

Thank You for sharing Your thoughts about this!
A

Yes, state sorting boosts performance. You can sort by shader, then texture (for example texture0).

Thank You, V-man, yes I do that kind of sorting,
I just wondered if this complication still needed,
but it seems yes.

Cheers
A