diff mbox

glsl-1.50: test shader compiles with unused uniform block

Message ID 1442979414-23118-1-git-send-email-t_arceri@yahoo.com.au
State New
Headers show

Commit Message

'Timothy Arceri' via Patchwork Forward Sept. 23, 2015, 3:36 a.m. UTC
Tests the second bug mentioned in the bug report.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83508
---
 .../uniform_block/unused-interface-array.vert         | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert

Comments

Samuel Iglesias Gonsálvez Sept. 23, 2015, 10:27 a.m. UTC | #1
Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>

On 23/09/15 05:36, Timothy Arceri wrote:
> Tests the second bug mentioned in the bug report.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83508
> ---
>  .../uniform_block/unused-interface-array.vert         | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>  create mode 100644 tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
> 
> diff --git a/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
> new file mode 100644
> index 0000000..e28ffe9
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
> @@ -0,0 +1,19 @@
> +/* [config]
> + * expect_result: pass
> + * glsl_version: 1.50
> + * [end config]
> + * 
> + * Tests that shader still compiles with an unused uniform block. A packed
> + * layout means the implementation can eliminate the block entirely.
> + */
> +#version 150
> +
> +layout(packed) uniform ArrayBlock
> +{
> +  mat4 a;
> +} i[4];
> +
> +void main()
> +{
> +  gl_Position = vec4(1.0);
> +}
>
Tapani Pälli Sept. 23, 2015, 12:29 p.m. UTC | #2
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>

On 09/23/2015 06:36 AM, Timothy Arceri wrote:
> Tests the second bug mentioned in the bug report.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83508
> ---
>   .../uniform_block/unused-interface-array.vert         | 19 +++++++++++++++++++
>   1 file changed, 19 insertions(+)
>   create mode 100644 tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
>
> diff --git a/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
> new file mode 100644
> index 0000000..e28ffe9
> --- /dev/null
> +++ b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
> @@ -0,0 +1,19 @@
> +/* [config]
> + * expect_result: pass
> + * glsl_version: 1.50
> + * [end config]
> + *
> + * Tests that shader still compiles with an unused uniform block. A packed
> + * layout means the implementation can eliminate the block entirely.
> + */
> +#version 150
> +
> +layout(packed) uniform ArrayBlock
> +{
> +  mat4 a;
> +} i[4];
> +
> +void main()
> +{
> +  gl_Position = vec4(1.0);
> +}
diff mbox

Patch

diff --git a/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
new file mode 100644
index 0000000..e28ffe9
--- /dev/null
+++ b/tests/spec/glsl-1.50/compiler/uniform_block/unused-interface-array.vert
@@ -0,0 +1,19 @@ 
+/* [config]
+ * expect_result: pass
+ * glsl_version: 1.50
+ * [end config]
+ * 
+ * Tests that shader still compiles with an unused uniform block. A packed
+ * layout means the implementation can eliminate the block entirely.
+ */
+#version 150
+
+layout(packed) uniform ArrayBlock
+{
+  mat4 a;
+} i[4];
+
+void main()
+{
+  gl_Position = vec4(1.0);
+}