Mesa (master): gallium: initialize viewport swizzle in cso_set_viewport_dims

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 15 16:11:47 UTC 2020


Module: Mesa
Branch: master
Commit: 7e525d29ab68d927d0f2aa7e3ef21d25e915e76d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7e525d29ab68d927d0f2aa7e3ef21d25e915e76d

Author: Karol Herbst <kherbst at redhat.com>
Date:   Wed Apr 15 13:37:39 2020 +0200

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 <kherbst at redhat.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4567>

---

 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);
 }
 



More information about the mesa-commit mailing list