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-02-11Merge branch 'blender-v3.1-release'Peter Kim
2022-02-11Fix excessive re-creation of VR viewport texturesPeter Kim
Due to the freeing and re-creation of textures performed when binding offscreen viewports, VR viewport textures would be needlessly re-created every drawing iteration, leading to a negative impact on VR frame rate. This was brought to light by 6738ecb64e8b, which introduced an additional texture clear operation on initialization and was prohibitively costly on some systems when performed every frame. Now, the textures for VR viewports will not be always re-created during offscreen binding, but only when necessary using a pre-drawing step (`wm_xr_session_surface_offscreen_ensure()`). Reviewed By: jbakker, fclem Differential Revision: https://developer.blender.org/D14059
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
2022-01-24Cleanup: sort struct forward declarationsCampbell Barton
2021-12-09Cleanup: move public doc-strings into headers for 'gpu'Campbell Barton
Ref T92709
2021-10-05DRW: Move buffer & temp textures & framebuffer management to DrawManagerClément Foucault
This is a necessary step for EEVEE's new arch. This moves more data to the draw manager. This makes it easier to have the render or draw engines manage their own data. This makes more sense and cleans-up what the GPUViewport holds Also rewrites the Texture pool manager to be in C++. This also move the DefaultFramebuffer/TextureList and the engine related data to a new `DRWViewData` struct. This struct manages the per view (as in stereo view) engine data. There is a bit of cleanup in the way the draw manager is setup. We now use a temporary DRWData instead of creating a dummy viewport. Development: fclem, jbakker Differential Revision: https://developer.blender.org/D11966
2021-08-31Cleanup: Added const keywork to GPU_viewport_colorspace_set.Jeroen Bakker
2021-06-26Cleanup: full sentences in comments, improve comment formattingCampbell Barton
2021-06-24Cleanup: compiler warnings with clangBrecht Van Lommel
* Mark either all or no class methods with override * Don't use zero sized array since it has a different size in C and C++. Using a little more memory here is not significant. * Don't use deprecated mechanism to mark private GSet members in clang just like we don't for MSVC, it warns even for simple zero initialization.
2021-01-26Viewport Rendering: Don't clamp when overlays are disabled.Jeroen Bakker
During viewport rendering the color values were clamped in order to apply the overlay on top of it. This clamping would show the scene colors washed out. This patch adds a work around to skip the clamping when the overlays are turned off. Parial fix for {T77909}
2020-11-03Materials: add custom object properties as uniform attributes.Alexander Gavrilov
This patch allows the user to type a property name into the Attribute node, which will then output the value of the property for each individual object, allowing to e.g. customize shaders by object without duplicating the shader. In order to make supporting this easier for Eevee, it is necessary to explicitly choose whether the attribute is varying or uniform via a dropdown option of the Attribute node. The dropdown also allows choosing whether instancing should be taken into account. The Cycles design treats all attributes as one common namespace, so the Blender interface converts the enum to a name prefix that can't be entered using keyboard. In Eevee, the attributes are provided to the shader via a UBO indexed with resource_id, similar to the existing Object Info data. Unlike it, however, it is necessary to maintain a separate buffer for every requested combination of attributes. This is done using a hash table with the attribute set as the key, as it is expected that technically different but similar materials may use the same set of attributes. In addition, in order to minimize wasted memory, a sparse UBO pool is implemented, so that chunks that don't contain any data don't have to be allocated. The back-end Cycles code is already refactored and committed by Brecht. Differential Revision: https://developer.blender.org/D2057
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-21GPUUniformBuf: Rename struct and change API a bitClément Foucault
This follows the GPU module naming of other buffers. We pass name to distinguish each GPUUniformBuf in debug mode. Also remove DRW_uniform_buffer interface.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-06Cleanup: Remove bad level calls from space imageDalai Felinto
Groundwork for upcoming fix (D8472)
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-19Fix T73931: Stereo Viewport Color ManagementJeroen Bakker
Stereoscopic viewport didn't support Color Manangement due recent changes in the color management pipeline. In order to solve the issue we will migrate the strereo rendering into the GPUViewport. This will share some textures and reduce required GPU memory. Reviewed By: fclem, dfelinto Differential Revision: https://developer.blender.org/D6922
2020-03-17VR: Initial Virtual Reality support - Milestone 1, Scene InspectionJulian Eisel
NOTE: While most of the milestone 1 goals are there, a few smaller features and improvements are still to be done. Big picture of this milestone: Initial, OpenXR-based virtual reality support for users and foundation for advanced use cases. Maniphest Task: https://developer.blender.org/T71347 The tasks contains more information about this milestone. To be clear: This is not a feature rich VR implementation, it's focused on the initial scene inspection use case. We intentionally focused on that, further features like controller support are part of the next milestone. - How to use? Instructions on how to use this are here: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test These will be updated and moved to a more official place (likely the manual) soon. Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC headsets don't support the OpenXR standard yet and hence, do not work with this implementation. --------------- This is the C-side implementation of the features added for initial VR support as per milestone 1. A "VR Scene Inspection" Add-on will be committed separately, to expose the VR functionality in the UI. It also adds some further features for milestone 1, namely a landmarking system (stored view locations in the VR space) Main additions/features: * Support for rendering viewports to an HMD, with good performance. * Option to sync the VR view perspective with a fully interactive, regular 3D View (VR-Mirror). * Option to disable positional tracking. Keeps the current position (calculated based on the VR eye center pose) when enabled while a VR session is running. * Some regular viewport settings for the VR view * RNA/Python-API to query and set VR session state information. * WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data * wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU context) * DNA/RNA for management of VR session settings * `--debug-xr` and `--debug-xr-time` commandline options * Utility batch & config file for using the Oculus runtime on Windows. * Most VR data is runtime only. The exception is user settings which are saved to files (`XrSessionSettings`). * VR support can be disabled through the `WITH_XR_OPENXR` compiler flag. For architecture and code documentation, see https://wiki.blender.org/wiki/Source/Interface/XR. --------------- A few thank you's: * A huge shoutout to Ray Molenkamp for his help during the project - it would have not been that successful without him! * Sebastian Koenig and Simeon Conzendorf for testing and feedback! * The reviewers, especially Brecht Van Lommel! * Dalai Felinto for pushing and managing me to get this done ;) * The OpenXR working group for providing an open standard. I think we're the first bigger application to adopt OpenXR. Congratulations to them and ourselves :) This project started as a Google Summer of Code 2019 project - "Core Support of Virtual Reality Headsets through OpenXR" (see https://wiki.blender.org/wiki/User:Severin/GSoC-2019/). Some further information, including ideas for further improvements can be found in the final GSoC report: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report Differential Revisions: D6193, D7098 Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-02Cleanup: make remaining gpu headers work in C++Jacques Lucke
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2019-11-27Cleanup: Remove BIF_gl.hJeroen Bakker
BIF_gl.h included hacks like redefining glew functions and a constant. The named constant `GLA_PIXEL_OFS` has been moved to `GPU_viewport.h` Reviewed By: brecht Differential Revision: https://developer.blender.org/D5860
2019-09-17DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-09-14Revert "DRW: Refactor to support draw call batching"Clément Foucault
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
2019-09-13DRW: Refactor to support draw call batchingClément Foucault
Reviewers: brecht Differential Revision: D4997
2019-05-22DRW: Add DRWView to improve different view handlingClément Foucault
This will have multiple benefit. TODO detail benefits (culling, more explicit, handling of clipping planes) For now the view usage is wrapped to make changes needed more progressive.
2019-05-08GPUViewport: Fix possible hash colision with enabled enginesClément Foucault
Also fix engine data validation that was not previously not working.
2019-05-08DRW: Replace BLI_mempool by BLI_memblockClément Foucault
This remove a avoid the big overhead present in BLI_mempool when it is cleared.
2019-04-23Fix T63178 Eevee animation render crashClément Foucault
If image buffer is not loaded and blender attempts to reload it (during `BKE_image_acquire_ibuf`) over and over for each frame rendered. When attempting this reload, image_load_image_file is calling `BKE_image_free_buffers` and tag the Image to the (GPU) image_free_queue (because this run on the rendering thread). If the main thread decide to redraw the UI and go through `GPU_free_unused_buffers` they all get deleted and if that happens before the rendering thread use them ... segfault. If I replace the environment textures with correct ones (the file does not seems to contain them), there is no crash when rendering. I used a list of GPUTexture from blender Image to increase and decrease the reference counter correctly. This add very little memory and computation overhead.
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-09-24Spelling fixes in comments and descriptions (2.8 changes), patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2018-04-30DRW: Remove DRWTextureFormat in favor or GPUTextureFormat.Clément Foucault
Because: - Less redundancy. - Better suffixes. Also a few modification to GPU_texture_create_* to simplify the API: - make the format explicit to the texture creation process. - remove the component count as it's specified in the GPUTextureFormat.
2018-04-27WM: new offscreen window draw method to replace all existing methods.Brecht Van Lommel
For Blender 2.8 we had to be compatible with very old OpenGL versions, and triple buffer was designed to work without offscreen rendering, by copying the the backbuffer to a texture right before swapping. This way we could avoid redrawing unchanged regions by copying them from this texture on the next redraws. Triple buffer used to suffer from poor performance and driver bugs on specific cards, so alternative draw methods remained available. Now that we require newer OpenGL, we can have just a single draw method that draw each region into an offscreen buffer, and then draws those to the screen. This has some advantages: * Poor 3D view performance when using Region Overlap should be solved now, since we can also cache overlapping regions in offscreen buffers. * Page flip, anaglyph and interlace stereo drawing can be a little faster by avoiding a copy to an intermediate texture. * The new 3D view drawing already writes to an offscreen buffer, which we can draw from directly instead of duplicating it to another buffer. * Eventually we will be able to remove depth and stencil buffers from the window and save memory, though at the moment there are still some tools using it so it's not possible yet. * This also fixes a bug with Eevee sampling not progressing with stereo drawing in the 3D viewport. Differential Revision: https://developer.blender.org/D3061
2018-03-25GPUViewport: Remove depth debug.Clément Foucault
This is not used anymore. Debug visualisations should be moved to the draw manager.
2018-03-17DRW: Move cache time to GPUViewport for profilingClément Foucault
This enables us to average this timer over time like the others.
2018-03-01DRW: Merge calls_generate pool with calls pool & add DRWCallState pool.Clément Foucault
2018-02-13GPU: add offscreen buffer drawing utility functions.Brecht Van Lommel
2018-01-09DRW & GPUViewport: Cleanup unused code.Clément Foucault
2018-01-09DRW: Add instance data memory manager.Clément Foucault
This is a special memory manager that keeps memory blocks ready to send as vbo data. Since we loose which memory block was used each DRWShadingGroup we need to redistribute them in the same order/size to avoid to realloc each frame. This is why DRWInstanceDatas are sorted in a list for each different data size.
2017-11-06DRW: Use pseudo persistent memory pool for the rendering data structure.Clément Foucault
This gets rid of the bottleneck of allocation / free of thousands of elements every frame. Cache time (Eevee) (test scene is default file with cube duplicated 3241 times) pre-patch: 23ms post-patch: 14ms
2017-09-25DRW : Add new view_update mechanism.Clément Foucault
This makes updates for the viewport cleaner and also add the possibility to add a new callback called when the scene is updated.
2017-05-16GPUViewport: Add a Texture Pool to reuse textures across engines.Clément Foucault
2017-05-04Draw Manager: Implement render info for external enginesDalai Felinto
This can be used by any engine actually. For example to give feedback regarding probe caching in Eevee, .... Unline master, we try to conciliate both the original viewport info (FPS, view name) and the render info. Note: I had to split the function in two because the camera alpha passepartout is handled inside the view3d_draw_region_info function. Review: Campbell Barton and Clement Foucault. Thanks to Sergey Sharybin and Pablo Vazquez for some of the design discussions.
2017-05-02Draw Manager: OpenGL render supportCampbell Barton
Works for clay-engine but doesn't draw objects with eevee.
2017-04-27Draw Manager: basic text overlay supportCampbell Barton
2017-04-25Draw Manager: support for selection using enginesCampbell Barton
Needed to remove old draw code entirely. Object mode selection support, pose and armature still need to be added. Enabled when 'use_modern_viewport' is set.
2017-04-12Draw Engine: remove hard coded limit on array sizesCampbell Barton
This removes MAX_STORAGE, MAX_BUFFERS, MAX_TEXTURES, MAX_PASSES limits. Actual memory saving isn't so important, it just means we don't need to manually bump these based on changes to engines.
2017-04-10Eevee: First Shadows implementationClément Foucault
Using Texture Arrays to store shadow maps so less texture slots are used when shading. This means a large amount of shadows can be supported. Support Projection Shadow Map for sun like in old BI/BGE. Support Cube Shadow Map for Point/Spot/Area lights. the benefit of using it for spot light is that the spot angle does not change shadow resolution (at the cost of more memory used). The implementation of the cubemap sampling is targeted for 3.3 core. We rely on 2D texture arrays to store cubemaps faces and sample the right one manualy. Significant performance improvement can be done using Cubemap Arrays on supported hardware. Shadows are only hardware filtered. Prefiltered shadows and settings comming next.