[Mesa-dev] [PATCH 2/8] gallium: disable stream output in drivers that support it

Marek Olšák maraeo at gmail.com
Sat Nov 19 12:44:24 PST 2011


I am going to make interface changes and I don't want to break compilation.
---
 src/gallium/drivers/llvmpipe/lp_state_so.c |    7 +++++++
 src/gallium/drivers/nvc0/nvc0_state.c      |    7 +++++++
 src/gallium/drivers/softpipe/sp_context.c  |    2 +-
 src/gallium/drivers/softpipe/sp_screen.c   |    2 +-
 src/gallium/drivers/softpipe/sp_state_so.c |    7 +++++++
 5 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_so.c b/src/gallium/drivers/llvmpipe/lp_state_so.c
index 30b17c9..35de52c 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_so.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_so.c
@@ -125,6 +125,7 @@ llvmpipe_set_stream_output_buffers(struct pipe_context *pipe,
 void
 llvmpipe_init_so_funcs(struct llvmpipe_context *llvmpipe)
 {
+#if 0
    llvmpipe->pipe.create_stream_output_state =
       llvmpipe_create_stream_output_state;
    llvmpipe->pipe.bind_stream_output_state =
@@ -134,4 +135,10 @@ llvmpipe_init_so_funcs(struct llvmpipe_context *llvmpipe)
 
    llvmpipe->pipe.set_stream_output_buffers =
       llvmpipe_set_stream_output_buffers;
+#else
+   (void) llvmpipe_create_stream_output_state;
+   (void) llvmpipe_bind_stream_output_state;
+   (void) llvmpipe_delete_stream_output_state;
+   (void) llvmpipe_set_stream_output_buffers;
+#endif
 }
diff --git a/src/gallium/drivers/nvc0/nvc0_state.c b/src/gallium/drivers/nvc0/nvc0_state.c
index 1a37d04..0d6952d 100644
--- a/src/gallium/drivers/nvc0/nvc0_state.c
+++ b/src/gallium/drivers/nvc0/nvc0_state.c
@@ -871,10 +871,17 @@ nvc0_init_state_functions(struct nvc0_context *nvc0)
    pipe->set_vertex_buffers = nvc0_set_vertex_buffers;
    pipe->set_index_buffer = nvc0_set_index_buffer;
 
+#if 0
    pipe->create_stream_output_state = nvc0_tfb_state_create;
    pipe->delete_stream_output_state = nvc0_tfb_state_delete;
    pipe->bind_stream_output_state = nvc0_tfb_state_bind;
    pipe->set_stream_output_buffers = nvc0_set_transform_feedback_buffers;
+#else
+   (void)nvc0_tfb_state_create;
+   (void)nvc0_tfb_state_delete;
+   (void)nvc0_tfb_state_bind;
+   (void)nvc0_set_transform_feedback_buffers;
+#endif
 
    pipe->redefine_user_buffer = u_default_redefine_user_buffer;
 }
diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c
index 3a83e58..a720600 100644
--- a/src/gallium/drivers/softpipe/sp_context.c
+++ b/src/gallium/drivers/softpipe/sp_context.c
@@ -257,7 +257,7 @@ softpipe_create_context( struct pipe_screen *screen,
    softpipe->pipe.set_framebuffer_state = softpipe_set_framebuffer_state;
 
    softpipe->pipe.draw_vbo = softpipe_draw_vbo;
-   softpipe->pipe.draw_stream_output = softpipe_draw_stream_output;
+   /* XXX softpipe->pipe.draw_stream_output = softpipe_draw_stream_output; */
 
    softpipe->pipe.clear = softpipe_clear;
    softpipe->pipe.flush = softpipe_flush_wrapped;
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 4851049..49d3de7 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -108,7 +108,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
       return 1;
    case PIPE_CAP_STREAM_OUTPUT:
-      return 1;
+      return 0;
    case PIPE_CAP_PRIMITIVE_RESTART:
       return 1;
    case PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE:
diff --git a/src/gallium/drivers/softpipe/sp_state_so.c b/src/gallium/drivers/softpipe/sp_state_so.c
index ddfa3ef..40e5634 100644
--- a/src/gallium/drivers/softpipe/sp_state_so.c
+++ b/src/gallium/drivers/softpipe/sp_state_so.c
@@ -131,10 +131,17 @@ softpipe_set_stream_output_buffers(struct pipe_context *pipe,
 void
 softpipe_init_streamout_funcs(struct pipe_context *pipe)
 {
+#if 0
    pipe->create_stream_output_state = softpipe_create_stream_output_state;
    pipe->bind_stream_output_state = softpipe_bind_stream_output_state;
    pipe->delete_stream_output_state = softpipe_delete_stream_output_state;
 
    pipe->set_stream_output_buffers = softpipe_set_stream_output_buffers;
+#else
+   (void) softpipe_create_stream_output_state;
+   (void) softpipe_bind_stream_output_state;
+   (void) softpipe_delete_stream_output_state;
+   (void) softpipe_set_stream_output_buffers;
+#endif
 }
 
-- 
1.7.5.4



More information about the mesa-dev mailing list