From: Karol Herbst Date: Wed, 15 Apr 2020 11:37:39 +0000 (+0200) Subject: gallium: initialize viewport swizzle in cso_set_viewport_dims X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e525d29ab68d927d0f2aa7e3ef21d25e915e76d;p=mesa.git gallium: initialize viewport swizzle in cso_set_viewport_dims Fixes: dEQP-GLES2.functional.fragment_ops.depth_stencil.stencil_* and more Fixes: 4137a79c2a7e ("gallium: add viewport swizzling state and cap") Signed-off-by: Karol Herbst Reviewed-by: Ilia Mirkin Part-of: --- diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c index 5c21f8279af..459833b21be 100644 --- a/src/gallium/auxiliary/cso_cache/cso_context.c +++ b/src/gallium/auxiliary/cso_cache/cso_context.c @@ -756,6 +756,10 @@ cso_set_viewport_dims(struct cso_context *ctx, vp.translate[0] = 0.5f * width; vp.translate[1] = 0.5f * height; vp.translate[2] = 0.5f; + 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(ctx, &vp); }