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
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.
2019-01-26Cleanup: remove redundant BKE/BLI/BIF headersCampbell Barton
2019-01-17GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensureClément Foucault
This is in order to make the API more multithread friendly inside the draw manager. GPU_shader_get_uniform will only serve to query the shader interface and not do any GL call, making it threadsafe. For now it only print a warning if the uniform was not queried before.
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-09-12Cleanup: use uint/uchar types in GPUCampbell Barton
2018-07-18GWN: Port to GPU module: Replace GWN prefix by GPUClément Foucault
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-27Fix missing action zones and emboss in the 3D viewport.Brecht Van Lommel
Not really happy with the fix, but it works. With the new window draw method we are no longer storing the 3D viewport in 4 buffers, by having the GPU viewport function directly as the 3rd buffer. This means we need to draw the action zones into it, and so we need to keep the framebuffer bound a little longer.
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-04-08UI: Perf: Use GWN_draw_primitive for drawing viewport textures.Clément Foucault
2018-03-25GPUFramebuffer: Refactor (Part 2)Clément Foucault
This refactor modernise the use of framebuffers. It also touches a lot of files so breaking down changes we have: - GPUTexture: Allow textures to be attached to more than one GPUFrameBuffer. This allows to create and configure more FBO without the need to attach and detach texture at drawing time. - GPUFrameBuffer: The wrapper starts to mimic opengl a bit closer. This allows to configure the framebuffer inside a context other than the one that will be rendering the framebuffer. We do the actual configuration when binding the FBO. We also Keep track of config validity and save drawbuffers state in the FBO. We remove the different bind/unbind functions. These make little sense now that we have separate contexts. - DRWFrameBuffer: We replace DRW_framebuffer functions by GPU_framebuffer ones to avoid another layer of abstraction. We move the DRW convenience functions to GPUFramebuffer instead and even add new ones. The MACRO GPU_framebuffer_ensure_config is pretty much all you need to create and config a GPUFramebuffer. - DRWTexture: Due to the removal of DRWFrameBuffer, we needed to create functions to create textures for thoses framebuffers. Pool textures are now using default texture parameters for the texture type asked. - DRWManager: Make sure no framebuffer object is bound when doing cache filling. - GPUViewport: Add new color_only_fb and depth_only_fb along with FB API usage update. This let draw engines render to color/depth only target and without the need to attach/detach textures. - WM_window: Assert when a framebuffer is bound when changing context. This balance the fact we are not track ogl context inside GPUFramebuffer. - Eevee, Clay, Mode engines: Update to new API. This comes with a lot of code simplification. This also come with some cleanups in some engine codes.
2018-03-25GPUViewport: Small simplifications + fixes.Clément Foucault
- Use GPU_SHADER_2D_IMAGE_ALPHA. - Add alpha uniform. - bypass reseting the scissors and depth test because we used another context for drawing.
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-25GPUTexture: Small refactor.Clément Foucault
This includes a few modification: - The biggest one is call glActiveTexture before doing any call to glBindTexture for rendering purpose (uniform value depends on it). This is also better to know what's going on when rendering UI. So if there is missing UI elements because of this commit look for this first. This allows us to have "less calls" to glActiveTexture (I did not measure the final count) and less checks inside GPU_texture. - Remove use of GL_TEXTURE0 as a uniform value in a few places. - Be more strict and use BLI_assert for bad usage of GPU_texture functions. - Disable filtering for integer and stencil textures (not supported by OGL specs). - Replace bools inside GPUTexture by a bitflag supporting more options to identify texture types.
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-14GPUViewport: Fix offscreen multisample syncing.Clément Foucault
2018-03-14GPUViewport: Fix offscreen multisample rendering.Clément Foucault
Multisample rendering needs to have both a multisample and a regular color/depth target for engines that does not support MSAA.
2018-03-01DRW: Merge calls_generate pool with calls pool & add DRWCallState pool.Clément Foucault
2018-02-28Code cleanup: make viewport free simpler and consistent with GPU module.Brecht Van Lommel
2018-02-26DRW: Add new Draw Manager OpenGL Context.Clément Foucault
This separate context allows two things: - It allows viewports in multi-windows configuration. - F12 render can use this context in a separate thread and do a non-blocking render. The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future. Under the hood what does that mean: - Not adding more mess with VAOs management in gawain. - Doing depth only draw for operators / selection needs to be done in an offscreen buffer. - The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it. - All FBOs needed by the drawmanager must to be created/destroyed with its context active. - We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.
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-14GPUTexture: Add for stencil to default depth buffers.Clément Foucault
Theses will be used by eevee SSS. TODO: only allocate stencil if needed.
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-10-07Cleanup: style, duplicate includesCampbell Barton
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-09-25DRW : Add AA to non meshes objects.Clément Foucault
You can change the amount of samples in the user preferences. You do not need to restart blender to see the effect in the new viewport. This adds another Multisample Framebuffer and textures (so even more memory required). It works by blitting the default_fb to the multisample_fb each time the renderer need to render one or more "wire" pass. It it then blit back to the default_fb so that the rest of pipeline is working as expected. We COULD lower the GPU memory / bandwidth usage to render everything to the same multisample fbo and change the logic depending on if MSAA is enabled or not, but I think it's a bit too much work for now.
2017-06-19Gawain API naming refactorCampbell Barton
Use consistent prefix for gawain API names as well as some abbreviations to avoid over-long names, see: D2678
2017-06-06Small cleanup: Use ELEM and wrong identationDalai Felinto
2017-05-18GPUViewport: Fix huge memory leak.Clément Foucault
2017-05-16GPUViewport: Add a Texture Pool to reuse textures across engines.Clément Foucault
2017-05-09glPushAttrib/Pop change implementation to use a stackDalai Felinto
The original implementation (cbd78c81268f) broke depth of field.
2017-05-07GPUViewport: Make Depth texture not depth testable.Clément Foucault
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-18GPUFramebuffer: Allow to bind a specific texture mip to framebuffer.Clément Foucault
2017-04-12Merge branch 'master' into 28Campbell Barton
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-07OpenGL: use PRIM instead of GL enum for immBeginMike Erwin
Getting ready for a Gawain API change... Part of T49043
2017-04-06Gawain: VertexFormat_add_attrib (function name change)Mike Erwin
See intern/gawain for the API change. Other files are updated to use the new name. Also updated every call site to the recommended style: unsigned int foo = VertexFormat_add_attrib(format, "foo", COMP_ ... )
2017-04-05Immediate Mode: replacing glPushAttrib/glPopAttribDalai Felinto
Reference document: http://docs.gl/gl3/glPushAttrib This patch only tackles the bits that are set by Blender with the following exceptions: 1) Deprecated states (e.g., GL_STIPPLE) are not saved/restored 2) The exception being GL_ALPHA_TEST, which will be removed, but it may affect drawing too much now. To be removed once we no longer set GL_ALPHA_TEST elsewhere. 3) paint_cursor will be tackled separated, since it was abusing glPush/PopAttrib in the first place. 4) Despite what the glPushAttrib page above may suggest, GL_DEPTH_WRITEMASK needs glGet, not glIsEnabled 5) BGE is still a problem since it relies on GL_ALL_ATTRIB_BITS which would lead to a way more complete/lenghty solution. Since the BGE has other (OpenGL deprecated) problems anyways, it can be handled on its own time. Finally, the original design for 2.8 was to implement a proper stack system. However we need to move to core profile sooner than later. So this is a pragmatic temporary (that may be permanent) solution. Reviewers: merwin, campbellbarton Differential Revision: https://developer.blender.org/D2600
2017-04-03Draw Manager: Use engine type pointer instead of engine name.Clément Foucault
Faster search
2017-04-03Draw Manager: Fix glBlitFramebuffer errorClément Foucault
2017-03-27Draw Manager: New debug timersClément Foucault
Both CPU time and GPU time are printed to spot bottlenecks. GPU Timers works only if cache is enabled.
2017-03-25Draw Manager: fix glitches when setting 3d cursor position by click.Clément Foucault
2017-03-18GPUTexture: Add support for depth_stencil textures.Clément Foucault
2017-03-09Draw Manager: structural changeClément Foucault
All engines are now called by the draw manager. Engines are separate entities that cannot interfer with each others. Also separated draw_mode_pass.c into the mode engines.
2017-02-19Clay Engine: Use G.debug_value to test cache performanceClément Foucault
Use debug 666 for cache without instance buffer caching. Use debug 667 for cache with instance buffer caching.