diff options
author | Tim Rowley <[email protected]> | 2017-07-31 17:22:54 -0500 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2017-08-02 11:39:33 -0500 |
commit | c8fe4c13b23d11b3ef980969dea80de9da1fd105 (patch) | |
tree | e4fcf8b2f2d14bd03a08e5d0e36d842390b76dc1 /src/gallium/drivers/swr/rasterizer/codegen | |
parent | 844be91e70413c1c3871d5f93b1e4766eb495df9 (diff) |
swr/rast: simplify knob default value setup
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr/rasterizer/codegen')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.h b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.h index b02870be464..d81f7d019eb 100644 --- a/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.h +++ b/src/gallium/drivers/swr/rasterizer/codegen/templates/gen_knobs.h @@ -67,12 +67,6 @@ public: return Value(); } -protected: - Knob(T const &defaultValue) : - m_Value(expandEnvironmentVariables(defaultValue)) - { - } - private: T m_Value; }; @@ -83,10 +77,10 @@ private: { \\ - Knob_##_name() : Knob<_type>(_default) { } \\ - static const char* Name() { return "KNOB_" #_name; } \\ + static _type DefaultValue() { return (_default); } \\ + } _name; #define GET_KNOB(_name) g_GlobalKnobs._name.Value() @@ -117,8 +111,9 @@ struct GlobalKnobs % endif % endfor - GlobalKnobs(); + std::string ToString(const char* optPerLinePrefix=""); + GlobalKnobs(); }; extern GlobalKnobs g_GlobalKnobs; |