Skip to content

Commit

Permalink
renderer: add option "no_compute"
Browse files Browse the repository at this point in the history
to forcibly disable the use of compute shaders
  • Loading branch information
ruihe774 committed May 17, 2024
1 parent bf1855c commit 1b39748
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/include/libplacebo/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,10 @@ struct pl_render_params {
// user, but it should be set to false once those values are "dialed in".
bool dynamic_constants;

// Disables the use of compute shaders.
// Can improve power saving and (even) performance on certain GPUs.
bool no_compute;

// This callback is invoked for every pass successfully executed in the
// process of rendering a frame. Optional.
//
Expand Down
1 change: 1 addition & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,6 +1160,7 @@ const struct pl_opt_t pl_option_list[] = {
OPT_BOOL("disable_fbos", "Disable FBOs", params.disable_fbos),
OPT_BOOL("force_low_bit_depth_fbos", "Force 8-bit FBOs", params.force_low_bit_depth_fbos),
OPT_BOOL("dynamic_constants", "Dynamic constants", params.dynamic_constants),
OPT_BOOL("no_compute", "Disable compute shaders", params.no_compute),
{0},
};

Expand Down

0 comments on commit 1b39748

Please sign in to comment.