struct anv_subpass *subpass =
&cmd_buffer->state.pass->subpasses[pBeginInfo->pInheritanceInfo->subpass];
- anv_cmd_buffer_begin_subpass(cmd_buffer, subpass);
+ anv_cmd_buffer_set_subpass(cmd_buffer, subpass);
}
anv_cmd_buffer_emit_state_base_address(cmd_buffer);
return state;
}
+/**
+ * @brief Setup the command buffer for recording commands inside the given
+ * subpass.
+ *
+ * This does not record all commands needed for starting the subpass.
+ * Starting the subpass may require additional commands.
+ *
+ * Note that vkCmdBeginRenderPass, vkCmdNextSubpass, and vkBeginCommandBuffer
+ * with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT, all setup the
+ * command buffer for recording commands for some subpass. But only the first
+ * two, vkCmdBeginRenderPass and vkCmdNextSubpass, can start a subpass.
+ */
void
-anv_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
- struct anv_subpass *subpass)
+anv_cmd_buffer_set_subpass(struct anv_cmd_buffer *cmd_buffer,
+ struct anv_subpass *subpass)
{
switch (cmd_buffer->device->info.gen) {
case 7:
- gen7_cmd_buffer_begin_subpass(cmd_buffer, subpass);
+ gen7_cmd_buffer_set_subpass(cmd_buffer, subpass);
break;
case 8:
- gen8_cmd_buffer_begin_subpass(cmd_buffer, subpass);
+ gen8_cmd_buffer_set_subpass(cmd_buffer, subpass);
break;
case 9:
- gen9_cmd_buffer_begin_subpass(cmd_buffer, subpass);
+ gen9_cmd_buffer_set_subpass(cmd_buffer, subpass);
break;
default:
unreachable("unsupported gen\n");
void anv_cmd_state_setup_attachments(struct anv_cmd_buffer *cmd_buffer,
const VkRenderPassBeginInfo *info);
-void gen7_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
- struct anv_subpass *subpass);
-void gen8_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
+void gen7_cmd_buffer_set_subpass(struct anv_cmd_buffer *cmd_buffer,
struct anv_subpass *subpass);
-void gen9_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
+void gen8_cmd_buffer_set_subpass(struct anv_cmd_buffer *cmd_buffer,
struct anv_subpass *subpass);
-
-void anv_cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
+void gen9_cmd_buffer_set_subpass(struct anv_cmd_buffer *cmd_buffer,
+ struct anv_subpass *subpass);
+void anv_cmd_buffer_set_subpass(struct anv_cmd_buffer *cmd_buffer,
struct anv_subpass *subpass);
struct anv_state
anv_batch_emit(&cmd_buffer->batch, GEN7_3DSTATE_CLEAR_PARAMS);
}
+/**
+ * @see anv_cmd_buffer_set_subpass()
+ */
GENX_FUNC(GEN7, GEN7) void
-genX(cmd_buffer_begin_subpass)(struct anv_cmd_buffer *cmd_buffer,
- struct anv_subpass *subpass)
+genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
+ struct anv_subpass *subpass)
{
cmd_buffer->state.subpass = subpass;
cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT;
.DrawingRectangleOriginY = 0,
.DrawingRectangleOriginX = 0);
- gen7_cmd_buffer_begin_subpass(cmd_buffer, pass->subpasses);
+ gen7_cmd_buffer_set_subpass(cmd_buffer, pass->subpasses);
anv_cmd_buffer_clear_subpass(cmd_buffer);
}
assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
- gen7_cmd_buffer_begin_subpass(cmd_buffer, cmd_buffer->state.subpass + 1);
+ gen7_cmd_buffer_set_subpass(cmd_buffer, cmd_buffer->state.subpass + 1);
anv_cmd_buffer_clear_subpass(cmd_buffer);
}
anv_batch_emit(&cmd_buffer->batch, GENX(3DSTATE_CLEAR_PARAMS));
}
+/**
+ * @see anv_cmd_buffer_set_subpass()
+ */
void
-genX(cmd_buffer_begin_subpass)(struct anv_cmd_buffer *cmd_buffer,
- struct anv_subpass *subpass)
+genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer,
+ struct anv_subpass *subpass)
{
cmd_buffer->state.subpass = subpass;
.DrawingRectangleOriginY = 0,
.DrawingRectangleOriginX = 0);
- genX(cmd_buffer_begin_subpass)(cmd_buffer, pass->subpasses);
+ genX(cmd_buffer_set_subpass)(cmd_buffer, pass->subpasses);
anv_cmd_buffer_clear_subpass(cmd_buffer);
}
assert(cmd_buffer->level == VK_COMMAND_BUFFER_LEVEL_PRIMARY);
- genX(cmd_buffer_begin_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
+ genX(cmd_buffer_set_subpass)(cmd_buffer, cmd_buffer->state.subpass + 1);
anv_cmd_buffer_clear_subpass(cmd_buffer);
}