From: Jason Ekstrand Date: Mon, 14 Sep 2015 21:18:13 +0000 (-0700) Subject: i965/fs: Only read output_components many components when writing an output X-Git-Tag: upstream/17.1.0~16089 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51824000541d8df9f870cbe0823a3835c9403bff;p=platform%2Fupstream%2Fmesa.git i965/fs: Only read output_components many components when writing an output Reviewed-by: Kristian Høgsberg --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index cea16e0..8b61c86 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -974,8 +974,10 @@ fs_visitor::emit_urb_writes() sources[length++] = reg; } } else { - for (int i = 0; i < 4; i++) + for (int i = 0; i < output_components[varying]; i++) sources[length++] = offset(this->outputs[varying], bld, i); + for (int i = output_components[varying]; i < 4; i++) + sources[length++] = fs_reg(0); } break; }