<div dir="ltr">Hello, Chris. Thank you for reviewing patch.<div>Do you mean changing just only <span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">emit_reloc() <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">parameter type or all the preceding callers too?</span></span></div><div><br></div><div>Also, please, explain what you mean about patch <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">cee9f3890351?</span></div><div>That issue is present even on mesa 13-0.0 and also solved with similar type-conversion fix.<br></div><div><br></div><div><br></div><div>Regards, Sergii.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 26, 2018 at 3:31 PM, Chris Wilson <span dir="ltr"><<a href="mailto:chris@chris-wilson.co.uk" target="_blank">chris@chris-wilson.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Quoting Sergii Romantsov (2018-03-26 13:16:24)<br>
<span class="">> Negative deltas are used to fake a range in a large buffer.<br>
> See 900a5c91eeb3<br>
> "i965: Use negative relocation deltas to minimise vertex uploads"<br>
><br>
> Gen8+ use 48-bit address relocations so need to extend the sign<br>
<br>
</span>Note that 48-bit relocations were only switched on in<br>
commit cee9f3890351 ("i965: Allow 48-bit addressing on Gen8+.")<br>
to save having to backport too far (although the patch is trivial).<br>
<span class=""><br>
> to 64-bit return value. Without it we have higher bits zeroed<br>
> and missing the negavive values.<br>
> Haswell and older use 32-bit deltas so are unaffected by this issue.<br>
><br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=101408" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=101408</a><br>
> Signed-off-by: Sergii Romantsov <<a href="mailto:sergii.romantsov@globallogic.com">sergii.romantsov@globallogic.<wbr>com</a>><br>
> Tested-by: Andriy Khulap <<a href="mailto:andriy.khulap@globallogic.com">andriy.khulap@globallogic.com</a><wbr>><br>
> ---<br>
> src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c | 4 +++-<br>
> 1 file changed, 3 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c b/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> index d824ff2..128da77 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_batchbuffer.c<br>
> @@ -1124,8 +1124,10 @@ emit_reloc(struct intel_batchbuffer *batch,<br>
> /* Using the old buffer offset, write in what the right data would be, in<br>
> * case the buffer doesn't move and we can short-circuit the relocation<br>
> * processing in the kernel<br>
> + *<br>
> + * Some target_offsets may be negative, so extend the sign to 64 bits.<br>
> */<br>
> - return entry->offset + target_offset;<br>
> + return entry->offset + (int64_t)((int32_t)target_<wbr>offset);<br>
<br>
</span>Although just changing s/uint32_t target_offset/int32_t target_offset/<br>
may be cleaner.<br>
<span class="HOEnZb"><font color="#888888">-Chris<br>
</font></span><div class="HOEnZb"><div class="h5">______________________________<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Sergii Romantsov<br></div><div dir="ltr"><div style="margin:0px;padding:0px;color:rgb(23,43,77);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:14px">GlobalLogic Inc.<br><a href="http://www.globallogic.com/" rel="nofollow" style="color:rgb(0,82,204)" target="_blank">www.globallogic.com</a><br></div></div></div></div></div></div>
</div>