Mesa (master): llvmpipe: plug in dummy pipe_context:: set_vertex_sampler_textures function

Brian Paul brianp at kemper.freedesktop.org
Wed Dec 2 09:11:55 PST 2009


Module: Mesa
Branch: master
Commit: 792888121b92913733daec7526c9441f27ce1231
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=792888121b92913733daec7526c9441f27ce1231

Author: Brian Paul <brianp at vmware.com>
Date:   Wed Dec  2 10:09:53 2009 -0700

llvmpipe: plug in dummy pipe_context::set_vertex_sampler_textures function

Fixes immediate segfault.

---

 src/gallium/drivers/llvmpipe/lp_context.c       |    3 ++-
 src/gallium/drivers/llvmpipe/lp_state.h         |   10 +++++++---
 src/gallium/drivers/llvmpipe/lp_state_sampler.c |   14 ++++++++++++--
 3 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_context.c b/src/gallium/drivers/llvmpipe/lp_context.c
index c081f6d..6654913 100644
--- a/src/gallium/drivers/llvmpipe/lp_context.c
+++ b/src/gallium/drivers/llvmpipe/lp_context.c
@@ -205,7 +205,8 @@ llvmpipe_create( struct pipe_screen *screen )
    llvmpipe->pipe.set_framebuffer_state = llvmpipe_set_framebuffer_state;
    llvmpipe->pipe.set_polygon_stipple = llvmpipe_set_polygon_stipple;
    llvmpipe->pipe.set_scissor_state = llvmpipe_set_scissor_state;
-   llvmpipe->pipe.set_fragment_sampler_textures = llvmpipe_set_sampler_textures;
+   llvmpipe->pipe.set_fragment_sampler_textures = llvmpipe_set_fragment_sampler_textures;
+   llvmpipe->pipe.set_vertex_sampler_textures = llvmpipe_set_vertex_sampler_textures;
    llvmpipe->pipe.set_viewport_state = llvmpipe_set_viewport_state;
 
    llvmpipe->pipe.set_vertex_buffers = llvmpipe_set_vertex_buffers;
diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h
index 7b26ce6..805959a 100644
--- a/src/gallium/drivers/llvmpipe/lp_state.h
+++ b/src/gallium/drivers/llvmpipe/lp_state.h
@@ -168,9 +168,13 @@ void llvmpipe_set_polygon_stipple( struct pipe_context *,
 void llvmpipe_set_scissor_state( struct pipe_context *,
                                  const struct pipe_scissor_state * );
 
-void llvmpipe_set_sampler_textures( struct pipe_context *,
-                                    unsigned num,
-                                    struct pipe_texture ** );
+void llvmpipe_set_fragment_sampler_textures( struct pipe_context *,
+                                             unsigned num,
+                                             struct pipe_texture ** );
+
+void llvmpipe_set_vertex_sampler_textures( struct pipe_context *,
+                                           unsigned num,
+                                           struct pipe_texture ** );
 
 void llvmpipe_set_viewport_state( struct pipe_context *,
                                   const struct pipe_viewport_state * );
diff --git a/src/gallium/drivers/llvmpipe/lp_state_sampler.c b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
index 8333805..b61b669 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_sampler.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_sampler.c
@@ -78,8 +78,9 @@ llvmpipe_bind_sampler_states(struct pipe_context *pipe,
 
 
 void
-llvmpipe_set_sampler_textures(struct pipe_context *pipe,
-                              unsigned num, struct pipe_texture **texture)
+llvmpipe_set_fragment_sampler_textures(struct pipe_context *pipe,
+                                       unsigned num,
+                                       struct pipe_texture **texture)
 {
    struct llvmpipe_context *llvmpipe = llvmpipe_context(pipe);
    uint i;
@@ -117,6 +118,15 @@ llvmpipe_set_sampler_textures(struct pipe_context *pipe,
 
 
 void
+llvmpipe_set_vertex_sampler_textures(struct pipe_context *pipe,
+                                     unsigned num,
+                                     struct pipe_texture **texture)
+{
+   /* XXX to do */
+}
+
+
+void
 llvmpipe_delete_sampler_state(struct pipe_context *pipe,
                               void *sampler)
 {



More information about the mesa-commit mailing list