[Mesa-dev] [PATCH 6/7] gallium/radeon: remove predicate_drawing flag

Marek Olšák maraeo at gmail.com
Tue Nov 10 03:22:31 PST 2015


On Mon, Nov 9, 2015 at 10:55 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 08.11.2015 22:48, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.olsak at amd.com>
>>
>> ---
>>   src/gallium/drivers/r600/r600_hw_context.c    | 2 +-
>>   src/gallium/drivers/r600/r600_state_common.c  | 2 +-
>>   src/gallium/drivers/radeon/r600_pipe_common.h | 1 -
>>   src/gallium/drivers/radeon/r600_query.c       | 1 -
>>   src/gallium/drivers/radeonsi/si_state_draw.c  | 2 +-
>>   5 files changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/src/gallium/drivers/r600/r600_hw_context.c
>> b/src/gallium/drivers/r600/r600_hw_context.c
>> index 44e7cf2..2383175 100644
>> --- a/src/gallium/drivers/r600/r600_hw_context.c
>> +++ b/src/gallium/drivers/r600/r600_hw_context.c
>> @@ -81,7 +81,7 @@ void r600_need_cs_space(struct r600_context *ctx,
>> unsigned num_dw,
>>         }
>>
>>         /* Count in render_condition(NULL) at the end of CS. */
>> -       if (ctx->b.predicate_drawing) {
>> +       if (ctx->b.current_render_cond) {
>>                 num_dw += 3;
>>         }
>
>
> Aside: What is this actually trying to count? The way I understand
> conditional drawing now, there is no reset state that we have to emit at the
> end of the CS (other than for the queries themselves, but AFAIU that is
> already counted by num_cs_dw_nontimer_queries_suspend above). Perhaps this
> block could actually be dropped entirely?

Yes, good catch. I'll drop this block in patch 4 "gallium/radeon:
simplify restoring render condition after flush" before pushing.

Marek


More information about the mesa-dev mailing list