From 5e52df21982eca6188c57f147ff6cc7361b3a61a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 15 Feb 2016 17:27:15 -0700 Subject: st/mesa: use cso_set_viewport_dims() in try_pbo_upload_common() Note that this results in a different transformation for the viewport's Z axis (depth range), but that doesn't matter for this case. Reviewed-by: Roland Scheidegger --- src/mesa/state_tracker/st_cb_texture.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_texture.c') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index a06cc72bdd2..d09c3609a9e 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1474,18 +1474,7 @@ try_pbo_upload_common(struct gl_context *ctx, pipe_surface_reference(&fb.cbufs[0], NULL); } - /* Viewport state */ - { - struct pipe_viewport_state vp; - vp.scale[0] = 0.5f * surface->width; - vp.scale[1] = 0.5f * surface->height; - vp.scale[2] = 1.0f; - vp.translate[0] = 0.5f * surface->width; - vp.translate[1] = 0.5f * surface->height; - vp.translate[2] = 0.0f; - - cso_set_viewport(cso, &vp); - } + cso_set_viewport_dims(cso, surface->width, surface->height, FALSE); /* Blend state */ cso_set_blend(cso, &st->pbo_upload.blend); -- cgit v1.2.3