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
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.
2017-02-17Clay Engine: Separate mode drawing to different files/engines.Clément Foucault
2017-02-09Clay Engine: support for overrides (not working yet)Clément Foucault
2017-02-07Clay-Engine (merge clay-engine)Clément Foucault
Initial work by Clément Foucault with contributions from Dalai Felinto (mainly per-collection engine settings logic, and depsgraph iterator placeholder). This makes Blender require OpenGL 3.3. Which means Intel graphic card and OSX will break. Disable CLAY_ENGINE in CMake in those cases. This is a prototype render engine intended to help the design of real render engines. This is mainly an engine with enphasis in matcap and ambient occlusion. Implemented Features -------------------- * Clay Render Engine, following the new API, to be used as reference for future engines * A more complete Matcap customization with more options * Per-Collection render engine settings * New Ground Truth AO - not enabled Missing Features ---------------- * Finish object edit mode - Fix shaders to use new matrix - Fix artifacts when edge does off screen - Fix depth issue - Selection sillhouette - Mesh wires - Use mesh normals (for higher quality matcap) - Non-Mesh objects drawing - Widget drawing - Performance issues * Finish mesh edit mode - Derived-Mesh-less edit mode API (mesh_rende.c) * General edit mode - Per-collection edit mode settings * General engines - Per-collection engine settings (they are their, but they still need to be flushed by depsgraph, and used by the drawing code)
2017-02-03Modifications to GPU_texture:Clément Foucault
-Remove NPOT check as it should be supported by default with OGL 3.3 -All custom texture creation follow the same path now -Now explicit texture format is required when creating a custom texture (Non RGBA8) -Support for arrays of textures Reviewers: dfelinto, merwin Differential Revision: https://developer.blender.org/D2452
2017-01-10Fix warnings (mostly unused arguments)Dalai Felinto
2016-10-25OpenGL: clean up glActiveTexture usageMike Erwin
Removed some of my earlier glActiveTexture calls. After reviewing the code I now trust that GL_TEXTURE0 is active by default. Fewer GL calls, same results. Fixed some misuse of glActiveTexture & glUniformi, mostly my fault. Caught by --debug-gpu on Windows. Don't know why this appeared to be working previously! Plus some easy cleanup nearby.
2016-10-21Viewport: use depth shader to debug the depthDalai Felinto
At the moment this already shows that the depth is the same after the solid plates and in the very end of drawing, while they should be different. Later on we can adapt this to show different buffers we want to debug. I am using near=0.1, far=2.0 for my tests. I decided not to make a doversion for near/far because this is for debugging only
2016-10-13viewport: barebones to handle viewport compositing in gpu_viewport.cDalai Felinto