diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c index db99fb57346..d5e03f77d68 100644 --- a/src/gallium/auxiliary/hud/hud_context.c +++ b/src/gallium/auxiliary/hud/hud_context.c @@ -523,6 +523,10 @@ hud_draw_results(struct hud_context *hud, struct pipe_resource *tex) viewport.translate[0] = 0.5f * hud->fb_width; viewport.translate[1] = 0.5f * hud->fb_height; viewport.translate[2] = 0.0f; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; cso_set_framebuffer(cso, &fb); cso_set_sample_mask(cso, ~0); diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index 97660ee609a..bbab41b9100 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -324,6 +324,10 @@ 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.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + p->viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + p->viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + p->viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; ppq->fbos_init = true; diff --git a/src/gallium/auxiliary/util/u_blitter.c b/src/gallium/auxiliary/util/u_blitter.c index cefe76fea59..42bbd47d93a 100644 --- a/src/gallium/auxiliary/util/u_blitter.c +++ b/src/gallium/auxiliary/util/u_blitter.c @@ -827,6 +827,10 @@ static void blitter_set_rectangle(struct blitter_context_priv *ctx, viewport.translate[0] = 0.5f * ctx->dst_width; viewport.translate[1] = 0.5f * ctx->dst_height; viewport.translate[2] = depth; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; ctx->base.pipe->set_viewport_states(ctx->base.pipe, 0, 1, &viewport); } diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index e94174554ef..bce9f8522e1 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -126,6 +126,10 @@ util_set_max_viewport(struct cso_context *cso, struct pipe_resource *tex) viewport.translate[0] = 0.5f * tex->width0; viewport.translate[1] = 0.5f * tex->height0; viewport.translate[2] = 0.0f; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; cso_set_viewport(cso, &viewport); } diff --git a/src/gallium/auxiliary/vl/vl_bicubic_filter.c b/src/gallium/auxiliary/vl/vl_bicubic_filter.c index 769e54d89e2..674aa587d61 100644 --- a/src/gallium/auxiliary/vl/vl_bicubic_filter.c +++ b/src/gallium/auxiliary/vl/vl_bicubic_filter.c @@ -422,6 +422,10 @@ vl_bicubic_filter_render(struct vl_bicubic_filter *filter, viewport.scale[1] = dst->height; } viewport.scale[2] = 1; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; struct pipe_constant_buffer cb = {0}; float *ptr = NULL; diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 9a378b6b386..a6ace353273 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -446,6 +446,10 @@ vl_compositor_clear_layers(struct vl_compositor_state *s) s->layers[i].cs = NULL; s->layers[i].viewport.scale[2] = 1; s->layers[i].viewport.translate[2] = 0; + s->layers[i].viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + s->layers[i].viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + s->layers[i].viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + s->layers[i].viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; s->layers[i].rotate = VL_COMPOSITOR_ROTATE_0; for ( j = 0; j < 3; j++) diff --git a/src/gallium/auxiliary/vl/vl_deint_filter.c b/src/gallium/auxiliary/vl/vl_deint_filter.c index d319f60346f..950739b6ca7 100644 --- a/src/gallium/auxiliary/vl/vl_deint_filter.c +++ b/src/gallium/auxiliary/vl/vl_deint_filter.c @@ -472,6 +472,10 @@ vl_deint_filter_render(struct vl_deint_filter *filter, /* prepare viewport */ memset(&viewport, 0, sizeof(viewport)); viewport.scale[2] = 1; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; /* prepare framebuffer */ memset(&fb_state, 0, sizeof(fb_state)); diff --git a/src/gallium/auxiliary/vl/vl_idct.c b/src/gallium/auxiliary/vl/vl_idct.c index f3ad2fbe2cb..ccee0d4889f 100644 --- a/src/gallium/auxiliary/vl/vl_idct.c +++ b/src/gallium/auxiliary/vl/vl_idct.c @@ -609,6 +609,10 @@ 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.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + buffer->viewport_mismatch.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + buffer->viewport_mismatch.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + buffer->viewport_mismatch.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; return true; } @@ -652,6 +656,10 @@ 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.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + buffer->viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + buffer->viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + buffer->viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; return true; diff --git a/src/gallium/auxiliary/vl/vl_matrix_filter.c b/src/gallium/auxiliary/vl/vl_matrix_filter.c index 8bb76eead15..6c912ea8645 100644 --- a/src/gallium/auxiliary/vl/vl_matrix_filter.c +++ b/src/gallium/auxiliary/vl/vl_matrix_filter.c @@ -279,6 +279,10 @@ vl_matrix_filter_render(struct vl_matrix_filter *filter, viewport.scale[0] = dst->width; viewport.scale[1] = dst->height; viewport.scale[2] = 1; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; memset(&fb_state, 0, sizeof(fb_state)); fb_state.width = dst->width; diff --git a/src/gallium/auxiliary/vl/vl_mc.c b/src/gallium/auxiliary/vl/vl_mc.c index ff923df9b8e..0b2a210cb10 100644 --- a/src/gallium/auxiliary/vl/vl_mc.c +++ b/src/gallium/auxiliary/vl/vl_mc.c @@ -563,6 +563,10 @@ vl_mc_init_buffer(struct vl_mc *renderer, struct vl_mc_buffer *buffer) buffer->viewport.translate[0] = 0; buffer->viewport.translate[1] = 0; buffer->viewport.translate[2] = 0; + buffer->viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + buffer->viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + buffer->viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + buffer->viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; buffer->fb_state.nr_cbufs = 1; buffer->fb_state.zsbuf = NULL; diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c index c60794e715a..90ae4fcf926 100644 --- a/src/gallium/auxiliary/vl/vl_median_filter.c +++ b/src/gallium/auxiliary/vl/vl_median_filter.c @@ -383,6 +383,10 @@ vl_median_filter_render(struct vl_median_filter *filter, viewport.scale[0] = dst->width; viewport.scale[1] = dst->height; viewport.scale[2] = 1; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; memset(&fb_state, 0, sizeof(fb_state)); fb_state.width = dst->width; diff --git a/src/gallium/auxiliary/vl/vl_zscan.c b/src/gallium/auxiliary/vl/vl_zscan.c index 0450126d2f8..d225265d081 100644 --- a/src/gallium/auxiliary/vl/vl_zscan.c +++ b/src/gallium/auxiliary/vl/vl_zscan.c @@ -500,6 +500,10 @@ vl_zscan_init_buffer(struct vl_zscan *zscan, struct vl_zscan_buffer *buffer, buffer->viewport.translate[0] = 0; buffer->viewport.translate[1] = 0; buffer->viewport.translate[2] = 0; + buffer->viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + buffer->viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + buffer->viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + buffer->viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; buffer->fb_state.width = dst->width; buffer->fb_state.height = dst->height; diff --git a/src/gallium/frontends/nine/nine_state.c b/src/gallium/frontends/nine/nine_state.c index ad84a6e0093..0650c867fa9 100644 --- a/src/gallium/frontends/nine/nine_state.c +++ b/src/gallium/frontends/nine/nine_state.c @@ -790,6 +790,10 @@ update_viewport(struct NineDevice9 *device) pvport.translate[0] = (float)vport->Width * 0.5f + (float)vport->X; pvport.translate[1] = (float)vport->Height * 0.5f + (float)vport->Y; pvport.translate[2] = vport->MinZ; + pvport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + pvport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + pvport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + pvport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; /* We found R600 and SI cards have some imprecision * on the barycentric coordinates used for interpolation. diff --git a/src/gallium/frontends/xa/xa_renderer.c b/src/gallium/frontends/xa/xa_renderer.c index 7b7fdce9d59..6596ccdcd9d 100644 --- a/src/gallium/frontends/xa/xa_renderer.c +++ b/src/gallium/frontends/xa/xa_renderer.c @@ -345,6 +345,10 @@ renderer_bind_destination(struct xa_context *r, viewport.translate[0] = width / 2.f; viewport.translate[1] = height / 2.f; viewport.translate[2] = 0.0; + viewport.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; /* Constant buffer set up to match viewport dimensions: */ diff --git a/src/gallium/tests/graw/fs-test.c b/src/gallium/tests/graw/fs-test.c index 46afc911823..f9bddccdaf7 100644 --- a/src/gallium/tests/graw/fs-test.c +++ b/src/gallium/tests/graw/fs-test.c @@ -148,6 +148,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/graw/graw_util.h b/src/gallium/tests/graw/graw_util.h index b8c79361c23..ca813b6b87c 100644 --- a/src/gallium/tests/graw/graw_util.h +++ b/src/gallium/tests/graw/graw_util.h @@ -201,6 +201,11 @@ graw_util_viewport(struct graw_info *info, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + info->ctx->set_viewport_states(info->ctx, 0, 1, &vp); } diff --git a/src/gallium/tests/graw/gs-test.c b/src/gallium/tests/graw/gs-test.c index 479ede26115..4d8f5c31f15 100644 --- a/src/gallium/tests/graw/gs-test.c +++ b/src/gallium/tests/graw/gs-test.c @@ -206,6 +206,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/graw/quad-sample.c b/src/gallium/tests/graw/quad-sample.c index dd86b51587e..912df7e7aac 100644 --- a/src/gallium/tests/graw/quad-sample.c +++ b/src/gallium/tests/graw/quad-sample.c @@ -76,6 +76,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/graw/shader-leak.c b/src/gallium/tests/graw/shader-leak.c index 71ddd33263c..0e121a7d0d6 100644 --- a/src/gallium/tests/graw/shader-leak.c +++ b/src/gallium/tests/graw/shader-leak.c @@ -66,6 +66,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/graw/tri-gs.c b/src/gallium/tests/graw/tri-gs.c index 6f577323ff5..8d5ad205860 100644 --- a/src/gallium/tests/graw/tri-gs.c +++ b/src/gallium/tests/graw/tri-gs.c @@ -67,6 +67,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/graw/tri-instanced.c b/src/gallium/tests/graw/tri-instanced.c index c1bf6396926..8ddd266792e 100644 --- a/src/gallium/tests/graw/tri-instanced.c +++ b/src/gallium/tests/graw/tri-instanced.c @@ -96,6 +96,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/graw/vs-test.c b/src/gallium/tests/graw/vs-test.c index 04bcb4f72fb..23e642b47bd 100644 --- a/src/gallium/tests/graw/vs-test.c +++ b/src/gallium/tests/graw/vs-test.c @@ -128,6 +128,11 @@ static void set_viewport( float x, float y, vp.translate[1] = half_height + y; vp.translate[2] = half_depth + z; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; + ctx->set_viewport_states( ctx, 0, 1, &vp ); } diff --git a/src/gallium/tests/trivial/quad-tex.c b/src/gallium/tests/trivial/quad-tex.c index 563e4f35a7f..79e9c39cab1 100644 --- a/src/gallium/tests/trivial/quad-tex.c +++ b/src/gallium/tests/trivial/quad-tex.c @@ -250,6 +250,11 @@ static void init_prog(struct program *p) 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.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + p->viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + p->viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + p->viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; } /* vertex elements state */ diff --git a/src/gallium/tests/trivial/tri.c b/src/gallium/tests/trivial/tri.c index 254a10ac863..0bc09a983a2 100644 --- a/src/gallium/tests/trivial/tri.c +++ b/src/gallium/tests/trivial/tri.c @@ -193,6 +193,11 @@ static void init_prog(struct program *p) 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.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + p->viewport.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + p->viewport.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + p->viewport.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; } /* vertex elements state */ diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index 88865cd5e27..013947d4b61 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -330,6 +330,10 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, vp.translate[0] = 0.5f * width; vp.translate[1] = 0.5f * height; vp.translate[2] = 0.0f; + vp.swizzle_x = PIPE_VIEWPORT_SWIZZLE_POSITIVE_X; + vp.swizzle_y = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y; + vp.swizzle_z = PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z; + vp.swizzle_w = PIPE_VIEWPORT_SWIZZLE_POSITIVE_W; cso_set_viewport(cso, &vp); }