[Mesa-dev] [PATCH] llvmpipe: add get sample position

Dave Airlie airlied at gmail.com
Mon Nov 25 02:57:29 PST 2013


This just always returns 0.5,0.5 as the position.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/gallium/drivers/llvmpipe/lp_context.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index 9a6d13b..678f852 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -122,6 +122,15 @@ llvmpipe_render_condition ( struct pipe_context *pipe,
    llvmpipe->render_cond_cond = condition;
 }
 
+static void
+llvmpipe_get_sample_position( struct pipe_context *pipe,
+                              unsigned sample_count,
+                              unsigned sample_index,
+                              float *out_value )
+{
+   out_value[0] = out_value[1] = 0.5;
+}
+
 struct pipe_context *
 llvmpipe_create_context( struct pipe_screen *screen, void *priv )
 {
@@ -150,6 +159,7 @@ llvmpipe_create_context( struct pipe_screen *screen, void *priv )
    llvmpipe->pipe.flush = do_flush;
 
    llvmpipe->pipe.render_condition = llvmpipe_render_condition;
+   llvmpipe->pipe.get_sample_position = llvmpipe_get_sample_position;
 
    llvmpipe_init_blend_funcs(llvmpipe);
    llvmpipe_init_clip_funcs(llvmpipe);
-- 
1.8.3.1



More information about the mesa-dev mailing list