Miguel Pozo
bd1f4ec23c
Fix: GPU: CPP shader errors in VS2019
...
Continuation of #131332 .
Including built-in headers in VS2019 ends up including `corecrt_math.h`
as a side effect, which has many functions that overlap in name with
our stubs.
This puts the conflicting functions inside its own namespace (`glsl`)
and declares macros for them.
(Note this has the side effect of not allowing us to use those as
variable names)
This also removes the `<cassert>` and `<cstdio>` includes.
Pull Request: https://projects.blender.org/blender/blender/pulls/131386
2024-12-04 18:03:42 +01:00
Clément Foucault
2c3ccdf77a
GPU: GLSL compilation as C++ for eevee static shaders
...
Rel #127983
Pull Request: https://projects.blender.org/blender/blender/pulls/130298
2024-12-02 21:26:15 +01:00
Clément Foucault
e44ae763bc
GPU: GLSL C++ Stubs: Add minor missing features
2024-11-30 10:20:37 +01:00
Clément Foucault
bda911bcaa
GPU: GLSL C++ Stub: Add packed type and small types
2024-11-29 21:33:06 +01:00
Clément Foucault
6332be9700
GPU: C++ GLSL Stubs: Use unions instead of inheritance for swizzle
...
This avoid stack overflow on GCC because types were getting too
large (70 bytes for a float4) and created a lot of static
memory for UBOs declarations.
2024-11-29 12:00:01 +01:00
Clément Foucault
95233986cb
GPU: C++ GLSL Stubs: Add atomic sampler
2024-11-29 10:19:23 +01:00
Clément Foucault
c1bc1ef3ea
GPU: C++ GLSL Stubs: Fix isinf / isnan
2024-11-29 00:37:45 +01:00
Clément Foucault
b39843e7b0
GPU: Use extern for non static expressions and use non zero value for gl_WorkGroupSize
...
Pull Request: https://projects.blender.org/blender/blender/pulls/131064
2024-11-28 23:23:30 +01:00
Clément Foucault
dd480ab604
GPU: Refactor the GLSL C++ stub swizzle implementation
...
This removes support for nested swizzling but avoid
warning about static member accesses through class
instance.
2024-11-28 23:23:27 +01:00
Clément Foucault
94d2a1e6a2
GPU: GLSL CPP stubs: Allow printf in code
2024-11-17 19:17:12 +01:00
Clément Foucault
c0c816f846
GPU: GLSL compilation as C++ for workbench static shaders
2024-11-14 23:15:06 +01:00
Clément Foucault
1aea4fb5c7
GPU: GLSL C++ shaders: Silence unuseful warnings
2024-11-13 12:37:00 +01:00
Clément Foucault
29b3df7504
GPU: GLSL compilation as C++ for draw intern shaders
...
Allow compilation of shaders using C++ for linting and
IDE support.
Related #127983
Pull Request: https://projects.blender.org/blender/blender/pulls/130193
2024-11-13 12:32:39 +01:00
Clément Foucault
091004f1b8
GPU: GLSL compilation as C++ for gpu static shaders
...
Allow compilation of shaders using C++ for linting and
IDE support.
Related #127983
Pull Request: https://projects.blender.org/blender/blender/pulls/128724
2024-11-12 18:53:34 +01:00
Clément Foucault
4416e27b14
GPU: GLSL C++ stubs: Add support for depth and buffer sampler fetch
2024-11-08 00:28:59 +01:00
Clément Foucault
94a5f541c3
GPU: Improve GLSL-C++ compatibility
...
Add a few missing operator/functions and fix some argument
type deduction problems.
2024-11-05 00:39:10 +01:00
Clément Foucault
d9ff375e7e
GPU: GLSL-C++ Stubs: Make compilation possible
...
- Add `main` workaournd.
- Define out create info class when compiling with stubs.
- Move interfaces and info namespace to global namespace.
2024-11-01 23:38:22 +01:00
Clément Foucault
0deec1005c
GPU: Remove some warnings and errors in GLSL C++ Stubs
2024-10-31 10:18:32 +01:00
Campbell Barton
2e881eacd1
Cleanup: spelling in comments
2024-10-08 09:54:29 +11:00
Clément Foucault
dcd80dbe15
GPU: GLSL C++ stubs
...
Allows to compile GLSL code using a C++ compiler. The end result is that
IDE features such as autocompletion and error detection can work with
the GLSL codebase.
Rel #127983
Pull Request: https://projects.blender.org/blender/blender/pulls/128598
2024-10-04 17:44:24 +02:00