Mesa (main): i915g: Fix polygon offset by telling draw the Z format.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 19 17:41:36 UTC 2021
Module: Mesa
Branch: main
Commit: da3f20a3ab4eebf48f72f9939a814899fec5c282
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=da3f20a3ab4eebf48f72f9939a814899fec5c282
Author: Emma Anholt <emma at anholt.net>
Date: Wed Aug 18 16:50:39 2021 -0700
i915g: Fix polygon offset by telling draw the Z format.
This is what initializes the MRD for draw's polygon offset calculations.
Closes: #4976
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12436>
---
src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt | 2 --
src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt | 6 ------
src/gallium/drivers/i915/ci/traces-i915.yml | 4 ++--
src/gallium/drivers/i915/i915_state.c | 2 ++
4 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt
index b4c82622de5..05ce50e4670 100644
--- a/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt
+++ b/src/gallium/drivers/i915/ci/deqp-i915-g33-fails.txt
@@ -20,8 +20,6 @@ dEQP-GLES2.functional.clipping.triangle_vertex.clip_two.clip_pos_y_pos_z_and_neg
dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb10_a2,Fail
dEQP-GLES2.functional.negative_api.shader.uniform_matrixfv_invalid_transpose,Fail
dEQP-GLES2.functional.negative_api.texture.generatemipmap_zero_level_array_compressed,Fail
-dEQP-GLES2.functional.polygon_offset.default_displacement_with_units,Fail
-dEQP-GLES2.functional.polygon_offset.fixed16_displacement_with_units,Fail
dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide,Fail
dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide,Fail
dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide,Fail
diff --git a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt
index e8a9dc88839..b5ee53f6ee7 100644
--- a/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt
+++ b/src/gallium/drivers/i915/ci/piglit-i915-g33-fails.txt
@@ -54,10 +54,6 @@ spec@!opengl 1.1 at linestipple@Line strip,Fail
spec@!opengl 1.1 at longprim,Crash
spec@!opengl 1.1 at point-line-no-cull,Crash
spec@!opengl 1.1 at polygon-mode-offset,Fail
-spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on bottom edge,Fail
-spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on left edge,Fail
-spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on right edge,Fail
-spec@!opengl 1.1 at polygon-mode-offset@config 0: Expected white pixel on top edge,Fail
spec@!opengl 1.1 at polygon-mode-offset@config 3: Expected white pixel on bottom edge,Fail
spec@!opengl 1.1 at polygon-mode-offset@config 3: Expected white pixel on left edge,Fail
spec@!opengl 1.1 at polygon-mode-offset@config 3: Expected white pixel on right edge,Fail
@@ -66,7 +62,6 @@ spec@!opengl 1.1 at polygon-mode-offset@config 4: Expected white pixel on bottom ed
spec@!opengl 1.1 at polygon-mode-offset@config 4: Expected white pixel on left edge,Fail
spec@!opengl 1.1 at polygon-mode-offset@config 4: Expected white pixel on right edge,Fail
spec@!opengl 1.1 at polygon-mode-offset@config 4: Expected white pixel on top edge,Fail
-spec@!opengl 1.1 at polygon-offset,Fail
spec@!opengl 1.1 at read-front,Fail
spec@!opengl 1.1 at read-front clear-front-first,Fail
spec@!opengl 1.1 at tex-upside-down-miptree,Fail
@@ -122,7 +117,6 @@ spec@!opengl 1.2 at texwrap 3d proj,Fail
spec@!opengl 1.2 at texwrap 3d proj at GL_RGBA8- NPOT- projected,Fail
spec@!opengl 1.2 at texwrap 3d proj bordercolor,Fail
spec@!opengl 1.2 at texwrap 3d proj bordercolor at GL_RGBA8- projected- border color only,Fail
-spec@!opengl 1.4 at gl-1.4-polygon-offset,Fail
spec@!opengl 1.4 at tex-miplevel-selection,Fail
spec@!opengl 1.4 at tex-miplevel-selection-lod,Fail
spec@!opengl 1.4 at tex-miplevel-selection-lod-bias,Fail
diff --git a/src/gallium/drivers/i915/ci/traces-i915.yml b/src/gallium/drivers/i915/ci/traces-i915.yml
index f35d482f752..819a6594968 100644
--- a/src/gallium/drivers/i915/ci/traces-i915.yml
+++ b/src/gallium/drivers/i915/ci/traces-i915.yml
@@ -12,7 +12,7 @@ traces:
- path: gputest/plot3d.trace
expectations:
- device: i915-g33
- checksum: dc187485584bc45b9050e88163e72c34
+ checksum: 6a3f62f1c6cc57c91188f93f37ebf9b4
- path: gputest/triangle.trace
expectations:
# Weird white bar behind Tux's head.
@@ -27,7 +27,7 @@ traces:
# The cel shading is pretty chunky, but maybe that's just precision stuff.
expectations:
- device: i915-g33
- checksum: 2258848deb4052a3c19145fe524e2805
+ checksum: 7518414e4f1a4f1e07c04ec1500f53e7
# Requires GLSL 1.30
#- path: humus/DynamicBranching3.trace
# expectations:
diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c
index 947a67c149c..fe34edd0f71 100644
--- a/src/gallium/drivers/i915/i915_state.c
+++ b/src/gallium/drivers/i915/i915_state.c
@@ -815,6 +815,8 @@ i915_set_framebuffer_state(struct pipe_context *pipe,
pipe_surface_reference(&i915->framebuffer.cbufs[0], NULL);
}
pipe_surface_reference(&i915->framebuffer.zsbuf, fb->zsbuf);
+ if (fb->zsbuf)
+ draw_set_zs_format(i915->draw, fb->zsbuf->format);
i915->dirty |= I915_NEW_FRAMEBUFFER;
}
More information about the mesa-commit
mailing list