diff options
| author | a1xd <[email protected]> | 2021-04-06 01:21:42 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-04-06 01:21:42 -0400 |
| commit | 7c1f14845bc948e9ea25908e96099203d9433a69 (patch) | |
| tree | eadfae6ec0a775a35c29807bde3c20be8160e034 /common | |
| parent | LUT text layout (diff) | |
| download | rawaccel-7c1f14845bc948e9ea25908e96099203d9433a69.tar.xz rawaccel-7c1f14845bc948e9ea25908e96099203d9433a69.zip | |
update wrapper + writer to handle lut
grapher is building but applying options still broken for the most part
Diffstat (limited to 'common')
| -rw-r--r-- | common/accel-union.hpp | 3 | ||||
| -rw-r--r-- | common/rawaccel-base.hpp | 3 | ||||
| -rw-r--r-- | common/rawaccel-validate.hpp | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/common/accel-union.hpp b/common/accel-union.hpp index 3d41a18..7f3d5d5 100644 --- a/common/accel-union.hpp +++ b/common/accel-union.hpp @@ -22,6 +22,7 @@ namespace rawaccel { motivity_gain, lut_log, lut_lin, + lut_arb, noaccel }; @@ -31,6 +32,7 @@ namespace rawaccel { switch (lut_mode) { case table_mode::binlog: return internal_mode::lut_log; case table_mode::linear: return internal_mode::lut_lin; + case table_mode::arbitrary: return internal_mode::lut_arb; default: return internal_mode::noaccel; } } @@ -64,6 +66,7 @@ namespace rawaccel { case internal_mode::motivity_gain: return vis(u.motivity_g); case internal_mode::lut_log: return vis(u.log_lut); case internal_mode::lut_lin: return vis(u.lin_lut); + case internal_mode::lut_arb: default: return vis(u.noaccel); } } diff --git a/common/rawaccel-base.hpp b/common/rawaccel-base.hpp index 9900aab..d318db5 100644 --- a/common/rawaccel-base.hpp +++ b/common/rawaccel-base.hpp @@ -29,7 +29,8 @@ namespace rawaccel { enum class table_mode { off, binlog, - linear + linear, + arbitrary }; struct table_args { diff --git a/common/rawaccel-validate.hpp b/common/rawaccel-validate.hpp index bccb21c..d625d20 100644 --- a/common/rawaccel-validate.hpp +++ b/common/rawaccel-validate.hpp @@ -44,7 +44,7 @@ namespace rawaccel { error("stop must be greater than start"); } - if (lut_args.num_elements < 2 || + if (lut_args.num_elements < 2 || lut_args.num_elements > 1025) { error("num must be between 2 and 1025"); } @@ -73,6 +73,7 @@ namespace rawaccel { } } + if (args.offset < 0) { error("offset can not be negative"); } |