[Mesa-dev] [PATCH 2/3] i965/fs: Don't generate saturates over existing variable values.

Andreas Boll andreas.boll.dev at gmail.com
Wed Nov 28 10:49:14 PST 2012


2012/11/28 Kenneth Graunke <kenneth at whitecape.org>:
> On 11/27/2012 12:12 AM, Eric Anholt wrote:
>>
>> Fixes a crash in http://workshop.chromeexperiments.com/stars/ on i965,
>> and the new piglit test glsl-fs-clamp-5.
>> We were trying to emit a saturating move into a uniform, which the code
>> generator appropriately choked on.  This was broken in the change in
>> 32ae8d3b321185a85b73ff703d8fc26bd5f48fa7.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57166
>> ---
>>   src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |    1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> index b6f7771..48ffc83 100644
>> --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
>> @@ -217,6 +217,7 @@ fs_visitor::try_emit_saturate(ir_expression *ir)
>>       */
>>      fs_inst *modify = get_instruction_generating_reg(pre_inst, last_inst,
>> src);
>>      if (!modify || modify->regs_written() != 1) {
>> +      this->result = fs_reg(this, ir->type);
>>         fs_inst *inst = emit(MOV(this->result, src));
>>         inst->saturate = true;
>>      } else {
>
>
> NOTE: This is a candidate for stable branches.

Should be a candidate only for 9.0

32ae8d3b321185a85b73ff703d8fc26bd5f48fa7 affects 9.0 and master only

>
> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list