mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[vulkan] Pass the current command buffer to tasks
Compute and render tasks need to be able to submit commands.
This commit is contained in:
parent
b0d1c0e75b
commit
274e821c06
2 changed files with 3 additions and 0 deletions
|
@ -381,6 +381,7 @@ typedef struct qfv_renderctx_s {
|
|||
typedef struct qfv_taskctx_s {
|
||||
struct vulkan_ctx_s *ctx;
|
||||
qfv_pipeline_t *pipeline;
|
||||
VkCommandBuffer cmd;
|
||||
} qfv_taskctx_t;
|
||||
|
||||
VkCommandBuffer QFV_GetCmdBufffer (struct vulkan_ctx_s *ctx, bool secondary);
|
||||
|
|
|
@ -99,6 +99,7 @@ run_pipeline (qfv_pipeline_t *pipeline, VkCommandBuffer cmd, vulkan_ctx_t *ctx)
|
|||
qfv_taskctx_t taskctx = {
|
||||
.ctx = ctx,
|
||||
.pipeline = pipeline,
|
||||
.cmd = cmd,
|
||||
};
|
||||
run_tasks (pipeline->task_count, pipeline->tasks, &taskctx);
|
||||
|
||||
|
@ -187,6 +188,7 @@ run_compute_pipeline (qfv_pipeline_t *pipeline, VkCommandBuffer cmd,
|
|||
qfv_taskctx_t taskctx = {
|
||||
.ctx = ctx,
|
||||
.pipeline = pipeline,
|
||||
.cmd = cmd,
|
||||
};
|
||||
run_tasks (pipeline->task_count, pipeline->tasks, &taskctx);
|
||||
|
||||
|
|
Loading…
Reference in a new issue