<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com" target="_blank">marek.olsak@amd.com</a>><br><br></div><div>Marek<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 27, 2018 at 10:22 PM, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
src/gallium/drivers/radeonsi/<wbr>si_shader.c | 19 +++++++++++--------<br>
1 file changed, 11 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/gallium/drivers/<wbr>radeonsi/si_shader.c b/src/gallium/drivers/<wbr>radeonsi/si_shader.c<br>
index 8ae742c93f6..d5607a99d32 100644<br>
--- a/src/gallium/drivers/<wbr>radeonsi/si_shader.c<br>
+++ b/src/gallium/drivers/<wbr>radeonsi/si_shader.c<br>
@@ -1290,12 +1290,13 @@ static LLVMValueRef si_nir_load_tcs_varyings(<wbr>struct ac_shader_abi *abi,<br>
is_patch);<br>
<br>
LLVMValueRef value[4];<br>
- for (unsigned i = 0; i < num_components + component; i++) {<br>
+ for (unsigned i = 0; i < num_components; i++) {<br>
unsigned offset = i;<br>
if (llvm_type_is_64bit(ctx, type))<br>
offset *= 2;<br>
<br>
- value[i] = lds_load(bld_base, type, offset, dw_addr);<br>
+ offset += component;<br>
+ value[i + component] = lds_load(bld_base, type, offset, dw_addr);<br>
}<br>
<br>
return ac_build_varying_gather_<wbr>values(&ctx->ac, value, num_components, component);<br>
@@ -1377,13 +1378,14 @@ LLVMValueRef si_nir_load_input_tes(struct ac_shader_abi *abi,<br>
* between the NIR and TGSI backends.<br>
*/<br>
LLVMValueRef value[4];<br>
- for (unsigned i = component; i < num_components + component; i++) {<br>
+ for (unsigned i = 0; i < num_components; i++) {<br>
unsigned offset = i;<br>
if (llvm_type_is_64bit(ctx, type))<br>
offset *= 2;<br>
<br>
- value[i] = buffer_load(&ctx->bld_base, type, offset,<br>
- ctx->tess_offchip_ring, base, addr, true);<br>
+ offset += component;<br>
+ value[i + component] = buffer_load(&ctx->bld_base, type, offset,<br>
+ ctx->tess_offchip_ring, base, addr, true);<br>
}<br>
<br>
return ac_build_varying_gather_<wbr>values(&ctx->ac, value, num_components, component);<br>
@@ -1693,13 +1695,14 @@ static LLVMValueRef si_nir_load_input_gs(struct ac_shader_abi *abi,<br>
struct si_shader_context *ctx = si_shader_context_from_abi(<wbr>abi);<br>
<br>
LLVMValueRef value[4];<br>
- for (unsigned i = component; i < num_components + component; i++) {<br>
+ for (unsigned i = 0; i < num_components; i++) {<br>
unsigned offset = i;<br>
if (llvm_type_is_64bit(ctx, type))<br>
offset *= 2;<br>
<br>
- value[i] = si_llvm_load_input_gs(&ctx-><wbr>abi, driver_location / 4,<br>
- vertex_index, type, offset);<br>
+ offset += component;<br>
+ value[i + component] = si_llvm_load_input_gs(&ctx-><wbr>abi, driver_location / 4,<br>
+ vertex_index, type, offset);<br>
}<br>
<br>
return ac_build_varying_gather_<wbr>values(&ctx->ac, value, num_components, component);<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.3<br>
<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></span></blockquote></div><br></div>