[Mesa-dev] [PATCH 1/4] gallium: Add support for multiple viewports
Brian Paul
brianp at vmware.com
Fri May 24 08:15:21 PDT 2013
Just some minor formatting nits below...
On 05/23/2013 02:33 PM, Zack Rusin wrote:
> 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 <zackr at vmware.com>
> ---
> src/gallium/auxiliary/cso_cache/cso_context.c | 37 +++++++++++++++--------
> src/gallium/auxiliary/cso_cache/cso_context.h | 9 +++---
> src/gallium/auxiliary/draw/draw_context.c | 6 ++--
> src/gallium/auxiliary/draw/draw_context.h | 5 +--
> src/gallium/auxiliary/hud/hud_context.c | 6 ++--
> src/gallium/auxiliary/postprocess/pp_run.c | 6 ++--
> src/gallium/auxiliary/tgsi/tgsi_scan.c | 6 ++++
> src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 +
> src/gallium/auxiliary/tgsi/tgsi_strings.c | 3 +-
> src/gallium/auxiliary/util/u_blit.c | 12 ++++----
> src/gallium/auxiliary/util/u_blitter.c | 8 ++---
> src/gallium/auxiliary/util/u_gen_mipmap.c | 6 ++--
> src/gallium/auxiliary/vl/vl_compositor.c | 4 +--
> src/gallium/auxiliary/vl/vl_idct.c | 4 +--
> src/gallium/auxiliary/vl/vl_matrix_filter.c | 2 +-
> src/gallium/auxiliary/vl/vl_mc.c | 2 +-
> src/gallium/auxiliary/vl/vl_median_filter.c | 2 +-
> src/gallium/auxiliary/vl/vl_zscan.c | 2 +-
> src/gallium/docs/source/context.rst | 8 +++--
> src/gallium/drivers/freedreno/freedreno_state.c | 10 +++---
> src/gallium/drivers/galahad/glhd_context.c | 16 +++++-----
> src/gallium/drivers/i915/i915_state.c | 12 +++++---
> src/gallium/drivers/identity/id_context.c | 22 ++++++++------
> src/gallium/drivers/ilo/ilo_state.c | 14 +++++----
> src/gallium/drivers/llvmpipe/lp_screen.c | 2 ++
> src/gallium/drivers/llvmpipe/lp_state_clip.c | 20 ++++++------
> src/gallium/drivers/noop/noop_state.c | 14 +++++----
> src/gallium/drivers/nv30/nv30_draw.c | 2 +-
> src/gallium/drivers/nv30/nv30_state.c | 14 +++++----
> src/gallium/drivers/nv50/nv50_state.c | 16 +++++-----
> src/gallium/drivers/nvc0/nvc0_state.c | 14 +++++----
> src/gallium/drivers/r300/r300_context.c | 2 +-
> src/gallium/drivers/r300/r300_state.c | 16 +++++-----
> src/gallium/drivers/r600/evergreen_state.c | 5 +--
> src/gallium/drivers/r600/r600_state.c | 7 +++--
> src/gallium/drivers/r600/r600_state_common.c | 9 +++---
> src/gallium/drivers/radeonsi/si_state.c | 14 +++++----
> src/gallium/drivers/rbug/rbug_context.c | 22 ++++++++------
> src/gallium/drivers/softpipe/sp_screen.c | 2 ++
> src/gallium/drivers/softpipe/sp_state_clip.c | 16 +++++-----
> src/gallium/drivers/svga/svga_pipe_misc.c | 18 ++++++-----
> src/gallium/drivers/svga/svga_swtnl_state.c | 2 +-
> src/gallium/drivers/trace/tr_context.c | 28 +++++++++--------
> src/gallium/include/pipe/p_context.h | 10 +++---
> src/gallium/include/pipe/p_defines.h | 3 +-
> src/gallium/include/pipe/p_shader_tokens.h | 3 +-
> src/gallium/include/pipe/p_state.h | 1 +
> src/gallium/state_trackers/vega/renderer.c | 10 +++---
> src/gallium/state_trackers/xa/xa_renderer.c | 2 +-
> src/gallium/state_trackers/xorg/xorg_renderer.c | 2 +-
> src/gallium/tests/graw/fs-test.c | 2 +-
> src/gallium/tests/graw/graw_util.h | 2 +-
> src/gallium/tests/graw/gs-test.c | 2 +-
> src/gallium/tests/graw/quad-sample.c | 2 +-
> src/gallium/tests/graw/shader-leak.c | 2 +-
> src/gallium/tests/graw/tri-gs.c | 2 +-
> src/gallium/tests/graw/tri-instanced.c | 2 +-
> src/gallium/tests/graw/vs-test.c | 2 +-
> src/gallium/tests/trivial/quad-tex.c | 2 +-
> src/gallium/tests/trivial/tri.c | 2 +-
> src/mesa/state_tracker/st_atom_scissor.c | 2 +-
> src/mesa/state_tracker/st_atom_viewport.c | 2 +-
> src/mesa/state_tracker/st_cb_bitmap.c | 6 ++--
> src/mesa/state_tracker/st_cb_clear.c | 6 ++--
> src/mesa/state_tracker/st_cb_drawpixels.c | 6 ++--
> src/mesa/state_tracker/st_cb_drawtex.c | 6 ++--
> src/mesa/state_tracker/st_draw_feedback.c | 2 +-
> 67 files changed, 290 insertions(+), 217 deletions(-)
>
> diff --git a/src/gallium/drivers/galahad/glhd_context.c b/src/gallium/drivers/galahad/glhd_context.c
> index a73a3ad..849c12e 100644
> --- a/src/gallium/drivers/galahad/glhd_context.c
> +++ b/src/gallium/drivers/galahad/glhd_context.c
> @@ -524,25 +524,27 @@ galahad_context_set_polygon_stipple(struct pipe_context *_pipe,
> }
>
> static void
> -galahad_context_set_scissor_state(struct pipe_context *_pipe,
> +galahad_context_set_scissor_states(struct pipe_context *_pipe,
> + unsigned num_scissors,
> const struct pipe_scissor_state *scissor)
> {
> struct galahad_context *glhd_pipe = galahad_context(_pipe);
> struct pipe_context *pipe = glhd_pipe->pipe;
>
> - pipe->set_scissor_state(pipe,
> + pipe->set_scissor_states(pipe, num_scissors,
> scissor);
As long as you're there, could you make that into one line:
pipe->set_scissor_states(pipe, num_scissors, scissor);
> }
>
> static void
> -galahad_context_set_viewport_state(struct pipe_context *_pipe,
> +galahad_context_set_viewport_states(struct pipe_context *_pipe,
> + unsigned num_viewports,
> const struct pipe_viewport_state *viewport)
> {
> struct galahad_context *glhd_pipe = galahad_context(_pipe);
> struct pipe_context *pipe = glhd_pipe->pipe;
>
> - pipe->set_viewport_state(pipe,
> - viewport);
> + pipe->set_viewport_states(pipe, num_viewports,
> + viewport);
Same thing.
> }
>
> static void
> @@ -486,25 +486,27 @@ identity_set_polygon_stipple(struct pipe_context *_pipe,
> }
>
> static void
> -identity_set_scissor_state(struct pipe_context *_pipe,
> - const struct pipe_scissor_state *scissor)
> +identity_set_scissor_states(struct pipe_context *_pipe,
> + unsigned num_scissors,
> + const struct pipe_scissor_state *scissor)
> {
> struct identity_context *id_pipe = identity_context(_pipe);
> struct pipe_context *pipe = id_pipe->pipe;
>
> - pipe->set_scissor_state(pipe,
> - scissor);
> + pipe->set_scissor_states(pipe, num_scissors,
> + scissor);
Again.
> }
>
> static void
> -identity_set_viewport_state(struct pipe_context *_pipe,
> - const struct pipe_viewport_state *viewport)
> +identity_set_viewport_states(struct pipe_context *_pipe,
> + unsigned num_viewports,
> + const struct pipe_viewport_state *viewport)
> {
> struct identity_context *id_pipe = identity_context(_pipe);
> struct pipe_context *pipe = id_pipe->pipe;
>
> - pipe->set_viewport_state(pipe,
> - viewport);
> + pipe->set_viewport_states(pipe, num_viewports,
> + viewport);
Again.
> }
>
> static void
> diff --git a/src/gallium/drivers/rbug/rbug_context.c b/src/gallium/drivers/rbug/rbug_context.c
> index bf939b9..27b32f5 100644
> --- a/src/gallium/drivers/rbug/rbug_context.c
> +++ b/src/gallium/drivers/rbug/rbug_context.c
> @@ -693,28 +693,30 @@ rbug_set_polygon_stipple(struct pipe_context *_pipe,
> }
>
> static void
> -rbug_set_scissor_state(struct pipe_context *_pipe,
> - const struct pipe_scissor_state *scissor)
> +rbug_set_scissor_states(struct pipe_context *_pipe,
> + unsigned num_scissors,
> + const struct pipe_scissor_state *scissor)
> {
> struct rbug_context *rb_pipe = rbug_context(_pipe);
> struct pipe_context *pipe = rb_pipe->pipe;
>
> pipe_mutex_lock(rb_pipe->call_mutex);
> - pipe->set_scissor_state(pipe,
> - scissor);
> + pipe->set_scissor_states(pipe, num_scissors,
> + scissor);
Again.
> pipe_mutex_unlock(rb_pipe->call_mutex);
> }
>
> static void
> -rbug_set_viewport_state(struct pipe_context *_pipe,
> - const struct pipe_viewport_state *viewport)
> +rbug_set_viewport_states(struct pipe_context *_pipe,
> + unsigned num_viewports,
> + const struct pipe_viewport_state *viewport)
> {
> struct rbug_context *rb_pipe = rbug_context(_pipe);
> struct pipe_context *pipe = rb_pipe->pipe;
>
> pipe_mutex_lock(rb_pipe->call_mutex);
> - pipe->set_viewport_state(pipe,
> - viewport);
> + pipe->set_viewport_states(pipe, num_viewports,
> + viewport);
Again.
> pipe_mutex_unlock(rb_pipe->call_mutex);
> }
>
More information about the mesa-dev
mailing list