diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-07-24 17:50:31 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-07-24 17:51:01 +0300 |
commit | c924f6f53f13fb55f76b878dbf5d69d60f9d64c2 (patch) | |
tree | 41c4d99ec12050e6883e8d4ff9cee4cb42d12283 /source/blender/draw/engines/workbench/workbench_deferred.c | |
parent | 7f7e51161f65c371d0f0c6c39bd32cbea45694cd (diff) |
Workbench: Fix missing geometry on Iris 640/630 GPUs
For some reason 32c5972653041a3423122b5a5ae791ef536b87ed broke display of
solid meshes in workbench.
After some investigation, it seems that the vertex coordinate output is
degenerated even if the input is correct and the matrix too.
Removing dead code seems to fix the problem. So maybe the GLSL preprocessor
is not doing what it should?
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_deferred.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_deferred.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_deferred.c b/source/blender/draw/engines/workbench/workbench_deferred.c index 4e90a08a543..23fbbe56c16 100644 --- a/source/blender/draw/engines/workbench/workbench_deferred.c +++ b/source/blender/draw/engines/workbench/workbench_deferred.c @@ -142,9 +142,12 @@ static char *workbench_build_prepass_frag(void) return str; } -static char *workbench_build_prepass_vert(void) +static char *workbench_build_prepass_vert(bool is_hair) { char *str = NULL; + if (!is_hair) { + return BLI_strdup(datatoc_workbench_prepass_vert_glsl); + } DynStr *ds = BLI_dynstr_new(); @@ -176,7 +179,7 @@ static void ensure_deferred_shaders(WORKBENCH_PrivateData *wpd, int index, bool if (e_data.prepass_sh_cache[index] == NULL) { char *defines = workbench_material_build_defines(wpd, use_textures, is_hair); char *composite_frag = workbench_build_composite_frag(wpd); - char *prepass_vert = workbench_build_prepass_vert(); + char *prepass_vert = workbench_build_prepass_vert(is_hair); char *prepass_frag = workbench_build_prepass_frag(); e_data.prepass_sh_cache[index] = DRW_shader_create( prepass_vert, NULL, |