summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_state_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r600/r600_state_common.c')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index 879ec3522ee..c3f21cb93ae 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -1103,6 +1103,9 @@ void r600_set_sample_locations_constant_buffer(struct r600_context *rctx)
assert(rctx->framebuffer.nr_samples <= Elements(values)/4);
for (i = 0; i < rctx->framebuffer.nr_samples; i++) {
ctx->get_sample_position(ctx, rctx->framebuffer.nr_samples, i, &values[4*i]);
+ /* Also fill in center-zeroed positions used for interpolateAtSample */
+ values[4*i + 2] = values[4*i + 0] - 0.5f;
+ values[4*i + 3] = values[4*i + 1] - 0.5f;
}
constbuf.user_buffer = values;