Re: [Mesa-dev] [PATCH v2 26/31] glsl: allow bindless samplers/images to be used with constructors

2017-04-26 Thread Nicolai Hähnle

With Timothy's suggestion, patches 24-26:

Reviewed-by: Nicolai Hähnle 

On 24.04.2017 12:35, Samuel Pitoiset wrote:

For the explicit conversions.

Signed-off-by: Samuel Pitoiset 
---
 src/compiler/glsl/ast_function.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_function.cpp 
b/src/compiler/glsl/ast_function.cpp
index 6ec5eda043..9aac9c51e4 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1969,7 +1969,8 @@ ast_function_expression::hir(exec_list *instructions,

   /* Constructors for opaque types are illegal.
*/
-  if (constructor_type->contains_opaque()) {
+  if (constructor_type->contains_atomic() ||
+  (!state->has_bindless() && constructor_type->contains_opaque())) {
  _mesa_glsl_error(& loc, state, "cannot construct opaque type `%s'",
   constructor_type->name);
  return ir_rvalue::error_value(ctx);




--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH v2 26/31] glsl: allow bindless samplers/images to be used with constructors

2017-04-25 Thread Timothy Arceri



On 24/04/17 20:35, Samuel Pitoiset wrote:

For the explicit conversions.

Signed-off-by: Samuel Pitoiset 
---
  src/compiler/glsl/ast_function.cpp | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_function.cpp 
b/src/compiler/glsl/ast_function.cpp
index 6ec5eda043..9aac9c51e4 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1969,7 +1969,8 @@ ast_function_expression::hir(exec_list *instructions,
  
/* Constructors for opaque types are illegal.

 */
-  if (constructor_type->contains_opaque()) {
+  if (constructor_type->contains_atomic() ||
+  (!state->has_bindless() && constructor_type->contains_opaque())) {
   _mesa_glsl_error(& loc, state, "cannot construct opaque type `%s'",
constructor_type->name);
   return ir_rvalue::error_value(ctx);


Again please update the comment and make the error message conditionally 
report atmmoc or opaque. With that:


Reviewed-by: Timothy Arceri 


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


[Mesa-dev] [PATCH v2 26/31] glsl: allow bindless samplers/images to be used with constructors

2017-04-24 Thread Samuel Pitoiset
For the explicit conversions.

Signed-off-by: Samuel Pitoiset 
---
 src/compiler/glsl/ast_function.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/glsl/ast_function.cpp 
b/src/compiler/glsl/ast_function.cpp
index 6ec5eda043..9aac9c51e4 100644
--- a/src/compiler/glsl/ast_function.cpp
+++ b/src/compiler/glsl/ast_function.cpp
@@ -1969,7 +1969,8 @@ ast_function_expression::hir(exec_list *instructions,
 
   /* Constructors for opaque types are illegal.
*/
-  if (constructor_type->contains_opaque()) {
+  if (constructor_type->contains_atomic() ||
+  (!state->has_bindless() && constructor_type->contains_opaque())) {
  _mesa_glsl_error(& loc, state, "cannot construct opaque type `%s'",
   constructor_type->name);
  return ir_rvalue::error_value(ctx);
-- 
2.12.2

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