st/nine: Use cso for viewport
authorPatrick Rudolph <siro@das-labor.org>
Sat, 19 Dec 2015 06:43:08 +0000 (07:43 +0100)
committerAxel Davy <axel.davy@ens.fr>
Thu, 4 Feb 2016 21:12:17 +0000 (22:12 +0100)
Use CSO to catch redundant viewport changes.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/nine_state.c

index 7a8231ae7e3d714b94bee536b8503322604d741f..f835d298014df3caee8d90916ac167b80c2eda67 100644 (file)
@@ -504,7 +504,6 @@ update_framebuffer(struct NineDevice9 *device)
 static void
 update_viewport(struct NineDevice9 *device)
 {
-    struct pipe_context *pipe = device->pipe;
     const D3DVIEWPORT9 *vport = &device->state.viewport;
     struct pipe_viewport_state pvport;
 
@@ -543,7 +542,7 @@ update_viewport(struct NineDevice9 *device)
         pvport.translate[1] -= 1.0f / 128.0f;
     }
 
-    pipe->set_viewport_states(pipe, 0, 1, &pvport);
+    cso_set_viewport(device->cso, &pvport);
 }
 
 /* Loop through VS inputs and pick the vertex elements with the declared