Campbell Barton
744f633986
Cleanup: trailing commas
...
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton
65ec7ec524
Cleanup: remove redundant, invalid info from headers
...
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-02-02 01:36:28 +11:00
Campbell Barton
293f4d88da
Cleanup: style, unused variable
2019-01-31 15:54:37 +11:00
Campbell Barton
68cab3aff6
Cleanup: replace attrib w/ attr
...
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
2019-01-29 08:32:25 +11:00
Campbell Barton
c0f88ed8a8
Cleanup: sort forward declarations of enum & struct
...
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Campbell Barton
f20dbc293f
Cleanup: blank lines over doxy headers
2019-01-26 21:43:24 +11:00
Campbell Barton
1e4aab36c2
Cleanup: remove redundant BKE/BLI/BIF headers
2019-01-26 21:20:25 +11:00
Campbell Barton
b8467273b8
Cleanup: redundant defines
...
Comment or remove unused defines.
2019-01-26 19:15:30 +11:00
Campbell Barton
1b6da95ccb
Cleanup: avoid static vars to store legacy shaders
2019-01-26 10:33:14 +11:00
Campbell Barton
1393335227
GPU: refactor defines into GPUShaderStages
...
Code comment notes there are "just a few",
now there are enough it's useful to include in GPUShaderStages.
2019-01-26 10:33:14 +11:00
Campbell Barton
0e95abf74b
Cleanup: order GPUShaderStages (vert, geom, frag)
...
Use names for declarations to support adding defines, coming next.
2019-01-26 10:33:14 +11:00
Clément Foucault
aae2bf7735
T60745: GPU texture alloc failed when opening Preference Windows
...
Was generating INVALID_FRAMEBUFFER here instead of failled texture alloc.
Add safety asserts in gpu_texture.c and clamp minimum size to 1 inside
GPU_offscreen_create.
2019-01-25 15:02:30 +01:00
Campbell Barton
48eed058b1
3D View: draw clipping region
...
Only for workbench solid/wire modes.
2019-01-23 23:37:25 +11:00
Campbell Barton
2e4f1b592f
Cleanup: use eGPU prefix for GPU enum types
2019-01-23 14:16:03 +11:00
Clément Foucault
ba4de7f1a5
GPUShader: Add GPU_VERTEX/FRAGMENT/GEOMETRY_SHADER defines
...
This makes it possible to have some code specific to each shader inside a
shader library.
2019-01-21 12:54:41 +01:00
Campbell Barton
dd3f518626
Cleanup: rename GPU function to set buffer length
2019-01-21 11:28:41 +11:00
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