[Mesa-dev] [PATCH 1/4] gallium: add get_sample_position interface

Roland Scheidegger sroland at vmware.com
Mon Mar 4 03:48:14 PST 2013


Am 03.03.2013 21:27, schrieb Dave Airlie:
> From: Dave Airlie <airlied at redhat.com>
> 
> This is to be used to implement glGet GL_SAMPLE_POSITION.
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/include/pipe/p_context.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/gallium/include/pipe/p_context.h b/src/gallium/include/pipe/p_context.h
> index 7ed946e..4ffee20 100644
> --- a/src/gallium/include/pipe/p_context.h
> +++ b/src/gallium/include/pipe/p_context.h
> @@ -520,6 +520,10 @@ struct pipe_context {
>                         const uint *block_layout, const uint *grid_layout,
>                         uint32_t pc, const void *input);
>     /*@}*/
> +   void (*get_sample_position)(struct pipe_context *context,
> +                               int max_samples,
> +                               unsigned sample_index,
> +                               float *out_value);
>  };
> 
It looks like GL wants that function to depend on the currently bound
visual, and this is format-indepedent (which seems to be more sane
indeed). I think though "max_samples" should be "num_samples" or
something similar. Also some doc would be nice.
Otherwise LGTM.

Roland


More information about the mesa-dev mailing list