mesa: make union in gl_program a struct and add FIXME
authorTimothy Arceri <timothy.arceri@collabora.com>
Fri, 30 Dec 2016 20:45:35 +0000 (07:45 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Fri, 30 Dec 2016 22:00:05 +0000 (09:00 +1100)
i915 is mixing the use of these fields, for now change this to a
struct and add a FIXME.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99229

src/mesa/main/mtypes.h

index 69d2eee..39ae667 100644 (file)
@@ -1945,7 +1945,11 @@ struct gl_program
    /** Map from sampler unit to texture unit (set by glUniform1i()) */
    GLubyte SamplerUnits[MAX_SAMPLERS];
 
-   union {
+   /* FIXME: We should be able to make this struct a union. However some
+    * drivers (i915/fragment_programs, swrast/prog_execute) mix the use of
+    * these fields, we should fix this.
+    */
+   struct {
       /** Fields used by GLSL programs */
       struct {
          struct gl_active_atomic_buffer **AtomicBuffers;