<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 22, 2016 at 2:08 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 22/11/16 04:26, Jason Ekstrand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If we try to allocate a binding table and fail, we have to get a new<br>
binding table block, re-emit STATE_BASE_ADDRESS, and then try again. We<br>
already handle this correctly for 3D and blorp but it never got handled for<br>
CS. This fixes the new stress.lots-of-surface-state.c<wbr>s.static crucible test.<br>
<br>
Cc: "13.0" <<a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop<wbr>.org</a>><br>
Cc: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>><br>
---<br>
src/intel/vulkan/genX_cmd_buff<wbr>er.c | 20 +++++++++++++++-----<br>
1 file changed, 15 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/genX_cmd_bu<wbr>ffer.c b/src/intel/vulkan/genX_cmd_bu<wbr>ffer.c<br>
index de3253f..6645d1b 100644<br>
--- a/src/intel/vulkan/genX_cmd_bu<wbr>ffer.c<br>
+++ b/src/intel/vulkan/genX_cmd_bu<wbr>ffer.c<br>
@@ -1674,12 +1674,22 @@ flush_compute_descriptor_set(s<wbr>truct anv_cmd_buffer *cmd_buffer)<br>
struct anv_state surfaces = { 0, }, samplers = { 0, };<br>
VkResult result;<br>
- result = emit_samplers(cmd_buffer, MESA_SHADER_COMPUTE, &samplers);<br>
- if (result != VK_SUCCESS)<br>
- return result;<br>
result = emit_binding_table(cmd_buffer, MESA_SHADER_COMPUTE, &surfaces);<br>
- if (result != VK_SUCCESS)<br>
- return result;<br>
+ if (result != VK_SUCCESS) {<br>
</blockquote>
<br></span>
Would it make sense to have the same assert(result == VK_ERROR_OUT_OF_DEVICE_MEMORY)<wbr>; here?<br>
Anyhow,<br></blockquote><div><br></div><div>Yes, but I forgot to make the change before pushing. :( I'll push another patch.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ result = anv_cmd_buffer_new_binding_tab<wbr>le_block(cmd_buffer);<br>
+ assert(result == VK_SUCCESS);<br>
+<br>
+ /* Re-emit state base addresses so we get the new surface state base<br>
+ * address before we start emitting binding tables etc.<br>
+ */<br>
+ genX(cmd_buffer_emit_state_bas<wbr>e_address)(cmd_buffer);<br>
+<br>
+ result = emit_binding_table(cmd_buffer, MESA_SHADER_COMPUTE, &surfaces);<br>
+ assert(result == VK_SUCCESS);<br>
+ }<br>
+ result = emit_samplers(cmd_buffer, MESA_SHADER_COMPUTE, &samplers);<br>
+ assert(result == VK_SUCCESS);<br>
+<br>
struct anv_state push_state = anv_cmd_buffer_cs_push_constan<wbr>ts(cmd_buffer);<br>
<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br></div></div>