GPU: GLSL-C++ compilation stubs #4

Closed
Clément Foucault wants to merge 38 commits from glsl-cpp-stubs-2 into glsl-include

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 9 additions and 2 deletions
Showing only changes of commit e145811e71 - Show all commits

View File

@ -28,7 +28,9 @@
* NOTE: You can use bool type using bool32_t a int boolean type matching the GLSL type. * NOTE: You can use bool type using bool32_t a int boolean type matching the GLSL type.
*/ */
#ifdef GPU_SHADER #ifdef GLSL_CPP_STUBS
/* Do nothing. */
#elif defined(GPU_SHADER)
/* Silence macros when compiling for shaders. */ /* Silence macros when compiling for shaders. */
# define BLI_STATIC_ASSERT(cond, msg) # define BLI_STATIC_ASSERT(cond, msg)
# define BLI_STATIC_ASSERT_ALIGN(type_, align_) # define BLI_STATIC_ASSERT_ALIGN(type_, align_)

View File

@ -759,8 +759,10 @@ void groupMemoryBarrier() {}
/** \} */ /** \} */
#define GLSL_CPP_STUBS
/* Include all shader shared files to that custom type definitions are available when create infos /* Include all shader shared files to that custom type definitions are available when create infos
* macros are included. */ * macros are included. Include them here so that only including this file is needed. */
#include "GPU_shader_shared.hh" #include "GPU_shader_shared.hh"
#include "draw_common_shader_shared.hh" #include "draw_common_shader_shared.hh"
#include "draw_shader_shared.hh" #include "draw_shader_shared.hh"
@ -768,3 +770,6 @@ void groupMemoryBarrier() {}
#include "overlay_shader_shared.h" #include "overlay_shader_shared.h"
#include "select_shader_shared.hh" #include "select_shader_shared.hh"
#include "workbench_shader_shared.h" #include "workbench_shader_shared.h"
/* TODO(fclem): Include all create infos here so that they don't need to be individually included
* inside shaders. */