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
2021-07-07Cleanup: spelling in commentsCampbell Barton
2021-07-06GPU: Fix crash when using EGL with --gpu-debug flag.Jeroen Bakker
During initialization of the platform a debug message is generated and interpreted by de callback. Here the platform is checked what requires an initialized platform. Fixed by giving the platform check less priority in the check.
2021-07-05Cleanup: use const argumentsCampbell Barton
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-29Cleanup: clang-formatCampbell Barton
2021-06-29Cleanup: GPU Shader Log Parsing.Jeroen Bakker
- Added functions to check if the cursor is at a number. - Added function to parse a number. - Joined skip_separator functions. - Added function to check if cursor is at any given set of characters.
2021-06-29Fixed issue in previous commit.Jeroen Bakker
During development a test was disabled. Enabling it again.
2021-06-29Fix T89405: Viewport Render Preview glitching (AMD)Jeroen Bakker
AMD Drivers didn't report an additional space in the rendered. This made testing for the HQ workaround fail and the issue appeared back on certain cards. This fix will test with surrounding spaces or if the renderer name endswith the given string. If any of these are the case the hq normals workaround will be enabled.
2021-06-28GPU: Refactored +cleanup compilation log parsing.Jeroen Bakker
Old implementation has a single parser of many different formats. With the introduction of Vulkan this would lead to another parser in the same function. This patch separates the log parsing using a visitor pattern so the log parsing can be configured per GPU backend or even per driver. With Vulkan we manage the compiler our self so the parsing will become more straight forward. The OpenGL part depends on many factors (OS, Driver) and perhaps even GPU.
2021-06-28GPU: Separate compiler log from shader.Jeroen Bakker
Current compiler log parser is to complex to follow. Moving it to its own compile unit before refactoring.
2021-06-28Fix: Crash Requesting GPU_SHADER_GPENCIL_FILL builtin shader.Jeroen Bakker
Shader doesn't have any shader code. Requesting the shader would crash blender. Solved by removing the enum_value.
2021-06-28GPU: Testcases for builtin shaders.Jeroen Bakker
Adding compiler test (does it compile?) test for all builtin shaders.
2021-06-28Cleanup GPU/Draw test cases.Jeroen Bakker
In preparation of supporting vulkan. Draw/GPU tests should use GPU_TEST or DRAW_TEST macros. These macros will run the test on available drawing context backends like OpenGL or Vulkan. As in master there is only an OpenGL backend nothing changed.
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-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2021-06-22UI: Fix widget emboss: Also fade on the right sideLeon Leno
Currently the emboss is only fading on left side of the widget, resulting in the emboss extending vertically on the right side and ending abruptly. This patch fixes this by also fading the emboss on the right side and making it symmetric. Differential Revision: https://developer.blender.org/D10810
2021-06-18Cleanup: clang-tidyCampbell Barton
2021-06-13Cleanup: redundant initializationCampbell Barton
These were limited to obvious cases. Some less obvious cases were kept as refactoring might make them necessary in future.
2021-06-11Refactor: use 'BLI_task_parallel_range' in Draw CacheGermano Cavalcante
One drawback to trying to predict the number of threads that will be used in the `task_graph` is that we are only sure of the number when the threads are running. Using `BLI_task_parallel_range` allows the driver to choose the best thread distribution through `parallel_reduce`. The benefit is most evident on hardware with fewer cores. This is the result on an 4-core laptop: ||before:|after: |---|---|---| |large_mesh_editing:|Average: 5.203638 FPS|Average: 5.398925 FPS ||rdata 15ms iter 43ms (frame 193ms)|rdata 14ms iter 36ms (frame 187ms) Differential Revision: https://developer.blender.org/D11558
2021-06-11Refactor: Draw Cache: use 'BLI_task_parallel_range'Germano Cavalcante
This is an adaptation of {D11488}. A disadvantage of manually setting the iter ranges per thread is that we don't know how many threads are running in the background and so we don't know how to best distribute the ranges. To solve this limitation we can use `parallel_reduce` and thus let the driver choose the best distribution of ranges among the threads. This proved to be especially beneficial for computers with few cores. **Benchmarking:** Here's the result on an 4-core laptop: ||master:|PATCH: |---|---|---| |large_mesh_editing:|Average: 5.203638 FPS|Average: 5.398925 FPS ||rdata 15ms iter 43ms (frame 193ms)|rdata 14ms iter 36ms (frame 187ms) Here's the result on an 8-core PC: ||master:|PATCH: |---|---|---| |large_mesh_editing:|Average: 15.267482 FPS|Average: 15.906881 FPS ||rdata 9ms iter 28ms (frame 65ms)|rdata 9ms iter 25ms (frame 63ms) |large_mesh_editing_ledge: |Average: 15.145966 FPS|Average: 15.520474 FPS ||rdata 9ms iter 29ms (frame 65ms)|rdata 9ms iter 25ms (frame 64ms) |looptris_test:|Average: 4.001917 FPS|Average: 4.061105 FPS ||rdata 12ms iter 90ms (frame 236ms)|rdata 12ms iter 87ms (frame 230ms) |subdiv_mesh_cage_and_final:|Average: 1.917769 FPS|Average: 1.971790 FPS ||rdata 7ms iter 37ms (frame 261ms)|rdata 7ms iter 31ms (frame 258ms) ||rdata 7ms iter 38ms (frame 252ms)|rdata 7ms iter 33ms (frame 249ms) |subdiv_mesh_final_only:|Average: 6.387240 FPS|Average: 6.591251 FPS ||rdata 3ms iter 25ms (frame 151ms)|rdata 3ms iter 16ms (frame 145ms) |subdiv_mesh_final_only_ledge:|Average: 6.247393 FPS|Average: 6.596024 FPS ||rdata 3ms iter 26ms (frame 158ms)|rdata 3ms iter 16ms (frame 148ms) **Notes:** - The improvement can only be noticed if all extracts are multithreaded. - This patch touches different areas of the code, so it can be split into another patch if the idea is accepted. These screenshots show how threads behave in a quadcore: Master: {F10164664} Patch: {F10164666} Differential Revision: https://developer.blender.org/D11558
2021-06-08GPU: Thread safe index buffer builders.Jeroen Bakker
Current index builder is designed to be used in a single thread. This makes all index buffer extractions single threaded. This patch adds a thread safe solution enabling multithreaded building of index buffers. To reduce locking the solution would provide a task/thread local index buffer builder (called sub builder). When a thread is finished this thread local index buffer builder can be joined with the initial index buffer builder. `GPU_indexbuf_subbuilder_init`: Initialized a sub builder. The index list is shared between the parent and sub buffer, but the counters are localized. Ensuring that updating counters would not need any locking. `GPU_indexbuf_subbuilder_finish`: merge the information of the sub builder back to the parent builder. Needs to be invoked outside the worker thread, or when sure that all worker threads have been finished. Internal the function is not thread safe. For testing purposes the extract_points extractor has been migrated to the new API. Herefore changes to the mesh extractor were needed. * When creating tasks, the task number of current task is stored in ExtractTaskData including the total number of tasks. * Adding two functions in `MeshExtract`. ** `task_init` will initialize the task specific userdata. ** `task_finish` should merge back the task specific userdata back. * adding task_id parameter to the iteration functions so they can access the correct task data without any need for locking. There is no noticeable change in end user performance. Reviewed By: mano-wii Differential Revision: https://developer.blender.org/D11499
2021-06-08Revert "Cleanup: use cpp new/delete."Jeroen Bakker
This reverts commit 43464c94f4def8689dd99a9e459f5ff77420d27b.
2021-06-08Cleanup: use cpp new/delete.Jeroen Bakker
2021-06-07Fix T77651: Black screen on Blender startup on ChromeOSGermano Cavalcante
Apparently `textureSize` doesn't work with `sampler1DArray` on this OS. Thanks to @dave1853 for finding the source of the problem.
2021-06-07GPUIndexBuf: Find the minimum and maximum index through the builderGermano Cavalcante
Moving the bounds code to the builder can be useful for future optimizations like building multithreaded. Reviewed By: fclem, jbakker Differential Revision: https://developer.blender.org/D11455
2021-06-04Nodes: Add Multiply Add to Vector Math nodesCharlie Jolly
Cycles, Eevee, OSL, Geo, Attribute This operator provides consistency with the standard math node. Allows users to use a single node instead of two nodes for this common operation. Reviewed By: HooglyBoogly, brecht Differential Revision: https://developer.blender.org/D10808
2021-06-01GPU: add 2D projection functionCampbell Barton
When projecting into screen space Z value isn't always needed. Add 2D projection functions, renaming them to avoid accidents happening again. - Add GPU_matrix_project_2fv - Add ED_view3d_project_v2 - Rename ED_view3d_project to ED_view3d_project_v3 - Use the 2D versions of these functions when the Z value isn't used.
2021-05-28DrawManager: Use Compute Shader to Update Hair.Jeroen Bakker
This patch will use compute shaders to create the VBO for hair. The previous implementation uses transform feedback. Timings before: between 0.000069s and 0.000362s. Timings after: between 0.000032s and 0.000092s. Speedup isn't noticeable by end-users. The patch is used to test the new compute shader pipeline and integrate it with the draw manager. Allowing EEVEE, Workbench and other draw engines to use compute shaders with the introduction of `DRW_shgroup_call_compute` and `DRW_shgroup_vertex_buffer`. Future improvements are possible by generating the index buffer of hair directly on the GPU. NOTE: that compute shaders aren't supported by Apple and still use the transform feedback workaround. Reviewed By: fclem Differential Revision: https://developer.blender.org/D11057
2021-05-27Cleanup: inconsistent parameter nameJacques Lucke
2021-05-26Revert "DrawManager: Use Compute Shader to Update Hair."Jeroen Bakker
This reverts commit 8f9599d17e80254928d2d72081a4c7e0dee64038. Mac seems to have an error with this change. ``` ERROR: /Users/blender/git/blender-vdev/blender.git/source/blender/draw/intern/draw_hair.c:115:44: error: use of undeclared identifier 'shader_src' ERROR: /Users/blender/git/blender-vdev/blender.git/source/blender/draw/intern/draw_hair.c:123:13: error: use of undeclared identifier 'shader_src' ERROR: make[2]: *** [source/blender/draw/CMakeFiles/bf_draw.dir/intern/draw_hair.c.o] Error 1 ERROR: make[1]: *** [source/blender/draw/CMakeFiles/bf_draw.dir/all] Error 2 ERROR: make: *** [all] Error 2 ```
2021-05-26DrawManager: Use Compute Shader to Update Hair.Jeroen Bakker
This patch will use compute shaders to create the VBO for hair. The previous implementation uses tranform feedback. Timings master (transform feedback with GPU_USAGE_STATIC between 0.000069s and 0.000362s Timings transform feedback with GPU_USAGE_DEVICE_ONLY. between 0.000057s and 0.000122s Timings compute shader between 0.000032 and 0.000092s Future improvements: * Generate hair Index buffer using compute shaders: currently done single threaded on CPU, easy to add as compute shader. Reviewed By: fclem Differential Revision: https://developer.blender.org/D11057
2021-05-26GPU: Compute Pipeline.Jeroen Bakker
With the compute pipeline calculation can be offloaded to the GPU. This patch only adds the framework for compute. So no changes for users at this moment. NOTE: As this is an OpenGL4.3 feature it must always have a fallback. Use `GPU_compute_shader_support` to check if compute pipeline can be used. Check `gpu_shader_compute*` test cases for usage. This patch also adds support for shader storage buffer objects and device only vertex/index buffers. An alternative that had been discussed was adding this to the `GPUBatch`, this was eventually not chosen as it would lead to more code when used as part of a shading group. The idea is that we add an `eDRWCommandType` in the near future. Reviewed By: fclem Differential Revision: https://developer.blender.org/D10913
2021-05-21Cleanup: spellingLeon Zandman
Includes fixes to misspelled function names. Ref D11280
2021-05-21Fix T88227: Eevee not working on AMD 535 cards.Jeroen Bakker
Enabled HQ normals workaround for this specific configuration.
2021-05-21Eevee Wavelength Node SupportIyad Ahmed
This patch adds wavelength node support to Eevee, similar to how Eevee Blackbody node works, thus it is a little off from Cycles. Reviewed By: #eevee_viewport, fclem, brecht Differential Revision: https://developer.blender.org/D11326
2021-05-19Merge branch 'blender-v2.93-release'Clément Foucault
2021-05-19EEVEE: Subsurface Node: Fix inverted texture blur inputClément Foucault
Fixes T86097 EEVEE Subsurface Node give blurry edges
2021-05-19Merge branch 'blender-v2.93-release'Clément Foucault
2021-05-19EEVEE: Geometry info -> tangent: Make consistent with Cycles for hairMikhail Matrosov
Changes output for geometry info node in Eevee to be consistent with Cycles (w/o osl) Before this patch Eevee outputs Z-tangent even for hair. This patch changes it to output hair tangent (growth direction). Hair tangent is impossible to derive otherwise from normal or view direction. Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D10841
2021-05-17Cleanup: missing declaration warningCampbell Barton
2021-05-14Python GPU: New 'platform' moduleGermano Cavalcante
This module exposes the platform utils defined in the GPU module in C. This will be useful for porting existing code with `bgl` to `gpu`. Reviewed By: fclem, brecht, campbellbarton Maniphest Tasks: T80730 Part of D11147
2021-05-14Python GPU: New 'capabilities' moduleGermano Cavalcante
This module exposes the capabilities defined in the GPU module in C. This will be useful for porting existing code in `bgl` to `gpu`. Reviewed By: fclem, brecht, campbellbarton Maniphest Tasks: T80730 Part of D11147
2021-05-10Merge branch 'blender-v2.93-release'Pablo Dobarro
2021-05-10Fix T88180: Enable HQ normal workaround for RX 580X cards.Jeroen Bakker
This needs to be backported to 2.83.
2021-05-10Cleanup: Remove double import in previous commit.Jeroen Bakker
2021-05-10Enable CLog for GPU test cases.Jeroen Bakker
2021-05-06Cleanup: spellingCampbell Barton
2021-05-03Cleanup: spellingCampbell Barton
2021-05-03Cleanup: clang-tidyJacques Lucke