[Mesa-dev] [PATCH 2/4] mesa: Set UsesDFdy appropriately for assembly programs.

Ian Romanick idr at freedesktop.org
Wed Jul 18 15:12:51 PDT 2012


On 07/18/2012 02:50 PM, Kenneth Graunke wrote:
> On 07/18/2012 12:16 PM, Paul Berry wrote:
>> ---
>>   src/mesa/program/arbprogparse.c   |    1 +
>>   src/mesa/program/program_parse.y  |    2 ++
>>   src/mesa/program/program_parser.h |    1 +
>>   3 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/src/mesa/program/arbprogparse.c b/src/mesa/program/arbprogparse.c
>> index dffc8ab..72e51dd 100644
>> --- a/src/mesa/program/arbprogparse.c
>> +++ b/src/mesa/program/arbprogparse.c
>> @@ -120,6 +120,7 @@ _mesa_parse_arb_fragment_program(struct gl_context* ctx, GLenum target,
>>      program->PixelCenterInteger = state.option.PixelCenterInteger;
>>
>>      program->UsesKill            = state.fragment.UsesKill;
>> +   program->UsesDFdy            = state.fragment.UsesDFdy;
>
> This reminds me, could you do something similar to clean up the
> kill_emitted flag in brw_fs_visitor?  It's kind of a hack, and I seem to
> recall that we wanted to do the kind of front-end plumbing you're
> already doing here.
>
> Not to mention there already seems to be a UsesKill flag...

I thought there were two problems with that.  First, we try to optimize 
away the kill instructions, and it's hard to unset a flag.  Second, 
there are other things that cause kill_emitted to get set (alpha test?).


More information about the mesa-dev mailing list