aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-14 14:18:13 -0700
committerJason Ekstrand <[email protected]>2015-09-15 11:08:12 -0700
commit51824000541d8df9f870cbe0823a3835c9403bff (patch)
tree06a169dd8b1656f24b119c247501d514927298e0 /src/mesa/drivers
parentf55836f5671de5381a609c8d45601e2a92c803ce (diff)
i965/fs: Only read output_components many components when writing an output
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index cea16e0b325..8b61c867602 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;
}