Note that this results in a different transformation for the viewport's
Z axis (depth range), but that doesn't matter for this case.
---
 src/mesa/state_tracker/st_cb_texture.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_texture.c 
b/src/mesa/state_tracker/st_cb_texture.c
index a06cc72..d09c360 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);
-- 
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to