Commit graph

18 commits

Author SHA1 Message Date
Brecht Van Lommel
7b6485f549 Core: Increase maximum number of open file handles
On Windows and macOS, the default maximum number of stdio file handles
is 512 and 256 respectively. On Linux it's usually some very high
number. This increases that limit on startup to 8192, to better handle
some production files and have more uniform limits across platforms.
This is commonly done in VFX software.

Some code in Blender keeps file handles open for a long time,
particularly the Cycles texture cache and Alembic cache file datablocks.
This helps improve performance when reading tiles or frames on demand,
without having to reopen the file each time.

Cycles limits itself to 128 file handles, but there is no limit on cache
file datablocks. The production file in #160383 has 480 open file
handles for Alembic, so it was already near the limit on Windows, and
then a few more pushed it over.

By increasing the limit, at a minimum all production files that worked
before should continue to work when enabling the texture cache.
Improving the cache file datablock to use fewer handles is left for
another time.

Fix #160383: Cycles texture missing images in production file

Pull Request: https://projects.blender.org/blender/blender/pulls/160488
2026-06-23 12:29:51 +02:00
Brecht Van Lommel
ba8417c41e Refactor: Cycles: Add system_max_open_files()
Pull Request: https://projects.blender.org/blender/blender/pulls/154668
2026-02-25 17:07:14 +01:00
Brecht Van Lommel
110de4f488 Cycles: Half float denormals and optimizations
* Switch to more accurate half and float conversion supporting denormals
  to match native instructions. This makes CPU and GPU match more
  closely in some tests and avoids clipping some low values.
* Inf and NaN are not supported still, as we already filter these out
  and there is no reason to have the overhead.
* Change avx2 kernel to require f16c. For all physical CPUs avx2 implies
  f16c, and it's only for emulation and virtual machines that this would
  not be the case. So it's fine to fall back to the sse4.1 kernel then.
* Assume half instructions are available with ARM NEON. There is no
  defined minimum architecture, but Blender assumes the same and ARMv8.2-A
  is relatively old.
* For everything else there are SIMD optimized fallbacks.
* New unit tests were added, coverting both native instructions and
  fallback implementations, and half/half3/half4.

Fix #152763: Half float image low values are clipped

Pull Request: https://projects.blender.org/blender/blender/pulls/154042
2026-02-09 13:01:08 +01:00
salipour
be792137c0 Cycles: Show CPU only name under Cycles devices for CPU
On APUs, cpuid returns a brand string that includes both CPU and GPU
information. For RDNA 3 and RDNA 3.5 parts, the pattern is
"cpu_info w/ gpu_info" (e.g., _AMD Ryzen 9 8940H w/ Radeon 780M Graphics_).
RDNA 2 APUs follow the same pattern using “with”.

Including GPU details in the CPU device option has caused confusion for some
users.

This pull request updates the logic to detect AMD in the brand string and
strips the GPU portion if it is part of the string. It checks for “w/” or
“with” and removes the trailing GPU information, leaving only the CPU name.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/151141
2025-12-05 20:14:19 +01:00
Brecht Van Lommel
4951356ebc Refactor: Cycles: Stop using entire OIIO namespace
Pull Request: https://projects.blender.org/blender/blender/pulls/132361
2025-01-03 10:22:52 +01:00
Brecht Van Lommel
3c2a6fbb9c Refactor: Cycles: Use nullptr instead of NULL
Pull Request: https://projects.blender.org/blender/blender/pulls/132361
2025-01-03 10:22:43 +01:00
Anthony Roberts
ef58d4ae26 Windows: Switch to ProcessorNameString for CPU identification on ARM64
This probably should always have been the value used, really.

Now, instead of reporting `Qualcomm Technologies Inc`, it reports the more informative `Snapdragon(R) X Elite - X1E78100 - Qualcomm(R) Oryon(TM) CPU` on a Thinkpad T14s Gen6 device.

Pull Request: https://projects.blender.org/blender/blender/pulls/128808
2024-10-10 10:37:17 +02:00
Anthony Roberts
3d5fa7698f Cycles: Add Windows ARM64 support
Ref #119126

Pull Request: https://projects.blender.org/blender/blender/pulls/117036
2024-03-06 16:14:34 +01:00
Thomas Dinges
2b095c97fa Cycles: Increase minimum target on x86 to SSE4.2
* Compile regular host code with SSE4.2
* Remove the SSE2 kernel, only the SSE4.2 and AVX2 kernel remain

Pull Request: https://projects.blender.org/blender/blender/pulls/118471
2024-02-26 14:49:19 +01:00
Thomas Dinges
30a22b92ca Cycles: Rename SSE4.1 kernel to SSE4.2
This commit updates all defines, compiler flags and cleans up some code for unused CPU capabilities.

There should be no functional change, unless it's run on a CPU that supports sse41 but not sse42. It will fallback to the SSE2 kernel in this case.

In preparation for the new SSE4.2 minimum in Blender 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/118043
2024-02-09 17:25:58 +01:00
Campbell Barton
e38ff7c06d Cleanup: use C++ comments for disabled code 2023-09-25 17:06:04 +10:00
Campbell Barton
c12994612b License headers: use SPDX-FileCopyrightText in intern/cycles 2023-06-14 16:53:23 +10:00
Brecht Van Lommel
93ca4eeec1 Cleanup: remove unused functions 2023-01-16 19:40:25 +01:00
Brecht Van Lommel
286e535071 Cleanup: simplify CPU instruction checking
The performance of this will be slightly more important for upcoming changes.
Also removed an unused function and changed includes so these system.h can
be included in more places.
2022-08-09 16:59:05 +02:00
Brecht Van Lommel
0de0950ad5 Cycles: various Linux build fixes related to Hydra render delegate
* Add missing GLEW and hgiGL libraries for Hydra
* Fix wrong case sensitive include
* Fix link errors by adding external libs to static Hydra lib
* Work around weird Hydra link error with MAX_SAMPLES
* Use Embree by default for Hydra
* Sync external libs code with standalone
* Update version number to match Blender
* Remove unneeded CLEW/GLEW from test executable

None of this should affect Cycles in Blender.

Ref T96731
2022-04-07 19:52:53 +02:00
Brecht Van Lommel
9cfc7967dd Cycles: use SPDX license headers
* Replace license text in headers with SPDX identifiers.
* Remove specific license info from outdated readme.txt, instead leave details
  to the source files.
* Add list of SPDX license identifiers used, and corresponding license texts.
* Update copyright dates while we're at it.

Ref D14069, T95597
2022-02-11 17:47:34 +01:00
Sergey Sharybin
2cc6b249c3 Cycles: Remove usage of libnumaapi
No need for it now since all the threading queries and
scheduling is done via TBB.

Should be no functional changes as all the removed code
is supposed to be unused.
2022-01-07 11:47:37 +01:00
Brecht Van Lommel
fd25e883e2 Cycles: remove prefix from source code file names
Remove prefix of filenames that is the same as the folder name. This used
to help when #includes were using individual files, but now they are always
relative to the cycles root directory and so the prefixes are redundant.

For patches and branches, git merge and rebase should be able to detect the
renames and move over code to the right file.
2021-10-26 15:37:04 +02:00
Renamed from intern/cycles/util/util_system.cpp (Browse further)