[Piglit] [PATCH 05/10] arb_enhanced_layouts: correct component usage with dvec{3, 4} tests
Timothy Arceri
tarceri at itsqueeze.com
Fri Feb 1 23:44:48 UTC 2019
Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
On 2/2/19 4:55 am, Andres Gomez wrote:
> There was a pre-existing test using "component = 0" with dvec3 which
> was not failing as it should. This was because the other tests
> checking for the usage of the component keyword with dvec3 and dvec4
> were failing due to a different restriction: the component sequence
> was overflowing 3 and/or a double based type was using component 1 o
> 3.
>
> Now we fix them by using "component = 0" when need to fail and
> removing the keyword when need to succeed.
>
> From Section 4.4.1 (Input Layout Qualifiers) of the GLSL 4.50 spec:
>
> " It is a compile-time error if this sequence of components gets
> larger than 3. A scalar double will consume two of these
> components, and a dvec2 will consume all four components available
> within a location. A dvec3 or dvec4 can only be declared without
> specifying a component."
>
> ...
>
> " It is a compile-time error to use component 1 or 3 as the
> beginning of a double or dvec2."
>
> Cc: Timothy Arceri <tarceri at itsqueeze.com>
> Cc: Kenneth Graunke <kenneth at whitecape.org>
> Signed-off-by: Andres Gomez <agomez at igalia.com>
> ---
> .../arb_enhanced_layouts/compiler/component-layout/dvec3.vert | 2 +-
> .../arb_enhanced_layouts/compiler/component-layout/dvec4.vert | 2 +-
> .../execution/component-layout/vs-fs-array-dvec3.shader_test | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert
> index 84eaf3ef7..fcb2a5284 100644
> --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert
> +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec3.vert
> @@ -13,7 +13,7 @@
> #extension GL_ARB_gpu_shader_fp64: require
> #extension GL_ARB_separate_shader_objects: require
>
> -layout(location = 0, component = 1) out dvec3 b;
> +layout(location = 0, component = 0) out dvec3 b;
>
> void main()
> {
> diff --git a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert
> index 3c6216310..78696f18d 100644
> --- a/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert
> +++ b/tests/spec/arb_enhanced_layouts/compiler/component-layout/dvec4.vert
> @@ -13,7 +13,7 @@
> #extension GL_ARB_gpu_shader_fp64: require
> #extension GL_ARB_separate_shader_objects: require
>
> -layout(location = 0, component = 1) out dvec4 b;
> +layout(location = 0, component = 0) out dvec4 b;
>
> void main()
> {
> diff --git a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test
> index de348cbb3..ebd18ad5d 100644
> --- a/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test
> +++ b/tests/spec/arb_enhanced_layouts/execution/component-layout/vs-fs-array-dvec3.shader_test
> @@ -13,7 +13,7 @@ GL_ARB_gpu_shader_fp64
> #extension GL_ARB_gpu_shader_fp64: require
>
> // XYZW components of 0 & 2, XY components of 1 & 3
> -layout(location = 0, component = 0) flat out dvec3 a[2];
> +layout(location = 0) flat out dvec3 a[2];
>
> // ZW component of 1
> layout(location = 1, component = 2) flat out double b;
> @@ -38,7 +38,7 @@ void main()
> out vec4 color;
>
> // XYZW components of 0 & 2, XY components of 1 & 3
> -layout(location = 0, component = 0) flat in dvec3 a[2];
> +layout(location = 0) flat in dvec3 a[2];
>
> // ZW component of 1
> layout(location = 1, component = 2) flat in double b;
>
More information about the Piglit
mailing list