[Mesa-dev] [PATCH] radeonsi: drop useless memcmp() check in si_set_blend_color()

Marek Olšák maraeo at gmail.com
Fri May 26 14:42:05 UTC 2017


On Fri, May 26, 2017 at 1:45 AM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> err, used in si_begin_new_cs(). Ignore for now.

Why? The patch seems good. It's not very important because radeonsi is
behind u_threaded_context. Anyway:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

>
> On 05/26/2017 01:42 AM, Samuel Pitoiset wrote:
>>
>> cso_set_blend_color() already checks if the old state is different.
>> Only Nine uses pipe::set_blend_color() directly but I guess it
>> should use the cache too.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>>   src/gallium/drivers/radeonsi/si_state.c | 3 ---
>>   1 file changed, 3 deletions(-)
>>
>> diff --git a/src/gallium/drivers/radeonsi/si_state.c
>> b/src/gallium/drivers/radeonsi/si_state.c
>> index 363f32170a..ae7c91f475 100644
>> --- a/src/gallium/drivers/radeonsi/si_state.c
>> +++ b/src/gallium/drivers/radeonsi/si_state.c
>> @@ -619,9 +619,6 @@ static void si_set_blend_color(struct pipe_context
>> *ctx,
>>   {
>>         struct si_context *sctx = (struct si_context *)ctx;
>>   -     if (memcmp(&sctx->blend_color.state, state, sizeof(*state)) == 0)
>> -               return;
>> -
>>         sctx->blend_color.state = *state;
>>         si_mark_atom_dirty(sctx, &sctx->blend_color.atom);
>>   }
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list