Commit Graph

2339 Commits

Author SHA1 Message Date
Clément Foucault
2d38ff67d3 GPU: Fix compilation error 2020-07-30 17:08:23 +02:00
Clément Foucault
da741013a1 EEVEE: GLSL refactor/cleanup
- add the use of DRWShaderLibrary to EEVEE's glsl codebase to reduce code
complexity and duplication.
- split bsdf_common_lib.glsl into multiple sub library which are now shared
with other engines.
- the surface shader code is now more organised and have its own files.
- change default world to use a material nodetree and make lookdev shader
more clear.

Reviewed By: jbakker

Differential Revision: https://developer.blender.org/D8306
2020-07-30 16:44:58 +02:00
Clément Foucault
19175f4757 GPUBatch & GPUImmediate: Use GPUShader instead of using raw OGL handle 2020-07-30 13:28:50 +02:00
Campbell Barton
dc3baf2c78 Cleanup: spelling 2020-07-30 08:43:40 +10:00
Clément Foucault
486c7b87fb Cleanup: GPU: Remove GPU_draw.h and move fluid gpu function to DRW 2020-07-29 23:21:33 +02:00
Clément Foucault
5f6fb5bb41 Cleanup: Split gpu_texture_image.c into BKE and IMB modules
This is in order to disolve GPU_draw.h into more meaningful code blocks.

All the Image related function are in `image_gpu.c`.
All the MovieClip related function are in `movieclip.c`.

The IMB module now has a connection with GPU. This is not strickly
necessary and the code could be move to `image_gpu.c` if needed.

The Image garbage collection is also ported to `image_gpu.c`.
2020-07-29 23:06:37 +02:00
Clément Foucault
7e8d493730 GPU_draw.h: cleanup before splitting 2020-07-29 23:06:37 +02:00
Clément Foucault
b9c7c904ed GPUShader: Fix linking with MSVC 2020-07-29 16:07:51 +02:00
Clément Foucault
f0687d4665 Cleanup: GPUTexture: Use UNPACK3 in texture_fluid 2020-07-29 15:54:51 +02:00
Clément Foucault
1804a6d040 GPUState: Fix compilation error on MSVC 2020-07-29 15:54:51 +02:00
Clément Foucault
2d89cd7dd5 Cleanup: GPU: Move Image based function to GPU_draw.h
This makes it less confusing what functions are for blender
structures.
2020-07-29 15:54:51 +02:00
Clément Foucault
99d0b3b793 Cleanup: GPU: Rename gpu_texture_smoke to fluid, and move back to C
The file do not have a reason to be C++ anymore.
2020-07-29 15:54:51 +02:00
Clément Foucault
e749643793 GPU: Refactor gpu_texture_image to not use GL calls
This is also a bit of code cleanup, reorganisation.

Tried to be DRYed but avoid too much code change to (hopefully) minimize
breakage.

- GPU: remove TEXTARGET_CUBE_MAP, this is no longer used in the codebase.
- GPUTexture: Move compressed texture upload to gpu_texture.cc
- GPUTexture: Add per texture Anisotropic filtering switch
2020-07-29 15:03:02 +02:00
Clément Foucault
e4ee9de638 GPU: Move gpu_shader.c to C++
We split builtin shader support to its own file to avoid
converting code (lack of designated initializer in C++)
and to reduce file size.
2020-07-29 15:03:02 +02:00
Clément Foucault
18d2db22ff GPU: Move gpu_state.c to C++ 2020-07-29 15:03:02 +02:00
Clément Foucault
45d61bdc03 GPU: Move gpu_texture.c to C++
# Conflicts:
#	source/blender/gpu/GPU_texture.h
2020-07-29 15:03:02 +02:00
Clément Foucault
56d0a554a8 GPU: Move gpu_uniformbuffer.c to C++
This also rewrite and simplify the module a bit.
2020-07-29 15:03:02 +02:00
Clément Foucault
f84342d7e1 GPU: Move gpu_vertex_buffer.c to C++ 2020-07-29 15:03:02 +02:00
Clément Foucault
959529d4b8 GPU: Move gpu_vertex_format.c to C++ 2020-07-29 15:03:02 +02:00
Campbell Barton
dcad6c9db8 Cleanup: correct assert in GPU_offscreen_read_pixels 2020-07-29 10:50:31 +10:00
Campbell Barton
2a52c2d001 Cleanup: spelling, comments 2020-07-28 21:49:37 +10:00
Campbell Barton
b18c376946 Cleanup: quiet warnings without DDS 2020-07-27 21:00:49 +10:00
Clément Foucault
0b04f0e4e6 GPU: Fix crash and missing texture due to recent C++ port
Fix T79306 DRW: small issues with yesterday commits modifying TEXTARGET
Fix T79303 Image texture node crashes EEVEE when connected to a shader output
2020-07-27 13:37:22 +02:00
Clément Foucault
2c2082cc62 GPU: Fix MSVC compile errors 2020-07-26 23:50:29 +02:00
Clément Foucault
54237994d8 Cleanup: Image: Rename redundant enum for clarity 2020-07-26 21:07:25 +02:00
Clément Foucault
487eaeed7e GPUTexture: Replace GL textarget enum by Image enum 2020-07-26 21:07:25 +02:00
Clément Foucault
025dc31d28 GPU: Remove GL constant from BIF_glutil 2020-07-26 21:07:25 +02:00
Clément Foucault
18cca0e704 Cleanup: GPU: Remove GPU_glew.h outside of GPU module
Remove use of GL* constants and types inside the codebase. There is still
a few occurence to get rid of.
2020-07-26 17:29:49 +02:00
Clément Foucault
9e23dbd060 Cleanup: GPU_codegen.c: Use LISTBASE_FOREACH macro instead of for loops 2020-07-26 17:28:48 +02:00
Clément Foucault
15655aa1dd Cleanup: GPU: Remove unused code and header 2020-07-26 17:28:48 +02:00
Clément Foucault
cc7d5e1fe6 GPU: Move gpu_platform.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
c276ef61d4 GPU: Move gpu_immediate.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
b296b68ff2 GPU: Move gpu_framebuffer.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
9905db5557 GPU: Move gpu_extensions.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
7c3eaffbbd GPU: Move gpu_element.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
97b597cd04 GPU: Move and rename gpu_draw*.c to C++
`gpu_draw.c` was a misleading name, `gpu_texture_image.cc` is better
suited.
2020-07-26 17:28:48 +02:00
Clément Foucault
8b7802db85 GPU: Move gpu_debug.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
56803e2754 GPU: Rename gpu_context.cpp to .cc suffix 2020-07-26 17:28:48 +02:00
Clément Foucault
7b4a21077a GPU: Move gpu_batch.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
d3cecc5007 GPU: Move gpu_attr_binding.c to C++ 2020-07-26 17:28:48 +02:00
Clément Foucault
a77175c9b6 GPU: Add extern "C" to intern headers 2020-07-26 17:28:48 +02:00
Campbell Barton
13fa4b9898 Cleanup: remove redundant glReadBuffer call when reading pixels 2020-07-24 19:01:13 +10:00
Germano Cavalcante
b64ae920e4 Fix T79158: Eevee cubemaps shows black
Same as T75943 that was fixed by rBff97545c50f4
2020-07-23 08:41:35 -03:00
Germano Cavalcante
65aba4fc7a Fix T79158: Eevee cubemaps shows black
Same as T75943 that was fixed by rBff97545c50f4
2020-07-23 08:37:41 -03:00
Sebastián Barschkis
62a819202e Fluid: Refactored smoke noise system
This refactor is in response to reports in which the adaptive domain with noise caused a crash (e.g. T79009). It should also fix issues where the smoke appeared to be cut off when using the adaptive domain together with noise. It is also possible that some of these changes improve the lines issue from T74559.
2020-07-20 18:35:52 +02:00
Campbell Barton
8c90910dcc Fix T66937: Blank view on navigation with auto-deph & large clip-end 2020-07-19 21:27:13 +10:00
Campbell Barton
71d0f6f896 Cleanup: spelling 2020-07-19 17:37:02 +10:00
Harley Acheson
c08d847488 UI: Status Bar Statistics and Other Options
Status Bar can show scene statistics, memory usage, version, etc set by context menu. Part two of T75672.

Differential Revision: https://developer.blender.org/D7557

Reviewed by Julian Eisel
2020-07-18 07:49:25 -07:00
Campbell Barton
016253a648 Cleanup: spelling 2020-07-18 14:27:53 +10:00
Clément Foucault
4c28b1c74e Cleanup: GPU: Encapsulate clipDistances
This also remove some non functionnal state changes that were left
from legacy code.
2020-07-18 03:43:52 +02:00