diff options
author | Brian Paul <[email protected]> | 2013-09-12 15:06:33 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-10-03 14:05:26 -0600 |
commit | bbc1fd8c80961cc2a756529050c1a29b55d0b255 (patch) | |
tree | a6a9802fc7603c596d44800f8ae7098bc8f90fab /src/gallium/auxiliary | |
parent | 27d500a844f7479747893ea70af6f296ea8e9d6a (diff) |
util: use pipe_context::bind_sampler_states() if non-null
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_blitter.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index be839d4390e..456d65c99d2 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -528,9 +528,14 @@ static void blitter_restore_textures(struct blitter_context_priv *ctx) unsigned i; /* Fragment sampler states. */ - pipe->bind_fragment_sampler_states(pipe, - ctx->base.saved_num_sampler_states, - ctx->base.saved_sampler_states); + if (pipe->bind_sampler_states) + pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0, + ctx->base.saved_num_sampler_states, + ctx->base.saved_sampler_states); + else + pipe->bind_fragment_sampler_states(pipe, + ctx->base.saved_num_sampler_states, + ctx->base.saved_sampler_states); ctx->base.saved_num_sampler_states = ~0; /* Fragment sampler views. */ @@ -1309,7 +1314,10 @@ void util_blitter_blit_generic(struct blitter_context *blitter, views[1] = pipe->create_sampler_view(pipe, src->texture, &templ); pipe->set_fragment_sampler_views(pipe, 2, views); - pipe->bind_fragment_sampler_states(pipe, 2, samplers); + if (pipe->bind_sampler_states) + pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, 0, 2, samplers); + else + pipe->bind_fragment_sampler_states(pipe, 2, samplers); pipe_sampler_view_reference(&views[1], NULL); } else if (blit_stencil) { @@ -1324,12 +1332,20 @@ void util_blitter_blit_generic(struct blitter_context *blitter, view = pipe->create_sampler_view(pipe, src->texture, &templ); pipe->set_fragment_sampler_views(pipe, 1, &view); - pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state); + if (pipe->bind_sampler_states) + pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, + 0, 1, &sampler_state); + else + pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state); pipe_sampler_view_reference(&view, NULL); } else { pipe->set_fragment_sampler_views(pipe, 1, &src); - pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state); + if (pipe->bind_sampler_states) + pipe->bind_sampler_states(pipe, PIPE_SHADER_FRAGMENT, + 0, 1, &sampler_state); + else + pipe->bind_fragment_sampler_states(pipe, 1, &sampler_state); } pipe->bind_vertex_elements_state(pipe, ctx->velem_state); |