glsl: keep track of intra-stage indices for atomics
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 26 Oct 2015 19:58:15 +0000 (06:58 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Mon, 26 Oct 2015 20:03:05 +0000 (07:03 +1100)
commita3d0359aff7a9be90149c416844f330b4f9a15ed
tree8223f873bd216747a5df731094b7793efe341049
parent711489648bcce5cd8fcf14e73e5affe069010c01
glsl: keep track of intra-stage indices for atomics

This is more optimal as it means we no longer have to upload the same set
of ABO surfaces to all stages in the program.

This also fixes a bug where since commit c0cd5b var->data.binding was
being used as a replacement for atomic buffer index, but they don't have
to be the same value they just happened to end up the same when binding is 0.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Alejandro Piñeiro <apinheiro@igalia.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90175
src/glsl/link_atomics.cpp
src/glsl/nir/glsl_to_nir.cpp
src/glsl/nir/nir.h
src/glsl/nir/nir_lower_atomics.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_gs_surface_state.c
src/mesa/drivers/dri/i965/brw_nir.c
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_vs_surface_state.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/main/mtypes.h