diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-24 03:04:58 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-10-24 03:05:41 +0300 |
commit | f5456df095291c6cb2d0223a179746c8e514cd15 (patch) | |
tree | 76384b0c91806c95d55b007850ee225889a3250e /intern/cycles/render/tables.cpp | |
parent | 254daf8f8c276a4e5292e5a12fcfa88296131878 (diff) | |
parent | 070a668d04844610059aaedc80c49e9038fd1779 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/render/tables.cpp')
-rw-r--r-- | intern/cycles/render/tables.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/intern/cycles/render/tables.cpp b/intern/cycles/render/tables.cpp index c08c83cfe11..5cda977b7f1 100644 --- a/intern/cycles/render/tables.cpp +++ b/intern/cycles/render/tables.cpp @@ -35,25 +35,22 @@ LookupTables::~LookupTables() assert(lookup_tables.size() == 0); } -void LookupTables::device_update(Device *device, DeviceScene *dscene) +void LookupTables::device_update(Device *, DeviceScene *dscene) { if(!need_update) return; VLOG(1) << "Total " << lookup_tables.size() << " lookup tables."; - device->tex_free(dscene->lookup_table); - if(lookup_tables.size() > 0) - device->tex_alloc("__lookup_table", dscene->lookup_table); + dscene->lookup_table.copy_to_device(); need_update = false; } -void LookupTables::device_free(Device *device, DeviceScene *dscene) +void LookupTables::device_free(Device *, DeviceScene *dscene) { - device->tex_free(dscene->lookup_table); - dscene->lookup_table.clear(); + dscene->lookup_table.free(); } static size_t round_up_to_multiple(size_t size, size_t chunk) |