Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-09-25Cleanup: replace C-style casts with functional casts for numeric typesCampbell Barton
2022-09-25Cleanup: use 'u' prefixed integer types for brevity & cast styleCampbell Barton
To use function style cast '(unsigned char)x' can't be replaced by 'unsigned char(x)'.
2022-09-23Cleanup: float literalsCampbell Barton
2022-09-22GPU: Ensure rendering operations occur within GPU render boundaries.Jason Fielder
This is required by the Metal backend to perform flushing of temporary objective-C resources. This is implemented as a global autoreleasepool, and is to ensure consistency such that all rendering operations, whether called via events, or via main loop will be within an autoreleasepool. Authored by Apple: Michael Parkin-White Ref T96261 Reviewed By: fclem Differential Revision: https://developer.blender.org/D15900
2022-09-22Metal: MTLContext implementation and immediate mode rendering support.Thomas Dinges
MTLContext provides functionality for command encoding, binding management and graphics device management. MTLImmediate provides simple draw enablement with dynamically encoded data. These draws utilise temporary scratch buffer memory to provide minimal bandwidth overhead during workload submission. This patch also contains empty placeholders for MTLBatch and MTLDrawList to enable testing of first pixels on-screen without failure. The Metal API also requires access to the GHOST_Context to ensure the same pre-initialized Metal GPU device is used by the viewport. Given the explicit nature of Metal, explicit control is also needed over presentation, to ensure correct work scheduling and rendering pipeline state. Authored by Apple: Michael Parkin-White Ref T96261 (The diff is based on 043f59cb3b5835ba1a0bbf6f1cbad080b527f7f6) Reviewed By: fclem Differential Revision: https://developer.blender.org/D15953
2022-09-14Adding `const Scene*` parameter in many areas.Monique Dewanchand
Related to {D15885} that requires scene parameter to be added in many places. To speed up the review process the adding of the scene parameter was added in a separate patch. Reviewed By: mont29 Maniphest Tasks: T73411 Differential Revision: https://developer.blender.org/D15930
2022-09-12Fix T100956: Cycles GPU context assert after recent changesBrecht Van Lommel
We don't need to be on the main thread to destroy the context.
2022-09-10Cleanup: spelling in commentsCampbell Barton
2022-09-09Cleanup: remove BLI_make_file_stringCampbell Barton
This function did multiple things making it difficult to know what was intended by the caller: - Directory & file join. - Expand relative '//' prefix to an optional directory. - Expand drive letters on windows (guessing with fall-backs). - Switch slashes to native direction. This functionality wasn't needed as the full directory was always passed in, so guessing the drive letter wasn't needed. If functionality to add drive letters onto paths is needed in the future a function that only does this can be added.
2022-09-09Realtime Compositor: Implement blur nodeOmar Emara
This patch implements the blur node for the realtime compositor. The patch is still missing the Variable Size option because it depends on the Erode/Dilate node, which is yet to be implemented. Furthermore, there are a number of optimizations that can be implemented, the most important of which is the IIR implementation of the Fast Gaussian filter, as well as the use of hardware filtering and thread local memory. The latter of which was attempted but was not robust enough, so it will be submitted as separate patch. Differential Revision: https://developer.blender.org/D15663 Reviewed By: Clement Foucault
2022-09-07Cleanup: Tweak naming for recently added mesh accessorsHans Goudey
Use `verts` instead of `vertices` and `polys` instead of `polygons` in the API added in 05952aa94d33eeb50. This aligns better with existing naming where the shorter names are much more common.
2022-09-05Mesh: Remove redundant custom data pointersHans Goudey
For copy-on-write, we want to share attribute arrays between meshes where possible. Mutable pointers like `Mesh.mvert` make that difficult by making ownership vague. They also make code more complex by adding redundancy. The simplest solution is just removing them and retrieving layers from `CustomData` as needed. Similar changes have already been applied to curves and point clouds (e9f82d3dc7ee, 410a6efb747f). Removing use of the pointers generally makes code more obvious and more reusable. Mesh data is now accessed with a C++ API (`Mesh::edges()` or `Mesh::edges_for_write()`), and a C API (`BKE_mesh_edges(mesh)`). The CoW changes this commit makes possible are described in T95845 and T95842, and started in D14139 and D14140. The change also simplifies the ongoing mesh struct-of-array refactors from T95965. **RNA/Python Access Performance** Theoretically, accessing mesh elements with the RNA API may become slower, since the layer needs to be found on every random access. However, overhead is already high enough that this doesn't make a noticible differenc, and performance is actually improved in some cases. Random access can be up to 10% faster, but other situations might be a bit slower. Generally using `foreach_get/set` are the best way to improve performance. See the differential revision for more discussion about Python performance. Cycles has been updated to use raw pointers and the internal Blender mesh types, mostly because there is no sense in having this overhead when it's already compiled with Blender. In my tests this roughly halves the Cycles mesh creation time (0.19s to 0.10s for a 1 million face grid). Differential Revision: https://developer.blender.org/D15488
2022-09-02Cleanup: Fix clang-tidy warnings: [readability-else-after-return]Clément Foucault
2022-09-02Cleanup: Fix clang-tidy warnings: ↵Clément Foucault
[readability-inconsistent-declaration-parameter-name]
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-use-bool-literals]Clément Foucault
2022-09-02Cleanup: Fix clang-tidy warnings: [modernize-deprecated-headers]Clément Foucault
2022-08-31Fix part of T100626: Cycles not using tiles for bakingBrecht Van Lommel
Leading to excessive memory usage compared to Blender 2.93. There's still some avoidable memory usage remaining, due to the full float buffer in the new image editor drawing and not loading the cached EXR from disk in tiles. Main difficulty was handling multi-image baking and disk caches, which is solved by associating a unique layer name with each image so it can be matched when reading back the image from the disk. Also some minor header changes to be able to use RE_MAXNAME in RE_bake.h.
2022-08-31Mesh: Move material indices to a generic attributeHans Goudey
This patch moves material indices from the mesh `MPoly` struct to a generic integer attribute. The builtin material index was already exposed in geometry nodes, but this makes it a "proper" attribute accessible with Python and visible in the "Attributes" panel. The goals of the refactor are code simplification and memory and performance improvements, mainly because the attribute doesn't have to be stored and processed if there are no materials. However, until 4.0, material indices will still be read and written in the old format, meaning there may be a temporary increase in memory usage. Further notes: * Completely removing the `MPoly.mat_nr` after 4.0 may require changes to DNA or introducing a new `MPoly` type. * Geometry nodes regression tests didn't look at material indices, so the change reveals a bug in the realize instances node that I fixed. * Access to material indices from the RNA `MeshPolygon` type is slower with this patch. The `material_index` attribute can be used instead. * Cycles is changed to read from the attribute instead. * BMesh isn't changed in this patch. Theoretically it could be though, to save 2 bytes per face when less than two materials are used. * Eventually we could use a 16 bit integer attribute type instead. Ref T95967 Differential Revision: https://developer.blender.org/D15675
2022-08-31Cleanup: quiet MSVC warning using flag flag operations on booleanCampbell Barton
While harmless it wasn't clear if other bits might be set but ignored, assign the value instead.
2022-08-30Cleanup: simplify comparison, clarify commentCampbell Barton
2022-08-29Cleanup: move Cycles display driver context handling to render moduleBrecht Van Lommel
This is highly coupled to Blender logic so doesn't belong in Cycles.
2022-08-29Cleanup: move part of render module to C++Brecht Van Lommel
2022-08-23Cleanup: match names between functions & declarationsCampbell Barton
2022-08-22Cleanup: remove dead codeCampbell Barton
2022-08-15Merge branch 'blender-v3.3-release'Sergey Sharybin
2022-08-15Fix T99955: Crash with 'Cache Result' and all render layers are disabledSergey Sharybin
Ensure render passes are allocated in the result prior to writing them. Alternative could be to not write empty passes, but that is kind of different from perspective of s one who reads the file. Differential Revision: https://developer.blender.org/D15692
2022-08-09Cleanup: use own username in code-comment tagsCampbell Barton
2022-08-05Fix: compositor stats in background mode subject to race conditionsChris Clyne
Evaluating a compositor node tree in background mode causes the stats callback to be called from multiple threads, leading to garbled output. This was causing major problems with render-farm scripts. Differential Revision: https://developer.blender.org/D15633
2022-07-15Fix workbench background render broken after recent changes from D15463Brecht Van Lommel
For Eevee the light baking can initialize OpenGL earlier, but for workbench we can't assume the backend exists here already.
2022-07-15Fix T99706: Crash rendering with headless buildsCampbell Barton
When rendering with headless builds, show an error instead of crashing. Previously GPU_backend_init was called indirectly from DRW_opengl_context_create, a new function is now called from the window manager (GPU_backend_init_once), so it's possible to check if the GPU has a back-end. This also disables the `bgl` Python module when building WITH_HEADLESS. Reviewed By: fclem Ref D15463
2022-07-15Cleanup: add utlity function to compute render resolutionBrecht Van Lommel
Instead of duplicating logic many times.
2022-06-30Cleanup: spelling in commentsCampbell Barton
2022-06-21Cleanup: removed unused Blender Internal bump/normal mapping texture codeBrecht Van Lommel
The TexResult.nor output does not appear to be used anywhere.
2022-06-17Cleanup: spelling in commentsCampbell Barton
2022-06-09Cleanup: spelling in comments & variablesCampbell Barton
2022-06-07Cleanup: spelling in comments, additional white spaceCampbell Barton
2022-06-03Cleanup: spelling in commentsCampbell Barton
2022-06-01Cleanup: remove redundant const qualifiers for scalar & enum typesCampbell Barton
2022-05-30Cleanup: Clang tidyHans Goudey
Mostly duplicate includes, also use nullptr, and using default member initializers.
2022-05-15Cleanup: Remove includes from DerivedMesh headerHans Goudey
Headers should only include other headers when absolutely necessary, to avoid unnecessary dependencies and increasing compile times. To make this change simpler, three DerivedMesh functions with a single use were removed.
2022-05-14Cleanup: Further use of const for retrieved custom data layersHans Goudey
Similar to cf69652618fefcd22b2cde9a2.
2022-05-13Cleanup: Use const when retrieving custom data layersHans Goudey
Knowing when layers are retrieved for write access will be essential when adding proper copy-on-write support. This commit makes that clearer by adding `const` where the retrieved data is not modified. Ref T95842
2022-05-13Cleanup: spelling in comments, capitalize tagsCampbell Barton
Also add missing task-ID reference & remove colon after \note as it doesn't render properly in doxygen.
2022-05-11Merge branch 'blender-v3.2-release'Campbell Barton
2022-05-10Fix T97945: Cycles baking max distance is wrongBrecht Van Lommel
It was effectively sqrt(max_distance) before this fix. Thanks to Omar Emara for identifying the solution.
2022-05-10Cleanup: Return earlyHans Goudey
2022-04-26Cleanup: use boolean arguments and return valuesCampbell Barton
2022-04-23Bake: add UDIM tile baking supportBrecht Van Lommel
Works for both Cycles and multires bake. Triangles are baked to multiple UDIM images if they span across them, though such UV layouts are generally discouraged as there is no filtering across UDIM tiles. The bake margin currently only works within UDIM tiles. For the extend method this is logical, for the adjacent faces method it may be useful to support copying pixels from other UDIM tiles, though this seems somewhat complicated. Fixes T95190 Ref T72390
2022-04-20Cleanup: Rename CD_MLOOPCOL to CD_PROP_BYTE_COLORHans Goudey
The "PROP" in the name reflects its generic status, and removing "LOOP" makes sense because it is no longer associated with just mesh face corners. In general the goal is to remove extra semantic meaning from the custom data types.
2022-04-05Cleanup: use doxygen links to struct membersCampbell Barton