<div dir="ltr">On 2 December 2013 11:39, Francisco Jerez <span dir="ltr"><<a href="mailto:currojerez@riseup.net" target="_blank">currojerez@riseup.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">+<br>
+void<br>
+backend_visitor::setup_image_uniform_values(const gl_uniform_storage *storage)<br>
+{<br>
+   const unsigned stage = _mesa_program_target_to_index(prog->Target);<br>
+<br>
+   for (unsigned i = 0; i < MAX2(storage->array_elements, 1); i++) {<br>
+      const unsigned image_idx = storage->image[stage].index + i;<br>
+      brw_image_param *param = &stage_prog_data->image_param[image_idx];<br>
+<br>
+      param->surface_idx =<br>
+         stage_prog_data->binding_table.image_start + image_idx;<br>
+<br>
+      setup_vector_uniform_values(&param->surface_idx, sizeof(uint32_t), 1);<br>
+      setup_vector_uniform_values(param->offset, sizeof(uint32_t), 2);<br>
+      setup_vector_uniform_values(param->size, sizeof(uint32_t), 3);<br>
+      setup_vector_uniform_values(param->stride, sizeof(uint32_t), 4);<br>
+      setup_vector_uniform_values(param->tiling, sizeof(uint32_t), 3);<br>
+      setup_vector_uniform_values(param->swizzling, sizeof(uint32_t), 2);<br>
+<br>
+      brw_mark_surface_used(stage_prog_data, param->surface_idx);<br></blockquote><div><br></div><div>Ok, now I see how you addressed my worries about brw_mark_surface_used() in patches 10-12.  It would be helpful to put comments in the commit messages for those patches explaining that brw_mark_surface_used() will be re-introduced in this patch and patch 17.  This is especially important for patch 10, since the lack of a call to brw_mark_surface_used() is going to introduce a temporary regression to ARB_shader_atomic_counters functionality that isn't corrected until patch 17.<br>
<br></div><div>With that addressed, this patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmai.com">stereotype441@gmai.com</a>><br></div></div></div></div>