1) I prefer this interface instead: void (*set_scissor_states)( struct pipe_context *, unsigned start_slot, unsigned count, const struct pipe_scissor_state * );
void (*set_viewport_states)( struct pipe_context *, unsigned start_slot, unsigned count, const struct pipe_viewport_state *); Both function should allow updating only a subset of all viewports and scissors (from start_slot to start_slot+count-1). This is especially important for meta ops (u_gen_mipmap, etc.), which need to update only the first viewport (and no scissor), leaving the other viewports unchanged. This idea is not new: the vertex buffer and compute sampler functions have the start_slot parameter too. 2) What does cso_context need to keep a copy of all viewports for? All meta ops need only one viewport, just as they need only one vertex buffer and one constant buffer (and cso_context doesn't really allow meta ops to use more than that). For example, see how the cso_context interface for saving and restoring the constant buffer slot 0 looks like. It's preferable to use the same mechanism unless there is a need to have the save and restore functionality for all slots. Marek On Thu, May 23, 2013 at 10:33 PM, Zack Rusin <za...@vmware.com> 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 <za...@vmware.com> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev