Skip to content
Snippets Groups Projects
Commit 3335f047 authored by Niklas Haas's avatar Niklas Haas
Browse files

dispatch: silently upgrade fragment->compute

Whenever PL_GPU_CAP_PARALLEL_COMPUTE is set. In this case, it's assumed
that dispatching multiple compute shaders can take advantage of
parallel execution of the compute queues.
parent 9faf55d2
No related branches found
No related tags found
No related merge requests found
Pipeline #17799 passed with stages
in 9 minutes and 43 seconds
......@@ -854,6 +854,9 @@ bool pl_dispatch_finish(struct pl_dispatch *dp, const struct pl_dispatch_params
PL_ERR(dp, "Trying to dispatch using a compute shader with a "
"non-storable target texture.");
goto error;
} else if (tpars->storable && (dp->gpu->caps & PL_GPU_CAP_PARALLEL_COMPUTE)) {
if (sh_try_compute(sh, 16, 16, true, 0))
PL_TRACE(dp, "Upgrading fragment shader to compute shader.");
}
struct pl_rect2d rc = params->rect;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment