mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 06:10:56 +00:00
[vulkan] Allow process steps to have render or compute
If a step has process tasks, any render or compute pipelines/renderpasses are **not** run automatically: the idea is the process tasks need to run the relevant pipelines in a custom manner but needs the objects to be created.
This commit is contained in:
parent
31cf3ed248
commit
2fa44c03a6
2 changed files with 16 additions and 9 deletions
|
@ -238,11 +238,16 @@ QFV_RunRenderJob (vulkan_ctx_t *ctx)
|
|||
for (uint32_t i = 0; i < job->num_steps; i++) {
|
||||
int64_t step_start = Sys_LongTime ();
|
||||
__auto_type step = &job->steps[i];
|
||||
if (step->render) {
|
||||
run_renderpass (step->render->active, ctx);
|
||||
}
|
||||
if (step->compute) {
|
||||
run_compute (step->compute, ctx, step);
|
||||
if (!step->process) {
|
||||
// run render and compute steps automatically only if there's no
|
||||
// process for the step (the idea is the proces uses the compute
|
||||
// and renderpass objects for its own purposes).
|
||||
if (step->render) {
|
||||
run_renderpass (step->render->active, ctx);
|
||||
}
|
||||
if (step->compute) {
|
||||
run_compute (step->compute, ctx, step);
|
||||
}
|
||||
}
|
||||
if (step->process) {
|
||||
run_process (step->process, ctx);
|
||||
|
|
|
@ -183,12 +183,14 @@ count_comp_stuff (qfv_computeinfo_t *ci, objcount_t *counts)
|
|||
static void
|
||||
count_step_stuff (qfv_stepinfo_t *step, objcount_t *counts)
|
||||
{
|
||||
if ((step->render && step->compute)
|
||||
|| (step->render && step->process)
|
||||
|| (step->compute && step->process)) {
|
||||
Sys_Error ("%s: invalid step: must be one of render/compute/process",
|
||||
if (step->render && step->compute && !step->process) {
|
||||
Sys_Error ("%s: invalid step: must have process for render+compute",
|
||||
step->name);
|
||||
}
|
||||
if (!step->render && !step->compute && !step->process) {
|
||||
Sys_Error ("%s: invalid step: must have at least one of "
|
||||
"proces/render/compute", step->name);
|
||||
}
|
||||
if (step->render) {
|
||||
__auto_type rinfo = step->render;
|
||||
counts->num_renderpasses += rinfo->num_renderpasses;
|
||||
|
|
Loading…
Reference in a new issue