gallium: remove unused pipe_viewport_state::translate[3] and scale[3]
authorMarek Olšák <marek.olsak@amd.com>
Sun, 9 Nov 2014 23:37:03 +0000 (00:37 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Sun, 16 Nov 2014 00:28:28 +0000 (01:28 +0100)
Almost all drivers ignore them.

34 files changed:
src/gallium/auxiliary/draw/draw_context.c
src/gallium/auxiliary/hud/hud_context.c
src/gallium/auxiliary/postprocess/pp_init.c
src/gallium/auxiliary/util/u_blit.c
src/gallium/auxiliary/util/u_blitter.c
src/gallium/auxiliary/util/u_tests.c
src/gallium/auxiliary/vl/vl_compositor.c
src/gallium/auxiliary/vl/vl_deint_filter.c
src/gallium/auxiliary/vl/vl_idct.c
src/gallium/auxiliary/vl/vl_matrix_filter.c
src/gallium/auxiliary/vl/vl_mc.c
src/gallium/auxiliary/vl/vl_median_filter.c
src/gallium/auxiliary/vl/vl_zscan.c
src/gallium/drivers/ilo/ilo_blitter_rectlist.c
src/gallium/drivers/nouveau/nv30/nv30_state_validate.c
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/include/pipe/p_state.h
src/gallium/state_trackers/vega/renderer.c
src/gallium/state_trackers/xa/xa_renderer.c
src/gallium/tests/graw/fs-test.c
src/gallium/tests/graw/graw_util.h
src/gallium/tests/graw/gs-test.c
src/gallium/tests/graw/quad-sample.c
src/gallium/tests/graw/shader-leak.c
src/gallium/tests/graw/tri-gs.c
src/gallium/tests/graw/tri-instanced.c
src/gallium/tests/graw/vs-test.c
src/gallium/tests/trivial/quad-tex.c
src/gallium/tests/trivial/tri.c
src/mesa/state_tracker/st_atom_viewport.c
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_cb_drawpixels.c
src/mesa/state_tracker/st_cb_drawtex.c

index b0f4ca2c4c0d425b81bb6ff684d01bdae6aaa639..bb8c03c36f9dfe677b3b02ad01fb86f1f7ab0747 100644 (file)
@@ -373,11 +373,9 @@ void draw_set_viewport_states( struct draw_context *draw,
       (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);
+       viewport->translate[2] == 0.0f);
 }
 
 
index 18a878118cb0d6cb5bf3490ea2f287c5ad099482..98678fc9f1e413e4350af3e6ab4d3bf5c9b6ce73 100644 (file)
@@ -444,11 +444,9 @@ hud_draw(struct hud_context *hud, struct pipe_resource *tex)
    viewport.scale[0] = 0.5f * hud->fb_width;
    viewport.scale[1] = 0.5f * hud->fb_height;
    viewport.scale[2] = 1.0f;
-   viewport.scale[3] = 1.0f;
    viewport.translate[0] = 0.5f * hud->fb_width;
    viewport.translate[1] = 0.5f * hud->fb_height;
    viewport.translate[2] = 0.0f;
-   viewport.translate[3] = 0.0f;
 
    cso_set_framebuffer(cso, &fb);
    cso_set_sample_mask(cso, ~0);
index 05a08304762b79ceb8c4b94b1e75e73562c10347..bdf66e6d63a12e994feb52ae0f6c477bae99fb22 100644 (file)
@@ -324,8 +324,6 @@ pp_init_fbos(struct pp_queue_t *ppq, unsigned int w,
 
    p->viewport.scale[0] = p->viewport.translate[0] = (float) w / 2.0f;
    p->viewport.scale[1] = p->viewport.translate[1] = (float) h / 2.0f;
-   p->viewport.scale[3] = 1.0f;
-   p->viewport.translate[3] = 0.0f;
 
    ppq->fbos_init = true;
 
index 020e5f727a5e29cb4045f1ee7b162194103f3449..90408ffdcc6b4ad1f58ce5ab05c88e70b5f78a7b 100644 (file)
@@ -559,11 +559,9 @@ util_blit_pixels_tex(struct blit_state *ctx,
    ctx->viewport.scale[0] = 0.5f * dst->width;
    ctx->viewport.scale[1] = 0.5f * dst->height;
    ctx->viewport.scale[2] = 0.5f;
-   ctx->viewport.scale[3] = 1.0f;
    ctx->viewport.translate[0] = 0.5f * dst->width;
    ctx->viewport.translate[1] = 0.5f * dst->height;
    ctx->viewport.translate[2] = 0.5f;
-   ctx->viewport.translate[3] = 0.0f;
    cso_set_viewport(ctx->cso, &ctx->viewport);
 
    /* texture */
index 5298603f7750a1ebcfdd34e05c8910ae03c0d50f..9d087fe8a66fc9068b5c93a77e50d097e4635a56 100644 (file)
@@ -683,11 +683,9 @@ static void blitter_set_rectangle(struct blitter_context_priv *ctx,
    ctx->viewport.scale[0] = 0.5f * ctx->dst_width;
    ctx->viewport.scale[1] = 0.5f * ctx->dst_height;
    ctx->viewport.scale[2] = 1.0f;
-   ctx->viewport.scale[3] = 1.0f;
    ctx->viewport.translate[0] = 0.5f * ctx->dst_width;
    ctx->viewport.translate[1] = 0.5f * ctx->dst_height;
    ctx->viewport.translate[2] = 0.0f;
-   ctx->viewport.translate[3] = 0.0f;
    ctx->base.pipe->set_viewport_states(ctx->base.pipe, 0, 1, &ctx->viewport);
 }
 
index 9483f0699d6b4cc356a791b423494a03810714ba..c0f6327b6e9363699a979653204f04360ba529a2 100644 (file)
@@ -114,11 +114,9 @@ util_set_max_viewport(struct cso_context *cso, struct pipe_resource *tex)
    viewport.scale[0] = 0.5f * tex->width0;
    viewport.scale[1] = 0.5f * tex->height0;
    viewport.scale[2] = 1.0f;
-   viewport.scale[3] = 1.0f;
    viewport.translate[0] = 0.5f * tex->width0;
    viewport.translate[1] = 0.5f * tex->height0;
    viewport.translate[2] = 0.0f;
-   viewport.translate[3] = 0.0f;
 
    cso_set_viewport(cso, &viewport);
 }
index 6bd1a886ed45213bc96e69489293e903aae396ec..69839e613869dae55e798361edad41e34cc43bff 100644 (file)
@@ -829,9 +829,7 @@ vl_compositor_clear_layers(struct vl_compositor_state *s)
       s->layers[i].blend = NULL;
       s->layers[i].fs = NULL;
       s->layers[i].viewport.scale[2] = 1;
-      s->layers[i].viewport.scale[3] = 1;
       s->layers[i].viewport.translate[2] = 0;
-      s->layers[i].viewport.translate[3] = 0;
       s->layers[i].rotate = VL_COMPOSITOR_ROTATE_0;
 
       for ( j = 0; j < 3; j++)
index a4554240f27c008a0f9a4a653803633983972298..8fa70e84c662ee7fcc6fd8ff1a0b26e95eaa7e6c 100644 (file)
@@ -443,7 +443,6 @@ vl_deint_filter_render(struct vl_deint_filter *filter,
    /* prepare viewport */
    memset(&viewport, 0, sizeof(viewport));
    viewport.scale[2] = 1;
-   viewport.scale[3] = 1;
 
    /* prepare framebuffer */
    memset(&fb_state, 0, sizeof(fb_state));
index 1212e5b1bf1bfb477755a8dfe1b129dc3e1aaa16..948a5a403d71b67df13fac1d38659af2ade7e167 100644 (file)
@@ -609,7 +609,6 @@ init_source(struct vl_idct *idct, struct vl_idct_buffer *buffer)
    buffer->viewport_mismatch.scale[0] = tex->width0;
    buffer->viewport_mismatch.scale[1] = tex->height0;
    buffer->viewport_mismatch.scale[2] = 1;
-   buffer->viewport_mismatch.scale[3] = 1;
 
    return true;
 }
@@ -653,7 +652,6 @@ init_intermediate(struct vl_idct *idct, struct vl_idct_buffer *buffer)
    buffer->viewport.scale[0] = tex->width0;
    buffer->viewport.scale[1] = tex->height0;
    buffer->viewport.scale[2] = 1;
-   buffer->viewport.scale[3] = 1;
 
    return true;
 
index 6d55116c8a2fb30f56038aefd788dc4dbc7f68f6..52ce4540122c98ec6b64f7adce1cc69485c39afc 100644 (file)
@@ -296,7 +296,6 @@ vl_matrix_filter_render(struct vl_matrix_filter *filter,
    viewport.scale[0] = dst->width;
    viewport.scale[1] = dst->height;
    viewport.scale[2] = 1;
-   viewport.scale[3] = 1;
 
    memset(&fb_state, 0, sizeof(fb_state));
    fb_state.width = dst->width;
index 11f12326c129dfb0142867091d05098180481855..6c317bbe04a5759d52ef5474c4e60ec6bb0e367d 100644 (file)
@@ -554,11 +554,9 @@ vl_mc_init_buffer(struct vl_mc *renderer, struct vl_mc_buffer *buffer)
    assert(renderer && buffer);
 
    buffer->viewport.scale[2] = 1;
-   buffer->viewport.scale[3] = 1;
    buffer->viewport.translate[0] = 0;
    buffer->viewport.translate[1] = 0;
    buffer->viewport.translate[2] = 0;
-   buffer->viewport.translate[3] = 0;
 
    buffer->fb_state.nr_cbufs = 1;
    buffer->fb_state.zsbuf = NULL;
index a79886f4a4bb660ae3f792fed10d5536e3db29a2..aa9a6b26485661c2392b5dc490027f18d151cde9 100644 (file)
@@ -375,7 +375,6 @@ vl_median_filter_render(struct vl_median_filter *filter,
    viewport.scale[0] = dst->width;
    viewport.scale[1] = dst->height;
    viewport.scale[2] = 1;
-   viewport.scale[3] = 1;
 
    memset(&fb_state, 0, sizeof(fb_state));
    fb_state.width = dst->width;
index 2e094810d21405c2c24e53eee46336c03da5fc0d..1c6cdd4f2c942863d32c25b317bd2a22d74d9766 100644 (file)
@@ -470,11 +470,9 @@ vl_zscan_init_buffer(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer,
    buffer->viewport.scale[0] = dst->width;
    buffer->viewport.scale[1] = dst->height;
    buffer->viewport.scale[2] = 1;
-   buffer->viewport.scale[3] = 1;
    buffer->viewport.translate[0] = 0;
    buffer->viewport.translate[1] = 0;
    buffer->viewport.translate[2] = 0;
-   buffer->viewport.translate[3] = 0;
 
    buffer->fb_state.width = dst->width;
    buffer->fb_state.height = dst->height;
index 0efe82082cf2c78ce7dfb199093b461af7a5cc1e..f232f4202bfc63f959bd001524ec0447c6ae26a4 100644 (file)
@@ -78,7 +78,6 @@ ilo_blitter_set_invariants(struct ilo_blitter *blitter)
    vp.scale[0] = 1.0f;
    vp.scale[1] = 1.0f;
    vp.scale[2] = 1.0f;
-   vp.scale[3] = 1.0f;
    ilo_gpe_set_viewport_cso(blitter->ilo->dev, &vp, &blitter->viewport);
 
    blitter->initialized = true;
index f22755983baf438a8f479879fe9170e1dc4d7b0c..0f9d19dd68efec00d89210299c02186a779155e4 100644 (file)
@@ -254,11 +254,11 @@ nv30_validate_viewport(struct nv30_context *nv30)
    PUSH_DATAf(push, vp->translate[0]);
    PUSH_DATAf(push, vp->translate[1]);
    PUSH_DATAf(push, vp->translate[2]);
-   PUSH_DATAf(push, vp->translate[3]);
+   PUSH_DATAf(push, 0.0f);
    PUSH_DATAf(push, vp->scale[0]);
    PUSH_DATAf(push, vp->scale[1]);
    PUSH_DATAf(push, vp->scale[2]);
-   PUSH_DATAf(push, vp->scale[3]);
+   PUSH_DATAf(push, 1.0f);
    BEGIN_NV04(push, NV30_3D(DEPTH_RANGE_NEAR), 2);
    PUSH_DATAf(push, vp->translate[2] - fabsf(vp->scale[2]));
    PUSH_DATAf(push, vp->translate[2] + fabsf(vp->scale[2]));
index f9393e601189ec46bad386d6015c44a94489552f..8aad1782d1db516e4505fe45729120b69078c364 100644 (file)
@@ -65,11 +65,9 @@ void r600_draw_rectangle(struct blitter_context *blitter,
        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;
        rctx->b.set_viewport_states(&rctx->b, 0, 1, &viewport);
 
        /* Upload vertices. The hw rectangle has only 3 vertices,
index 36d253c5157e493bce5e1f302dd2588b6eb28c03..43bc48bd336019f938f0ed4b33c73cb552076e6b 100644 (file)
@@ -166,8 +166,8 @@ struct pipe_poly_stipple
 
 struct pipe_viewport_state
 {
-   float scale[4];
-   float translate[4];
+   float scale[3];
+   float translate[3];
 };
 
 
index 931924ca407bc32f7591f5fba37c815024ed2d7f..d369c323bcc48003b45467e980660297f6842778 100644 (file)
@@ -348,11 +348,9 @@ static void vg_set_viewport(struct renderer *r,
    viewport.scale[0] =  fb->width / 2.f;
    viewport.scale[1] =  fb->height / y_scale;
    viewport.scale[2] =  1.0;
-   viewport.scale[3] =  1.0;
    viewport.translate[0] = fb->width / 2.f;
    viewport.translate[1] = fb->height / 2.f;
    viewport.translate[2] = 0.0;
-   viewport.translate[3] = 0.0;
 
    cso_set_viewport(r->cso, &viewport);
 }
index 780b24777af20026c50844aa3f6c8ace0aa5d4c4..7b28afc907f4b0c6ceaa6d035f8e1b47b90b6b6f 100644 (file)
@@ -361,11 +361,9 @@ renderer_bind_destination(struct xa_context *r,
     viewport.scale[0] = width / 2.f;
     viewport.scale[1] = height / 2.f;
     viewport.scale[2] = 1.0;
-    viewport.scale[3] = 1.0;
     viewport.translate[0] = width / 2.f;
     viewport.translate[1] = height / 2.f;
     viewport.translate[2] = 0.0;
-    viewport.translate[3] = 0.0;
 
     /* Constant buffer set up to match viewport dimensions:
      */
index e335bc6d46995ce0ac83840b55813255dbcc68a4..97306c4113b199911727ea1d07eb7dd540f0ca8f 100644 (file)
@@ -143,12 +143,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index 1856f0d7df4d98dd9386024e2c9bdd3a067add1b..72b6bc68c46a09b3190bba877028aa936b8438b5 100644 (file)
@@ -196,12 +196,10 @@ graw_util_viewport(struct graw_info *info,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    info->ctx->set_viewport_states(info->ctx, 0, 1, &vp);
 }
index c522a8f5c65254a68025d145e3651688e16f91aa..9200685caae2a04fa893ecb984de06185da07c9e 100644 (file)
@@ -218,12 +218,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index 4d5a59769f3b237eda7d6b24f1503330641b8e6b..787d811a56fe01861a5057aa4cfe58df6ecc53d7 100644 (file)
@@ -71,12 +71,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index fce3683bf3d8d8339d5d4c15be8ae27a36f2a8ab..90704a37f7d9d1fc73a6e161e1dfe2b9e549bc46 100644 (file)
@@ -61,12 +61,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index ab92dd02325a5a34d152b922a7854dbc02cba58a..7fe340d549fe1d82174ce4496ebd5c8ff38e226e 100644 (file)
@@ -62,12 +62,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index d7cad81b722b8300df35bd232252ed98b36efbab..65c5936e6bd2be6ccbc6ef0ea5e661311b999a0f 100644 (file)
@@ -91,12 +91,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index 187759dcba46146d2df3646a8dc2296919132ad1..cac432ef607fcf791be1f59f3843eb2845a22000 100644 (file)
@@ -129,12 +129,10 @@ static void set_viewport( float x, float y,
    vp.scale[0] = half_width;
    vp.scale[1] = half_height;
    vp.scale[2] = half_depth;
-   vp.scale[3] = 1.0f;
 
    vp.translate[0] = half_width + x;
    vp.translate[1] = half_height + y;
    vp.translate[2] = half_depth + z;
-   vp.translate[3] = 0.0f;
 
    ctx->set_viewport_states( ctx, 0, 1, &vp );
 }
index 1d52aff34396235d98c41dec22a59a6ac3d1450c..c09e09a57998062a409bf9d5cab46f8ad3aec09f 100644 (file)
@@ -243,12 +243,10 @@ static void init_prog(struct program *p)
                p->viewport.scale[0] = half_width;
                p->viewport.scale[1] = half_height * scale;
                p->viewport.scale[2] = half_depth;
-               p->viewport.scale[3] = 1.0f;
 
                p->viewport.translate[0] = half_width + x;
                p->viewport.translate[1] = (half_height + y) * scale + bias;
                p->viewport.translate[2] = half_depth + z;
-               p->viewport.translate[3] = 0.0f;
        }
 
        /* vertex elements state */
index 062d45d2fa4989ab93739577e38cf99cdc6e9016..dcc5a2288c73b2826a6ec6074114f17adcbcad97 100644 (file)
@@ -188,12 +188,10 @@ static void init_prog(struct program *p)
                p->viewport.scale[0] = half_width;
                p->viewport.scale[1] = half_height * scale;
                p->viewport.scale[2] = half_depth;
-               p->viewport.scale[3] = 1.0f;
 
                p->viewport.translate[0] = half_width + x;
                p->viewport.translate[1] = (half_height + y) * scale + bias;
                p->viewport.translate[2] = half_depth + z;
-               p->viewport.translate[3] = 0.0f;
        }
 
        /* vertex elements state */
index 5b992084bd5c8ef6951e8cecf69642eb6a73a986..efa056e10cdd64d94a248b02027b80653b1ff90b 100644 (file)
@@ -70,12 +70,10 @@ update_viewport( struct st_context *st )
       st->state.viewport[i].scale[0] = scale[0];
       st->state.viewport[i].scale[1] = scale[1] * yScale;
       st->state.viewport[i].scale[2] = scale[2];
-      st->state.viewport[i].scale[3] = 1.0;
 
       st->state.viewport[i].translate[0] = translate[0];
       st->state.viewport[i].translate[1] = translate[1] * yScale + yBias;
       st->state.viewport[i].translate[2] = translate[2];
-      st->state.viewport[i].translate[3] = 0.0;
    }
 
    cso_set_viewport(st->cso_context, &st->state.viewport[0]);
index 25975d098e4497c14cce6784e531f9befe54cbe3..2107ab167399083be37f0b7a42c38a56b2732cd9 100644 (file)
@@ -504,11 +504,9 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
       vp.scale[0] =  0.5f * width;
       vp.scale[1] = height * (invert ? -0.5f : 0.5f);
       vp.scale[2] = 0.5f;
-      vp.scale[3] = 1.0f;
       vp.translate[0] = 0.5f * width;
       vp.translate[1] = 0.5f * height;
       vp.translate[2] = 0.5f;
-      vp.translate[3] = 0.0f;
       cso_set_viewport(cso, &vp);
    }
 
index bb84fd96575103a1045e72ab0bcfda6c6fab3c4d..3a359f318855befb5c6c7e04d0930415b03b2f5e 100644 (file)
@@ -324,11 +324,9 @@ clear_with_quad(struct gl_context *ctx, unsigned clear_buffers)
       vp.scale[0] = 0.5f * fb_width;
       vp.scale[1] = fb_height * (invert ? -0.5f : 0.5f);
       vp.scale[2] = 0.5f;
-      vp.scale[3] = 1.0f;
       vp.translate[0] = 0.5f * fb_width;
       vp.translate[1] = 0.5f * fb_height;
       vp.translate[2] = 0.5f;
-      vp.translate[3] = 0.0f;
       cso_set_viewport(st->cso_context, &vp);
    }
 
index 5ae092b94fbf0eb290d7c96aed691541ecc6a5a1..939fc2065457edc365a3f6f54da238a6cc29af89 100644 (file)
@@ -776,11 +776,9 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
       vp.scale[0] =  0.5f * w;
       vp.scale[1] = -0.5f * h;
       vp.scale[2] = 0.5f;
-      vp.scale[3] = 1.0f;
       vp.translate[0] = 0.5f * w;
       vp.translate[1] = 0.5f * h;
       vp.translate[2] = 0.5f;
-      vp.translate[3] = 0.0f;
       cso_set_viewport(cso, &vp);
    }
 
index 168c276a99cd7cd086e7c053e700374a20db50ea..d057ff62aeef00be4eaaaa800042a4d6c45045b9 100644 (file)
@@ -258,11 +258,9 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
       vp.scale[0] =  0.5f * width;
       vp.scale[1] = height * (invert ? -0.5f : 0.5f);
       vp.scale[2] = 1.0f;
-      vp.scale[3] = 1.0f;
       vp.translate[0] = 0.5f * width;
       vp.translate[1] = 0.5f * height;
       vp.translate[2] = 0.0f;
-      vp.translate[3] = 0.0f;
       cso_set_viewport(cso, &vp);
    }