[Mesa-dev] [PATCH 04/19] i965/fs: Store the number of sources an fs_inst has.

Matt Turner mattst88 at gmail.com
Sun Jun 1 13:21:31 PDT 2014


On Sat, May 31, 2014 at 10:05 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> On Tuesday, May 27, 2014 06:47:35 PM Matt Turner wrote:
>> ---
>>  src/mesa/drivers/dri/i965/brw_fs.cpp | 21 +++++++++++----------
>>  src/mesa/drivers/dri/i965/brw_fs.h   |  3 ++-
>>  2 files changed, 13 insertions(+), 11 deletions(-)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp
> b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> index b06966a..a9a8ac1 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
>> @@ -52,11 +52,12 @@ extern "C" {
>>  #include "glsl/glsl_types.h"
>>
>>  void
>> -fs_inst::init()
>> +fs_inst::init(int sources)
>>  {
>>     memset(this, 0, sizeof(*this));
>>
>> -   this->src = ralloc_array(this, fs_reg, 3);
>> +   this->sources = sources;
>> +   this->src = ralloc_array(this, fs_reg, sources);
>>
>>     this->conditional_mod = BRW_CONDITIONAL_NONE;
>>
>> @@ -73,19 +74,19 @@ fs_inst::init()
>>
>>  fs_inst::fs_inst()
>>  {
>> -   init();
>> +   init(3);
>
> Why 3?  Seems like a waste.

Yes, I didn't want to make a functional change as well.


More information about the mesa-dev mailing list