[Mesa-dev] [PATCH] i965: report correct sample positions

Paul Berry stereotype441 at gmail.com
Tue Apr 23 12:55:11 PDT 2013


On 23 April 2013 11:54, Chris Forbes <chrisf at ijw.co.nz> wrote:

> 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 at ijw.co.nz>
>

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> ---
>  src/mesa/drivers/dri/i965/gen6_multisample_state.c | 8 ++++----
>  1 file 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 35071e8..534abc2 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:
> --
> 1.8.2.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130423/3515cd68/attachment.html>


More information about the mesa-dev mailing list