summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_context.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-04-02 00:37:12 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-04-02 00:37:12 +1000
commitea990867a8b0f59a85b01e7d3aa3ab53d61078d2 (patch)
treeda285fd991a5ccdb1c5a14efd9af560033825f93 /src/gallium/auxiliary/draw/draw_context.c
parente616d3f3e2178e34e4e7d769b38b0dff4ad615fe (diff)
parentedfa8201a50c47376b7aa0c05d7851e3e1353bde (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_context.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_context.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c
index 10bf9f54c1..d0d5f66b37 100644
--- a/src/gallium/auxiliary/draw/draw_context.c
+++ b/src/gallium/auxiliary/draw/draw_context.c
@@ -228,6 +228,14 @@ void draw_set_viewport_state( struct draw_context *draw,
{
draw_do_flush( draw, DRAW_FLUSH_STATE_CHANGE );
draw->viewport = *viewport; /* struct copy */
+ draw->identity_viewport = (viewport->scale[0] == 1.0f &&
+ viewport->scale[1] == 1.0f &&
+ viewport->scale[2] == 1.0f &&
+ viewport->scale[3] == 1.0f &&
+ viewport->translate[0] == 0.0f &&
+ viewport->translate[1] == 0.0f &&
+ viewport->translate[2] == 0.0f &&
+ viewport->translate[3] == 0.0f);
}