On Sat, Jul 25, 2015 at 4:24 PM, Timothy Arceri <[email protected]> wrote:
> 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 happen to end up the same when binding is 0.
>
> Now we store atomic buffer index in the unused var->data.index
> to avoid the extra memory of putting back the atmoic buffer index field.
>
> V2: store buffer index in var->data.index and uniform slot in
> var->data.location to avoid issues when linking more than 2 shaders.
> Also some small tidy ups.
>
> Cc: Alejandro Piñeiro <[email protected]>
> Cc: Ian Romanick <[email protected]>
> Cc: 10.4, 10.5 <[email protected]>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90175
> ---
>  src/glsl/ir.h                                  |  3 +++
>  src/glsl/link_atomics.cpp                      | 18 +++++++-----------
>  src/glsl/link_uniforms.cpp                     |  4 ++++
>  src/glsl/nir/glsl_to_nir.cpp                   |  2 --
>  src/glsl/nir/nir.h                             |  6 ++++--
>  src/glsl/nir/nir_lower_atomics.c               |  2 +-
>  src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp |  2 +-
>  7 files changed, 20 insertions(+), 17 deletions(-)
>
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
> index 62cdbd4..d97db68 100644
> --- a/src/glsl/nir/nir.h
> +++ b/src/glsl/nir/nir.h
> @@ -307,7 +310,6 @@ typedef struct {
>         * Location an atomic counter is stored at.
>         */
>        struct {
> -         unsigned buffer_index;
>           unsigned offset;
>        } atomic;

This smells a bit like the struct should be nuked all together...
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to