gallium/trace: add 'start' parameter to bind_sampler_states/views()
authorBrian Paul <brianp@vmware.com>
Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 16 Aug 2012 15:01:31 +0000 (09:01 -0600)
src/gallium/drivers/trace/tr_context.c

index 54ad0e9197a4660647bea90ebbec2fb3a0ecd79c..f50a7426ed5c7c2b929718b770211fde24eb813b 100644 (file)
@@ -290,12 +290,16 @@ trace_context_create_sampler_state(struct pipe_context *_pipe,
 static INLINE void
 trace_context_bind_sampler_states(struct pipe_context *_pipe,
                                   unsigned shader,
+                                  unsigned start,
                                   unsigned num_states,
                                   void **states)
 {
    struct trace_context *tr_ctx = trace_context(_pipe);
    struct pipe_context *pipe = tr_ctx->pipe;
 
+   /* remove this when we have pipe->bind_sampler_states(..., start, ...) */
+   assert(start == 0);
+
    switch (shader) {
    case PIPE_SHADER_VERTEX:
       trace_dump_call_begin("pipe_context", "bind_vertex_sampler_states");
@@ -337,7 +341,8 @@ trace_context_bind_fragment_sampler_states(struct pipe_context *_pipe,
                                            unsigned num,
                                            void **states)
 {
-   trace_context_bind_sampler_states(_pipe, PIPE_SHADER_FRAGMENT, num, states);
+   trace_context_bind_sampler_states(_pipe, PIPE_SHADER_FRAGMENT,
+                                     0, num, states);
 }
 
 
@@ -346,7 +351,8 @@ trace_context_bind_vertex_sampler_states(struct pipe_context *_pipe,
                                          unsigned num,
                                          void **states)
 {
-   trace_context_bind_sampler_states(_pipe, PIPE_SHADER_VERTEX, num, states);
+   trace_context_bind_sampler_states(_pipe, PIPE_SHADER_VERTEX,
+                                     0, num, states);
 }
 
 
@@ -984,6 +990,7 @@ trace_context_surface_destroy(struct pipe_context *_pipe,
 static INLINE void
 trace_context_set_sampler_views(struct pipe_context *_pipe,
                                 unsigned shader,
+                                unsigned start,
                                 unsigned num,
                                 struct pipe_sampler_view **views)
 {
@@ -993,6 +1000,9 @@ trace_context_set_sampler_views(struct pipe_context *_pipe,
    struct pipe_sampler_view *unwrapped_views[PIPE_MAX_SAMPLERS];
    unsigned i;
 
+   /* remove this when we have pipe->set_sampler_views(..., start, ...) */
+   assert(start == 0);
+
    for(i = 0; i < num; ++i) {
       tr_view = trace_sampler_view(views[i]);
       unwrapped_views[i] = tr_view ? tr_view->sampler_view : NULL;
@@ -1041,7 +1051,7 @@ trace_context_set_fragment_sampler_views(struct pipe_context *_pipe,
                                          unsigned num,
                                          struct pipe_sampler_view **views)
 {
-   trace_context_set_sampler_views(_pipe, PIPE_SHADER_FRAGMENT, num, views);
+   trace_context_set_sampler_views(_pipe, PIPE_SHADER_FRAGMENT, 0, num, views);
 }
 
 
@@ -1050,7 +1060,7 @@ trace_context_set_vertex_sampler_views(struct pipe_context *_pipe,
                                        unsigned num,
                                        struct pipe_sampler_view **views)
 {
-   trace_context_set_sampler_views(_pipe, PIPE_SHADER_VERTEX, num, views);
+   trace_context_set_sampler_views(_pipe, PIPE_SHADER_VERTEX, 0, num, views);
 }