Re: [Mesa-dev] [PATCH] glsl: Allow explicit binding on atomics again

2014-04-18 Thread Kenneth Graunke
On 04/12/2014 12:44 AM, Chris Forbes wrote:
 As of 943b2d52bf5, layout(binding) on an atomic would fail the assertion
 here.
 
 Signed-off-by: Chris Forbes chr...@ijw.co.nz
 Cc: Ian Romanick ian.d.roman...@intel.com
 ---
  src/glsl/link_uniform_initializers.cpp | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/src/glsl/link_uniform_initializers.cpp 
 b/src/glsl/link_uniform_initializers.cpp
 index e60bb64..2100e05 100644
 --- a/src/glsl/link_uniform_initializers.cpp
 +++ b/src/glsl/link_uniform_initializers.cpp
 @@ -296,8 +296,10 @@ link_set_uniform_initializers(struct gl_shader_program 
 *prog)
linker::set_block_binding(prog, iface_type-name,
  var-data.binding);
 }
 +} else if (type-contains_atomic()) {
 +   /* we don't actually need to do anything. */
  } else {
 -   assert(!Explicit binding not on a sampler or UBO.);
 +   assert(!Explicit binding not on a sampler, UBO or atomic.);
  }
   } else if (var-constant_value) {
  linker::set_uniform_initializer(mem_ctx, prog, var-name,
 

I went ahead and pushed this with:
Reviewed-by: Kenneth Graunke kenn...@whitecape.org

I'm not entirely clear why nothing needs to happen, but we've always
done nothing here, and all of our tests worked.  This fixes a regression
and gets all of our tests working again, and it's been a week, and
nobody more knowledgeable stepped up to review it...so...pushed.

Thanks for the fix, Chris.



signature.asc
Description: OpenPGP digital signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] glsl: Allow explicit binding on atomics again

2014-04-17 Thread Carl Worth
Chris Forbes chr...@ijw.co.nz writes:
 As of 943b2d52bf5, layout(binding) on an atomic would fail the assertion
 here.

 Signed-off-by: Chris Forbes chr...@ijw.co.nz
 Cc: Ian Romanick ian.d.roman...@intel.com

Tested-by: Carl Worth cwo...@cworth.org

(That is, on my Intel laptop this patch fixes all the regressions I saw
on 10.1 and otherwise passes all piglit tests just fine.)

Ian, if you're good with this patch, then we can land it in master and
10.1 and finally cut the 10.1.1 release.

-Carl

-- 
carl.d.wo...@intel.com


pgp8HT3_ZLQ3h.pgp
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] glsl: Allow explicit binding on atomics again

2014-04-12 Thread Chris Forbes
As of 943b2d52bf5, layout(binding) on an atomic would fail the assertion
here.

Signed-off-by: Chris Forbes chr...@ijw.co.nz
Cc: Ian Romanick ian.d.roman...@intel.com
---
 src/glsl/link_uniform_initializers.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/glsl/link_uniform_initializers.cpp 
b/src/glsl/link_uniform_initializers.cpp
index e60bb64..2100e05 100644
--- a/src/glsl/link_uniform_initializers.cpp
+++ b/src/glsl/link_uniform_initializers.cpp
@@ -296,8 +296,10 @@ link_set_uniform_initializers(struct gl_shader_program 
*prog)
   linker::set_block_binding(prog, iface_type-name,
 var-data.binding);
}
+} else if (type-contains_atomic()) {
+   /* we don't actually need to do anything. */
 } else {
-   assert(!Explicit binding not on a sampler or UBO.);
+   assert(!Explicit binding not on a sampler, UBO or atomic.);
 }
  } else if (var-constant_value) {
 linker::set_uniform_initializer(mem_ctx, prog, var-name,
-- 
1.9.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev