[Freedreno] [PATCH 5/7] freedreno: allow each generation to hook into sampler view setting
Ilia Mirkin
imirkin at alum.mit.edu
Sat Nov 29 19:06:20 PST 2014
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/gallium/drivers/freedreno/a2xx/fd2_texture.c | 1 +
src/gallium/drivers/freedreno/a3xx/fd3_texture.c | 1 +
src/gallium/drivers/freedreno/a4xx/fd4_texture.c | 1 +
src/gallium/drivers/freedreno/freedreno_texture.c | 4 +---
src/gallium/drivers/freedreno/freedreno_texture.h | 4 ++++
5 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c
index e5e1f35..b70eaa6 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_texture.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_texture.c
@@ -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;
}
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c
index 5dda82d..c573c0e 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_texture.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_texture.c
@@ -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;
}
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
index fc9c873..874e001 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_texture.c
@@ -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;
}
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c
index e61bf8a..eaa6629 100644
--- a/src/gallium/drivers/freedreno/freedreno_texture.c
+++ b/src/gallium/drivers/freedreno/freedreno_texture.c
@@ -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;
}
diff --git a/src/gallium/drivers/freedreno/freedreno_texture.h b/src/gallium/drivers/freedreno/freedreno_texture.h
index 388b980..43571a9 100644
--- a/src/gallium/drivers/freedreno/freedreno_texture.h
+++ b/src/gallium/drivers/freedreno/freedreno_texture.h
@@ -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_ */
--
2.0.4
More information about the Freedreno
mailing list