[Mesa-dev] [PATCH 12/15] i965: Pull out layer_multiplier in intel_update_renderbuffer_wrapper
Kenneth Graunke
kenneth at whitecape.org
Tue Feb 4 20:39:58 PST 2014
On 01/25/2014 05:00 PM, Chris Forbes wrote:
> On Thu, Jan 23, 2014 at 6:58 AM, Courtney Goeltzenleuchter <courtney at lunarg.com> wrote:
>> On Tue, Jan 21, 2014 at 3:34 AM, Chris Forbes <chrisf at ijw.co.nz> wrote:
>>>
>>> We're about to need this in another place.
>>>
>>> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
>>> ---
>>> src/mesa/drivers/dri/i965/intel_fbo.c | 7 +++++--
>>> 1 file changed, 5 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c
>>> b/src/mesa/drivers/dri/i965/intel_fbo.c
>>> index 4cdf54d..e7c5571 100644
>>> --- a/src/mesa/drivers/dri/i965/intel_fbo.c
>>> +++ b/src/mesa/drivers/dri/i965/intel_fbo.c
>>> @@ -433,16 +433,19 @@ intel_renderbuffer_update_wrapper(struct
>>> brw_context *brw,
>>> intel_miptree_check_level_layer(mt, level, layer);
>>> irb->mt_level = level;
>>>
>>> + int layer_multiplier;
>>>
>> Shouldn't this declaration be at the top of the function?
>
> Since we're not restricted to C89 in the driver, I put it as close to
> the point of use as possible -- but yes, I can move it to the top of
> the function if you think that's clearer.
FWIW, I prefer putting declarations closer to their use...I'd stick with
the way you did it. C99 is fine in the driver, since nobody uses MSVC
on it.
--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140204/8347cabb/attachment.pgp>
More information about the mesa-dev
mailing list