From 9bc47ed0f6d0db9e43af30c741a7e5ac347cbecd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 21 Jan 2019 23:51:34 +1100 Subject: Fix clipping shaders with some AMD/Intel drivers Caused: error: unsized array index must be constant Use hard coded number of clipping planes, copying the 4th to 5 & 6 when only 4 are used. --- source/blender/draw/intern/draw_common.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source/blender/draw/intern/draw_common.c') diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 250b0a1f1ab..bb247832d44 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -302,7 +302,6 @@ void DRW_shgroup_world_clip_planes_from_rv3d(DRWShadingGroup *shgrp, const Regio { int world_clip_planes_len = (rv3d->viewlock & RV3D_BOXCLIP) ? 4 : 6; DRW_shgroup_uniform_vec4(shgrp, "WorldClipPlanes", rv3d->clip[0], world_clip_planes_len); - DRW_shgroup_uniform_int_copy(shgrp, "WorldClipPlanesLen", world_clip_planes_len); DRW_shgroup_state_enable(shgrp, DRW_STATE_CLIP_PLANES); } -- cgit v1.2.3