aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen6_multisample_state.c
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-04-24 06:44:02 +1200
committerChris Forbes <[email protected]>2013-04-25 20:47:54 +1200
commit447bf1fb524f1f451baa67ea172caa2ed51369c7 (patch)
tree0c508747848d6bcefe0bd2ce2d9c9084888c097a /src/mesa/drivers/dri/i965/gen6_multisample_state.c
parent49a7624973870289a10b17778709c4c2a676fb12 (diff)
i965: report correct sample positions
From low to high bits, the sample positions are packed y0,x0,y1,x1... Fixes arb_texture_multisample-sample-position piglit. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen6_multisample_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen6_multisample_state.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_multisample_state.c b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
index 35071e846be..534abc212b6 100644
--- a/src/mesa/drivers/dri/i965/gen6_multisample_state.c
+++ b/src/mesa/drivers/dri/i965/gen6_multisample_state.c
@@ -83,14 +83,14 @@ gen6_get_sample_position(struct gl_context *ctx,
break;
case 4: {
uint8_t val = (uint8_t)(sample_positions_4x[0] >> (8*index));
- result[0] = (val & 0xf) / 16.0f;
- result[1] = ((val >> 4) & 0xf) / 16.0f;
+ result[0] = ((val >> 4) & 0xf) / 16.0f;
+ result[1] = (val & 0xf) / 16.0f;
break;
}
case 8: {
uint8_t val = (uint8_t)(sample_positions_8x[index>>2] >> (8*(index & 3)));
- result[0] = (val & 0xf) / 16.0f;
- result[1] = ((val >> 4) & 0xf) / 16.0f;
+ result[0] = ((val >> 4) & 0xf) / 16.0f;
+ result[1] = (val & 0xf) / 16.0f;
break;
}
default: