mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-11 20:03:11 +00:00
[vulkan] Mark more command buffer regions
Now all pipelines and any tasks that have a command buffer attached get a region using their names (tasks use the function name). I don't know when it happened, or if I failed to notice last time, but (sync) validation layers now include the debug region for command buffers: very nice.
This commit is contained in:
parent
f6d2cf43e8
commit
bc22cd3255
4 changed files with 17 additions and 4 deletions
|
@ -142,6 +142,7 @@ typedef struct qfv_attachmentinfo_s {
|
|||
} qfv_attachmentinfo_t;
|
||||
|
||||
typedef struct qfv_taskinfo_s {
|
||||
const char *name;
|
||||
exprfunc_t *func;
|
||||
const exprval_t **params;
|
||||
void *param_data;
|
||||
|
|
|
@ -112,8 +112,16 @@ update_viewport_scissor (qfv_render_t *render, const qfv_output_t *output)
|
|||
static void
|
||||
run_tasks (uint32_t task_count, qfv_taskinfo_t *tasks, qfv_taskctx_t *ctx)
|
||||
{
|
||||
auto device = ctx->ctx->device;
|
||||
for (uint32_t i = 0; i < task_count; i++) {
|
||||
if (ctx->cmd) {
|
||||
QFV_duCmdBeginLabel (device, ctx->cmd, tasks[i].name,
|
||||
{0.2, 0.8, 0.3, 1});
|
||||
}
|
||||
tasks[i].func->func (tasks[i].params, 0, (exprctx_t *) ctx);
|
||||
if (ctx->cmd) {
|
||||
QFV_duCmdEndLabel (device, ctx->cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +155,10 @@ run_subpass (qfv_subpass_t *sp, qfv_taskctx_t *taskctx)
|
|||
|
||||
for (uint32_t i = 0; i < sp->pipeline_count; i++) {
|
||||
__auto_type pipeline = &sp->pipelines[i];
|
||||
QFV_duCmdBeginLabel (device, taskctx->cmd, pipeline->label.name,
|
||||
{VEC4_EXP (pipeline->label.color)});
|
||||
run_pipeline (pipeline, taskctx);
|
||||
QFV_duCmdEndLabel (device, taskctx->cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -921,9 +921,10 @@ parse_task_function (const plitem_t *item, void **data,
|
|||
offs = ((offs + type->size - 1) & ~(type->size - 1));
|
||||
offs += type->size;
|
||||
}
|
||||
*(exprfunc_t **) data[0] = func;
|
||||
*(exprval_t ***) data[1] = param_ptrs;
|
||||
*(void **) data[2] = param_data;
|
||||
*(const char **) data[0] = vkstrdup (pctx, fname);
|
||||
*(exprfunc_t **) data[1] = func;
|
||||
*(exprval_t ***) data[2] = param_ptrs;
|
||||
*(void **) data[3] = param_data;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ parse = {
|
|||
.name = qfv_taskinfo_t;
|
||||
func = {
|
||||
type = (custom, QFString, parse_task_function);
|
||||
fields = (func, params, param_data);
|
||||
fields = (name, func, params, param_data);
|
||||
};
|
||||
params = {
|
||||
type = (custom, QFArray, parse_task_params);
|
||||
|
|
Loading…
Reference in a new issue