diff options
author | Brian Paul <[email protected]> | 2013-09-12 15:06:44 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2013-10-03 14:05:26 -0600 |
commit | 96b9c094952868513961cf4f8612949f3e624ab9 (patch) | |
tree | e663bd23a411d7af147291a667a36a49a96aab2f /src/gallium/auxiliary/vl | |
parent | bbc1fd8c80961cc2a756529050c1a29b55d0b255 (diff) |
vl: use pipe_context::bind_sampler_states() if non-null
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_compositor.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_idct.c | 14 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_matrix_filter.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mc.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_median_filter.c | 7 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_mpeg12_decoder.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_zscan.c | 7 |
7 files changed, 49 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 4b8308796eb..a2a113999ad 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -725,7 +725,12 @@ draw_layers(struct vl_compositor *c, struct vl_compositor_state *s, struct u_rec c->pipe->bind_blend_state(c->pipe, blend); c->pipe->set_viewport_states(c->pipe, 0, 1, &layer->viewport); c->pipe->bind_fs_state(c->pipe, layer->fs); - c->pipe->bind_fragment_sampler_states(c->pipe, num_sampler_views, layer->samplers); + if (c->pipe->bind_sampler_states) + c->pipe->bind_sampler_states(c->pipe, PIPE_SHADER_FRAGMENT, 0, + num_sampler_views, layer->samplers); + else + c->pipe->bind_fragment_sampler_states(c->pipe, num_sampler_views, + layer->samplers); c->pipe->set_fragment_sampler_views(c->pipe, num_sampler_views, samplers); util_draw_arrays(c->pipe, PIPE_PRIM_QUADS, vb_index * 4, 4); vb_index++; diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c index 5346cbc0ed7..d31bf4120e9 100644 --- a/src/gallium/auxiliary/vl/vl_idct.c +++ b/src/gallium/auxiliary/vl/vl_idct.c @@ -825,7 +825,13 @@ vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer, unsigned num_ idct->pipe->bind_rasterizer_state(idct->pipe, idct->rs_state); idct->pipe->bind_blend_state(idct->pipe, idct->blend); - idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers); + + if (idct->pipe->bind_sampler_states) + idct->pipe->bind_sampler_states(idct->pipe, PIPE_SHADER_FRAGMENT, + 0, 2, idct->samplers); + else + idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers); + idct->pipe->set_fragment_sampler_views(idct->pipe, 2, buffer->sampler_views.stage[0]); /* mismatch control */ @@ -850,7 +856,11 @@ vl_idct_prepare_stage2(struct vl_idct *idct, struct vl_idct_buffer *buffer) /* second stage */ idct->pipe->bind_rasterizer_state(idct->pipe, idct->rs_state); - idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers); + if (idct->pipe->bind_sampler_states) + idct->pipe->bind_sampler_states(idct->pipe, PIPE_SHADER_FRAGMENT, + 0, 2, idct->samplers); + else + idct->pipe->bind_fragment_sampler_states(idct->pipe, 2, idct->samplers); idct->pipe->set_fragment_sampler_views(idct->pipe, 2, buffer->sampler_views.stage[1]); } diff --git a/src/gallium/auxiliary/vl/vl_matrix_filter.c b/src/gallium/auxiliary/vl/vl_matrix_filter.c index 9bd7ed15019..f4fd07d865f 100644 --- a/src/gallium/auxiliary/vl/vl_matrix_filter.c +++ b/src/gallium/auxiliary/vl/vl_matrix_filter.c @@ -306,7 +306,12 @@ vl_matrix_filter_render(struct vl_matrix_filter *filter, filter->pipe->bind_rasterizer_state(filter->pipe, filter->rs_state); filter->pipe->bind_blend_state(filter->pipe, filter->blend); - filter->pipe->bind_fragment_sampler_states(filter->pipe, 1, &filter->sampler); + if (filter->pipe->bind_sampler_states) + filter->pipe->bind_sampler_states(filter->pipe, PIPE_SHADER_FRAGMENT, + 0, 1, &filter->sampler); + else + filter->pipe->bind_fragment_sampler_states(filter->pipe, + 1, &filter->sampler); filter->pipe->set_fragment_sampler_views(filter->pipe, 1, &src); filter->pipe->bind_vs_state(filter->pipe, filter->vs); filter->pipe->bind_fs_state(filter->pipe, filter->fs); diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c index 4877f5ee6c7..b864b210476 100644 --- a/src/gallium/auxiliary/vl/vl_mc.c +++ b/src/gallium/auxiliary/vl/vl_mc.c @@ -614,7 +614,12 @@ vl_mc_render_ref(struct vl_mc *renderer, struct vl_mc_buffer *buffer, struct pip renderer->pipe->bind_fs_state(renderer->pipe, renderer->fs_ref); renderer->pipe->set_fragment_sampler_views(renderer->pipe, 1, &ref); - renderer->pipe->bind_fragment_sampler_states(renderer->pipe, 1, &renderer->sampler_ref); + if (renderer->pipe->bind_sampler_states) + renderer->pipe->bind_sampler_states(renderer->pipe, PIPE_SHADER_FRAGMENT, + 0, 1, &renderer->sampler_ref); + else + renderer->pipe->bind_fragment_sampler_states(renderer->pipe, + 1, &renderer->sampler_ref); util_draw_arrays_instanced(renderer->pipe, PIPE_PRIM_QUADS, 0, 4, 0, renderer->buffer_width / VL_MACROBLOCK_WIDTH * diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c index 158751a22b3..9a4a54beeff 100644 --- a/src/gallium/auxiliary/vl/vl_median_filter.c +++ b/src/gallium/auxiliary/vl/vl_median_filter.c @@ -385,7 +385,12 @@ vl_median_filter_render(struct vl_median_filter *filter, filter->pipe->bind_rasterizer_state(filter->pipe, filter->rs_state); filter->pipe->bind_blend_state(filter->pipe, filter->blend); - filter->pipe->bind_fragment_sampler_states(filter->pipe, 1, &filter->sampler); + if (filter->pipe->bind_sampler_states) + filter->pipe->bind_sampler_states(filter->pipe, PIPE_SHADER_FRAGMENT, + 0, 1, &filter->sampler); + else + filter->pipe->bind_fragment_sampler_states(filter->pipe, 1, + &filter->sampler); filter->pipe->set_fragment_sampler_views(filter->pipe, 1, &src); filter->pipe->bind_vs_state(filter->pipe, filter->vs); filter->pipe->bind_fs_state(filter->pipe, filter->fs); diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c index f91f90b7ac6..3b577ace4d5 100644 --- a/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c +++ b/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c @@ -747,7 +747,13 @@ vl_mpeg12_end_frame(struct pipe_video_codec *decoder, vl_idct_prepare_stage2(i ? &dec->idct_c : &dec->idct_y, &buf->idct[plane]); else { dec->base.context->set_fragment_sampler_views(dec->base.context, 1, &mc_source_sv[plane]); - dec->base.context->bind_fragment_sampler_states(dec->base.context, 1, &dec->sampler_ycbcr); + if (dec->base.context->bind_sampler_states) + dec->base.context->bind_sampler_states(dec->base.context, + PIPE_SHADER_FRAGMENT, + 0, 1, + &dec->sampler_ycbcr); + else + dec->base.context->bind_fragment_sampler_states(dec->base.context, 1, &dec->sampler_ycbcr); } vl_mc_render_ycbcr(i ? &dec->mc_c : &dec->mc_y, &buf->mc[i], j, buf->num_ycbcr_blocks[plane]); } diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index 33baa3d9902..706a8094703 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -574,7 +574,12 @@ vl_zscan_render(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, unsigned zscan->pipe->bind_rasterizer_state(zscan->pipe, zscan->rs_state); zscan->pipe->bind_blend_state(zscan->pipe, zscan->blend); - zscan->pipe->bind_fragment_sampler_states(zscan->pipe, 3, zscan->samplers); + if (zscan->pipe->bind_sampler_states) + zscan->pipe->bind_sampler_states(zscan->pipe, PIPE_SHADER_FRAGMENT, + 0, 3, zscan->samplers); + else + zscan->pipe->bind_fragment_sampler_states(zscan->pipe, 3, + zscan->samplers); zscan->pipe->set_framebuffer_state(zscan->pipe, &buffer->fb_state); zscan->pipe->set_viewport_states(zscan->pipe, 0, 1, &buffer->viewport); zscan->pipe->set_fragment_sampler_views(zscan->pipe, 3, &buffer->src); |