mesa/src
Dave Airlie 8c628ab13e glsl: make max array trackers ints and use -1 as base. (v2)
This fixes a bug that breaks cull distances. The problem
is the max array accessors can't tell the difference between
an never accessed unsized array and an accessed at location 0
unsized array. This leads to converting an undeclared unused
gl_ClipDistance inside or outside gl_PerVertex to a size 1
array. However we need to the number of active clip distances
to work out the starting point for the cull distances, and
this offset by one when it's not being used isn't possible
to distinguish from the case were only the first element is
accessed. I tried to use ->used for this, but that doesn't
work when gl_ClipDistance is part of an interface block.

So this changes things so that max_array_access is an int
and initialised to -1. This also allows unsized arrays to
proceed further than that could before, but we really shouldn't
mind as they will get eliminated if nothing uses them later.

For initialised uniforms we no longer change their array
size at runtime, if these are unused they will get eliminated
eventually.

v2: use ralloc_array (Ilia)

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-05-24 11:27:29 +10:00
..
compiler glsl: make max array trackers ints and use -1 as base. (v2) 2016-05-24 11:27:29 +10:00
egl egl: Add OpenGL_ES to API string regardless of GLES version 2016-05-23 13:46:01 -07:00
gallium gallium: Add a pipe cap for whether primitive restart works for patches. 2016-05-23 16:44:11 -07:00
gbm gbm: remove define _DEFAULT_SOURCE 2016-05-23 12:09:11 +01:00
getopt
glx glxcmds: glXGetFBConfigs, fix screen bounds 2016-05-23 12:07:47 +01:00
gtest
hgl
intel anv/formats: Make alpha blending a property of render targets 2016-05-23 17:26:17 -07:00
loader loader: add a libdrm case for loader_get_device_name_for_fd 2016-04-21 14:41:41 +01:00
mapi mesa: Implement glGet*(GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED). 2016-05-23 16:44:22 -07:00
mesa glsl: make max array trackers ints and use -1 as base. (v2) 2016-05-24 11:27:29 +10:00
util util: Add ATTRIBUTE_RETURNS_NONNULL. 2016-05-16 11:06:15 -07:00
Makefile.am automake: tweak SUBDIR reorder and comment it 2016-05-01 08:38:05 +01:00
SConscript glsl: move to compiler/ 2016-01-26 16:08:33 +00:00