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-07-16Fix error in assertion after 92a99c14965905e73f049bc1f92b597a903977fcCampbell Barton
2022-07-15Fix Eevee backround render crash after recent changes from D15463Brecht Van Lommel
Backend initialization needs to be delayed until after the OpenGL context is created. This worked fine in foreground mode because the OpenGL context already exists for the window at the point GPU_backend_init_once was called, but not for background mode. Create the backend just in time in GPU_context_create as before, and automatically free it when the last context id discarded. But check if any GPU backend is supported before creating the OpenGL context. Ref D15463, D15465
2022-07-15Fix compiler error in debug builds after 1cf465bbc331Julian Eisel
2022-07-15Fix GPU backend deleting resources without an active contextBrecht Van Lommel
This causes an assert with libepoxy, but was wrong already regardless. Refactor logic to work as follows: * GPU_exit() deletes backend resources * Destroy UI GPU resources with the context active * Call GPU_backend_exit() after deleting the context Ref D15291 Differential Revision: https://developer.blender.org/D15465
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-06-27MTLCommandBufferState for coordinating GPU workload submission and render ↵Jason Fielder
pass coordination. MTLFrameBuffer has been implemented to support creation of RenderCommandEncoders, along with supporting functionality in the Metal Context. Optimisation stubs for GPU_framebuffer_bind_ext has been added, which enables specific assignment of attachment load-store ops at the bind level, rather than on a framebuffer object as a whole. Begin and end frame markers are used to encapsulate frame boundaries for explicit workload submission. This is required for explicit APIs where implicit flushing of work does not occur. Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D15027
2022-06-22Cleanup: remove redundant GPU headersCampbell Barton
2022-06-21Fix crash editing anisotropic filter preference from background modeBrecht Van Lommel
2022-03-22Cleanup: make format and fix warningJacques Lucke
2022-03-22Metal: Initial Implementation of Metal Backend for GPU Module.Jason Fielder
Adding WITH_METAL option to CMAKE to guard compilation for macOS only. Implemented stub METALBackend to mirror GPUBackend interface and added capabilities initialisation, along with API initialisation paths. Global rendering coordination commands added to backend with GPU_render_begin and GPU_render_end() commands globally wrapping GPU work. This is required for Metal to ensure temporary resources are generated within an NSAutoReleasePool and freed accordingly. Authored by Apple: Michael Parkin-White, Vil Harvey, Marco Giordano, Michael Jones, Morteza Mostajabodaveh, Jason Fielder Ref T96261 Reviewed By: fclem Maniphest Tasks: T96261 Differential Revision: https://developer.blender.org/D14293
2022-02-11File headers: SPDX License migrationCampbell Barton
Use a shorter/simpler license convention, stops the header taking so much space. Follow the SPDX license specification: https://spdx.org/licenses - C/C++/objc/objc++ - Python - Shell Scripts - CMake, GNUmakefile While most of the source tree has been included - `./extern/` was left out. - `./intern/cycles` & `./intern/atomic` are also excluded because they use different header conventions. doc/license/SPDX-license-identifiers.txt has been added to list SPDX all used identifiers. See P2788 for the script that automated these edits. Reviewed By: brecht, mont29, sergey Ref D14069
2021-12-27OpenSubDiv: add support for an OpenGL evaluatorKévin Dietrich
This evaluator is used in order to evaluate subdivision at render time, allowing for faster renders of meshes with a subdivision surface modifier placed at the last position in the modifier list. When evaluating the subsurf modifier, we detect whether we can delegate evaluation to the draw code. If so, the subdivision is first evaluated on the GPU using our own custom evaluator (only the coarse data needs to be initially sent to the GPU), then, buffers for the final `MeshBufferCache` are filled on the GPU using a set of compute shaders. However, some buffers are still filled on the CPU side, if doing so on the GPU is impractical (e.g. the line adjacency buffer used for x-ray, whose logic is hardly GPU compatible). This is done at the mesh buffer extraction level so that the result can be readily used in the various OpenGL engines, without having to write custom geometry or tesselation shaders. We use our own subdivision evaluation shaders, instead of OpenSubDiv's vanilla one, in order to control the data layout, and interpolation. For example, we store vertex colors as compressed 16-bit integers, while OpenSubDiv's default evaluator only work for float types. In order to still access the modified geometry on the CPU side, for use in modifiers or transform operators, a dedicated wrapper type is added `MESH_WRAPPER_TYPE_SUBD`. Subdivision will be lazily evaluated via `BKE_object_get_evaluated_mesh` which will create such a wrapper if possible. If the final subdivision surface is not needed on the CPU side, `BKE_object_get_evaluated_mesh_no_subsurf` should be used. Enabling or disabling GPU subdivision can be done through the user preferences (under Viewport -> Subdivision). See patch description for benchmarks. Reviewed By: campbellbarton, jbakker, fclem, brecht, #eevee_viewport Differential Revision: https://developer.blender.org/D12406
2021-12-09Cleanup: move public doc-strings into headers for 'gpu'Campbell Barton
Ref T92709
2021-12-08Cleanup: Clang-Tidy modernize-redundant-void-argAaron Carlisle
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-05-06Cleanup: spellingCampbell Barton
2020-11-06Cleanup: Clang-Tidy modernize-use-nullptrSybren A. Stüvel
Replace `NULL` with `nullptr` in C++ code. No functional changes.
2020-11-06Cleanup: Clang-Tidy, modernize-redundant-void-argSergey Sharybin
2020-09-08DrawManager: Fixed memory leak in test casesJeroen Bakker
Memory leak is introduced as test cases reinitializes the GPU stack. Added a call to GPU_backend_exit to fix this. In GPU_backend_exit the GPU backend was destroyed but the pointer wasn't reset for reuse. This patch also clears the pointer to be reused.
2020-09-08GPUContext: Move GPUContext to gpu::Context for more consistencyClément Foucault
This makes the GPUContext follow the same naming convention as the rest of the module. Also add a static getter for extra bonus style (no need for casts): - Context::get() - GLContext::get()
2020-09-07Cleanup: GLBackend: Move buf_free and tex_free to GLContextClément Foucault
This makes it easier to follow. Also removes the GL related functions inside gpu_context.cc.
2020-09-01Cleanup: GPU: Remove GPU_draw_primitive and default_vao_Clément Foucault
These are not used anymore and can be replicated using the GPUBatch API.
2020-08-31GPUImmediate: GL backend isolationClément Foucault
This is part of the Vulkan backend task T68990. This is mostly a cleanup, however, there is a small change: We don't use a special Vertex Array binding function for Immediate anymore and just reuse the one for batches. This might create a bit more state changes but this could be fixed easily if it causes perf regression. # Conflicts: # source/blender/gpu/intern/gpu_context.cc
2020-08-31GLContext: Fix framebuffer deletion to GPUContextClément Foucault
This has more meaning as it's the base class who holds the pointer. # Conflicts: # source/blender/gpu/opengl/gl_context.cc
2020-08-30Cleanup: GPUContext: Remove default_framebuffer_Clément Foucault
This is now handled by FrameBuffer wrapping.
2020-08-30GPUFramebuffer: Make GPUFrameBuffer an opaque typeClément Foucault
This is in preparation of the Framebuffer GL backend. This is a just changing types and moving some code. No logic is changed... almost... it just removes the context attach. i.e: `gpu_context_add/remove_framebuffer()` This is not needed for now and was even disabled in release. This is part of T68990.
2020-08-18Cleanup: GPUState: Remove stack from the state manager and rename itClément Foucault
2020-08-18GPUState: Make use of GPUStateStack classClément Foucault
This isolate most GL calls to the GL backend. Still a few remains.
2020-08-13GPUBatch: GL backend isolationClément Foucault
This changes the drawing paradigm a bit. The VAO configuration is done JIT-style and depends on context active shader. This is to allow more flexibility for implementations to do optimization at lower level. The vao cache is now its own class to isolate the concept. It is this class that is reference by the GLContext for ownership of the containing VAO ids.
2020-08-13Cleanup: GPUBatch: Move gpu_batch_private.h to CPP headerClément Foucault
2020-08-13GPUDrawList: GL backend isolationClément Foucault
2020-08-11Cleanup: Resolve clang tidy warning / errorHans Goudey
2020-08-08Cleanup: GPU: Change gpu_context_private.h to C++ only headerClément Foucault
2020-08-08GPUBackend: Add new GPUBackend object to manage GL object allocationsClément Foucault
This just set a global object responsible for allocating new objects in a thread safe way without needing any GPUContext bound to this thread. This also introduce the GLContext which will contain all the GL related functions for the current context. # Conflicts: # source/blender/gpu/intern/gpu_context.cc
2020-08-08GPUBackend: Add new GPUBackend object to manage GL object allocationsClément Foucault
This just set a global object responsible for allocating new objects in a thread safe way without needing any GPUContext bound to this thread. This also introduce the GLContext which will contain all the GL related functions for the current context.
2020-08-08GPU: Move ghost default framebuffer getter to context creationClément Foucault
2020-08-05Merge branch 'blender-v2.90-release'Jeroen Bakker
2020-07-26GPU: Rename gpu_context.cpp to .cc suffixClément Foucault