Re: [Mesa-dev] [PATCH 2/2] glsl: don't run intrastage array validation when the interface type is not an array
On 01.12.2017 08:20, Samuel Iglesias Gonsálvez wrote: On Thu, 2017-11-30 at 15:47 +0100, Nicolai Hähnle wrote: Can you add an explanation / spec quote for this? Yes. "We validate that the interface block array type's definition matches. However, the function could be previously called if an non-array interface block has different type definitions -for example, when the precision qualifier differs in a GLSL ES shader, we would create two different types-, and it would return invalid as both definitions are non-arrays. We fix this by specifying that at least one definition should be an array to call the validation." Does it sound good to you? Yes, thanks. R-b with that. Cheers, Nicolai Sam On 09.11.2017 12:48, Samuel Iglesias Gonsálvez wrote: Signed-off-by: Samuel Iglesias Gonsálvez--- src/compiler/glsl/link_interface_blocks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/link_interface_blocks.cpp b/src/compiler/glsl/link_interface_blocks.cpp index c2c3b58f821..ce90d916075 100644 --- a/src/compiler/glsl/link_interface_blocks.cpp +++ b/src/compiler/glsl/link_interface_blocks.cpp @@ -137,7 +137,7 @@ intrastage_match(ir_variable *a, /* If a block is an array then it must match across the shader. * Unsized arrays are also processed and matched agaist sized arrays. */ - if (b->type != a->type && + if (b->type != a->type && (b->type->is_array() || a->type- is_array()) && (b->is_interface_instance() || a->is_interface_instance()) && !validate_intrastage_arrays(prog, b, a)) return false; -- 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 2/2] glsl: don't run intrastage array validation when the interface type is not an array
On Thu, 2017-11-30 at 15:47 +0100, Nicolai Hähnle wrote: > Can you add an explanation / spec quote for this? > Yes. "We validate that the interface block array type's definition matches. However, the function could be previously called if an non-array interface block has different type definitions -for example, when the precision qualifier differs in a GLSL ES shader, we would create two different types-, and it would return invalid as both definitions are non-arrays. We fix this by specifying that at least one definition should be an array to call the validation." Does it sound good to you? Sam > On 09.11.2017 12:48, Samuel Iglesias Gonsálvez wrote: > > Signed-off-by: Samuel Iglesias Gonsálvez> > --- > > src/compiler/glsl/link_interface_blocks.cpp | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/compiler/glsl/link_interface_blocks.cpp > > b/src/compiler/glsl/link_interface_blocks.cpp > > index c2c3b58f821..ce90d916075 100644 > > --- a/src/compiler/glsl/link_interface_blocks.cpp > > +++ b/src/compiler/glsl/link_interface_blocks.cpp > > @@ -137,7 +137,7 @@ intrastage_match(ir_variable *a, > > /* If a block is an array then it must match across the > > shader. > > * Unsized arrays are also processed and matched agaist sized > > arrays. > > */ > > - if (b->type != a->type && > > + if (b->type != a->type && (b->type->is_array() || a->type- > > >is_array()) && > > (b->is_interface_instance() || a->is_interface_instance()) > > && > > !validate_intrastage_arrays(prog, b, a)) > > return false; > > > > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH 2/2] glsl: don't run intrastage array validation when the interface type is not an array
Can you add an explanation / spec quote for this? On 09.11.2017 12:48, Samuel Iglesias Gonsálvez wrote: Signed-off-by: Samuel Iglesias Gonsálvez--- src/compiler/glsl/link_interface_blocks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/link_interface_blocks.cpp b/src/compiler/glsl/link_interface_blocks.cpp index c2c3b58f821..ce90d916075 100644 --- a/src/compiler/glsl/link_interface_blocks.cpp +++ b/src/compiler/glsl/link_interface_blocks.cpp @@ -137,7 +137,7 @@ intrastage_match(ir_variable *a, /* If a block is an array then it must match across the shader. * Unsized arrays are also processed and matched agaist sized arrays. */ - if (b->type != a->type && + if (b->type != a->type && (b->type->is_array() || a->type->is_array()) && (b->is_interface_instance() || a->is_interface_instance()) && !validate_intrastage_arrays(prog, b, a)) return false; -- 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
[Mesa-dev] [PATCH 2/2] glsl: don't run intrastage array validation when the interface type is not an array
Signed-off-by: Samuel Iglesias Gonsálvez--- src/compiler/glsl/link_interface_blocks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/glsl/link_interface_blocks.cpp b/src/compiler/glsl/link_interface_blocks.cpp index c2c3b58f821..ce90d916075 100644 --- a/src/compiler/glsl/link_interface_blocks.cpp +++ b/src/compiler/glsl/link_interface_blocks.cpp @@ -137,7 +137,7 @@ intrastage_match(ir_variable *a, /* If a block is an array then it must match across the shader. * Unsized arrays are also processed and matched agaist sized arrays. */ - if (b->type != a->type && + if (b->type != a->type && (b->type->is_array() || a->type->is_array()) && (b->is_interface_instance() || a->is_interface_instance()) && !validate_intrastage_arrays(prog, b, a)) return false; -- 2.13.6 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev