Skip to content

Commit

Permalink
Update wgpu size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianEddy committed Oct 17, 2023
1 parent 9aadf86 commit bf1849b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ofx = "0.3"
log = "0.4"
itertools = "0.11"
lru = "0.12"
gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "838f1d2", features = ["bundle-lens-profiles"] }
gyroflow-core = { git = "https://github.com/gyroflow/gyroflow.git", default-features = false, rev = "3f411b2", features = ["bundle-lens-profiles"] }
#gyroflow-core = { path = "../gyroflow/src/core", default-features = false, features = ["bundle-lens-profiles"] }
log-panics = "2.1"
rfd = "0.12"
Expand Down
15 changes: 13 additions & 2 deletions src/gyroflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ struct InstanceData {
ever_changed: bool,

current_file_info_pending: Arc<AtomicBool>,
current_file_info: Arc<Mutex<Option<CurrentFileInfo>>>
current_file_info: Arc<Mutex<Option<CurrentFileInfo>>>,

opencl_disabled: bool,
}
impl Drop for InstanceData {
fn drop(&mut self) {
Expand Down Expand Up @@ -467,6 +469,12 @@ impl InstanceData {
rfd::MessageDialog::new().set_description("Unable to find Gyroflow app path. Make sure to run Gyroflow app at least once and that version is at least v1.4.3").show();
}
}
fn disable_opencl(&mut self) {
if !self.opencl_disabled {
std::env::set_var("NO_OPENCL", "1");
self.opencl_disabled = true;
}
}
}

struct PerFrameParams { }
Expand Down Expand Up @@ -616,6 +624,7 @@ impl Execute for GyroflowPlugin {
{ None }
#[cfg(any(target_os = "macos", target_os = "ios"))]
{
instance_data.disable_opencl();
let in_ptr = source_image.get_data()? as *mut metal::MTLBuffer;
let out_ptr = output_image.get_data()? as *mut metal::MTLBuffer;
let command_queue = in_args.get_metal_command_queue()? as *mut metal::MTLCommandQueue;
Expand All @@ -642,6 +651,7 @@ impl Execute for GyroflowPlugin {
{ None }
#[cfg(any(target_os = "windows", target_os = "linux"))]
{
instance_data.disable_opencl();
let in_ptr = source_image.get_data()? as *mut std::ffi::c_void;
let out_ptr = output_image.get_data()? as *mut std::ffi::c_void;

Expand Down Expand Up @@ -778,7 +788,8 @@ impl Execute for GyroflowPlugin {
current_file_info: Arc::new(Mutex::new(None)),
current_file_info_pending: Arc::new(AtomicBool::new(false)),
reload_values_from_project: false,
ever_changed: false,
ever_changed: false,
opencl_disabled: false,
keyframable_params: Arc::new(RwLock::new(KeyframableParams {
fov: param_set.parameter("FOV")?,
smoothness: param_set.parameter("Smoothness")?,
Expand Down

0 comments on commit bf1849b

Please sign in to comment.