William Leeson leesonw
  • Joined on 2021-06-09
William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:18 +02:00
Refactor geometry update for better parallelization and upload performance

Yes, I fixed this up.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:18 +02:00
Refactor geometry update for better parallelization and upload performance

I reverted this change also.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:17 +02:00
Refactor geometry update for better parallelization and upload performance

Done. I also replace the device creation with a unique_ptr<>

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:17 +02:00
Refactor geometry update for better parallelization and upload performance

I added a variable and mutex to indicate if it was being built or has been built. This ensures that it is built only once. However, I put this code in build_bvh in device.cpp as the BVHMulti can have different BVH types within it and this only applies to BVH2.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:17 +02:00
Refactor geometry update for better parallelization and upload performance

I reverted this change also.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:17 +02:00
Refactor geometry update for better parallelization and upload performance

Yes, it looks like it's not used in this PR so I removed it.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:16 +02:00
Refactor geometry update for better parallelization and upload performance

That is a possibility, I can switch it off for now. In our usage we never had that happen but most of the systems were not memory constrained. Not putting it in pinned memory ends up with a double copy as the driver then copies it to pinned memory before copying to the device. I switched this back to using regular memory for now.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:16 +02:00
Refactor geometry update for better parallelization and upload performance

Ok, I replaced the include with a forward declaration. In another patch, instead of uploading the geometry data a second time we use the data in the DeviceScene which is already uploaded. This saves both memory and time. Would that not be acceptable?

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:16 +02:00
Refactor geometry update for better parallelization and upload performance

This gives a great speed boost for interactive preview. I'll remove it from this PR and I can add it in a separate PR later.

William Leeson commented on pull request blender/blender#105403 2023-04-11 15:43:16 +02:00
Refactor geometry update for better parallelization and upload performance

Changing this to use reinterpret_cast<unsigned char *>() results in having to cast it back to CUdeviceptr as follows reinterpret_cast<CUdeviceptr>(reinterpret_cast<unsigned char *>(device_pointer)) otherwise the following error occurs:

William Leeson pushed to geometry_update at leesonw/blender-cluster 2023-04-11 15:41:03 +02:00
cddd2bfdf0 Replae upload and building times arrays with a vector struct
506106b3a8 Remove custom spin lock and replace with that from utils/thread.h
06b43213b7 Don't use background to disable progress update.
6e904ef6b2 Rename progressErrorCheck check_cancel_update
8731ee9761 Change swop to swap.
Compare 17 commits »
William Leeson pushed to geometry_update_refactor at leesonw/blender-cluster 2023-04-10 19:39:18 +02:00
ac67371fa4 Makes sure the CPU is the last device just once at the end.
William Leeson pushed to master-cluster at leesonw/blender-cluster 2023-04-10 18:09:29 +02:00
5ad77d2818 Merge branch 'upstream_main' into master-cluster
ad7e6d5e43 Fix wrong gradients in Displace node shader
f8c964de87 GPU: Improve the shader cache GC behavior
4bbbad49c8 Fix missing includes
0a460d4707 UV: refactor uv packing for readability and performance
Compare 69 commits »
William Leeson pushed to geometry_update at leesonw/blender-cluster 2023-04-10 18:09:15 +02:00
3186d8d725 Merge branch 'upstream_main' into geometry_update
ad7e6d5e43 Fix wrong gradients in Displace node shader
f8c964de87 GPU: Improve the shader cache GC behavior
4bbbad49c8 Fix missing includes
0a460d4707 UV: refactor uv packing for readability and performance
Compare 69 commits »
William Leeson pushed to geometry_update_refactor at leesonw/blender-cluster 2023-04-10 18:09:03 +02:00
57d7deec2a Merge branch 'geometry_update' into geometry_update_refactor
3186d8d725 Merge branch 'upstream_main' into geometry_update
ad7e6d5e43 Fix wrong gradients in Displace node shader
f8c964de87 GPU: Improve the shader cache GC behavior
4bbbad49c8 Fix missing includes
Compare 70 commits »
William Leeson created branch geometry_update_refactor in leesonw/blender-cluster 2023-04-07 09:27:29 +02:00
William Leeson pushed to geometry_update_refactor at leesonw/blender-cluster 2023-04-07 09:27:29 +02:00
9b3b180d23 FIX: Enable OneAPI build and fix compile issues
5409cc2011 Refactor memory copy methods to remove duplication
a27247e28f Refactor geometry.cpp and geometry_additions.cpp
Compare 3 commits »
William Leeson pushed to geometry_update at leesonw/blender-cluster 2023-04-05 18:31:03 +02:00
fc30231f88 Merge branch 'upstream_main' into geometry_update
075d92184b Cleanup: correct comment, quiet warnings
a76bf65c9d Cycles: Refactored GPU denoising code
9e9baa9085 Cycles: Upgrade to new Embree 4 while staying compatible with Embree 3
2c446d2de3 Cleanup: use bool for render pipeline & related API's
Compare 39 commits »
William Leeson pushed to master-cluster at leesonw/blender-cluster 2023-04-05 17:48:20 +02:00
363b8b4c97 Merge branch 'upstream_main' into master-cluster
075d92184b Cleanup: correct comment, quiet warnings
a76bf65c9d Cycles: Refactored GPU denoising code
9e9baa9085 Cycles: Upgrade to new Embree 4 while staying compatible with Embree 3
2c446d2de3 Cleanup: use bool for render pipeline & related API's
Compare 39 commits »