[Mesa-dev] [PATCH 21/45] st/nine: Use cso for viewport

Axel Davy axel.davy at ens.fr
Fri Jan 29 08:08:45 PST 2016


From: Patrick Rudolph <siro at das-labor.org>

Use CSO to catch redundant viewport changes.

Signed-off-by: Patrick Rudolph <siro at das-labor.org>
Reviewed-by: Axel Davy <axel.davy at ens.fr>
---
 src/gallium/state_trackers/nine/nine_state.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 2f932ba..aeee11a 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -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
-- 
2.7.0



More information about the mesa-dev mailing list