summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2013-05-24 16:08:39 -0400
committerZack Rusin <[email protected]>2013-05-25 09:49:20 -0400
commiteaabb4ead07ae043ecc789024028e225ebd0f318 (patch)
tree3cd3788f1f6ba45b5855e6858b306f3f6d880500 /src/gallium/auxiliary/vl
parente6efb900e7a7601797b2e8263388fe72f6820e9b (diff)
gallium: Add support for multiple viewports
Gallium supported only a single viewport/scissor combination. This commit changes the interface to allow us to add support for multiple viewports/scissors. Signed-off-by: Zack Rusin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: José Fonseca<[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c4
-rw-r--r--src/gallium/auxiliary/vl/vl_idct.c4
-rw-r--r--src/gallium/auxiliary/vl/vl_matrix_filter.c2
-rw-r--r--src/gallium/auxiliary/vl/vl_mc.c2
-rw-r--r--src/gallium/auxiliary/vl/vl_median_filter.c2
-rw-r--r--src/gallium/auxiliary/vl/vl_zscan.c2
6 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index 62f593a3203..4b8308796eb 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -723,7 +723,7 @@ draw_layers(struct vl_compositor *c, struct vl_compositor_state *s, struct u_rec
void *blend = layer->blend ? layer->blend : i ? c->blend_add : c->blend_clear;
c->pipe->bind_blend_state(c->pipe, blend);
- c->pipe->set_viewport_state(c->pipe, &layer->viewport);
+ 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);
c->pipe->set_fragment_sampler_views(c->pipe, num_sampler_views, samplers);
@@ -1014,7 +1014,7 @@ vl_compositor_render(struct vl_compositor_state *s,
dirty_area->x1 = dirty_area->y1 = MIN_DIRTY;
}
- c->pipe->set_scissor_state(c->pipe, &s->scissor);
+ c->pipe->set_scissor_states(c->pipe, 0, 1, &s->scissor);
c->pipe->set_framebuffer_state(c->pipe, &c->fb_state);
c->pipe->bind_vs_state(c->pipe, c->vs);
c->pipe->set_vertex_buffers(c->pipe, 0, 1, &c->vertex_buf);
diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c
index bd73dfd40f7..5346cbc0ed7 100644
--- a/src/gallium/auxiliary/vl/vl_idct.c
+++ b/src/gallium/auxiliary/vl/vl_idct.c
@@ -830,14 +830,14 @@ vl_idct_flush(struct vl_idct *idct, struct vl_idct_buffer *buffer, unsigned num_
/* mismatch control */
idct->pipe->set_framebuffer_state(idct->pipe, &buffer->fb_state_mismatch);
- idct->pipe->set_viewport_state(idct->pipe, &buffer->viewport_mismatch);
+ idct->pipe->set_viewport_states(idct->pipe, 0, 1, &buffer->viewport_mismatch);
idct->pipe->bind_vs_state(idct->pipe, idct->vs_mismatch);
idct->pipe->bind_fs_state(idct->pipe, idct->fs_mismatch);
util_draw_arrays_instanced(idct->pipe, PIPE_PRIM_POINTS, 0, 1, 0, num_instances);
/* first stage */
idct->pipe->set_framebuffer_state(idct->pipe, &buffer->fb_state);
- idct->pipe->set_viewport_state(idct->pipe, &buffer->viewport);
+ idct->pipe->set_viewport_states(idct->pipe, 0, 1, &buffer->viewport);
idct->pipe->bind_vs_state(idct->pipe, idct->vs);
idct->pipe->bind_fs_state(idct->pipe, idct->fs);
util_draw_arrays_instanced(idct->pipe, PIPE_PRIM_QUADS, 0, 4, 0, num_instances);
diff --git a/src/gallium/auxiliary/vl/vl_matrix_filter.c b/src/gallium/auxiliary/vl/vl_matrix_filter.c
index cda90ff10eb..9bd7ed15019 100644
--- a/src/gallium/auxiliary/vl/vl_matrix_filter.c
+++ b/src/gallium/auxiliary/vl/vl_matrix_filter.c
@@ -311,7 +311,7 @@ vl_matrix_filter_render(struct vl_matrix_filter *filter,
filter->pipe->bind_vs_state(filter->pipe, filter->vs);
filter->pipe->bind_fs_state(filter->pipe, filter->fs);
filter->pipe->set_framebuffer_state(filter->pipe, &fb_state);
- filter->pipe->set_viewport_state(filter->pipe, &viewport);
+ filter->pipe->set_viewport_states(filter->pipe, 0, 1, &viewport);
filter->pipe->set_vertex_buffers(filter->pipe, 0, 1, &filter->quad);
filter->pipe->bind_vertex_elements_state(filter->pipe, filter->ves);
diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c
index b4272093655..1fd40c37d16 100644
--- a/src/gallium/auxiliary/vl/vl_mc.c
+++ b/src/gallium/auxiliary/vl/vl_mc.c
@@ -600,7 +600,7 @@ prepare_pipe_4_rendering(struct vl_mc *renderer, struct vl_mc_buffer *buffer, un
renderer->pipe->bind_blend_state(renderer->pipe, renderer->blend_clear[mask]);
renderer->pipe->set_framebuffer_state(renderer->pipe, &buffer->fb_state);
- renderer->pipe->set_viewport_state(renderer->pipe, &buffer->viewport);
+ renderer->pipe->set_viewport_states(renderer->pipe, 0, 1, &buffer->viewport);
}
void
diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c
index 2db147904b8..158751a22b3 100644
--- a/src/gallium/auxiliary/vl/vl_median_filter.c
+++ b/src/gallium/auxiliary/vl/vl_median_filter.c
@@ -390,7 +390,7 @@ vl_median_filter_render(struct vl_median_filter *filter,
filter->pipe->bind_vs_state(filter->pipe, filter->vs);
filter->pipe->bind_fs_state(filter->pipe, filter->fs);
filter->pipe->set_framebuffer_state(filter->pipe, &fb_state);
- filter->pipe->set_viewport_state(filter->pipe, &viewport);
+ filter->pipe->set_viewport_states(filter->pipe, 0, 1, &viewport);
filter->pipe->set_vertex_buffers(filter->pipe, 0, 1, &filter->quad);
filter->pipe->bind_vertex_elements_state(filter->pipe, filter->ves);
diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c
index 262fb0dc491..33baa3d9902 100644
--- a/src/gallium/auxiliary/vl/vl_zscan.c
+++ b/src/gallium/auxiliary/vl/vl_zscan.c
@@ -576,7 +576,7 @@ vl_zscan_render(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, unsigned
zscan->pipe->bind_blend_state(zscan->pipe, zscan->blend);
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_state(zscan->pipe, &buffer->viewport);
+ zscan->pipe->set_viewport_states(zscan->pipe, 0, 1, &buffer->viewport);
zscan->pipe->set_fragment_sampler_views(zscan->pipe, 3, &buffer->src);
zscan->pipe->bind_vs_state(zscan->pipe, zscan->vs);
zscan->pipe->bind_fs_state(zscan->pipe, zscan->fs);