<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">Am 10.01.2018 01:03 schrieb "Ilia Mirkin" <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>>:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">On Tue, Jan 9, 2018 at 5:40 PM, Christopher Egert <<a href="mailto:cme3000@gmail.com">cme3000@gmail.com</a>> wrote:<br>
> I'm not too familiar with gallium3d, but this fixes<br>
> crashes with 3DMark2001 and GTA3 in wine-staging.<br>
><br>
> This should be fixed properly in the future.<br>
><br>
> Signed-off-by: Christopher Egert <<a href="mailto:cme3000@gmail.com">cme3000@gmail.com</a>><br>
> ---<br>
> src/gallium/drivers/i915/i915_<wbr>clear.c | 3 ++-<br>
> src/gallium/drivers/i915/i915_<wbr>state_static.c | 4 +++-<br>
> 2 files changed, 5 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/gallium/drivers/i915/<wbr>i915_clear.c b/src/gallium/drivers/i915/<wbr>i915_clear.c<br>
> index a1af789104..7a6f3fbb9a 100644<br>
> --- a/src/gallium/drivers/i915/<wbr>i915_clear.c<br>
> +++ b/src/gallium/drivers/i915/<wbr>i915_clear.c<br>
> @@ -250,7 +250,8 @@ i915_clear_render(struct pipe_context *pipe, unsigned buffers,<br>
> {<br>
> struct i915_context *i915 = i915_context(pipe);<br>
><br>
> - if (i915->dirty)<br>
> + /* XXX not sure why this happens, but it works around one crash */<br>
<br>
</div>It used to be that there'd always be a draw before the first clear.<br>
This no longer happens, and a ton of drivers had to get fixes for<br>
that. Not sure if this is the right thing to do, but should look at<br>
how/whether the draw function deals with this.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Can you point me to when this was changed/which commit in gallium and how other drivers fixed this? :) </div><div dir="auto"><br></div><div dir="auto">Thanks! </div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="quoted-text"><br>
> + if (i915->dirty || (i915->hardware_dirty == ~0))<br>
> i915_update_derived(i915);<br>
><br>
> i915_clear_emit(pipe, buffers, color, depth, stencil,<br>
> diff --git a/src/gallium/drivers/i915/<wbr>i915_state_static.c b/src/gallium/drivers/i915/<wbr>i915_state_static.c<br>
> index 88b418b1ac..48bb137019 100644<br>
> --- a/src/gallium/drivers/i915/<wbr>i915_state_static.c<br>
> +++ b/src/gallium/drivers/i915/<wbr>i915_state_static.c<br>
> @@ -244,7 +244,9 @@ static void update_dst_buf_vars(struct i915_context *i915)<br>
> i915->current.target_fixup_<wbr>format = need_fixup;<br>
> i915->current.fixup_swizzle = fixup;<br>
> /* we also send a new program to make sure the fixup for RGBA surfaces happens */<br>
> - i915->hardware_dirty |= I915_HW_PROGRAM;<br>
> + /* XXX there is no program to upload, not sure where this should<br>
> + * be coming from, so comment this out for now */<br>
> + //i915->hardware_dirty |= I915_HW_PROGRAM;<br>
<br>
</div>Note that for that first clear, you might not have a program bound.<br>
Perhaps related?<br>
<br>
> }<br>
> }<br>
<font color="#888888">><br>
> --<br>
> 2.15.1<br>
> ______________________________<wbr>_________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br></div></div></div>