<div dir="auto">R-b</div><div class="gmail_extra"><br><div class="gmail_quote">On 20 Sep. 2017 22:07, "Samuel Pitoiset" <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@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">The number of viewports/scissors can only be specified at pipeline<br>
creation time, so make sure to copy them when binding a new one<br>
because the dynamic state is cleared in BeginCommandBuffer().<br>
<br>
Fixes: dcf46e995d ("radv: do not update the number of scissors in vkCmdSetScissor()")<br>
Fixes: 60878dd00c ("radv: do not update the number of viewports in vkCmdSetViewport()")<br>
Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>><br>
---<br>
src/amd/vulkan/radv_cmd_<wbr>buffer.c | 8 ++++++--<br>
1 file changed, 6 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/amd/vulkan/radv_cmd_<wbr>buffer.c b/src/amd/vulkan/radv_cmd_<wbr>buffer.c<br>
index 0c3a5c6ffc..78b235fa22 100644<br>
--- a/src/amd/vulkan/radv_cmd_<wbr>buffer.c<br>
+++ b/src/amd/vulkan/radv_cmd_<wbr>buffer.c<br>
@@ -83,14 +83,18 @@ radv_dynamic_state_copy(struct radv_dynamic_state *dest,<br>
const struct radv_dynamic_state *src,<br>
uint32_t copy_mask)<br>
{<br>
+ /* Make sure to copy the number of viewports/scissors because they can<br>
+ * only be specified at pipeline creation time.<br>
+ */<br>
+ dest->viewport.count = src->viewport.count;<br>
+ dest->scissor.count = src->scissor.count;<br>
+<br>
if (copy_mask & (1 << VK_DYNAMIC_STATE_VIEWPORT)) {<br>
- dest->viewport.count = src->viewport.count;<br>
typed_memcpy(dest->viewport.<wbr>viewports, src->viewport.viewports,<br>
src->viewport.count);<br>
}<br>
<br>
if (copy_mask & (1 << VK_DYNAMIC_STATE_SCISSOR)) {<br>
- dest->scissor.count = src->scissor.count;<br>
typed_memcpy(dest->scissor.<wbr>scissors, src->scissor.scissors,<br>
src->scissor.count);<br>
}<br>
--<br>
2.14.1<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>