<p dir="ltr">Seems reasonable</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></p>
<p dir="ltr">This reminds me that we really need to convert CmdFillBuffer over to using blorp...</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 20, 2016 6:37 PM, "Nicolas Koch" <<a href="mailto:nioko1337@gmail.com">nioko1337@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Vulkan spec:<br>
Size is the number of bytes to fill, and must be either a multiple of 4,<br>
or VK_WHOLE_SIZE to fill the range from offset to the end of the buffer.<br>
If VK_WHOLE_SIZE is used and the remaining size of the buffer is not a<br>
multiple of 4, then the nearest smaller multiple is used.<br>
---<br>
src/intel/vulkan/anv_meta_<wbr>clear.c | 6 ++++++<br>
1 file changed, 6 insertions(+)<br>
<br>
diff --git a/src/intel/vulkan/anv_meta_<wbr>clear.c b/src/intel/vulkan/anv_meta_<wbr>clear.c<br>
index ed4d1db..fd0797f 100644<br>
--- a/src/intel/vulkan/anv_meta_<wbr>clear.c<br>
+++ b/src/intel/vulkan/anv_meta_<wbr>clear.c<br>
@@ -1012,6 +1012,12 @@ void anv_CmdFillBuffer(<br>
<br>
meta_clear_begin(&saved_state, cmd_buffer);<br>
<br>
+ if (fillSize == VK_WHOLE_SIZE) {<br>
+ fillSize = dst_buffer->size - dstOffset;<br>
+ /* Make sure fillSize is a multiple of 4 */<br>
+ fillSize -= fillSize & 3;<br>
+ }<br>
+<br>
VkFormat format;<br>
int bs;<br>
if ((fillSize & 15) == 0 && (dstOffset & 15) == 0) {<br>
--<br>
2.10.0<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>
</blockquote></div></div>