GPU: Shader Create Info GLSL-C++ stubs #3

Closed
Clément Foucault wants to merge 90 commits from create-info-cpp-macros into glsl-include

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 6f6493ba3e - Show all commits

View File

@ -8,7 +8,14 @@
* language.
*/
#ifndef USE_GPU_SHADER_CREATE_INFO
/* __cplusplus is true when compiling with MSL, so ensure we are not inside a shader. */
#if defined(GPU_SHADER) || defined(GLSL_CPP_STUBS)
# define IS_CPP 0
#else
# define IS_CPP 1
#endif
#if IS_CPP
# pragma once
# include "BLI_math_bits.h"
@ -34,13 +41,6 @@ constexpr GPUSamplerState no_filter = GPUSamplerState::default_sampler();
constexpr GPUSamplerState with_filter = {GPU_SAMPLER_FILTERING_LINEAR};
#endif
/* __cplusplus is true when compiling with MSL, so ensure we are not inside a shader. */
#ifdef GPU_SHADER
# define IS_CPP 0
#else
# define IS_CPP 1
#endif
/** WORKAROUND(@fclem): This is because this file is included before common_math_lib.glsl. */
#ifndef M_PI
# define EEVEE_PI