[Mesa-dev] [PATCH 4/7] i965/fs: Add reads_reg() and writes_flag() to fs_inst.

Matt Turner mattst88 at gmail.com
Tue Oct 22 22:43:11 CEST 2013


On Tue, Oct 22, 2013 at 1:30 PM, Ian Romanick <idr at freedesktop.org> wrote:
> On 10/22/2013 01:07 PM, Matt Turner wrote:
>> ---
>>  src/mesa/drivers/dri/i965/brw_fs.cpp | 16 ++++++++++++++++
>>  src/mesa/drivers/dri/i965/brw_fs.h   |  3 +++
>>  2 files changed, 19 insertions(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> index 77b898b..9b56764 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> @@ -730,6 +730,22 @@ fs_inst::regs_read(fs_visitor *v, int arg)
>>     return 1;
>>  }
>>
>> +bool
>> +fs_inst::reads_flag()
>> +{
>> +   if (predicate)
>> +      return true;
>> +   return false;
>
> This seems a bit more obvious:
>
>     return predicate != 0;

Yes, it would. I wrote it this way because I expect people will tell
me I missed some cases.


More information about the mesa-dev mailing list