mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 11:20:20 +01:00
radv: move radv_CmdPreprocessGeneratedCommandsNV() to radv_cmd_buffer.c
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29980>
This commit is contained in:
parent
e7f6388ac7
commit
4c8d44aed0
2 changed files with 23 additions and 23 deletions
|
|
@ -11418,6 +11418,29 @@ radv_CmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer _b
|
|||
static void radv_dgc_before_dispatch(struct radv_cmd_buffer *cmd_buffer);
|
||||
static void radv_dgc_after_dispatch(struct radv_cmd_buffer *cmd_buffer);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
radv_CmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer,
|
||||
const VkGeneratedCommandsInfoNV *pGeneratedCommandsInfo)
|
||||
{
|
||||
VK_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
VK_FROM_HANDLE(radv_indirect_command_layout, layout, pGeneratedCommandsInfo->indirectCommandsLayout);
|
||||
VK_FROM_HANDLE(radv_pipeline, pipeline, pGeneratedCommandsInfo->pipeline);
|
||||
|
||||
if (!radv_dgc_can_preprocess(layout, pipeline))
|
||||
return;
|
||||
|
||||
/* VK_EXT_conditional_rendering says that copy commands should not be
|
||||
* affected by conditional rendering.
|
||||
*/
|
||||
const bool old_predicating = cmd_buffer->state.predicating;
|
||||
cmd_buffer->state.predicating = false;
|
||||
|
||||
radv_prepare_dgc(cmd_buffer, pGeneratedCommandsInfo, false);
|
||||
|
||||
/* Restore conditional rendering. */
|
||||
cmd_buffer->state.predicating = old_predicating;
|
||||
}
|
||||
|
||||
static void
|
||||
radv_dgc_execute_ib(struct radv_cmd_buffer *cmd_buffer, const VkGeneratedCommandsInfoNV *pGeneratedCommandsInfo)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2344,29 +2344,6 @@ radv_dgc_can_preprocess(const struct radv_indirect_command_layout *layout, struc
|
|||
return true;
|
||||
}
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
radv_CmdPreprocessGeneratedCommandsNV(VkCommandBuffer commandBuffer,
|
||||
const VkGeneratedCommandsInfoNV *pGeneratedCommandsInfo)
|
||||
{
|
||||
VK_FROM_HANDLE(radv_cmd_buffer, cmd_buffer, commandBuffer);
|
||||
VK_FROM_HANDLE(radv_indirect_command_layout, layout, pGeneratedCommandsInfo->indirectCommandsLayout);
|
||||
VK_FROM_HANDLE(radv_pipeline, pipeline, pGeneratedCommandsInfo->pipeline);
|
||||
|
||||
if (!radv_dgc_can_preprocess(layout, pipeline))
|
||||
return;
|
||||
|
||||
/* VK_EXT_conditional_rendering says that copy commands should not be
|
||||
* affected by conditional rendering.
|
||||
*/
|
||||
const bool old_predicating = cmd_buffer->state.predicating;
|
||||
cmd_buffer->state.predicating = false;
|
||||
|
||||
radv_prepare_dgc(cmd_buffer, pGeneratedCommandsInfo, false);
|
||||
|
||||
/* Restore conditional rendering. */
|
||||
cmd_buffer->state.predicating = old_predicating;
|
||||
}
|
||||
|
||||
/* Always need to call this directly before draw due to dependence on bound state. */
|
||||
static void
|
||||
radv_prepare_dgc_graphics(struct radv_cmd_buffer *cmd_buffer, const VkGeneratedCommandsInfoNV *pGeneratedCommandsInfo,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue