Clément Foucault
6dccc7cdab
GPUInterface: Add builtin check in uniform location request.
...
This is a compile time option to remove the unecessary uniform queries.
2019-01-17 19:48:00 +01:00
Clément Foucault
844cda8f22
DRW: Make missing uniform debuging print only once
2019-01-17 19:48:00 +01:00
Clément Foucault
e3b3b32076
DRW: Use name buffer to request uniform location before drawing.
...
This is in order to avoid GL call during the "cache creation" phase and
support multithreading.
2019-01-17 19:48:00 +01:00
Clément Foucault
4c95899098
GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
...
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.
2019-01-17 19:44:01 +01:00
Campbell Barton
00dd294a6e
Cleanup: unused code
2019-01-17 11:17:45 +11:00
Brecht Van Lommel
ece72e15d5
Preferences: remove OpenGL select method preference.
...
Deprecated GL_SELECT no longer works in OpenGL core profile, so there is no
reason to have this.
2019-01-16 16:16:42 +01:00
Brecht Van Lommel
49562da98d
Preferences: remove unnecessary 16 bit textures preference.
...
This is a leftover from a time when these were not supported on all GPUs.
2019-01-16 16:16:42 +01:00
Brecht Van Lommel
a8a89db9c8
Preferences: always do GPU accelerated mipmapping, remove preference.
...
This setting was added long ago to be cautious in case some GPUs did not
support this propertly, no reason to have it anymore.
2019-01-16 16:16:42 +01:00
Campbell Barton
88a80fcec8
Cleanup: commas at the end of enums
...
Without this clang-format may wrap them onto a single line.
2019-01-16 00:03:03 +11:00
Clément Foucault
1c91b6ee29
UVEdit: Port texpaint_loop_wire to batch request
...
This removes code duplication and put an end to the old "create at request"
batch creation.
Also it uses the same vbo as the uv layer used for shading. Reducing VRAM
usage.
Also fixes the modified uv display in uv edit mode.
2019-01-11 16:00:23 +01:00
Clément Foucault
621a6d4a5d
UVEdit: Add back uv angle stretch aspect correction
...
This is now done in shader so that the batches are shared across ImageUV
areas.
2019-01-11 16:00:23 +01:00
Clément Foucault
1459a70489
GPUShader: Cleanup Unused shaders
2019-01-11 16:00:23 +01:00
Clément Foucault
9d19ff9076
GPUShader: Add selection id shader
...
This is to separate id drawing from standard color drawing.
2019-01-11 16:00:23 +01:00
Brecht Van Lommel
4b0c2152db
Fix use of uninitialized GPU context memory in release builds.
...
Reported by valgrind, not sure it caused any real bugs.
2019-01-10 20:03:05 +01:00
Campbell Barton
e305560f13
Cleanup: add trailing commas to structs
...
Needed for clang formatting to workaround bug/limit, see: T53211
2019-01-07 00:34:48 +11:00
Sergey Sharybin
7bd31bdcce
Cleanup: Spelling
2019-01-04 12:51:10 +01:00
Sergey Sharybin
7a10960947
Provide more information on unknown GPU
2019-01-04 12:50:05 +01:00
Sergey Sharybin
785fc137ce
Merge branch 'blender2.7'
2019-01-04 12:42:13 +01:00
Sergey Sharybin
e6acb4fba0
Recognize llvmpipe renderer as software OpenGL
2019-01-04 12:41:35 +01:00
Campbell Barton
052150bbcc
Revert "GPU: add negated normal conversion functions"
...
This reverts commit d28b29d428 .
2019-01-03 17:19:05 +11:00
Campbell Barton
d28b29d428
GPU: add negated normal conversion functions
...
Saves having to negate to a temporary variable.
2019-01-03 16:56:16 +11:00
mano-wii
945007b32e
Fix T59773: Raise exception if the gpu module is used in backgound mode.
...
Instead of crashing, an error message is displayed if a function of the gpu module is called without a GPU context.
Reviewers: brecht, campbellbarton, JacquesLucke, mont29
Subscribers: abdelmatinboulbayam, amir.shehata
Differential Revision: https://developer.blender.org/D4143
2019-01-02 10:01:46 -02:00
Campbell Barton
543ddbe6bf
Cleanup: warnings (clang)
2018-12-30 15:15:05 +11:00
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
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