Re: [Piglit] [PATCH] draw-prim-rate: Fix Clang build error.

2019-06-03 Thread Marek Olšák
Reviewed-by: Marek Olšák 

Marek

On Mon, Jun 3, 2019 at 10:28 PM Vinson Lee  wrote:

> draw-prim-rate.c:415:3: error: initializer element is not a compile-time
> constant
> ceil(sqrt(0.5 * 1000)),
> ^~
>
> Fixes: 6e1bb1e769d2 ("Add a test that measures primitive rate")
> Signed-off-by: Vinson Lee 
> ---
>  tests/perf/draw-prim-rate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/perf/draw-prim-rate.c b/tests/perf/draw-prim-rate.c
> index 85792b00ea99..c9e4e078cec9 100644
> --- a/tests/perf/draw-prim-rate.c
> +++ b/tests/perf/draw-prim-rate.c
> @@ -410,7 +410,7 @@ piglit_display(void)
> return PIGLIT_PASS;
> }
>
> -   static const unsigned num_quads_per_dim[] = {
> +   const unsigned num_quads_per_dim[] = {
> /* The second number is the approx. number of primitives.
> */
> ceil(sqrt(0.5 * 1000)),
> ceil(sqrt(0.5 * 2000)),
> --
> 2.21.0
>
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

[Piglit] [PATCH] draw-prim-rate: Fix Clang build error.

2019-06-03 Thread Vinson Lee
draw-prim-rate.c:415:3: error: initializer element is not a compile-time 
constant
ceil(sqrt(0.5 * 1000)),
^~

Fixes: 6e1bb1e769d2 ("Add a test that measures primitive rate")
Signed-off-by: Vinson Lee 
---
 tests/perf/draw-prim-rate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/perf/draw-prim-rate.c b/tests/perf/draw-prim-rate.c
index 85792b00ea99..c9e4e078cec9 100644
--- a/tests/perf/draw-prim-rate.c
+++ b/tests/perf/draw-prim-rate.c
@@ -410,7 +410,7 @@ piglit_display(void)
return PIGLIT_PASS;
}
 
-   static const unsigned num_quads_per_dim[] = {
+   const unsigned num_quads_per_dim[] = {
/* The second number is the approx. number of primitives. */
ceil(sqrt(0.5 * 1000)),
ceil(sqrt(0.5 * 2000)),
-- 
2.21.0

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

Re: [Piglit] [PATCH] cl: Add tests for some cases that were broken with function calls

2019-06-03 Thread Jan Vesely
On Mon, 2019-06-03 at 10:31 -0400, Matt Arsenault wrote:
> > On Jun 2, 2019, at 2:36 PM, Jan Vesely  wrote:
> > 
> > he other problem is that even with killed process hung GPU usually
> > makes the machine unable to suspend or reboot on its own, which kills
> > remote testing.
> > I'd need to recheck if that's still the case with linux-5.1.
> 
> I was able to interrupt the process normally and everything worked
> OK with rocm (which due to the device name regex, its the only
> platform this runs) without my fix applied.

Does rocm do anything special other than using compute rings?
What was the HW you tested?
I checked that raven can reboot after gpu hangs/crashes (not suspend,
but that's probably one of many raven problems). I'd like to check
carrizo/iceland too, as that's the machine that get accessed remotely.

Other than that I think it's OK to just put default 30s timeout on all
CL tests, even debug build of LLVM shouldn't need more than that.

Jan

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

-- 
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

Re: [Piglit] [PATCH] arb_texture_buffer_range: Fix buffer alignment in ranges-2 test

2019-06-03 Thread Anthony Pesch

Opened https://gitlab.freedesktop.org/mesa/piglit/merge_requests/73.

 - Anthony

On 5/31/19 4:39 AM, Pelloux-prayer, Pierre-eric wrote:

I can push it but can you first resend your patch using git send-mail because 
git am doesn't recognize the format of this one.

(or you can open a merge request on gitlab if you prefer)

Thanks!

Pierre-Eric


From: Anthony Pesch 
Sent: Friday, May 24, 2019 8:51 PM
To: Pelloux-prayer, Pierre-eric; Pierre-Eric Pelloux-Prayer; Anthony Pesch; 
piglit@lists.freedesktop.org
Subject: Re: [Piglit] [PATCH] arb_texture_buffer_range: Fix buffer alignment in 
ranges-2 test

I think I should have noted, I don't have commit access.

Would someone mind pushing this on my behalf?

   - Anthony

On 5/24/19 2:49 PM, Pelloux-prayer, Pierre-eric wrote:

Looks good to me, thanks.

Reviewed-by: Pierre-Eric Pelloux-Prayer 



From: Piglit  on behalf of Anthony Pesch 

Sent: Friday, May 24, 2019 8:21 PM
To: Pierre-Eric Pelloux-Prayer; Anthony Pesch; piglit@lists.freedesktop.org
Subject: Re: [Piglit] [PATCH] arb_texture_buffer_range: Fix buffer alignment in 
ranges-2 test

[CAUTION: External Email]

Hi Pierre,

Thanks!

I've modifed the patch to cast data, and added an additional check to
ensure unaligned offsets produce INVALID_VALUE. I'm not sure how to use
git send-mail to update a review, so I've just inlined the updated patch
here and attached it as well.

- Anthony


commit 770effba655f97be229e13f894884f0e4c3e604a
Author: Anthony Pesch 
Date:   Thu Apr 11 12:37:07 2019 -0400

   arb_texture_buffer_range: Fix buffer alignment in ranges-2 test

   The ranges-2 test was failing due to glTexBufferRange returning
GL_INVALID_VALUE
   when the offset parameter wasn't GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT
byte aligned.

   From the OpenGL 4.6 Core spec:

   An INVALID_VALUE error is generated if offset is not an integer
multiple of the
   value of TEXTURE_BUFFER_OFFSET_ALIGNMENT.

diff --git a/tests/spec/arb_texture_buffer_range/ranges-2.c
b/tests/spec/arb_texture_buffer_range/ranges-2.c
index 3477e4b52..83a009875 100644
--- a/tests/spec/arb_texture_buffer_range/ranges-2.c
+++ b/tests/spec/arb_texture_buffer_range/ranges-2.c
@@ -91,22 +91,29 @@ float data[] = {
  0, 0,   0.5, 0,
};

+int aligned_size = 0;
+int chunk_size = 24 * sizeof(float);
+int num_chunks = 4;
+
enum piglit_result
piglit_display(void) {
  int i;
-   int chunk_size = 24 * sizeof(float);
  bool pass = true;

  glClearColor(0.2, 0.2, 0.2, 0.2);
  glClear(GL_COLOR_BUFFER_BIT);

-   for (i = 0; i < sizeof(data) / chunk_size; i++) {
+   /* verify unaligned offsets produce an error */
+   glTexBufferRange(GL_TEXTURE_BUFFER, GL_RGBA32F, tbo, aligned_size - 1, 
1);
+   pass &= glGetError() == GL_INVALID_VALUE;
+
+   for (i = 0; i < num_chunks; i++) {
  glTexBufferRange(GL_TEXTURE_BUFFER, GL_RGBA32F,
-tbo, i * chunk_size, chunk_size);
+tbo, i * aligned_size, chunk_size);
  glDrawArrays(GL_TRIANGLES, 0, 6);
  }

-   for (i = 0; i < sizeof(data) / chunk_size; i++) {
+   for (i = 0; i < num_chunks; i++) {
  float c[4] = {
  data[i * 24 + 2],
  data[i * 24 + 3],
@@ -114,7 +121,7 @@ piglit_display(void) {
  1
  };

-   pass = piglit_probe_rect_rgba(
+   pass &= piglit_probe_rect_rgba(
  piglit_width * 0.5 * (1 + data[i * 24 + 0]),
  piglit_height * 0.5 * (1 + data[i * 24 + 1]),
  piglit_width/2,
@@ -128,8 +135,14 @@ piglit_display(void) {

void
piglit_init(int argc, char **argv) {
+   GLint align, i;
+   uint8_t *chunk;
+
  piglit_require_extension("GL_ARB_texture_buffer_range");

+   glGetIntegerv(GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT, );
+   aligned_size = chunk_size % align == 0 ? chunk_size : align;
+
  prog = piglit_build_simple_program(vs_source, fs_source);
  glUseProgram(prog);

@@ -138,7 +151,12 @@ piglit_init(int argc, char **argv) {

  glGenBuffers(1, );
  glBindBuffer(GL_ARRAY_BUFFER, tbo);
-   glBufferData(GL_ARRAY_BUFFER, sizeof(data), data, GL_STATIC_DRAW);
+   glBufferData(GL_ARRAY_BUFFER, aligned_size * num_chunks, NULL,
GL_STATIC_DRAW);
+
+   for (i = 0, chunk = (uint8_t *)data; i < num_chunks; i++) {
+   glBufferSubData(GL_ARRAY_BUFFER, aligned_size * i, chunk_size, 
chunk);
+   chunk += chunk_size;
+   }

  glGenTextures(1, );
  glBindTexture(GL_TEXTURE_BUFFER, tex);


On 5/17/19 6:04 AM, Pierre-Eric Pelloux-Prayer wrote:

Hi,

The patch looks good, except ranges-2.c now cause a compiler warning:


Re: [Piglit] [PATCH] cl: Add tests for some cases that were broken with function calls

2019-06-03 Thread Matt Arsenault


> On Jun 2, 2019, at 2:36 PM, Jan Vesely  wrote:
> 
> he other problem is that even with killed process hung GPU usually
> makes the machine unable to suspend or reboot on its own, which kills
> remote testing.
> I'd need to recheck if that's still the case with linux-5.1.

I was able to interrupt the process normally and everything worked OK with rocm 
(which due to the device name regex, its the only platform this runs) without 
my fix applied

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

[Piglit] [PATCH] RFC: README.md: update test sets documentation

2019-06-03 Thread Alejandro Piñeiro
Since commit "tests: use meta profiles"
(400dcd5cf18ac51ab8e9681d8ecab4132986efbd) some test sets are not
represented anymore as python scripts. So first, it would be good to
mention it, and second it would be good to mention that it would be
better to run the test sets using the set name, not directly the
python script.

RFC because I have been struggling with the wording.
---

Basically I was not understanding why ./piglit run tests/all.py was
not working, and the README.md didn't help me. So somehow it needs to
be tweaked, but not sure how. Current patch tries to be as small as
possible, but perhaps it is too small.


 README.md | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index 7366893f8..b3267cd58 100644
--- a/README.md
+++ b/README.md
@@ -313,26 +313,28 @@ available, then this completion file will be installed 
system-wide.
 
 ## 4. Available test sets
 
-Test sets are specified as Python scripts in the tests directory.
-The following test sets are currently available:
+Test sets are specified as Python scripts in the tests directory or as
+meta profiles (for that reason it is better to run the test suite
+name, not the python script).  The following test sets are currently
+available:
 
 
 ### 4.1 OpenGL Tests
 
-  - **sanity.py** This suite contains minimal OpenGL sanity tests. These tests
+  - **sanity** This suite contains minimal OpenGL sanity tests. These tests
 must pass, otherwise the other tests will not generate reliable results.
-  - **all.py** This suite contains all OpenGL tests.
-  - **quick.py** Run all tests, but cut down significantly on their runtime
+  - **all** This suite contains all OpenGL tests.
+  - **quick** Run all tests, but cut down significantly on their runtime
 (and thus on the number of problems they can find).
-  - **gpu.py** A further reduced set of tests from quick.py, this runs tests
+  - **gpu** A further reduced set of tests from quick.py, this runs tests
 only for hardware functionality and not tests for the software stack.
-  - **llvmpipe.py** A reduced set of tests from gpu.py removing tests that are
+  - **llvmpipe** A reduced set of tests from gpu.py removing tests that are
 problematic using llvmpipe
-  - **cpu.py** This profile runs tests that don't touch the gpu, in other words
+  - **cpu** This profile runs tests that don't touch the gpu, in other words
 all of the tests in quick.py that are not run by gpu.py
-  - **glslparser.py** A subset of all.py which runs only glslparser tests
-  - **shader.py** A subset of all.py which runs only shader tests
-  - **no_error.py** A modified version of the test list run as khr_no_error
+  - **glslparser** A subset of all.py which runs only glslparser tests
+  - **shader** A subset of all.py which runs only shader tests
+  - **no_error** A modified version of the test list run as khr_no_error
 variants
 
 
-- 
2.19.1

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