[Mesa-dev] [PATCH] r600g: Avoid setting one gpu register multiple times in a r600_pipe_state

Henri Verbeet hverbeet at gmail.com
Sun Mar 13 09:34:08 PDT 2011


2011/3/13 Mathias Fröhlich <Mathias.Froehlich at gmx.net>:
> It does not fix anything. This change is supposed to produce the same command
> stream than before.
> I discovered that r600_context_pipe_state_set is one of the userspace
> functions that are high in profiles for my use cases, I was looking for
> duplicate registers within a single pipe_state_set in all r600_pipe_state
> structs around.
> This was the only place where I found duplicate registers.
> The effect of the patch is not measurable in performance, but I think that this
> duplication can be easily avoided.
>
Ok, pushed. You had some whitespace issues, I've fixed those, but for
future reference please note that r600g uses tabs for indentation.
Thinking about the patch some more though, I wonder if the original
code wasn't wrong anyway. I think it could cause e.g. Z_EXPORT_ENABLE
to be incorrectly set when switching from a shader that exports depth
to one that doesn't.


More information about the mesa-dev mailing list