[Mesa-stable] [Mesa-dev] [PATCH 2/3] i965: Use a gl_color_union for sampler border color.
Matt Turner
mattst88 at gmail.com
Fri Feb 6 12:19:31 PST 2015
On Fri, Feb 6, 2015 at 4:47 AM, Ian Romanick <idr at freedesktop.org> wrote:
> On 02/06/2015 02:32 PM, Kenneth Graunke wrote:
>> This should have no effect, but will make it easier to implement other
>> bug fixes.
>>
>> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
>> Cc: Chris Forbes <chrisf at ijw.co.nz>
>> Cc: mesa-stable at lists.freedesktop.org
>> ---
>> src/mesa/drivers/dri/i965/brw_sampler_state.c | 107 +++++++++++++-------------
>> 1 file changed, 54 insertions(+), 53 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c
>> index 0fe0853..c6a8ab1 100644
>> --- a/src/mesa/drivers/dri/i965/brw_sampler_state.c
>> +++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c
>> @@ -208,7 +208,9 @@ upload_default_color(struct brw_context *brw,
>> struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
>> struct gl_texture_object *texObj = texUnit->_Current;
>> struct gl_texture_image *firstImage = texObj->Image[0][texObj->BaseLevel];
>> - float color[4];
>> + union gl_color_union color;
>> +
>> + unsigned one = float_as_int(1.0);
>
> const?
Since it's only used in two places, I'd opt to not make a variable at
all. float_as_int() is an inline function and it's pretty clear what
it does.
More information about the mesa-stable
mailing list