mesa: Move {split,merge}_location_offset to uniforms.h
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 13 Oct 2011 20:42:56 +0000 (13:42 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Nov 2011 21:33:16 +0000 (13:33 -0800)
commit637a7eb9e981d7dbe3bdb0c39712a9183ea19e9c
tree532d5cb5ce26d31dbc2a80a06bc48da683a231ea
parent4ad460991cb1f4d8904b075133af414a624a27f3
mesa: Move {split,merge}_location_offset to uniforms.h

Prepend _mesa_uniform_ to the names and rework the calling
convention.  The calling convention was changed for a couple reasons.

1. Having a single variable named 'location' have completely different
meanings at different places in the function is confusing.  Before
calling split_location_offset the location is the encoded value
returned by glGetUniformLocation.  After calling split_location_offset
it's the index of the uniform in the gl_uniform_list::Uniforms array.

2. In a later commit the original value of 'location' is needed after
split_location_offset has been called.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
src/mesa/main/uniforms.c
src/mesa/main/uniforms.h