<div dir="ltr"><div><div>If you add break statements into patch 5, the series is:<br><br></div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br><br></div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 5, 2018 at 1:34 AM, 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">This makes it easier to follow the code, and also initialises<br>
dynamic_index which will be useful for adding bindless textures<br>
support.<br>
---<br>
src/gallium/drivers/radeonsi/<wbr>si_shader_nir.c | 8 +++-----<br>
1 file changed, 3 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/gallium/drivers/<wbr>radeonsi/si_shader_nir.c b/src/gallium/drivers/<wbr>radeonsi/si_shader_nir.c<br>
index 362b7445cc5..f916575a1a1 100644<br>
--- a/src/gallium/drivers/<wbr>radeonsi/si_shader_nir.c<br>
+++ b/src/gallium/drivers/<wbr>radeonsi/si_shader_nir.c<br>
@@ -880,14 +880,12 @@ si_nir_load_sampler_desc(<wbr>struct ac_shader_abi *abi,<br>
struct si_shader_context *ctx = si_shader_context_from_abi(<wbr>abi);<br>
LLVMBuilderRef builder = ctx->ac.builder;<br>
LLVMValueRef list = LLVMGetParam(ctx->main_fn, ctx->param_samplers_and_<wbr>images);<br>
- LLVMValueRef index = dynamic_index;<br>
+ LLVMValueRef index;<br>
<br>
assert(!descriptor_set);<br>
<br>
- if (!index)<br>
- index = ctx->ac.i32_0;<br>
-<br>
- index = LLVMBuildAdd(builder, index,<br>
+ dynamic_index = dynamic_index ? dynamic_index : ctx->ac.i32_0;<br>
+ index = LLVMBuildAdd(builder, dynamic_index,<br>
LLVMConstInt(ctx->ac.i32, base_index + constant_index, false),<br>
"");<br>
<span class="HOEnZb"><font color="#888888"><br>
--<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>