summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_framebuffer.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-17 11:27:55 -0600
committerBrian Paul <brianp@vmware.com>2009-06-17 11:30:30 -0600
commitb7adc92576e9efa05517d19112d5a7add7413500 (patch)
treef22a87edb446b0c367f8075d5255eb8660fccac3 /src/mesa/state_tracker/st_framebuffer.c
parent1b1acf6fa8189867a15416a098fe70e05913a48b (diff)
st/mesa: rework viewport/scissor initialization codegallium-mesa-7.4
This is a hand-pick of some of the new viewport code committed to mesa_7_5_branch. See commit 3f856c6b6b7fa95ef97a8712876de88d7d57932e for reference. This is just the state_tracker part. The core Mesa part came from merging in mesa_7_4_branch.
Diffstat (limited to 'src/mesa/state_tracker/st_framebuffer.c')
-rw-r--r--src/mesa/state_tracker/st_framebuffer.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_framebuffer.c b/src/mesa/state_tracker/st_framebuffer.c
index 0d9c7b97e3d..10847abdc81 100644
--- a/src/mesa/state_tracker/st_framebuffer.c
+++ b/src/mesa/state_tracker/st_framebuffer.c
@@ -133,16 +133,7 @@ void st_resize_framebuffer( struct st_framebuffer *stfb,
if (stfb->Base.Width != width || stfb->Base.Height != height) {
GET_CURRENT_CONTEXT(ctx);
if (ctx) {
- if (stfb->InitWidth == 0 && stfb->InitHeight == 0) {
- /* didn't have a valid size until now */
- stfb->InitWidth = width;
- stfb->InitHeight = height;
- if (ctx->Viewport.Width <= 1) {
- /* set context's initial viewport/scissor size */
- _mesa_set_viewport(ctx, 0, 0, width, height);
- _mesa_set_scissor(ctx, 0, 0, width, height);
- }
- }
+ _mesa_check_init_viewport(ctx, width, height);
_mesa_resize_framebuffer(ctx, &stfb->Base, width, height);