[Mesa-dev] [PATCH 1/5] mesa: replace ctx->Const.{Vertex, Fragment, Geomtery}Program with an array.
Kenneth Graunke
kenneth at whitecape.org
Wed Jan 8 13:22:02 PST 2014
On 01/08/2014 11:20 AM, Paul Berry wrote:
> These are replaced with
> ctx->Const.Program[MESA_SHADER_{VERTEX,FRAGMENT,GEOMETRY}]. In
> patches to follow, this will allow us to replace a lot of ad-hoc logic
> with a variable index into the array.
>
> With the exception of the changes to mtypes.h, this patch was
> generated entirely by the command:
>
> find src -type f '(' -iname '*.c' -o -iname '*.cpp' -o -iname '*.py' \
> -o -iname '*.y' ')' -print0 | xargs -0 sed -i \
> -e 's/Const\.VertexProgram/Const.Program[MESA_SHADER_VERTEX]/g' \
> -e 's/Const\.GeometryProgram/Const.Program[MESA_SHADER_GEOMETRY]/g' \
> -e 's/Const\.FragmentProgram/Const.Program[MESA_SHADER_FRAGMENT]/g'
>
> Suggested-by: Brian Paul <brianp at vmware.com>
I didn't know about the ( ... -o ... ) syntax for find. Thanks :D
You deleted a surprising amount of ugly code! Fantastic. Good
suggestion from Brian, and nice work here, Paul.
Series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list