mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
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 <chrisf@ijw.co.nz> Reviewed-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
49a7624973
commit
447bf1fb52
1 changed files with 4 additions and 4 deletions
|
|
@ -83,14 +83,14 @@ gen6_get_sample_position(struct gl_context *ctx,
|
||||||
break;
|
break;
|
||||||
case 4: {
|
case 4: {
|
||||||
uint8_t val = (uint8_t)(sample_positions_4x[0] >> (8*index));
|
uint8_t val = (uint8_t)(sample_positions_4x[0] >> (8*index));
|
||||||
result[0] = (val & 0xf) / 16.0f;
|
result[0] = ((val >> 4) & 0xf) / 16.0f;
|
||||||
result[1] = ((val >> 4) & 0xf) / 16.0f;
|
result[1] = (val & 0xf) / 16.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 8: {
|
case 8: {
|
||||||
uint8_t val = (uint8_t)(sample_positions_8x[index>>2] >> (8*(index & 3)));
|
uint8_t val = (uint8_t)(sample_positions_8x[index>>2] >> (8*(index & 3)));
|
||||||
result[0] = (val & 0xf) / 16.0f;
|
result[0] = ((val >> 4) & 0xf) / 16.0f;
|
||||||
result[1] = ((val >> 4) & 0xf) / 16.0f;
|
result[1] = (val & 0xf) / 16.0f;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue