summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_bitmap.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-02-16 10:22:32 -0700
committerBrian Paul <[email protected]>2016-02-16 10:22:32 -0700
commit347b9418acfc68544ab5c0cba6bfdd934e129b80 (patch)
treee0acb07012f5602e1f69fd01518ecd35af3b44ad /src/mesa/state_tracker/st_cb_bitmap.c
parentf7af12ae852bdc957fc6f197c722822b82043ead (diff)
st/mesa: use new cso_set_viewport_dims() helper
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 0db2514f451..abea7a0c1ae 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -267,19 +267,9 @@ setup_render_state(struct gl_context *ctx,
}
/* viewport state: viewport matching window dims */
- {
- const GLboolean invert = st->state.fb_orientation == Y_0_TOP;
- const GLfloat width = (GLfloat)st->state.framebuffer.width;
- const GLfloat height = (GLfloat)st->state.framebuffer.height;
- struct pipe_viewport_state vp;
- vp.scale[0] = 0.5f * width;
- vp.scale[1] = height * (invert ? -0.5f : 0.5f);
- vp.scale[2] = 0.5f;
- vp.translate[0] = 0.5f * width;
- vp.translate[1] = 0.5f * height;
- vp.translate[2] = 0.5f;
- cso_set_viewport(cso, &vp);
- }
+ cso_set_viewport_dims(cso, st->state.framebuffer.width,
+ st->state.framebuffer.height,
+ st->state.fb_orientation == Y_0_TOP);
cso_set_vertex_elements(cso, 3, st->util_velems);