[Mesa-dev] [PATCH 05/14] i965/compaction: Make src_offset local to the for loop.

Matt Turner mattst88 at gmail.com
Sat Aug 30 15:12:30 PDT 2014


On Sat, Aug 30, 2014 at 2:43 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Thursday, August 28, 2014 08:10:35 PM Matt Turner wrote:
>> ---
>>  src/mesa/drivers/dri/i965/brw_eu_compact.c | 17 +++++++----------
>>  1 file changed, 7 insertions(+), 10 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_eu_compact.c b/src/mesa/drivers/dri/i965/brw_eu_compact.c
>> index 5617947..dd32175 100644
>> --- a/src/mesa/drivers/dri/i965/brw_eu_compact.c
>> +++ b/src/mesa/drivers/dri/i965/brw_eu_compact.c
>> @@ -737,6 +737,8 @@ brw_try_compact_instruction(struct brw_context *brw, brw_compact_inst *dst,
>>  {
>>     brw_compact_inst temp;
>>
>> +   assert(brw_inst_cmpt_control(brw, src) == 0);
>
> This seems unrelated to the patch title, but probably a good idea nonetheless.

I think this was supposed to be in another patch, but I don't see
which one. I can split it out.

> However, it looks like you're making it so calling brw_compact_instructions()
> multiple times will now assert fail, instead of simply doing nothing on later iterations.  Did you intend for that to happen?

Yes, as intended. Back in commit 9976294e I added the start_offset
parameter to brw_compact_instructions() so that we didn't walk over
the whole SIMD8 program when compacting the SIMD16 program. I guess I
should have put this hunk in *that* patch. :)


More information about the mesa-dev mailing list