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-05UI: Node Editor: Make nodelink arrow size and link width dpi dependant.Clément Foucault
2018-04-05GPUBatch: Change preset managment system.Clément Foucault
Now use a list of preset batches with a function to add new ones to this list. This removes the need of new functions all over the place to reset/exit.
2018-04-05GPUShader: Add 2D Nodelink shader.Clément Foucault
Special shader to draw nodelinks for the node editor. We only pass bezier points to the GPU and vertex position is handled inside the vertex shader. The arrow is also part of the batch to avoid separate drawcalls for it. We still draw 2 pass one for shadow and one for the link color on top. One variation to draw instances of theses links so that we only do one drawcall.
2018-04-03Fix crash on startup on macOS, after recent framebuffer refactoring.Brecht Van Lommel
2018-04-02UI: Perf: Batch Trias with widgets.Clément Foucault
This remove another portion of imm calls and reduce overall drawcall count.
2018-03-31UI: Perf: Batch icons drawcalls together.Clément Foucault
For this we use a new shader that gets it's data from a uniform array. Vertex shader position the vertices using these data. Using glUniform is way faster than using imm for that matter. Like BLF rendering, UI icons are always (as far as I know) non occluded and displayed above everything else. They also does not overlap with texts so they can be batched at the same time.
2018-03-30BFL: Fix broken vertical texts.Clément Foucault
I've made a separate version of the geom shader that works with full 3D modelviewmat. This commit also includes some fixup inside blf_batching_start().
2018-03-30GPUFramebuffer: Fix assert triggering another assert.Clément Foucault
2018-03-30BLF: Use Batch API instead of IMM.Clément Foucault
This is not a perfect win just yet. It's now calling glBufferSubData for every call (instead of using glMapBufferRange which is almost faster), but with this system we will be able to batch drawcalls together. See next commit.
2018-03-29BLF: Perf: Divide by 6 the amount of verts sent to the GPU.Clément Foucault
This means smaller imm buffer usage. This does not reduce the number of drawcalls. This uses geometry shader which is slow for the GPU but given we are really CPU bound on this case, it should not matter. A perfect implementation would: - Set the glyph coord in a bufferTexture and just send the glyph ID to the GPU to read the bufferTexture. - Use GWN_draw_primitive and draw 2*strllen triangle and just retrieve the glyph ID and color based on gl_VertexID / 6. - Stream fixed size buffer that the Driver can discard quickly but this is the same as improving IMM directly.
2018-03-29Cleanup: Use uppercase UI_ prefix for external functionsJulian Eisel
Using uppercase prefixes is our convention for external functions. "External" as in functions exposed to the outside of interface/ directory.
2018-03-29UI: Perf: Group fill/border/emboss batches together.Clément Foucault
This roughly halves the number of drawcalls from widgetbase_draw.
2018-03-29UI: Perf: widgetbase: Replace imm usage by a batch cache.Clément Foucault
Introduce a UI batch cache. For the moment it's only used by widgetbase so leaving it interface_widgets.c. If it grows, it can have its own file. Like all preset batches (batches used by UI context), vaos must be refreshed each time a new window context is binded. This still does 3 GWN_batch_draw in the worst cases but at least it does not use the IMM api. I will continue and batch the 3 calls together since we are really CPU bound, so shader complexity does not really matters. I cannot spot any difference on all the widgets I could test. I did not use any unit tests so I cannot tell if there is really any defects. This is not a complete rewrite but it adresses the top bottleneck found after a profilling session.
2018-03-29GPUShader: Add specialized widget base shader.Clément Foucault
This vertex shader let us draw widgets with batches instead of imm calls.
2018-03-29EEVEE: Fix bad framebuffer configurationClément Foucault
Was causing black / corrupted scene because of broken downsample Add a debug check to not run into this problem again.
2018-03-28UI: Perf: Make icon_draw_texture use GWN_draw_primitive.Clément Foucault
This bypass the use of immediate mode for theses drawcalls. Placement and and icon select (via uvs) is done inside the vertex shader.
2018-03-28GPUShader: Cleanup: Remove unused uniform_interface.Clément Foucault
2018-03-26GPUFramebuffer: Fix compiler warning about return value.Clément Foucault
2018-03-26GPUTexture: Fix compilation issue.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-25GPUFramebuffer: Refactor (part 1)Clément Foucault
Move some DRWFramebuffer functions to GPUFramebuffer.
2018-03-25GPUOffscreen: Remove unused offscreen blit.Clément Foucault
2018-03-25GPULamp: Move GPU_frambuffer_blur to GPU_lamp.cClément Foucault
This is a bit useless because gpu lamps are only used by the game engine and it is planned to be "remove" in some way. Doing this to clean gpu_framebuffer.c.
2018-03-25GPUFramebuffer: Make current framebuffer thread local.Clément Foucault
This make sense since we are using multiple olg contexts and two contexts can be active at the same time with different framebuffers.
2018-03-25GPUTexture: Style: Respect 120 char per line limit.Clément Foucault
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-25GPU: gpu_draw.c: Fix wrong renaming.Clément Foucault
Renaming happened in b4d053efc754 and seems to have been a bit too agressive.
2018-03-23GPUCompositing: Remove last reference to gpu_shader_fullscreen_vert.glslClément Foucault
It was breaking compilation with MSVC apparently.
2018-03-22GPUCompositing: Remove entire module.Clément Foucault
This module has no use now with the new DrawManager and DrawEngines and it is using deprecated paths. Moving gpu_shader_fullscreen_vert.glsl to draw/modes/shaders/common_fullscreen_vert.glsl
2018-03-20GPU Bufferes: Small optimization when updating buffersGermano
With the API recently added to gawain, it is now possible to update the vbos linked to the batch. So the batch does not have to be destroyed. The optimization is more sensitive when sculpt is made on low poly meshs
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-16Code cleanup: fix various compiler warnings on clang/macOS.Brecht Van Lommel
2018-03-14GPUViewport: Fix offscreen multisample syncing.Clément Foucault
2018-03-14GPUTexture: Unlock GL_R16I format.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-14GPUTexture: Save sample count inside texture struct.Clément Foucault
This adds a quick way to know if a texture is a multisample texture and its sample count.
2018-03-13GPUMaterial: Fix non finished material status if shader has no output.Clément Foucault
This wasn't producing any issue for now but it's better to make things clean.
2018-03-12GPUMaterial: Add Material shader cache.Clément Foucault
This is mostly to avoid re-compilation when using undo/redo operators. This also has the benefit to reuse the same GPUShader for multiple materials using the same nodetree configuration. The cache stores GPUPasses that already contains the shader code and a hash to test for matches. We use refcounts to know when a GPUPass is not used anymore. I had to move the GPUInput list from GPUPass to GPUMaterial because it's containing references to the material nodetree and cannot be reused. A garbage collection is hardcoded to run every 60 seconds to free every unused GPUPass.
2018-03-10Merge branch 'master' into blender2.8Brecht Van Lommel
2018-03-10Cycles: switch to squared roughness convention for all nodes.Brecht Van Lommel
This was already done for the Principled BSDF to be compatible with typical baked roughness maps in PBR workflows.
2018-03-10Merge branch 'master' into blender2.8Brecht Van Lommel
2018-03-10Eevee: Make use of the new view matrix UBO.Clément Foucault
2018-03-10DRW: Change UBOs binding logic.Clément Foucault
Use the same logic than textures. Also reset bindings only on shader changes.
2018-03-06GPU: Fix typo.Clément Foucault
2018-03-06DRW: Deferred compilation initial implementation.Clément Foucault
2018-03-01Merge branch 'master' into blender2.8Campbell Barton
2018-03-01GPU_select: remove unused finalize functionCampbell Barton
Changed 2.8x code so this is no longer needed.
2018-03-01DRW: Merge calls_generate pool with calls pool & add DRWCallState pool.Clément Foucault