freedreno: allow each generation to hook into sampler view setting
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 30 Nov 2014 00:21:33 +0000 (19:21 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 30 Nov 2014 18:04:28 +0000 (13:04 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/freedreno/a2xx/fd2_texture.c
src/gallium/drivers/freedreno/a3xx/fd3_texture.c
src/gallium/drivers/freedreno/a4xx/fd4_texture.c
src/gallium/drivers/freedreno/freedreno_texture.c
src/gallium/drivers/freedreno/freedreno_texture.h

index e5e1f35b9c73efb8f9c697f7c2cdd852e70e5e7d..b70eaa69898976fd154068ac20392a83dd354450 100644 (file)
@@ -175,4 +175,5 @@ fd2_texture_init(struct pipe_context *pctx)
        pctx->create_sampler_state = fd2_sampler_state_create;
        pctx->bind_sampler_states = fd2_sampler_states_bind;
        pctx->create_sampler_view = fd2_sampler_view_create;
+       pctx->set_sampler_views = fd_set_sampler_views;
 }
index 5dda82de148097832bdacbdeb81b441203e47d14..c573c0ea9c0c135b970f977ea94245882eab4625 100644 (file)
@@ -267,4 +267,5 @@ fd3_texture_init(struct pipe_context *pctx)
        pctx->create_sampler_state = fd3_sampler_state_create;
        pctx->bind_sampler_states = fd3_sampler_states_bind;
        pctx->create_sampler_view = fd3_sampler_view_create;
+       pctx->set_sampler_views = fd_set_sampler_views;
 }
index fc9c8735815096d2d42ea22bb7416341ab94fced..874e0014d937ce14985aa91060c0bf9d75330edd 100644 (file)
@@ -187,4 +187,5 @@ fd4_texture_init(struct pipe_context *pctx)
        pctx->create_sampler_state = fd4_sampler_state_create;
        pctx->bind_sampler_states = fd_sampler_states_bind;
        pctx->create_sampler_view = fd4_sampler_view_create;
+       pctx->set_sampler_views = fd_set_sampler_views;
 }
index e61bf8a612d1e1dc6e62112726341904facc521e..eaa6629f2b80c50e45760db0d5bd30adc6ec4639 100644 (file)
@@ -137,7 +137,7 @@ fd_verttex_set_sampler_views(struct pipe_context *pctx, unsigned nr,
        ctx->dirty |= FD_DIRTY_VERTTEX;
 }
 
-static void
+void
 fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
                      unsigned start, unsigned nr,
                      struct pipe_sampler_view **views)
@@ -161,6 +161,4 @@ fd_texture_init(struct pipe_context *pctx)
        pctx->delete_sampler_state = fd_sampler_state_delete;
 
        pctx->sampler_view_destroy = fd_sampler_view_destroy;
-
-       pctx->set_sampler_views = fd_set_sampler_views;
 }
index 388b980d8575841a46ff2629ab35be4dfd766e28..43571a9fa61270579d891fd4db805ce3083b129e 100644 (file)
@@ -35,6 +35,10 @@ void fd_sampler_states_bind(struct pipe_context *pctx,
                unsigned shader, unsigned start,
                unsigned nr, void **hwcso);
 
+void fd_set_sampler_views(struct pipe_context *pctx, unsigned shader,
+                                                 unsigned start, unsigned nr,
+                                                 struct pipe_sampler_view **views);
+
 void fd_texture_init(struct pipe_context *pctx);
 
 #endif /* FREEDRENO_TEXTURE_H_ */