Re: [Piglit] [PATCH] cl: Add tests for function calls

2017-09-18 Thread Jan Vesely
On Mon, 2017-09-18 at 18:53 -0700, Matt Arsenault wrote:
> Passes on ROCm, I haven't tried clover recently. Last
> time I did it errored because the AsmParser wasn't properly
> initialized.
> 
> v2: Fix non-unique test names, Wrap noinline in unguarded macro,
> use prettier test names, use device_regex (effectively restricting to ROCm)

thanks.
Reviewed-by: Jan Vesely 
I want to run this on my carrizo machine before pushing, should be
~wednesday.

Jan

> ---
>  tests/cl/program/execute/call-clobbers-amdgcn.cl |  68 +++
>  tests/cl/program/execute/calls-struct.cl | 179 +++
>  tests/cl/program/execute/calls-workitem-id.cl|  77 +++
>  tests/cl/program/execute/calls.cl| 607 
> +++
>  tests/cl/program/execute/tail-calls.cl   | 305 
>  5 files changed, 1236 insertions(+)
>  create mode 100644 tests/cl/program/execute/call-clobbers-amdgcn.cl
>  create mode 100644 tests/cl/program/execute/calls-struct.cl
>  create mode 100644 tests/cl/program/execute/calls-workitem-id.cl
>  create mode 100644 tests/cl/program/execute/calls.cl
>  create mode 100644 tests/cl/program/execute/tail-calls.cl
> 
> diff --git a/tests/cl/program/execute/call-clobbers-amdgcn.cl 
> b/tests/cl/program/execute/call-clobbers-amdgcn.cl
> new file mode 100644
> index 0..400771795
> --- /dev/null
> +++ b/tests/cl/program/execute/call-clobbers-amdgcn.cl
> @@ -0,0 +1,68 @@
> +/*!
> +
> +[config]
> +name: amdgcn call clobbers
> +clc_version_min: 10
> +device_regex: gfx[\d]*
> +
> +[test]
> +name: callee saved sgpr
> +kernel_name: call_clobber_s40
> +dimensions: 1
> +global_size: 1 0 0
> +arg_out: 0 buffer int[1] 0xabcd1234
> +
> +[test]
> +name: callee saved vgpr
> +kernel_name: call_clobber_v40
> +dimensions: 1
> +global_size: 1 0 0
> +arg_out: 0 buffer int[1] 0xabcd1234
> +
> +!*/
> +
> +#ifndef __AMDGCN__
> +#error This test is only for amdgcn
> +#endif
> +
> +__attribute__((noinline))
> +void clobber_s40()
> +{
> +__asm volatile("s_mov_b32 s40, 0xdead" : : : "s40");
> +}
> +
> +kernel void call_clobber_s40(__global int* ret)
> +{
> +__asm volatile("s_mov_b32 s40, 0xabcd1234" : : : "s40");
> +
> +clobber_s40();
> +
> +int tmp;
> +
> +__asm volatile("v_mov_b32 %0, s40"
> +  : "=v"(tmp)
> +  :
> +  : "s40");
> +*ret = tmp;
> +}
> +
> +__attribute__((noinline))
> +void clobber_v40()
> +{
> +__asm volatile("v_mov_b32 v40, 0xdead" : : : "v40");
> +}
> +
> +kernel void call_clobber_v40(__global int* ret)
> +{
> +__asm volatile("v_mov_b32 v40, 0xabcd1234" : : : "v40");
> +
> +clobber_v40();
> +
> +int tmp;
> +__asm volatile("v_mov_b32 %0, v40"
> +  : "=v"(tmp)
> +  :
> +  : "v40");
> +*ret = tmp;
> +}
> +
> diff --git a/tests/cl/program/execute/calls-struct.cl 
> b/tests/cl/program/execute/calls-struct.cl
> new file mode 100644
> index 0..04f769dac
> --- /dev/null
> +++ b/tests/cl/program/execute/calls-struct.cl
> @@ -0,0 +1,179 @@
> +/*!
> +
> +[config]
> +name: calls with structs
> +clc_version_min: 10
> +
> +[test]
> +name: byval struct
> +kernel_name: call_i32_func_byval_Char_IntArray
> +dimensions: 1
> +global_size: 16 0 0
> +
> +arg_out: 0 buffer int[16]\
> + 1021 1022 1023 1024 1025 1026 1027 1028 \
> + 1029 1030 1031 1032 1033 1034 1035 1036
> +
> +arg_out: 1 buffer int[16] \
> +  14   14   14   14 \
> +  14   14   14   14 \
> +  14   14   14   14 \
> +  14   14   14   14 \
> +
> +arg_in: 2 buffer int[16] \
> + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> +
> +
> +[test]
> +name: sret struct
> +kernel_name: call_sret_Char_IntArray_func
> +dimensions: 1
> +global_size: 16 0 0
> +
> +arg_out: 0 buffer int[16]\
> + 921 922 923 924 925 926 927 928 \
> + 929 930 931 932 933 934 935 936
> +
> +arg_in: 1 buffer int[16] \
> + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> +
> +
> +[test]
> +name: byval struct and sret struct
> +kernel_name: call_sret_Char_IntArray_func_byval_Char_IntArray
> +dimensions: 1
> +global_size: 16 0 0
> +
> +arg_out: 0 buffer int[16]\
> +  86 87 88 89   \
> +  90 91 92 93   \
> +  94 95 96 97   \
> +  98 99 100 101
> +
> +arg_out: 1 buffer int[16]\
> +  134  135  136  137  \
> +  138  139  140  141  \
> +  142  143  144  145  \
> +  146  147  148  149
> +
> +arg_in: 2 buffer int[16] \
> + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
> +
> +!*/
> +
> +#define NOINLINE __attribute__((noinline))
> +
> +typedef struct ByVal_Char_IntArray {
> +char c;
> +int i[4];
> +} ByVal_Char_IntArray;
> +
> +NOINLINE
> +int i32_func_byval_Char_IntArray(ByVal_Char_IntArray st)
> +{
> +st.i[0] += 100;
> +
> +int sum = 0;
> +for (int i = 0; i < 4; ++i)
> +{
> +sum += st.i[i];
> +}
> +
> +sum += st.c;
> +return sum;
> +}
> +
> +kernel void call_i32_func_byval_Char_IntArray(global int* out0,
> +  

Re: [Piglit] [PATCH] cl: Fix device_regex feature

2017-09-18 Thread Jan Vesely
On Mon, 2017-09-18 at 18:29 -0700, Matt Arsenault wrote:
> ---
>  tests/cl/program/program-tester.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/cl/program/program-tester.c 
> b/tests/cl/program/program-tester.c
> index 1a876101d..a4abed9ee 100644
> --- a/tests/cl/program/program-tester.c
> +++ b/tests/cl/program/program-tester.c
> @@ -1703,7 +1703,7 @@ parse_config(const char* config_str,
>   } else if(regex_match(key, "^platform_regex$")) 
> {
>   config->platform_regex = 
> add_dynamic_str_copy(value);
>   } else if(regex_match(key, "^device_regex$")) {
> - config->platform_regex = 
> add_dynamic_str_copy(value);
> + config->device_regex = 
> add_dynamic_str_copy(value);
>   } else if(regex_match(key, 
> "^require_platform_extensions$")) {
>   config->require_platform_extensions =
>   add_dynamic_str_copy(value);
nice catch.

Reviewed-by: Jan Vesely 

-- 
Jan Vesely 

signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] cl: Add tests for function calls

2017-09-18 Thread Matt Arsenault
Passes on ROCm, I haven't tried clover recently. Last
time I did it errored because the AsmParser wasn't properly
initialized.

v2: Fix non-unique test names, Wrap noinline in unguarded macro,
use prettier test names, use device_regex (effectively restricting to ROCm)
---
 tests/cl/program/execute/call-clobbers-amdgcn.cl |  68 +++
 tests/cl/program/execute/calls-struct.cl | 179 +++
 tests/cl/program/execute/calls-workitem-id.cl|  77 +++
 tests/cl/program/execute/calls.cl| 607 +++
 tests/cl/program/execute/tail-calls.cl   | 305 
 5 files changed, 1236 insertions(+)
 create mode 100644 tests/cl/program/execute/call-clobbers-amdgcn.cl
 create mode 100644 tests/cl/program/execute/calls-struct.cl
 create mode 100644 tests/cl/program/execute/calls-workitem-id.cl
 create mode 100644 tests/cl/program/execute/calls.cl
 create mode 100644 tests/cl/program/execute/tail-calls.cl

diff --git a/tests/cl/program/execute/call-clobbers-amdgcn.cl 
b/tests/cl/program/execute/call-clobbers-amdgcn.cl
new file mode 100644
index 0..400771795
--- /dev/null
+++ b/tests/cl/program/execute/call-clobbers-amdgcn.cl
@@ -0,0 +1,68 @@
+/*!
+
+[config]
+name: amdgcn call clobbers
+clc_version_min: 10
+device_regex: gfx[\d]*
+
+[test]
+name: callee saved sgpr
+kernel_name: call_clobber_s40
+dimensions: 1
+global_size: 1 0 0
+arg_out: 0 buffer int[1] 0xabcd1234
+
+[test]
+name: callee saved vgpr
+kernel_name: call_clobber_v40
+dimensions: 1
+global_size: 1 0 0
+arg_out: 0 buffer int[1] 0xabcd1234
+
+!*/
+
+#ifndef __AMDGCN__
+#error This test is only for amdgcn
+#endif
+
+__attribute__((noinline))
+void clobber_s40()
+{
+__asm volatile("s_mov_b32 s40, 0xdead" : : : "s40");
+}
+
+kernel void call_clobber_s40(__global int* ret)
+{
+__asm volatile("s_mov_b32 s40, 0xabcd1234" : : : "s40");
+
+clobber_s40();
+
+int tmp;
+
+__asm volatile("v_mov_b32 %0, s40"
+  : "=v"(tmp)
+  :
+  : "s40");
+*ret = tmp;
+}
+
+__attribute__((noinline))
+void clobber_v40()
+{
+__asm volatile("v_mov_b32 v40, 0xdead" : : : "v40");
+}
+
+kernel void call_clobber_v40(__global int* ret)
+{
+__asm volatile("v_mov_b32 v40, 0xabcd1234" : : : "v40");
+
+clobber_v40();
+
+int tmp;
+__asm volatile("v_mov_b32 %0, v40"
+  : "=v"(tmp)
+  :
+  : "v40");
+*ret = tmp;
+}
+
diff --git a/tests/cl/program/execute/calls-struct.cl 
b/tests/cl/program/execute/calls-struct.cl
new file mode 100644
index 0..04f769dac
--- /dev/null
+++ b/tests/cl/program/execute/calls-struct.cl
@@ -0,0 +1,179 @@
+/*!
+
+[config]
+name: calls with structs
+clc_version_min: 10
+
+[test]
+name: byval struct
+kernel_name: call_i32_func_byval_Char_IntArray
+dimensions: 1
+global_size: 16 0 0
+
+arg_out: 0 buffer int[16]\
+ 1021 1022 1023 1024 1025 1026 1027 1028 \
+ 1029 1030 1031 1032 1033 1034 1035 1036
+
+arg_out: 1 buffer int[16] \
+  14   14   14   14 \
+  14   14   14   14 \
+  14   14   14   14 \
+  14   14   14   14 \
+
+arg_in: 2 buffer int[16] \
+ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+
+
+[test]
+name: sret struct
+kernel_name: call_sret_Char_IntArray_func
+dimensions: 1
+global_size: 16 0 0
+
+arg_out: 0 buffer int[16]\
+ 921 922 923 924 925 926 927 928 \
+ 929 930 931 932 933 934 935 936
+
+arg_in: 1 buffer int[16] \
+ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+
+
+[test]
+name: byval struct and sret struct
+kernel_name: call_sret_Char_IntArray_func_byval_Char_IntArray
+dimensions: 1
+global_size: 16 0 0
+
+arg_out: 0 buffer int[16]\
+  86 87 88 89   \
+  90 91 92 93   \
+  94 95 96 97   \
+  98 99 100 101
+
+arg_out: 1 buffer int[16]\
+  134  135  136  137  \
+  138  139  140  141  \
+  142  143  144  145  \
+  146  147  148  149
+
+arg_in: 2 buffer int[16] \
+ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+
+!*/
+
+#define NOINLINE __attribute__((noinline))
+
+typedef struct ByVal_Char_IntArray {
+char c;
+int i[4];
+} ByVal_Char_IntArray;
+
+NOINLINE
+int i32_func_byval_Char_IntArray(ByVal_Char_IntArray st)
+{
+st.i[0] += 100;
+
+int sum = 0;
+for (int i = 0; i < 4; ++i)
+{
+sum += st.i[i];
+}
+
+sum += st.c;
+return sum;
+}
+
+kernel void call_i32_func_byval_Char_IntArray(global int* out0,
+  global int* out1,
+  global int* input)
+{
+ByVal_Char_IntArray st;
+st.c = 15;
+
+int id = get_global_id(0);
+
+int val = input[id];
+st.i[0] = 14;
+st.i[1] = -8;
+st.i[2] = val;
+st.i[3] = 900;
+
+int result = i32_func_byval_Char_IntArray(st);
+out0[id] = result;
+out1[id] = st.i[0];
+}
+
+NOINLINE
+ByVal_Char_IntArray sret_Char_IntArray_func(global int* input, int id)
+{
+ByVal_Char_IntArray st;
+st.c = 15;
+
+int val = input[id];
+st.i[0] = 14;
+st.i[1] = -8;
+

Re: [Piglit] [PATCH] arb_arrays_of_arrays: remove an unused variable

2017-09-18 Thread Timothy Arceri

Reviewed-by: Timothy Arceri 

On 19/09/17 00:42, Nicolai Hähnle wrote:

From: Nicolai Hähnle 

---
  .../execution/atomic_counters/fs-indirect-index.shader_test  | 1 -
  1 file changed, 1 deletion(-)

diff --git 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
index dae9686ad..39dc268df 100644
--- 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
+++ 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
@@ -11,21 +11,20 @@ GL_ARB_arrays_of_arrays
  [fragment shader]
  #version 140
  #extension GL_ARB_shader_atomic_counters: require
  #extension GL_ARB_arrays_of_arrays: require
  
  layout(binding = 0) uniform atomic_uint a0[2][4];
  
  uniform int n;

  uniform int m;
  
-in vec4 vcolor;

  out vec4 fcolor;
  
  void main()

  {
bool passed = true;
uint v0[12];
uint v1[12];
  
  	/* Get all initail values of a0 */

v0[0] = atomicCounter(a0[0][0]);


___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Add KHR-GL46 to khr_gl.py

2017-09-18 Thread Dylan Baker
In the event that ever happened:
Reviewed-by: Dylan Baker 

Quoting Kenneth Graunke (2017-09-18 14:22:06)
> Following the pattern, if there ever were a OpenGL 4.6 CTS, it would
> probably have tests named like this.
> ---
>  tests/khr_gl.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/khr_gl.py b/tests/khr_gl.py
> index 0cc86afff..6a4e845c4 100644
> --- a/tests/khr_gl.py
> +++ b/tests/khr_gl.py
> @@ -89,5 +89,7 @@ profile = deqp.make_profile(  # pylint: disable=invalid-name
>  deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL44-cases.txt', 
> _EXTRA_ARGS)),
>  deqp.iter_deqp_test_cases(
>  deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL45-cases.txt', 
> _EXTRA_ARGS)),
> +deqp.iter_deqp_test_cases(
> +deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL46-cases.txt', 
> _EXTRA_ARGS)),
>  ),
>  DEQPKHRTest)
> -- 
> 2.14.1
> 
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Add tests for function calls

2017-09-18 Thread Matt Arsenault

> On Sep 16, 2017, at 20:15, Jan Vesely  wrote:
>> 
>> +#ifndef __AMDGCN__
>> +#error This test is only for amdgcn
>> +#endif
> 
> This needs "device_regexp" in config section to skip instead of fail on
> other platforms/devices.
> 

I’ve tried doing this, but there isn’t really a satisfactory way to test for 
this. While ROCm uses the consistent gfxNNN device names, clover and the older 
OpenCL platforms use the various device names which ends up just being an 
exhaustive list. The names are also slightly different for the same devices 
between those.

Additionally, this feature seems to not work and no other test is using it. If 
I use just device_regex, I get errors about the platform:
# Skipping platform AMD Accelerated Parallel Processing because it does not 
match platform_regex.

If I add the exact platform name, it works. If I additionally add a device_name 
regex, I get the same error about the platform name. Quickly looking at the 
code I don’t see any reason why these would be linked.


>> +// The inline asm is necessary to defeat interprocedural sparse
>> +// conditional constant propagation eliminating some of the trivial
>> +// calls.
>> +#ifdef __AMDGCN__
>> +#define USE_ASM 1
>> +#endif
> 
> I think it'd be better to use build options to disable the opt pass
> instead (or all optimizations, like optimization-options-cl1X.cl
> tests).
> 
> Jan
> 

-O0 is far heavier than this test should get. We really want testing with full 
optimizations, the code is pretty radically different at -O0 in all programs. 
Ideally we would have every test running at -O0 and other opt levels for best 
coverage. 

We could defeat this optimization in particular by keeping the function 
externally visible, but right now we are forced to internalize every program 
before codegen so this is always a problem for us. I don’t see any specific 
switch to disable this particular pass. Other methods might be using a volatile 
variable for the constant (which I don’t want because that introduces stack 
usage, which these tests specifically do not want). I could try to find other 
convoluted methods of defeating the optimization, but those will also end up 
contrary to the goal of having easily readable isa for these.

-Matt___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] Add KHR-GL46 to khr_gl.py

2017-09-18 Thread Kenneth Graunke
Following the pattern, if there ever were a OpenGL 4.6 CTS, it would
probably have tests named like this.
---
 tests/khr_gl.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/khr_gl.py b/tests/khr_gl.py
index 0cc86afff..6a4e845c4 100644
--- a/tests/khr_gl.py
+++ b/tests/khr_gl.py
@@ -89,5 +89,7 @@ profile = deqp.make_profile(  # pylint: disable=invalid-name
 deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL44-cases.txt', 
_EXTRA_ARGS)),
 deqp.iter_deqp_test_cases(
 deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL45-cases.txt', 
_EXTRA_ARGS)),
+deqp.iter_deqp_test_cases(
+deqp.gen_caselist_txt(_KHR_BIN, 'KHR-GL46-cases.txt', 
_EXTRA_ARGS)),
 ),
 DEQPKHRTest)
-- 
2.14.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [Bug 102845] [m32] piglit.spec.arb_shader_bit_encoding.execution.and-clamp

2017-09-18 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=102845

Kenneth Graunke  changed:

   What|Removed |Added

   Assignee|ja...@jlekstrand.net|kenn...@whitecape.org
 Status|NEW |RESOLVED
Version|git |unspecified
 Resolution|--- |FIXED
 QA Contact|intel-3d-bugs@lists.freedes |pig...@lists.freedesktop.or
   |ktop.org|g
  Component|Drivers/DRI/i965|tests
Product|Mesa|piglit

--- Comment #3 from Kenneth Graunke  ---
Should be fixed by Piglit commit:

commit 3093326348b632ce9a9b92b9289725c400aa77b0
Author: Kenneth Graunke 
Date:   Mon Sep 18 14:15:38 2017 -0700

Fix bogus .50. number in and-clamp.shader_test

Trivial.  ".50." is clearly a typo, it should have been ".50"

This fixes test failures in some environments.

Tested-by: Mark Janes 

-- 
You are receiving this mail because:
You are the QA Contact for the bug.___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 1/1] cl: Add tests for 64 bit integer atomics

2017-09-18 Thread Jan Vesely
Signed-off-by: Jan Vesely 
---
 .../atomic/atomic_int64_add-global-return.cl   | 63 +
 .../builtin/atomic/atomic_int64_add-global.cl  | 60 
 .../builtin/atomic/atomic_int64_add-local.cl   | 71 +++
 .../atomic/atomic_int64_and-global-return.cl   | 65 +
 .../builtin/atomic/atomic_int64_and-global.cl  | 62 
 .../builtin/atomic/atomic_int64_and-local.cl   | 71 +++
 .../atomic/atomic_int64_cmpxchg-global-return.cl   | 74 +++
 .../builtin/atomic/atomic_int64_cmpxchg-global.cl  | 70 ++
 .../builtin/atomic/atomic_int64_cmpxchg-local.cl   | 82 ++
 .../atomic/atomic_int64_dec-global-return.cl   | 63 +
 .../builtin/atomic/atomic_int64_dec-global.cl  | 59 
 .../builtin/atomic/atomic_int64_dec-local.cl   | 68 ++
 .../atomic/atomic_int64_inc-global-return.cl   | 63 +
 .../builtin/atomic/atomic_int64_inc-global.cl  | 59 
 .../builtin/atomic/atomic_int64_inc-local.cl   | 68 ++
 .../atomic/atomic_int64_max-global-return.cl   | 63 +
 .../builtin/atomic/atomic_int64_max-global.cl  | 60 
 .../builtin/atomic/atomic_int64_max-local.cl   | 82 ++
 .../atomic/atomic_int64_min-global-return.cl   | 63 +
 .../builtin/atomic/atomic_int64_min-global.cl  | 60 
 .../builtin/atomic/atomic_int64_min-local.cl   | 82 ++
 .../atomic/atomic_int64_or-global-return.cl| 65 +
 .../builtin/atomic/atomic_int64_or-global.cl   | 62 
 .../builtin/atomic/atomic_int64_or-local.cl| 71 +++
 .../atomic/atomic_int64_sub-global-return.cl   | 63 +
 .../builtin/atomic/atomic_int64_sub-global.cl  | 60 
 .../builtin/atomic/atomic_int64_sub-local.cl   | 71 +++
 .../atomic/atomic_int64_xchg-global-return.cl  | 69 ++
 .../builtin/atomic/atomic_int64_xchg-global.cl | 67 ++
 .../builtin/atomic/atomic_int64_xchg-local.cl  | 76 
 .../atomic/atomic_int64_xor-global-return.cl   | 65 +
 .../builtin/atomic/atomic_int64_xor-global.cl  | 62 
 .../builtin/atomic/atomic_int64_xor-local.cl   | 72 +++
 33 files changed, 2211 insertions(+)
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_add-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_add-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_add-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_and-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_and-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_and-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_cmpxchg-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_cmpxchg-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_cmpxchg-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_dec-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_dec-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_dec-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_inc-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_inc-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_inc-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_max-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_max-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_max-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_min-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_min-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_min-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_or-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_or-global.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_or-local.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_sub-global-return.cl
 create mode 100644 
tests/cl/program/execute/builtin/atomic/atomic_int64_sub-global.cl
 create mode 100644 

Re: [Piglit] [PATCH] Add tests for function calls

2017-09-18 Thread Matt Arsenault

> On Sep 17, 2017, at 19:22, Jan Vesely  wrote:
> 
> On Sun, 2017-09-17 at 17:02 -0700, Matt Arsenault wrote:
>>> On Sep 16, 2017, at 20:15, Jan Vesely  wrote:
>>> 
>>> afaik, noinline is not defined in CLC, so it should be ifdefed on
>>> __clang__
>>> 
>> 
>> It’s not, but my reading of the standard is that it’s required to
>> parse any unknown attributes and ignore them. ifdef clang would be
>> too restrictive (e.g. it wouldn’t work with the old EDG frontend)
> 
> OK, if it helps. ignoring/warning is sensible compiler behaviour.
> 
> I haven't found anything about unknown attributes in the specs (CLC or
> GCC), so technically it should be UB.
> 
> Jan
> 
> -- 
> Jan Vesely 

6.11.5 in the 1.2 spec says:
Attributes are intended as useful hints to the compiler. It is our intention 
that a particular implementation of OpenCL be free to ignore all attributes and 
the resulting executable binary will produce the same result. This does not 
preclude an implementation from making use of the additional information 
provided by attributes and performing optimizations or other transformations as 
it sees fit. In this case it is the programmer’s responsibility to guarantee 
that the information provided is in some sense correct. 


My interpretation is it should be OK to ignore unknown attributes___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 2/2] arb_sample_shading: run more tests concurrently

2017-09-18 Thread Nicolai Hähnle
From: Nicolai Hähnle 

There doesn't seem to be a reason for not running those tests
concurrently. Looks like they were just missed.
---
 tests/all.py | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 286c01eee..404c13f3e 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2325,25 +2325,23 @@ with profile.test_list.group_manager(
   'builtin-gl-sample-id {}'.format(num_samples), run_concurrent=False)
 g(['arb_sample_shading-builtin-gl-sample-mask', num_samples],
   'builtin-gl-sample-mask {}'.format(num_samples),
   run_concurrent=False)
 g(['arb_sample_shading-builtin-gl-sample-position', num_samples],
   'builtin-gl-sample-position {}'.format(num_samples),
   run_concurrent=False)
 
 for sample_count in MSAA_SAMPLE_COUNTS:
 g(['arb_sample_shading-interpolate-at-sample-position', sample_count],
-  'interpolate-at-sample-position {}'.format(sample_count),
-  run_concurrent=False)
+  'interpolate-at-sample-position {}'.format(sample_count))
 g(['arb_sample_shading-ignore-centroid-qualifier', sample_count],
-  'ignore-centroid-qualifier {}'.format(sample_count),
-  run_concurrent=False)
+  'ignore-centroid-qualifier {}'.format(sample_count))
 g(['arb_sample_shading-samplemask', sample_count, 'all', 'all'],
   'samplemask {}'.format(sample_count))
 
 for num_samples in ['0'] + MSAA_SAMPLE_COUNTS:
 g(['arb_sample_shading-builtin-gl-sample-mask-simple',
num_samples],
   'builtin-gl-sample-mask-simple {}'.format(num_samples))
 g(['arb_sample_shading-samplemask', num_samples, 'all'],
   'samplemask {} all'.format(num_samples))
 
-- 
2.11.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 1/2] arb_sample_shading: add more extensive gl_SampleMask(In) tests

2017-09-18 Thread Nicolai Hähnle
From: Nicolai Hähnle 

Test the interaction of gl_SampleMask and gl_SampleMaskIn with different
sample shading rates. It used to fail on radeonsi.
---
 tests/all.py   |   4 +
 .../arb_sample_shading/execution/CMakeLists.gl.txt |   1 +
 .../arb_sample_shading/execution/samplemask.cpp| 452 +
 3 files changed, 457 insertions(+)
 create mode 100644 tests/spec/arb_sample_shading/execution/samplemask.cpp

diff --git a/tests/all.py b/tests/all.py
index ff2ff1f23..286c01eee 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -2330,25 +2330,29 @@ with profile.test_list.group_manager(
   'builtin-gl-sample-position {}'.format(num_samples),
   run_concurrent=False)
 
 for sample_count in MSAA_SAMPLE_COUNTS:
 g(['arb_sample_shading-interpolate-at-sample-position', sample_count],
   'interpolate-at-sample-position {}'.format(sample_count),
   run_concurrent=False)
 g(['arb_sample_shading-ignore-centroid-qualifier', sample_count],
   'ignore-centroid-qualifier {}'.format(sample_count),
   run_concurrent=False)
+g(['arb_sample_shading-samplemask', sample_count, 'all', 'all'],
+  'samplemask {}'.format(sample_count))
 
 for num_samples in ['0'] + MSAA_SAMPLE_COUNTS:
 g(['arb_sample_shading-builtin-gl-sample-mask-simple',
num_samples],
   'builtin-gl-sample-mask-simple {}'.format(num_samples))
+g(['arb_sample_shading-samplemask', num_samples, 'all'],
+  'samplemask {} all'.format(num_samples))
 
 g(['arb_sample_shading-builtin-gl-sample-mask-mrt-alpha'])
 
 # Group ARB_debug_output
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ARB_debug_output')) as g:
 g(['arb_debug_output-api_error'], run_concurrent=False)
 
 # Group KHR_debug
diff --git a/tests/spec/arb_sample_shading/execution/CMakeLists.gl.txt 
b/tests/spec/arb_sample_shading/execution/CMakeLists.gl.txt
index 3752da78b..124c03022 100644
--- a/tests/spec/arb_sample_shading/execution/CMakeLists.gl.txt
+++ b/tests/spec/arb_sample_shading/execution/CMakeLists.gl.txt
@@ -11,11 +11,12 @@ link_libraries (
 
 piglit_add_executable (arb_sample_shading-api api.c)
 piglit_add_executable (arb_sample_shading-builtin-gl-num-samples 
builtin-gl-num-samples.cpp)
 piglit_add_executable (arb_sample_shading-builtin-gl-sample-id 
builtin-gl-sample-id.cpp)
 piglit_add_executable (arb_sample_shading-builtin-gl-sample-mask 
builtin-gl-sample-mask.cpp)
 piglit_add_executable (arb_sample_shading-builtin-gl-sample-mask-simple 
builtin-gl-sample-mask-simple.cpp)
 piglit_add_executable (arb_sample_shading-builtin-gl-sample-mask-mrt-alpha 
builtin-gl-sample-mask-mrt-alpha.cpp)
 piglit_add_executable (arb_sample_shading-builtin-gl-sample-position 
builtin-gl-sample-position.cpp)
 piglit_add_executable (arb_sample_shading-interpolate-at-sample-position 
interpolate-at-sample-position.cpp)
 piglit_add_executable (arb_sample_shading-ignore-centroid-qualifier 
ignore-centroid-qualifier.cpp)
+piglit_add_executable (arb_sample_shading-samplemask samplemask.cpp)
 # vim: ft=cmake:
diff --git a/tests/spec/arb_sample_shading/execution/samplemask.cpp 
b/tests/spec/arb_sample_shading/execution/samplemask.cpp
new file mode 100644
index 0..ab593cf12
--- /dev/null
+++ b/tests/spec/arb_sample_shading/execution/samplemask.cpp
@@ -0,0 +1,452 @@
+/*
+ * Copyright 2017 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
THE
+ * SOFTWARE.
+ */
+
+/** \file samplemask.c
+ *
+ * Test two properties of gl_SampleMask and gl_SampleMaskIn for different
+ * sample rates, while rendering a slightly off-center triangle fan that
+ * covers the entire window, to thoroughly exercise cases where pixels are
+ * partially covered:
+ *
+ * 1. Setting all bits of gl_SampleMask in all 

[Piglit] [PATCH 1/2] arb_query_buffer_object: extract some common code for running queries

2017-09-18 Thread Nicolai Hähnle
From: Nicolai Hähnle 

---
 .../spec/arb_query_buffer_object/CMakeLists.gl.txt |   2 +-
 tests/spec/arb_query_buffer_object/common.c| 169 +
 tests/spec/arb_query_buffer_object/common.h|  58 +++
 tests/spec/arb_query_buffer_object/qbo.c   | 140 ++---
 4 files changed, 240 insertions(+), 129 deletions(-)
 create mode 100644 tests/spec/arb_query_buffer_object/common.c
 create mode 100644 tests/spec/arb_query_buffer_object/common.h

diff --git a/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt 
b/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt
index 9a3d202c0..30a545546 100644
--- a/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt
@@ -1,13 +1,13 @@
 include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
)
 
 link_libraries(
piglitutil_${piglit_target_api}
${OPENGL_gl_LIBRARY}
)
 
-piglit_add_executable(arb_query_buffer_object-qbo qbo.c)
+piglit_add_executable(arb_query_buffer_object-qbo qbo.c common.c)
 
 # vim: ft=cmake:
diff --git a/tests/spec/arb_query_buffer_object/common.c 
b/tests/spec/arb_query_buffer_object/common.c
new file mode 100644
index 0..cd6bd4787
--- /dev/null
+++ b/tests/spec/arb_query_buffer_object/common.c
@@ -0,0 +1,169 @@
+/*
+ * Copyright © 2015 Glenn Kennard
+ * Copyright (c) 2017 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+#include "common.h"
+
+static int prog;
+
+/* Note: meaningful test cases (with non-zero values) for the following are
+ * missing:
+ *  - GL_COMPUTE_SHADER_INVOCATIONS_ARB
+ *  - GL_GEOMETRY_SHADER_INVOCATIONS
+ *  - GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB
+ *  - GL_TESS_CONTROL_SHADER_PATCHES_ARB
+ *  - GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB
+ *  - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN
+ */
+const struct query_type_desc query_types[] = {
+   { GL_ANY_SAMPLES_PASSED,{ 
"GL_ARB_occlusion_query2", NULL } },
+   { GL_ANY_SAMPLES_PASSED_CONSERVATIVE,   { 
"GL_ARB_ES3_compatibility", NULL } },
+   { GL_CLIPPING_INPUT_PRIMITIVES_ARB, { 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_CLIPPING_OUTPUT_PRIMITIVES_ARB,{ 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_COMPUTE_SHADER_INVOCATIONS_ARB,{ 
"GL_ARB_pipeline_statistics_query", "GL_ARB_compute_shader" } },
+   { GL_FRAGMENT_SHADER_INVOCATIONS_ARB,   { 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_GEOMETRY_SHADER_INVOCATIONS,   { 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB,{ 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_PRIMITIVES_GENERATED,  { NULL, } },
+   { GL_PRIMITIVES_SUBMITTED_ARB,  { 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_SAMPLES_PASSED_ARB,{ NULL, } },
+   { GL_TESS_CONTROL_SHADER_PATCHES_ARB,   { 
"GL_ARB_pipeline_statistics_query", "GL_ARB_tessellation_shader" } },
+   { GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB,{ 
"GL_ARB_pipeline_statistics_query", "GL_ARB_tessellation_shader" } },
+   { GL_TIMESTAMP, { "GL_ARB_timer_query", 
NULL } },
+   { GL_TIME_ELAPSED,  { "GL_ARB_timer_query", 
NULL } },
+   { GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, { NULL, } },
+   { GL_VERTEX_SHADER_INVOCATIONS_ARB, { 
"GL_ARB_pipeline_statistics_query", NULL } },
+   { GL_VERTICES_SUBMITTED_ARB,{ 
"GL_ARB_pipeline_statistics_query", NULL } },
+};
+
+unsigned
+num_query_types() {
+   return ARRAY_SIZE(query_types);
+}
+
+void
+get_query_values(const struct 

[Piglit] [PATCH 2/2] arb_query_buffer_object: add additional coherency tests

2017-09-18 Thread Nicolai Hähnle
From: Nicolai Hähnle 

The existing tests only test that shaders receive the query result.
The new tests also check for earlier pipeline stages.
---
 tests/all.py   |   1 +
 .../spec/arb_query_buffer_object/CMakeLists.gl.txt |   1 +
 tests/spec/arb_query_buffer_object/coherency.c | 441 +
 3 files changed, 443 insertions(+)
 create mode 100644 tests/spec/arb_query_buffer_object/coherency.c

diff --git a/tests/all.py b/tests/all.py
index ff2ff1f23..6b751c49d 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -4878,20 +4878,21 @@ with profile.test_list.group_manager(
 g(['arb_vertex_attrib_64bit-getactiveattrib'], 'getactiveattrib')
 g(['arb_vertex_attrib_64bit-max-vertex-attrib'], 'max-vertex-attrib')
 for test_type in ('shader', 'api'):
 g(['arb_vertex_attrib_64bit-overlapping-locations', test_type],
   run_concurrent=False)
 
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'arb_query_buffer_object')) as g:
 g(['arb_query_buffer_object-qbo'], 'qbo')
+g(['arb_query_buffer_object-coherency'], 'coherency')
 
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'ext_framebuffer_blit')) as g:
 g(['ext_framebuffer_blit-blit-early'], 'blit-early')
 
 # Group OES_draw_elements_base_vertex
 with profile.test_list.group_manager(
 PiglitGLTest,
 grouptools.join('spec', 'OES_draw_elements_base_vertex')) as g:
diff --git a/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt 
b/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt
index 30a545546..82484c81e 100644
--- a/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt
+++ b/tests/spec/arb_query_buffer_object/CMakeLists.gl.txt
@@ -2,12 +2,13 @@ include_directories(
${GLEXT_INCLUDE_DIR}
${OPENGL_INCLUDE_PATH}
)
 
 link_libraries(
piglitutil_${piglit_target_api}
${OPENGL_gl_LIBRARY}
)
 
 piglit_add_executable(arb_query_buffer_object-qbo qbo.c common.c)
+piglit_add_executable(arb_query_buffer_object-coherency coherency.c common.c)
 
 # vim: ft=cmake:
diff --git a/tests/spec/arb_query_buffer_object/coherency.c 
b/tests/spec/arb_query_buffer_object/coherency.c
new file mode 100644
index 0..834daba0d
--- /dev/null
+++ b/tests/spec/arb_query_buffer_object/coherency.c
@@ -0,0 +1,441 @@
+/*
+ * Copyright (c) 2017 Advanced Micro Devices, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+/**
+ * \file qbo-coherency.c
+ * Test coherency of ARB_query_buffer_object results with pre-shader pipeline
+ * stages:
+ *  1. Indirect draw
+ * Write the qbo result to the 'first' member of the indirect draw
+ * structure, and write the gl_VertexID to a transform feedback buffer.
+ *  2. Index buffer fetch
+ * Write the qbo result to the index buffer, and write the gl_VertexID to
+ * a transform feedback buffer.
+ *  3. Indirect draw count
+ * Write the qbo result to the 'drawcount' value for an
+ * GL_ARB_indirect_parameters multi-draw, and increment an atomic counter
+ * in the vertex shader.
+ *  4. Indirect dispatch
+ * Write the qbo result to the number of groups, and count the groups using
+ * an atomic counter.
+ */
+
+#include "common.h"
+
+PIGLIT_GL_TEST_CONFIG_BEGIN
+   config.supports_gl_compat_version = 32;
+   config.supports_gl_core_version = 32;
+   config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE |
+   PIGLIT_GL_VISUAL_DEPTH;
+PIGLIT_GL_TEST_CONFIG_END
+
+#define BUFFER_OFFSET(i) ((void *)((char *)NULL + i))
+
+#define DRAW_COUNT_CLAMP_MAX 50
+
+static GLuint prog_compute;
+static GLuint prog_xfb;
+static GLuint prog_vs_atomic;
+static GLuint empty_vao;
+static GLuint indirect_draw_count_data_bo;
+
+static const char *arg_consumer_mode;
+static 

[Piglit] [PATCH] arb_arrays_of_arrays: remove an unused variable

2017-09-18 Thread Nicolai Hähnle
From: Nicolai Hähnle 

---
 .../execution/atomic_counters/fs-indirect-index.shader_test  | 1 -
 1 file changed, 1 deletion(-)

diff --git 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
index dae9686ad..39dc268df 100644
--- 
a/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
+++ 
b/tests/spec/arb_arrays_of_arrays/execution/atomic_counters/fs-indirect-index.shader_test
@@ -11,21 +11,20 @@ GL_ARB_arrays_of_arrays
 [fragment shader]
 #version 140
 #extension GL_ARB_shader_atomic_counters: require
 #extension GL_ARB_arrays_of_arrays: require
 
 layout(binding = 0) uniform atomic_uint a0[2][4];
 
 uniform int n;
 uniform int m;
 
-in vec4 vcolor;
 out vec4 fcolor;
 
 void main()
 {
bool passed = true;
uint v0[12];
uint v1[12];
 
/* Get all initail values of a0 */
v0[0] = atomicCounter(a0[0][0]);
-- 
2.11.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] arb_gpu_shader_fp64: relax ldexp test due to denorms

2017-09-18 Thread Nicolai Hähnle
From: Nicolai Hähnle 

ldexp(0.5, -1028) will be different from 0.0 on implementations that
support denorms. Simply crank up the exponents to exclude the possibility
of denorms.
---
 .../execution/built-in-functions/fs-ldexp-dvec4.shader_test   | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git 
a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test
 
b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test
index c0e60b97b..38214dee6 100644
--- 
a/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test
+++ 
b/tests/spec/arb_gpu_shader_fp64/execution/built-in-functions/fs-ldexp-dvec4.shader_test
@@ -85,25 +85,21 @@ probe rgba 4 0 0.0 0.0 0.0 0.0
 # Test DBL_MIN (2.2250738585072014E-308) and DBL_MAX (1.7976931348623157E+308) 
as inputs.
 uniform dvec4 expected_double 0.5 -0.5 0.99989 -0.99989
 uniform dvec4 given_double 2.2250738585072014E-308 -2.2250738585072014E-308 
1.7976931348623157E+308 -1.7976931348623157E+308
 uniform ivec4 given_exponent 1021 1021 -1024 -1024
 draw arrays GL_TRIANGLE_FAN 0 4
 probe rgba 5 0 0.0 0.0 0.0 0.0
 
 # Test underflow generates zero with sign of x.
 uniform dvec4 expected_double 0.0 -0.0 0.0 -0.0
 uniform dvec4 given_double 0.0 -0.0 0.5 -0.5
-uniform ivec4 given_exponent -1028 -1028 -1028 -1028
+uniform ivec4 given_exponent -1028 -1028 -1078 -1078
 draw arrays GL_TRIANGLE_FAN 0 4
 probe rgba 6 0 0.0 0.0 0.0 0.0
 
 uniform dvec4 expected_double 0.0 -0.0 0.0 -0.0
 uniform dvec4 given_double 2.2250738585072014E-308 -2.2250738585072014E-308 
1.7976931348623157E+308 -1.7976931348623157E+308
-# For the FLT_MAX case -255 comes from (-127 + -127 + -1).
-#   ldexp(FLT_MAX, -127)   = 0x1.fep+0 (1.99881)
-#   ldexp(FLT_MAX, -127 - 127) = 0x1p-126 (epsilon above FLT_MIN)
-#   ldexp(FLT_MAX, -127 - 127 - 1) = 0.0
-uniform ivec4 given_exponent -1 -1 -2048 -2048
+uniform ivec4 given_exponent -53 -53 -2100 -2100
 draw arrays GL_TRIANGLE_FAN 0 4
 probe rgba 7 0 0.0 0.0 0.0 0.0
 
 # Overflow is undefined according to the GLSL spec, so nothing to test.
-- 
2.11.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit