Commit Graph

2233 Commits

Author SHA1 Message Date
mano-wii
60b930af3e GPU: Add another driver to the list of unused_fb_slot_workaround
I start to think that an automatic detection would be a better solution.
2018-12-25 14:36:51 -02:00
Bastien Montagne
1ac311cedc Fix/cleanup another bunch of UI messages issues.
Also (mostly in comments): behaviour -> behavior (we use American English).
2018-12-24 12:32:43 +01:00
Clément Foucault
c92cffb56d DRW: Instance: Makes it possible to have instances of a non-init batch 2018-12-18 13:08:17 +01:00
Clément Foucault
7ac49a07c6 Mesh Batch Cache: Port Texture paint batches to new batch request 2018-12-17 17:05:57 +01:00
Clément Foucault
99457dd981 GPU: Add Intel HD Graphics 530 to the list of buggy intel gpus 2018-12-17 08:56:38 +01:00
mano-wii
ba1f178c1c Fix T56185, T59351: bypass GL_PROXY_TEXTURE.. test on AMD GPU + windows
This replaces the test of consistency and capacity made with `GL_PROXY_TEXTURE_..` on AMD GPUs with one that checks only if the texture fits the limits of size and layer.

Differential Revision: https://developer.blender.org/D4081
2018-12-14 21:33:31 -02:00
Clément Foucault
c09913e9dd GPUBatch: Add GPU_batch_clear to clear batches without freeing 2018-12-14 16:17:29 +01:00
Clément Foucault
49287b34a2 GPUBuffers: Fix uninitialized memory use causing undefined conditional jump 2018-12-14 16:17:29 +01:00
Sergey Sharybin
e67f7e922c Attempt to sanitize node tree deletion
Make it explicit when freeing node tree which is owned by other
ID or when freeing node tree which is outside of a bmain.
2018-12-14 15:29:16 +01:00
Campbell Barton
49490e5cfb Merge branch 'master' into blender2.8 2018-12-12 13:02:09 +11:00
Campbell Barton
16fc62e15f Docs: correct doxy comments 2018-12-12 12:18:52 +11:00
Clément Foucault
b7933cc601 GPUTexture: Add debug print for cubemap textures 2018-12-11 22:30:41 +01:00
Clément Foucault
70d38a996e GPUTexture: Fix memory statistics not working for Multisamples textures
and also output the vram footprint of the texture at the creation.

Also output the full texture memory usage if alloc fails.
2018-12-11 22:10:16 +01:00
Clément Foucault
bf2e0c7598 GPUState: Remove glLineWidth warnings about size 0x0 2018-12-11 21:15:50 +01:00
Clément Foucault
0ba02c6e9e GPUTexture: Add debug output to check what texture was created 2018-12-11 21:15:50 +01:00
Clément Foucault
33cc3344a2 GPU: Make changes to GPUIndexBuf and GPUVertBuf to allow multithreading
This is a small change. We delay all gl calls at the first use of the
GPUIndexBuf / GPUVertBuf in order to be able to create multiple buffers
from different threads without having many gl contexts.
2018-12-10 19:02:17 +01:00
Clément Foucault
a99eb0ca68 GPU: Cleanup: Rename vbo to ibo for index buffers 2018-12-10 19:02:17 +01:00
Sergey Sharybin
c2b0d8b6d6 Fix T57633: Particle texture update problem
Textures are now hooked up to the RESET operation of particle
settings, which ensures particles being re-distributed when
texture is changed.

This is limited to a direct user modifications, which matches
old behavior in 2.79.
2018-12-10 15:11:57 +01:00
Clément Foucault
9f5a27c5be GPU: Remove EXT and add assert
Some drivers accept shaders with only vertex stage, but some just silently
fails.
2018-12-07 05:33:46 +01:00
Clément Foucault
fe20aa1edf GPU: Add GPU_vertformat_triple_load to load next vertices attrib
Right now does not add padding at the end of the buffer.

This seems not necessary but may cause problem on some platform. If needed
we will add this padding (only 2 more vertices).
2018-12-07 05:33:17 +01:00
mano-wii
39efb58446 GPU Framebuffer: simplify gpu_framebuffer_update_attachments_and_fill_empty_slots func 2018-12-06 11:47:37 -02:00
mano-wii
da7f00b9c9 GPU Extensions: unused_fb_slot_workaround: Compare only the driver.
Dozens of renderes are included.
2018-12-06 10:05:42 -02:00
mano-wii
ffdd5b3699 Fix T56362: sub surface scattering does not work on eevee on radeon hd 7600 series 2018-12-05 21:22:12 -02:00
mano-wii
c0a71b8369 Fix problem with unused color slot in framebuffer on some bugged AMD GPUs
Differential Revision: https://developer.blender.org/D4035
2018-12-05 21:00:08 -02:00
Clément Foucault
16749070ae GPU: Fix gpu workaround detection 2018-12-05 16:57:44 +01:00
Clément Foucault
a7712e8594 GPU: Improve detection of intels UHD graphics 2018-12-05 04:22:32 +01:00
Clément Foucault
4d4f0dbd8d GPU: Print opengl infos if using --debug-gpu-force-workarounds 2018-12-05 04:03:40 +01:00
Clément Foucault
1fa527bfa3 BKE: Add "--debug-gpu-force-workarounds" to force gpu workarounds
This is nice to test workarounds on other configs that may benefits from
the existing workarounds.
2018-12-05 03:05:39 +01:00
Clément Foucault
5368540431 Workbench: Fix workbench broken on some config due to usuned fb slot
This seems to be a driver bug. Only windows + Radeon HD 7500M seems
to be affected. Fix can be extended to more config if necessary.
2018-12-05 02:51:48 +01:00
Clément Foucault
24fd03d0c2 Workbench: Reduce VRAM usage depending on mode
We exploit the fact that we are using the metallic workflow for material
and pass the metallic parameter instead of the specular color.

Pack the front facing bit in the color buffer only for matcap display.

Change buffer formats to use less bytes as possible.

Also don't request buffers that we won't use.

Saved 40MB on 2K screen on StudioLight + Shadows + Specular Lighting.

Includes several cleanups.
2018-12-03 17:19:11 +01:00
Clément Foucault
40d0374411 Fix T57455: Laggy, freezing UI with Linux and Intel UHD 620
Seems like a driver bug but doing glFlush() before these calls fixes it.
2018-12-02 01:57:30 +01:00
Clément Foucault
d55c269dd1 UI: Simplify the area border drawing
Instead of doing a lot of alpha blended drawing with jittering, use the
fragment shader to do the masking using a circle mask.

This is much simpler and requires much less resources.

Hopefully this may solve the issue we have with the Intels UHD Graphics 620
on linux.
2018-12-01 20:38:52 +01:00
Campbell Barton
40f45a7eac Cleanup: redundant NULL checks
Also use unsigned shifting for values not in int range.
2018-12-01 19:36:57 +11:00
Clément Foucault
e1023014f4 GPUTexture: Add support for GL_R16 texture format 2018-11-30 02:02:36 +01:00
Clément Foucault
52458ab49d GPU: Add AMD Radeon RX series to macos blitting workaround list
Fixes T55987
2018-11-28 15:59:56 +01:00
Campbell Barton
c2863326af Cleanup: correct assert, remove redundant NULL checks 2018-11-28 17:20:23 +11:00
Campbell Barton
62edc31d34 Cleanup: correct function signatures 2018-11-28 16:21:24 +11:00
Clément Foucault
65fa5a1926 Eevee: Optimize Color Ramp node for common cases. 2018-11-17 18:20:10 +01:00
Clément Foucault
c599aeaee5 GPU: Cleanup / Opti : Vectorize + MADD and remove unused function 2018-11-17 14:56:18 +01:00
Clément Foucault
2c347ebbba Fix T57874: Crash due to IMM_BUFFER_SIZE when drawing cached frames...
... in the timeline.
2018-11-16 19:26:23 +01:00
Sergey Sharybin
d546269de8 Cleanup: Double semicolon at the end of line 2018-11-15 16:32:18 +01:00
Campbell Barton
55e719ec35 Merge branch 'master' into blender2.8 2018-11-14 17:21:34 +11:00
Campbell Barton
d7f55c4ff5 Cleanup: comment block tabs 2018-11-14 17:10:56 +11:00
Clément Foucault
14e4fb2773 GPU: Fix crash at startup 2018-11-13 11:22:28 +01:00
Clément Foucault
d941f40c21 Fix T57571: Blender crashes on UV transformation
That was caused by a thread safety issue on gpu_batch_presets_unregister()
which was not designed to be used for this kind of situation (managing 3D
meshes batches).
2018-11-12 18:07:01 +01:00
Clément Foucault
b43ce7908f Eevee: Fix broken Vector Transform node
The Camera to Object space matrix was not implemented in gpu_codegen.
2018-11-08 21:50:17 +01:00
Clément Foucault
4f11441913 Eevee: Add partial support for the Light Path Node
This makes it possible to tweak indirect lighting in the shader.

Only a subset of the outputs is supported and the ray depth has not exactly
the same meaning:

Is Camera : Supported.
Is Shadow : Supported.
Is Diffuse : Supported.
Is Glossy : Supported.
Is Singular : Not supported. Same as Is Glossy.
Is Reflection : Not supported. Same as Is Glossy.
Is Transmission : Not supported. Same as Is Glossy.
Ray Length : Not supported. Defaults to 1.0.
Ray Depth : Indicate the current bounce when baking the light cache.
Diffuse Depth : Same as Ray Depth but only when baking diffuse light.
Glossy Depth : Same as Ray Depth but only when baking specular light.
Transparent Depth : Not supported. Defaults to 0.
Transmission Depth : Not supported. Same as Glossy Depth.

Caveat: Is Glossy does not work with Screen Space Reflections but does work
with reflection planes (when used with SSR or not).
We have to render the world twice for that to work.
2018-11-08 19:20:40 +01:00
Clément Foucault
9d12a5aa9e Eevee: Fix geometry node for environments and support true_normal
Also minor cleanup for the Bump node.
2018-11-08 19:20:40 +01:00
Brecht Van Lommel
11a53ec28a Fix T57689: world nodes / texture not updating for Eevee.
Only do GPU material updates through depsgraph evaluation now. This was
already happening for material, just missing for the world.
2018-11-08 16:01:02 +01:00
Clément Foucault
bdd44564c9 GPU: Cleanups: Remove GPUMatType, Vectorize / MADD some operations 2018-11-07 22:16:13 +01:00