From 7e525d29ab68d927d0f2aa7e3ef21d25e915e76d Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 15 Apr 2020 13:37:39 +0200 Subject: [PATCH] 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: --- src/gallium/auxiliary/cso_cache/cso_context.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 2.30.2