summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-03-12 14:43:11 +0100
committerMichal Krol <[email protected]>2010-03-12 14:43:11 +0100
commitfaa14818856e1e9a4ee624c2bc04d7aecabd07ab (patch)
treed555b19a7ccf64908d6cbac4c69b1193098f811d /src/gallium
parentb8030c6561e019e079b5be2fe64ec804df4bfa03 (diff)
cso: Remove set/save/restore_vertex_sampler_textures().
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c87
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.h11
2 files changed, 0 insertions, 98 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 5c16e0959d6..648ba10a995 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -76,18 +76,14 @@ struct cso_context {
struct pipe_sampler_view *fragment_sampler_views[PIPE_MAX_SAMPLERS];
uint nr_textures;
- struct pipe_texture *vertex_textures[PIPE_MAX_VERTEX_SAMPLERS];
uint nr_vertex_sampler_views;
struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
- uint nr_vertex_textures;
uint nr_textures_saved;
struct pipe_texture *textures_saved[PIPE_MAX_SAMPLERS];
uint nr_fragment_sampler_views_saved;
struct pipe_sampler_view *fragment_sampler_views_saved[PIPE_MAX_SAMPLERS];
- uint nr_vertex_textures_saved;
- struct pipe_texture *vertex_textures_saved[PIPE_MAX_VERTEX_SAMPLERS];
uint nr_vertex_sampler_views_saved;
struct pipe_sampler_view *vertex_sampler_views_saved[PIPE_MAX_VERTEX_SAMPLERS];
@@ -310,8 +306,6 @@ void cso_release_all( struct cso_context *ctx )
}
for (i = 0; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
- pipe_texture_reference(&ctx->vertex_textures[i], NULL);
- pipe_texture_reference(&ctx->vertex_textures_saved[i], NULL);
pipe_sampler_view_reference(&ctx->vertex_sampler_views[i], NULL);
pipe_sampler_view_reference(&ctx->vertex_sampler_views_saved[i], NULL);
}
@@ -706,87 +700,6 @@ void cso_restore_sampler_textures( struct cso_context *ctx )
}
-
-enum pipe_error
-cso_set_vertex_sampler_textures(struct cso_context *ctx,
- uint count,
- struct pipe_texture **textures)
-{
- uint i;
-
- ctx->nr_vertex_textures = count;
-
- for (i = 0; i < count; i++) {
- struct pipe_sampler_view templ, *view;
-
- u_sampler_view_default_template(&templ,
- textures[i],
- textures[i]->format);
- view = ctx->pipe->create_sampler_view(ctx->pipe,
- textures[i],
- &templ);
-
- pipe_texture_reference(&ctx->vertex_textures[i], textures[i]);
- pipe_sampler_view_reference(&ctx->vertex_sampler_views[i], view);
- }
- for ( ; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
- pipe_texture_reference(&ctx->vertex_textures[i], NULL);
- pipe_sampler_view_reference(&ctx->vertex_sampler_views[i], NULL);
- }
-
- ctx->pipe->set_vertex_sampler_views(ctx->pipe,
- count,
- ctx->vertex_sampler_views);
-
- return PIPE_OK;
-}
-
-void
-cso_save_vertex_sampler_textures(struct cso_context *ctx)
-{
- uint i;
-
- ctx->nr_vertex_textures_saved = ctx->nr_vertex_textures;
- for (i = 0; i < ctx->nr_vertex_textures; i++) {
- assert(!ctx->vertex_textures_saved[i]);
- assert(!ctx->vertex_sampler_views_saved[i]);
-
- pipe_texture_reference(&ctx->vertex_textures_saved[i], ctx->vertex_textures[i]);
- pipe_sampler_view_reference(&ctx->vertex_sampler_views_saved[i],
- ctx->vertex_sampler_views[i]);
- }
-}
-
-void
-cso_restore_vertex_sampler_textures(struct cso_context *ctx)
-{
- uint i;
-
- ctx->nr_vertex_textures = ctx->nr_vertex_textures_saved;
-
- for (i = 0; i < ctx->nr_vertex_textures; i++) {
- pipe_texture_reference(&ctx->vertex_textures[i], NULL);
- ctx->vertex_textures[i] = ctx->vertex_textures_saved[i];
- ctx->vertex_textures_saved[i] = NULL;
-
- pipe_sampler_view_reference(&ctx->vertex_sampler_views[i], NULL);
- ctx->vertex_sampler_views[i] = ctx->vertex_sampler_views_saved[i];
- ctx->vertex_sampler_views_saved[i] = NULL;
- }
- for ( ; i < PIPE_MAX_VERTEX_SAMPLERS; i++) {
- pipe_texture_reference(&ctx->vertex_textures[i], NULL);
- pipe_sampler_view_reference(&ctx->vertex_sampler_views[i], NULL);
- }
-
- ctx->pipe->set_vertex_sampler_views(ctx->pipe,
- ctx->nr_vertex_textures,
- ctx->vertex_sampler_views);
-
- ctx->nr_vertex_textures_saved = 0;
-}
-
-
-
enum pipe_error cso_set_depth_stencil_alpha(struct cso_context *ctx,
const struct pipe_depth_stencil_alpha_state *templ)
{
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index e476cf4adef..a24077e009c 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -111,17 +111,6 @@ void cso_save_sampler_textures( struct cso_context *cso );
void cso_restore_sampler_textures( struct cso_context *cso );
-
-enum pipe_error
-cso_set_vertex_sampler_textures(struct cso_context *cso,
- uint count,
- struct pipe_texture **textures);
-void
-cso_save_vertex_sampler_textures(struct cso_context *cso);
-void
-cso_restore_vertex_sampler_textures(struct cso_context *cso);
-
-
enum pipe_error cso_set_vertex_elements(struct cso_context *ctx,
unsigned count,
const struct pipe_vertex_element *states);