[Mesa-dev] [PATCH] r600g: track whether we need to update the shaders

Jerome Glisse j.glisse at gmail.com
Wed Oct 6 10:04:02 PDT 2010

On Wed, Oct 6, 2010 at 12:22 PM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> The shaders only depend on the shader itself and the vertex_elements state and we don't need to emit the registers again if these are not changed. Tracking is also faster than the
> memcmp in r600_shader_update, so in some cases that expensive check doesn't have to be performed. I also optimized that expensive check by only looping through the first count
> elements, as the other elements don't matter.
> ---

You missed the case where flatshade value change, we need to rebuild
some of the register
in that case. Thought that can be optimized away in shader_update function


More information about the mesa-dev mailing list