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
2020-07-26GPU: Move gpu_batch.c to C++Clément Foucault
2020-06-02Cleanup: GPU: Remove GPU_shaderinterface_uniform_ensureClément Foucault
2020-06-02GPU: ShaderInterface: Refactor to setup all uniform at creation timeClément Foucault
This remove the complexity of queriying the locations at runtime and allows for more performance and upfront binding specifications. The benefit of doing everything at creation time is that we can assign binding points in a predictable order which is going to be somewhat the same for every similar shader. This also rewrite GPU_vertformat_from_shader to not use shaderface. This is to keep the shaderface simple. If it becomes necessary to not query the shader after creation (i.e: vulkan?) we could just create the vert format in advance at compilation for PyGPU shaders. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7879
2020-04-14GPUShader: Implement workaround for gizmo drawing on sRGB framebufferClément Foucault
This solution involves adding a uniform to each fragment shader that is used by gizmo drawing and use the framebuffer state to set this uniform accordingly. This solution can also be carried to external shaders (addons). A single line of code would then be enough to fix the issue. The only trickery here is the dummy define: `#define srgb_to_framebuffer_space(a)` This is in order to avoid breaking other DRW shaders that use the same fragment shader code but do not need the tranformation. Related to T74139 Reviewed By: brecht, campbellbarton Differential Revision: https://developer.blender.org/D7261
2020-04-03Cleanup: use term 'attr' instead of 'attrib'Campbell Barton
This was already the case in most parts of the GPU API. Use full name for descriptive-comments.
2020-03-26GPU: Add workaround for faulty default attrib values on some driversClément Foucault
On some drivers, the default values is not respected correctly. To workaround this we create a small VBO that contains only 1 vec4 worth of data and just bind it using glBindVertexBuffer to ensure 0 stride. This fixes T75069 Instances not rendered correctly by workbench.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-02-18GPU: Fix huge performance regression regarding instancingClément Foucault
Under some circumstances, MultiDrawIndirect was disabled to improve perf. of average scene. But this conflicted with the normal instancing buffer filling if only 1 or 2 instances were needed to fill the buffer. All consecutive drawcalls could not be batched together and performance would degrade rapidly. This patch make my instance test scene go from 11fps back to 40fps where it should have been.
2020-02-11DRW: Color Management improvementClément Foucault
Reviewed By: brecht sergey jbakker Differential Revision: http://developer.blender.org/D6729
2020-02-04GPU: Remove disabling of indirect drawcall batching on NVIDIA hardwareClément Foucault
Nvidia has fixed their drivers so there is no reasons to keep this. This fix T70011 NVIDIA issue prevents full indirect draw call batching performance
2019-12-02Overlay Engine: Refactor & CleanupClément Foucault
This is the unification of all overlays into one overlay engine as described in T65347. I went over all the code making it more future proof with less hacks and removing old / not relevent parts. Goals / Acheivements: - Remove internal shader usage (only drw shaders) - Remove viewportSize and viewportSizeInv and put them in gloabl ubo - Fixed some drawing issues: Missing probe option and Missing Alt+B clipping of some shader - Remove old (legacy) shaders dependancy (not using view UBO). - Less shader variation (less compilation time at first load and less patching needed for vulkan) - removed some geom shaders when I could - Remove static e_data (except shaders storage where it is OK) - Clear the way to fix some anoying limitations (dithered transparency, background image compositing etc...) - Wireframe drawing now uses the same batching capabilities as workbench & eevee (indirect drawing). - Reduced complexity, removed ~3000 Lines of code in draw (also removed a lot of unused shader in GPU). - Post AA to avoid complexity and cost of MSAA. Remaining issues: - ~~Armature edits, overlay toggles, (... others?) are not refreshing viewport after AA is complete~~ - FXAA is not the best for wires, maybe investigate SMAA - Maybe do something more temporally stable for AA. - ~~Paint overlays are not working with AA.~~ - ~~infront objects are difficult to select.~~ - ~~the infront wires sometimes goes through they solid counterpart (missing clear maybe?) (toggle overlays on-off when using infront+wireframe overlay in solid shading)~~ Note: I made some decision to change slightly the appearance of some objects to simplify their drawing. Namely the empty arrows end (which is now hollow/wire) and distance points of the cameras/spots being done by lines. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6296
2019-11-28Fix T71147 Eevee stops rendering after selection attemptClément Foucault
This is caused by the fallback path used by OSX, which is reconfiguring the same default VAO. But it seems to be an issue on certain drivers.
2019-10-16Fix assert and memleak in recent Skin Root Display patchClément Foucault
Caused by 4ddf3215a7df
2019-10-10Cleanup: clang-format, spellingCampbell Barton
2019-10-04Fix T70463 GPU: Very Slow Workbench/Eevee PerformanceClément Foucault
2019-10-04GPU: Platform Support LevelJeroen Bakker
Adds a check when starting blender if your platform is supported. We use a blacklist as drivers are updated more regular then blender (stable releases). The mechanism detects if the support level changed or has been validated by the user previously. Changes can happen due to users updating their drivers, but also when we change the support level in our code base. When the user has seen the limited support level message it is saved in the user config. It would be better to have a system specific config section, but currently not clear what could benefit from that. When the platform is unsupported or has limited support a dialog box will appear including a link to our user manual describing what to do. **Windows** Windows uses the MessageBox that is provided by the windows kernel. **X11** We use a very lowlevel messagebox for X11. It is very limited in use and can be fine tuned when needed. **SDL/APPLE** There is no implementation for SDL or APPLE at this moment as the platform support feature targets mostly Windows users. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5955
2019-10-03Fix T70466 Rendering error when drawing multi-material meshesClément Foucault
2019-10-02Workaround for NVidia broken driverClément Foucault
This disable the indirect drawcall on all Nvidia hardware. This has to be until nvidia fixes their drivers or instruct us how to correctly fix the issue. Related to T70011 Various display issues on NVIDIA after draw call batching.
2019-09-26Fix T70107 EEVEE: Crash using Irradiance Volume with Curve insideClément Foucault
This was more of a general nvidia driver bug. Was caused by a drawcall that had 0 vertex count. This worked in normal drawcalls but not in indirect drawcalls.
2019-09-23Cleanup: use bracesCampbell Barton
2019-09-18GPU: AMD: Remove workaround that doesn't workmano-wii
2019-09-17GPU: Comment incorrect assertsClément Foucault
These asserts are too simple and triggers false positive.
2019-09-17GPU: Fix broken assertClément Foucault
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-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-08-14Mesh Batch Cache: Refactor + MultithreadClément Foucault
For clarity sake, the batch cache now uses exclusively per Loop attributes. While this is a bit of a waste of VRAM (for the few case where per vert attribs are enough) it reduces the complexity and amount of overall VBO to update in general situations. This patch also makes the VertexBuffers filling multithreaded. This make the update of dense meshes a bit faster. The main bottleneck is the IndexBuffers update which cannot be multithreaded efficiently (have to increment a counter and/or do a final sorting pass). We introduce the concept of "extract" functions/step. All extract functions are executed in one thread each and if possible, using multiple thread for looping over all elements. Reviewed By: brecht Differential Revision: http://developer.blender.org/D5424
2019-07-31Fix T67951: Bone selection is broken on some Intel GPUsmano-wii
The problem is that the `glDrawArraysInstancedBaseInstance` is ignoring the last parameter. The solution is to indicate that `GLEW_ARB_base_instance` is not supported in these cases. Reviewers: fclem, brecht, jbakker Reviewed By: fclem, brecht Differential Revision: https://developer.blender.org/D5383
2019-06-06Fix T65383 UI graphics glitches on macOS with Intel HD 4000Clément Foucault
glDrawArrays is not supposed to be affected by primitive restart but osx drivers never cease to surprise me.
2019-06-03GPU: Fix Restart index bugClément Foucault
Restart index can have been changed in another context and the static var can get out of sync. A better solution is to set the restart index when binding the VAO. It also have less perf impact. Fix T65364 Corrupted mesh display on macOS
2019-05-30GPU: Remove GPU_INDEX_U8Clément Foucault
This type of indices is not natively supported on modern GPU and gives warning on some implementation. The memory savings it provides is also quite minimal and unlikely to be visible on nowadays hardware. This remove some uneeded struct members and makes primitive restart always enabled by default. This can be broken by addons if they are not careful enough but many other states have this problem. Also leverage GL_PRIMITIVE_RESTART_FIXED_INDEX if ARB_ES3_compatibility is supported. This removes all API calls to change restart index depending on indices length.
2019-05-27Cleanup: Fix warnings in gpu_batchRay Molenkamp
Passing a const pointer to MEM_freeN/MEM_recallocN lead to C4090 'function': different 'const' qualifiers warnings with MSVC
2019-05-27Fix T65066 Armature and bone selection is broken on macOSClément Foucault
2019-05-22GPU: Refactor GPU_batch_draw_range_exClément Foucault
Rename it to GPU_batch_draw_advanced and use base instance when possible. Also add GPU_batch_bind to bind the vao independantly of drawing commands.
2019-05-20GPU: Use uint in GPU_batch_uniform_1ui.mano-wii
2019-05-14GPUVertexFormat: Reduce size of structsClément Foucault
With this patch, the size of GPUVertFormat goes from 1240 to 388.
2019-05-14GPU: Add GPU_vertbuf_discard and GPU_BATCH_UNUSEDClément Foucault
GPU_vertbuf_discard to clear buffer containers in place. GPU_BATCH_UNUSED to tag batch that are cleared and not immediatly usable.
2019-04-22Cleanup: style, use braces for gpuCampbell Barton
2019-04-21Cleanup: comments (long lines) in gpuCampbell Barton
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-04-05Fix T61035 Draw manager crash opening file with curvesClément Foucault
Move free callback call to GPU_batch_discard to prevent the crash. The issue was that clearing can happen after referencing to an instance buffer and that's perfectly legal.
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-10Cleanup: use shorter name for shader configCampbell Barton
The struct name is descriptive, this isn't going to be confused with other variables.
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-06Fix T61196: Mesh select ignores clippingCampbell Barton
Select clipping now works when x-ray is disabled.
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-29Cleanup: replace attrib w/ attrCampbell Barton
Also rename GPUVertexAttribs to GPUVertAttrLayers, avoids confusion with GPUVertAttr which isn't closely related.
2019-01-23Cleanup: use eGPU prefix for GPU enum typesCampbell 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.