[Piglit] [PATCH] shader_runner: some extra skip reasong logging

2019-06-12 Thread Alejandro Piñeiro
--- tests/shaders/shader_runner.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 44aa5da37..a2a1d43fb 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -1143,13

[Piglit] [PATCH] tests/deqp: add configuration option to control caselist generation

2019-06-06 Thread Alejandro Piñeiro
Right now, each time any deqp-like profile ask for the case list, it calls to generate the caselist. As by default it doesn't pass any parameter, it creates all the possible caselist. And there are some test sets (like khr_gles) that calls this method several time. On slow machines this means a

[Piglit] [PATCH] tests/deqp: use --deqp-case when generating case-list

2019-06-06 Thread Alejandro Piñeiro
Without this commit, generating the case list is called without any parameter by default, so it would generate all the caselist, even if you don't need it, or if you have just called the method before (like in khr_gles where you call several time gen_caselist). For the latter an alternative would

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

2019-06-05 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

[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

[Piglit] [PATCH 2/2] shader_runner: get proper access bitfield when calling MapBufferRange

2019-04-11 Thread Alejandro Piñeiro
Current workaround assumes that glMapBuffer and glMapBufferRange 'access' bitfield uses the same values, when it is not. --- .../shaders/shader_runner_gles_workarounds.h | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git

[Piglit] [PATCH 0/2] shader_runner: fix gles3 glMapBuffer workaround

2019-04-11 Thread Alejandro Piñeiro
Alejandro Piñeiro (2): shader_runner: fix error checking on MapBuffer gles workaround shader_runner: get proper access bitfield when calling MapBufferRange .../shaders/shader_runner_gles_workarounds.h | 21 --- 1 file changed, 18 insertions(+), 3 deletions(-) -- 2.19.1

[Piglit] [PATCH 1/2] shader_runner: fix error checking on MapBuffer gles workaround

2019-04-11 Thread Alejandro Piñeiro
--- tests/shaders/shader_runner_gles_workarounds.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/shaders/shader_runner_gles_workarounds.h b/tests/shaders/shader_runner_gles_workarounds.h index d3ab77506..77956f6b9 100644 ---

[Piglit] [PATCH 62/63] shader_runner/spirv: skip for GL extensions without SPIR-V equivalent

2019-02-23 Thread Alejandro Piñeiro
There are some GL extensions/features, like shader subroutines, that doesn't have their equivalent on SPIR-V, so those tests should be skipped on SPIR-V mode. We reuse the code that checks if a given SPIR-V extension equivalent to a GL extension is supported, by setting the mapping to a string

[Piglit] [PATCH 61/63] shader_runner/spirv: add check for SPV extension support

2019-02-23 Thread Alejandro Piñeiro
This only affects the case where SPIR-V shaders are run, specially when using tests coming from other extensions. In several cases, OpenGL supports an extension with a given functionality. And such functionality it is not supported on core SPIR-V but on a equivalent SPV functionality. But it is

[Piglit] [PATCH 58/63] generated_tests: remove extra space before #extension

2019-02-23 Thread Alejandro Piñeiro
glslang doesn't like those spaces, failing to generate SPIR-V. Additionally this improves readibility of the generated shader (although this is subjective). --- .../templates/gen_extensions_defined/disabled.glsl.mako | 2 +- .../templates/gen_extensions_defined/enabled.glsl.mako| 2

[Piglit] [PATCH 55/63] CMake: search for glslangValidator, spirv-dis if needed

2019-02-23 Thread Alejandro Piñeiro
If we are generating SPIR-V tests using already existing tests, we would need both programs. Note that we are not removing the option to configure where those binaries are on the script using envvars, as that can be handy if you want to use glslang from master compiled by yourself, and having

[Piglit] [PATCH 60/63] shader_runner/spirv: check if test really includes spirv

2019-02-23 Thread Alejandro Piñeiro
SPIRV YES/ONLY assumes that the test includes the SPIR-V shader, and that you should use it. This commit checks that this really happens, and prints a proper error message if that is not the case. Without this commit, a SPIRV YES/ONLY test that by mistake didn't include the [spirv xx] sections

[Piglit] [PATCH 57/63] generated_tests: Generate SPIR-V equivalents for builtin tests

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts Adds a script based on gen_builtin_uniform_tests.py which directly generates the equivalent SPIR-V assembly to test with the ARB_gl_spirv extension. The main reason to do this rather than converting the GLSL tests with glslang is that not all of the GLSL builtins have direct

[Piglit] [PATCH 54/63] CMake: Add PIGLIT_GENERATE_GL_SPIRV_TESTS option

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes Adds an option to CMake which can be enabled to generate additional shader_tests for ARB_gl_spirv by translating shader_tests written for other specifications to SPIR-V. Specifically, uses the gen_gl_spirv.py script to translate the shader_tests under the 'tests' directory,

[Piglit] [PATCH 48/63] util: add piglit_is_file_older_than helper

2019-02-23 Thread Alejandro Piñeiro
From: Nicolai Hähnle This will be used by shader_runner to check whether SPIRV object files are up-to-date. --- tests/util/piglit-util.c | 34 ++ tests/util/piglit-util.h | 1 + 2 files changed, 35 insertions(+) diff --git a/tests/util/piglit-util.c

[Piglit] [PATCH 45/63] arb_gl_spirv: add tests equivalent to component-layout SSO

2019-02-23 Thread Alejandro Piñeiro
From: Arcady Goldmints-Orlov The difference is that we explicitly specify locations for inputs and outputs in component-layout tests. The current version of glslang doesn't handle a mixture of explicit and implicit locations for inputs and outputs, so make all locations explicit. ---

[Piglit] [PATCH 56/63] generated_tests/builtin_function: Add templates for equivalent SPIR-V

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts The test signatures now have an additional member called template_spirv. If this is not None then it is a template which can be used to generate an equivalent line of SPIR-V assembly. --- generated_tests/builtin_function.py | 547 ++-- 1 file changed,

[Piglit] [PATCH 63/63] shader_runner/spirv: skip compat profile tests on SPIR-V mode

2019-02-23 Thread Alejandro Piñeiro
From ARB_gl_spirv spec: "Changes to Chapter 3 of the OpenGL Shading Language 4.50 Specification (Basics) After describing the compatibility profile rules, add: "Compatibility-profile features are not available when generating SPIR-V."" With this commit, tests that

[Piglit] [PATCH 44/63] arb_gl_spirv: Add test equivalent to CS basic-ssbo

2019-02-23 Thread Alejandro Piñeiro
From: Arcady Goldmints-Orlov The difference with arb_compute_shader/execution/basic-ssbo.shader_test is that we explicitly assign a binding to the SSBO. Without a binding number specified, glslang implicitly assigns a binding number of 1 to the SSBO, while Mesa assigns a binding number of 0. To

[Piglit] [PATCH 50/63] framework: add --spirv option

2019-02-23 Thread Alejandro Piñeiro
So when executing shader tests, they will be executed with -spirv. So for example: ./piglit run tests/shader.py -t ARB_explicit_uniform_location --spirv results/explicit_uniform_location-spirv Will run all the shader tests for that extension using -spirv. --- framework/options.py | 1

[Piglit] [PATCH 59/63] shader_runner/spirv: log skip reason on ARB_gl_spirv extension check

2019-02-23 Thread Alejandro Piñeiro
--- tests/shaders/shader_runner.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 927926a35..7c6810099 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -850,6 +850,8 @@ static enum

[Piglit] [PATCH 51/63] generated_tests: Add script to translate shader_tests to SPIR-V

2019-02-23 Thread Alejandro Piñeiro
Hänle Signed-off-by: Alejandro Piñeiro Signed-off-by: Neil Roberts Signed-off-by: Antia Puentes --- generated_tests/gen_gl_spirv_tests.py | 1424 + 1 file changed, 1424 insertions(+) create mode 100644 generated_tests/gen_gl_spirv_tests.py diff --git a/generated_tests

[Piglit] [PATCH 52/63] arb_gl_spirv: add gl_spirv.exclude file

2019-02-23 Thread Alejandro Piñeiro
wrote the first version of the file. Several people have contributed: Signed-off-by: Nicolai Hänle Signed-off-by: Antia Puentes Signed-off-by: Alejandro Piñeiro Signed-off-by: Neil Roberts Signed-off-by: Eleni Maria Stea Signed-off-by: Arcady Goldmints-Orlov --- tests/gl_spirv.exclude | 305

[Piglit] [PATCH 53/63] gitignore: add *.spv

2019-02-23 Thread Alejandro Piñeiro
From: Nicolai Hähnle --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0f4c952c2..b8008d0a2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.tar.bz2 *.zip *~ +*.spv .ninja_log build.ninja -- 2.19.1

[Piglit] [PATCH 49/63] shader_runner/spirv: Load a replacement .shader_test

2019-02-23 Thread Alejandro Piñeiro
tests that even having SPIR-V included, we want them to run on GLSL mode. Obviously it is a mistake to use "-spirv" and "-glsl" at the same time. v2: update on the code and commit message due the addition of the "-glsl" command line option,

[Piglit] [PATCH 46/63] arb_gl_spirv: fix wrong extension name for atomic-uint-fs test

2019-02-23 Thread Alejandro Piñeiro
--- .../{atomic-uint-fs.shader_runner => atomic-uint-fs.shader_test} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/spec/arb_gl_spirv/execution/uniform/{atomic-uint-fs.shader_runner => atomic-uint-fs.shader_test} (100%) diff --git

[Piglit] [PATCH 38/63] arb_gl_spirv: Add a test for PixelCenterInteger

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts This is forbidden in Vulkan but it is available in GLSL and the SPIR-V spec allows it. It isn’t mentioned in the ARB_gl_spirv spec but it seems likely that it’s intended to work. --- .../execution/pixel-center-half.shader_test | 123 +

[Piglit] [PATCH 37/63] arb_gl_spirv: Add tests for the gl_FragCoord origin

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts Using OriginLowerLeft isn’t allowed on Vulkan but explicitly allowed by ARB_gl_spirv so it’s probably worth testing. --- .../execution/origin-lower-left.shader_test | 191 + .../execution/origin-upper-left.shader_test | 192 ++ 2 files

[Piglit] [PATCH 42/63] arb_gl_spirv: Add test for atomic memory ops (shared uint)

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes --- ...ared-uint-atomic-mem-functions.shader_test | 262 ++ 1 file changed, 262 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/shared-uint-atomic-mem-functions.shader_test diff --git

[Piglit] [PATCH 41/63] arb_gl_spirv: add test for atomic images

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes --- .../execution/atomic-image.shader_test| 425 ++ 1 file changed, 425 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/atomic-image.shader_test diff --git a/tests/spec/arb_gl_spirv/execution/atomic-image.shader_test

[Piglit] [PATCH 35/63] arb_gl_spirv: Add a test for gl_InstanceID

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts This value is different from InstanceID in Vulkan because it shouldn’t include the baseinstance. --- .../execution/vs-instance-id.shader_test | 165 ++ 1 file changed, 165 insertions(+) create mode 100644

[Piglit] [PATCH 36/63] arb_gl_spirv: Add a test for the OpFUnord* opcodes

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts These opcodes are not available via GLSL so it seems worth testing them separately. This involves generating NaN values which apparently isn’t required by the spec at least on GLSL. The tests therefore try to calculate the square root of -1 and if check if it actually

[Piglit] [PATCH 40/63] arb_gl_spirv: Add a test for gl_PatchVerticesIn

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts --- .../tcs-patch-vertices-in.shader_test | 373 ++ 1 file changed, 373 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/tcs-patch-vertices-in.shader_test diff --git

[Piglit] [PATCH 33/63] shader_runner: Add a “draw arrays instanced base” command

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts This is just like “draw arrays instanced” but has an extra parameter to set the baseinstance. --- tests/shaders/shader_runner.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index

[Piglit] [PATCH 19/63] shader_runner: Add commands to query index, loc, loc-index.

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes Tests glGetProgramResourceIndex(), glGetProgramLocation() and glGetProgramLocationIndex(). --- tests/shaders/shader_runner.c | 97 +-- 1 file changed, 92 insertions(+), 5 deletions(-) diff --git a/tests/shaders/shader_runner.c

[Piglit] [PATCH 25/63] arb_gl_spirv: add xfb tests

2019-02-23 Thread Alejandro Piñeiro
Testing different things, from very basic types, to something more complex like arrays of blocks where just one member is captured. All of them are VS, as it is the most common use case. --- .../execution/xfb/vs_aoa.shader_test | 131 + .../execution/xfb/vs_block.shader_test

[Piglit] [PATCH 26/63] arb_gl_spirv: Add TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH test

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes --- .../program/max-length-xfb-query.shader_test | 79 +++ 1 file changed, 79 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/queries/program/max-length-xfb-query.shader_test diff --git

[Piglit] [PATCH 28/63] arb_gl_spirv: add a basic geometry shader

2019-02-23 Thread Alejandro Piñeiro
--- .../execution/simple-geometry.shader_test | 241 ++ 1 file changed, 241 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/simple-geometry.shader_test diff --git a/tests/spec/arb_gl_spirv/execution/simple-geometry.shader_test

[Piglit] [PATCH 32/63] shader_runner: Add support for indexed draw calls

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts There is now an [elements] section which can contain a list of indices as well as a draw elements command to draw with it. --- tests/shaders/shader_runner.c | 99 +++ 1 file changed, 99 insertions(+) diff --git a/tests/shaders/shader_runner.c

[Piglit] [PATCH 34/63] arb_gl_spirv: Add a test for gl_VertexID

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts This value is different from Vulkan because it should include the firstvertex and basevertex parameters. --- .../execution/vs-vertex-id.shader_test| 192 ++ 1 file changed, 192 insertions(+) create mode 100644

[Piglit] [PATCH 24/63] shader_runner: add xfb query object support

2019-02-23 Thread Alejandro Piñeiro
This commit adds query objects for GL_PRIMITIVES_GENERATED and GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN, and only for xfb drawing. Those query objects are created implicitly during xfb drawing. We don't add general query object support for two reasons: * Right now only xfb tests would be using

[Piglit] [PATCH 29/63] arb_gl_spirv: added tests for functions and function calls

2019-02-23 Thread Alejandro Piñeiro
From: Eleni Maria Stea --- .../execution/simple-function.shader_test | 98 +++ .../linker/simple-function-call.shader_test | 112 ++ 2 files changed, 210 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/simple-function.shader_test create

[Piglit] [PATCH 31/63] arb_gl_spirv: Add a test for matching a block by location with SSOs

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts This is copied from arb_enhanced_layouts/execution/block-member-locations --- ...o-block-member-layout-location.shader_test | 257 ++ 1 file changed, 257 insertions(+) create mode 100644

[Piglit] [PATCH 20/63] shader_runner: Check compatibility for resource name queries

2019-02-23 Thread Alejandro Piñeiro
=UNIFORM_BLOCK_NAME_LENGTH, ..) -> params = 1 GetActiveAttrib(..) -> length = 0, name = "" GetAttribLocation(.., name) -> -1 GetFragDataLocation(.., name) -> -1 GetFragDataIndex(.., name) -> -1" v2: tweak the commit message to explain better what

[Piglit] [PATCH 27/63] arb_gl_spirv: array of interface block test

2019-02-23 Thread Alejandro Piñeiro
--- .../array_of_input_output_block.shader_test | 171 ++ 1 file changed, 171 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/array_of_input_output_block.shader_test diff --git a/tests/spec/arb_gl_spirv/execution/array_of_input_output_block.shader_test

[Piglit] [PATCH 23/63] shader_runner: add xfb testing support

2019-02-23 Thread Alejandro Piñeiro
Limited to capture doubles and floats, for simplicity. This patch introduces the following [test] commands: * "expected buffer ": it allocates a expected buffer of the given in bytes. It frees any previous one if already allocated. * "expected buffer float ": sets at the

[Piglit] [PATCH 30/63] arb_gl_spirv: adding basic vertex attrib 64-bit tests

2019-02-23 Thread Alejandro Piñeiro
For now just: * Simple * Simple with array. In general ARB_gl_spirv implementation didn't need to add too many specifics. Those two were enough to catch the minor things, and enough to cover the barebone testing. For a more detailed testing it is more practical to borrow the extensive testing

[Piglit] [PATCH 14/63] shader_runner: Add skeleton to support more query commands

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes --- tests/shaders/shader_runner.c | 372 ++ 1 file changed, 283 insertions(+), 89 deletions(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 7d24c50bc..97cb89079 100644 --- a/tests/shaders/shader_runner.c

[Piglit] [PATCH 09/63] arb_gl_spirv: Add a test for SSBOs with an unsized array

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts This tests handling of the OpTypeRuntimeArray opcode. --- .../execution/ssbo/unsized-array.shader_test | 119 ++ 1 file changed, 119 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/ssbo/unsized-array.shader_test diff --git

[Piglit] [PATCH 12/63] arb_gl_spirv: add some arrays of arrays ubo/ssbo tests

2019-02-23 Thread Alejandro Piñeiro
Arrays of arrays of ubo/ssbo doesn't need to be supported on Vulkan, but, from ARB_gl_spirv spec: "Changes of system features, relative to Vulkan: . Vulkan does not allow multi-dimensional arrays of resources like UBOs and SSBOs in its SPIR-V environment spec. SPIR-V

[Piglit] [PATCH 22/63] arb_gl_spirv: Add ARB_program_interface_query tests

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes Added tests to check that the ARB_program_interface_query queries involving names behave as described in the ARB_gl_spirv extension. The SPIR-V used do not contain names. As names are optional in SPIR-V this is useful to test the behaviour of the name related queries when no

[Piglit] [PATCH 10/63] arb_gl_spirv: add ssbo test using std140 and std430

2019-02-23 Thread Alejandro Piñeiro
The test includes two ssbos, with the same content but different layouts, in order to ensure that works in both cases. Note that std140 and std430 layouts are used on the base GLSL shader used to generate the SPIR-V shaders. SPIR-V shaders doesn't include info about the layout. From ARB_gl_spirv

[Piglit] [PATCH 07/63] arb_gl_spirv: Add tests for UBOs with explicit offsets

2019-02-23 Thread Alejandro Piñeiro
From: Neil Roberts Adds two tests, one which has an explicit offset in GLSL using the layout(offset) decoration on an interface member, and another which has a struct embedded in an interface. On SPIR-V it is possible to set an explicit offset even within this embedded struct (note that this

[Piglit] [PATCH 21/63] shader_runner: add UNSIGNED_INT_ATOMIC_COUNTER as allowed type

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes --- tests/shaders/shader_runner.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 624817b59..d786963bd 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -393,6 +393,7 @@

[Piglit] [PATCH 18/63] shader_runner: Add command to query the resource name

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes Tests glGetProgramResourceName(). --- tests/shaders/shader_runner.c | 74 ++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 51c31c9d8..893a99422 100644 ---

[Piglit] [PATCH 11/63] arb_gl_spirv: add ubo array test with copy between arrays

2019-02-23 Thread Alejandro Piñeiro
For tests that triggered the lowering nir_split_vars to split arrays, we found some crashes on ARB_gl_spirv if we didn't take into account the explicit array stride on the splitted type. This is basically a regression catching test. This test is based on

[Piglit] [PATCH 04/63] arb_gl_spirv: add some simple ubo/ssbo tests

2019-02-23 Thread Alejandro Piñeiro
Those include: * Simple test with just one ubo * Two different ubo on the same stage * Same ubo used on two different stages * Array and array using indirect index of ubos Finally this also includes a test for a shader that was crashing on a early version of the SPIR-V support.

[Piglit] [PATCH 02/63] arb_gl_spirv: add GL_ACTIVE_UNIFORMS checks

2019-02-23 Thread Alejandro Piñeiro
Right now the main reason is to check that we are expanding uniforms for arrays and array of arrays of structs properly. This would be even more important with UBO/SSBO tests. The other reason is to check that hidden uniforms are really hidden. As far as we know, current arb_gl_spirv tests

[Piglit] [PATCH 17/63] shader_runner: Add command to query program interfaces

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes Tests glGetProgramInterfaceiv(). --- tests/shaders/shader_runner.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 331221449..51c31c9d8 100644 ---

[Piglit] [PATCH 08/63] arb_gl_spirv: add ubo tests with different matrix/array strides

2019-02-23 Thread Alejandro Piñeiro
ARB_gl_spirv requires that the SPIR-V includes the explicit matrix and array stride. GLSL layouts are mapped in SPIR-V with explicit values for offset, matrix stride and array stride, but as far as it respect alignments and minimum offsets, the strides doesn't need to be exactly what OpenGL GLSL

[Piglit] [PATCH 13/63] arb_gl_spirv: Added tests for glGetProgramiv()

2019-02-23 Thread Alejandro Piñeiro
From: Antia Puentes The SPIR-V used does not contain names. As names are optional in SPIR-V this is useful to test the behaviour of the name related queries when no name reflection is available. --- .../program/max-length-queries.shader_test| 211 +

[Piglit] [PATCH 06/63] arb_gl_spirv: add a array of ubo test, with complex ubo content

2019-02-23 Thread Alejandro Piñeiro
Specifically the ubo contains some basic types, a struct type, with array and matrices members. v2: * Add some layer of complexity (to include some cases mentioned by Timothy on the mesa-dev review) * No expected final substractions/additions value of content, but check for real

[Piglit] [PATCH 01/63] shader_runner: add support for glGetProgram queries

2019-02-23 Thread Alejandro Piñeiro
id results for the query (Antia Puentes). Signed-off-by: Alejandro Piñeiro Signed-off-by: Antia Puentes --- tests/shaders/shader_runner.c | 80 +++ 1 file changed, 80 insertions(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index

[Piglit] [PATCH 00/63] ARB_gl_spirv full series

2019-02-23 Thread Alejandro Piñeiro
ches 59-64: as mentioned, minor clean-ups and fixes. [1] https://gitlab.freedesktop.org/mesa/mesa/merge_requests/178 Alejandro Piñeiro (26): shader_runner: add support for glGetProgram queries arb_gl_spirv: add GL_ACTIVE_UNIFORMS checks shader_runner: add force_no_names mode arb_gl_spirv: add s

[Piglit] [PATCH 03/63] shader_runner: add force_no_names mode

2019-02-23 Thread Alejandro Piñeiro
r the NULL terminator when returning the name length and glGetProgramResourceiv does, and improved the error message (Antia Puentes). Signed-off-by: Alejandro Piñeiro --- tests/shaders/shader_runner.c | 392 ++ 1 file changed, 300 insertions(+), 92 deletions(-) diff --g

[Piglit] [PATCH 2/3] arb_enhanced_layouts: Fix error in subtest result reporting

2019-02-20 Thread Alejandro Piñeiro
From: Antia Puentes --- .../arb_enhanced_layouts/transform-feedback-layout-query-api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/spec/arb_enhanced_layouts/transform-feedback-layout-query-api.c

[Piglit] [PATCH 1/3] arb_enhanced_layouts: don't call glLinkProgram twice

2019-02-20 Thread Alejandro Piñeiro
GLSL codepath uses piglit_build_simple_program_multiple_shaders, that already calls glLinkProgram. Minor thing, but makes debug the test more easy. --- .../transform-feedback-layout-qualifiers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Piglit] [PATCH 3/3] arb_enhanced_layouts: use consistent test names

2019-02-20 Thread Alejandro Piñeiro
Before this commit a piglit run like this: ./piglit run tests/all.py -t arb_enhanced_layouts-transform-feedback ../piglit_results/foo Would include the layout-qualifiers tests, but not the layout-query one. --- tests/opengl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Piglit] [PATCH 0/3] arb_enhanced_layouts: minor clean-up and one bugfix

2019-02-20 Thread Alejandro Piñeiro
We found this issues while working with ARB_gl_spirv, but all those are independent of it, so we are sending independently. Alejandro Piñeiro (2): arb_enhanced_layouts: don't call glLinkProgram twice arb_enhanced_layouts: use consistent test names Antia Puentes (1): arb_enhanced_layouts

[Piglit] [PATCH] shader_runner: skip GLSL version check when running SPIR-V shaders

2019-02-02 Thread Alejandro Piñeiro
Because after all, you are not running GLSL shaders in that case. SPIR-V requirements are OpenGL version >= 3.30 and having ARB_gl_spirv available. About why this is needed: most SPIR-V tests include the GLSL used to generate the SPIR-V, so the SPIR-V could be regenerated easily if we test needs

[Piglit] [PATCH] vulkan: Add some tests for block member decorations

2019-01-24 Thread Alejandro Piñeiro
From: Neil Roberts v2: imported to piglit from a example vkrunner examples branch, also updated description on the top comment (Alejandro Piñeiro) v3: use location 1 instead of location 0 for one of the tests (Lionel) Reviewed-by: Lionel Landwerlin --- .../block-layout

[Piglit] [PATCH] vulkan: Add tests for double vertex inputs

2019-01-24 Thread Alejandro Piñeiro
From: Neil Roberts v2: (changes made by Alejandro Piñeiro) * Imported to piglit from a example vkrunner examples branch, also updated description on the top comment (Alejandro Piñeiro) * Fixed the fact that the interface type was not being properly assigned the Block OpDecorate

[Piglit] [PATCH] vulkan: Add some tests for block member decorations

2019-01-23 Thread Alejandro Piñeiro
From: Neil Roberts v2: imported to piglit from a example vkrunner examples branch, also updated description on the top comment (Alejandro Piñeiro) --- This tests are intended to test the patches at the following mesa MR: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/142 Although

[Piglit] [PATCH] arb_gl_spirv: simple test, use correct reference colors

2018-12-06 Thread Alejandro Piñeiro
It was using the same color for the base color, drawing color and expected color. As we are here, we also remove the debug names, as the test should work without names. --- .../execution/vs-ps-simple.shader_test| 23 +-- 1 file changed, 6 insertions(+), 17 deletions(-)

Re: [Piglit] [PATCH] vulkan: Add tests for block layout location calculations

2018-11-08 Thread Alejandro Piñeiro
On 08/11/18 13:24, Neil Roberts wrote: > All but one of these are currently broken on anv. > > See: https://patchwork.freedesktop.org/series/40797/ FWIW, the first patch of that series is outdated, due all the changes on master since then. A updated version was included on the ubo/ssbo support

[Piglit] [PATCH] vulkan: test cases for large local arrays

2018-11-08 Thread Alejandro Piñeiro
Equivalent to the GLSL tests added with the series "Test cases for large GLSL local arrays". Quoting from the cover-letter of that series: "Drivers typically need special handling for local array storage when arrays exceed a certain size, this adds a few test cases for exercising some

Re: [Piglit] [PATCH v2 00/17] ARB_gl_spirv: v2 ubo/ssbo tests

2018-10-22 Thread Alejandro Piñeiro
, Alejandro Piñeiro wrote: > Hi, > > this is the second version of the ubo/ssbo tests for > ARB_gl_spirv. Differences compared with v1: > > * Rebased against today master. > > * Updated the pass checks on several tests. Instead of a silly > addition/substract

[Piglit] [PATCH] arb_gl_spirv: add array test with copy between arrays

2018-10-01 Thread Alejandro Piñeiro
For tests that triggered nir_split_vars to split arrays, we found some crashes on ARB_gl_spirv if we didn't take into account the explicit array stride on the splitted type. This is basically a regression catching test. This test is based on spec/glsl-1.40/uniform_buffer/fs-array-copy test that

[Piglit] [PATCH v2 13/17] arb_gl_spirv: add some simple ssbo tests

2018-09-27 Thread Alejandro Piñeiro
Equivalent to the ubo tests added with the commit "arb_gl_spirv: add some simple ubo tests", but without the linker tests and the regression-check test. v2: no expected final substractions/additions value of content, but check for real values (Timothy) ---

[Piglit] [PATCH v2 11/17] arb_gl_spirv: add ubo matrix test with different matrix_stride

2018-09-27 Thread Alejandro Piñeiro
ARB_gl_spirv requires that the SPIR-V includes the explicit matrix stride. In general layouts are mapping with explicit offset, matrix stride and array stride. As far as it respect alignments and minimum offsets, matrix_stride doesn't need to be exactly what OpenGL GLSL computes, and in fact, the

[Piglit] [PATCH v2 16/17] arb_gl_spirv: Add a test for SSBOs with an unsized array

2018-09-27 Thread Alejandro Piñeiro
From: Neil Roberts This tests handling of the OpTypeRuntimeArray opcode. --- .../execution/ssbo/unsized-array.shader_test | 119 + 1 file changed, 119 insertions(+) create mode 100644 tests/spec/arb_gl_spirv/execution/ssbo/unsized-array.shader_test diff --git

[Piglit] [PATCH v2 15/17] arb_gl_spirv: adding complex ssbo matrix test

2018-09-27 Thread Alejandro Piñeiro
v2: no expected final substractions/additions value of content, but check for real values (Timothy) --- .../execution/ssbo/matrix/complex.shader_test | 702 + 1 file changed, 702 insertions(+) create mode 100644

[Piglit] [PATCH v2 17/17] arb_gl_spirv: add ssbo test using std140 and std430

2018-09-27 Thread Alejandro Piñeiro
The test includes two ssbos, with the same content but different layouts, in order to ensure that works in both cases. Note that std140 and std430 layouts are used on the base GLSL shader used to generate the SPIR-V shaders. SPIR-V shaders doesn't include info about the layout. From ARB_gl_spirv

[Piglit] [PATCH v2 14/17] arb_gl_spirv: add simple ssbo tests with matrices

2018-09-27 Thread Alejandro Piñeiro
v2: no expected final substractions/additions value of content, but check for real values (Timothy) --- .../execution/ssbo/matrix/column-major.shader_test | 188 + .../ssbo/matrix/column-vs-row.shader_test | 291 +

[Piglit] [PATCH v2 04/17] shader_runner: add support for glGetProgram queries

2018-09-27 Thread Alejandro Piñeiro
Similar to the already existing verify program_interface_query, but with the glGetProgramiv queries. Useful, for example, to verify the current number of active (via GL_ACTIVE_UNIFORMS). Note that now there are two ways to verify link success. With the already existing "link succes" shader

[Piglit] [PATCH v2 05/17] arb_gl_spirv: add GL_ACTIVE_UNIFORMS checks

2018-09-27 Thread Alejandro Piñeiro
Right now the main reason is to check that we are expanding uniforms for arrays and array of arrays of structs properly. This would be even more important with UBO/SSBO tests. The other reason is to check that hidden uniforms are really hidden. As far as we know, current arb_gl_spirv tests

[Piglit] [PATCH v2 12/17] arb_gl_spirv: add ubo array test with different array_stride

2018-09-27 Thread Alejandro Piñeiro
For more info, see the long explanation at the commit "arb_gl_spirv: add ubo matrix test with different matrix_stride" v2: no expected final substractions/additions value of content, but check for real values (Timothy) --- .../array-different-array-stride-ubo.shader_test | 271

[Piglit] [PATCH v2 00/17] ARB_gl_spirv: v2 ubo/ssbo tests

2018-09-27 Thread Alejandro Piñeiro
The series can be found on this branch: https://github.com/Igalia/piglit/tree/arb_gl_spirv-series5-ubo-ssbo-v2 Alejandro Piñeiro (15): shader_runner/spirv: log skip reason on ARB_gl_spirv extension check shader_runner/spirv: check if test really includes spirv shader_runner: add

[Piglit] [PATCH v2 02/17] shader_runner/spirv: check if test really includes spirv

2018-09-27 Thread Alejandro Piñeiro
SPIRV YES/ONLY assumes that the test includes the SPIR-V shader, and that you should use it. This commit checks that this really happens, and prints a proper error message. Without this commit, a SPIRV YES/ONLY test that by mistake didn't include the [spirv xx] sections would be just skipped with

[Piglit] [PATCH v2 03/17] shader_runner: add force_no_names mode

2018-09-27 Thread Alejandro Piñeiro
Right now UBO data filling is based on using the name of the ubo and their components, in order to get the block and uniform index. It also uses it to set the binding (so it forces block_index and block_binding to be equal). Since ARB_shading_language_420pack it is possible to set a explicit ubo

[Piglit] [PATCH v2 09/17] arb_gl_spirv: add a array of ubo test, with complex ubo content

2018-09-27 Thread Alejandro Piñeiro
Specifically the ubo contains some basic types, a struct type, with array and matrices members. v2: * Add some layer of complexity (to include some cases mentioned by Timothy on the mesa-dev review) * No expected final substractions/additions value of content, but check for real

[Piglit] [PATCH v2 07/17] arb_gl_spirv: add simple ubo tests with matrices

2018-09-27 Thread Alejandro Piñeiro
v2: no expected final substractions/additions value of content, but check for real values (Timothy) --- .../execution/ubo/matrix/column-major.shader_test | 176 .../execution/ubo/matrix/column-vs-row.shader_test | 303 +

[Piglit] [PATCH v2 10/17] arb_gl_spirv: Add tests for UBOs with explicit offsets

2018-09-27 Thread Alejandro Piñeiro
From: Neil Roberts Adds two tests, one which has an explicit offset in GLSL using the layout(offset) decoration on an interface member, and another which has a struct embedded in an interface. On SPIR-V it is possible to set an explicit offset even within this embedded struct. ---

[Piglit] [PATCH v2 06/17] arb_gl_spirv: add some simple ubo tests

2018-09-27 Thread Alejandro Piñeiro
Add two linker tests and several simple execution tests for ubo. Linker tests just checks for some basic linker errors (like mistmatched ubo on different stages). The execution tests include: * Simple one with just one ubo * Two different ubo on the same stage * Same ubo used on

[Piglit] [PATCH v2 08/17] arb_gl_spirv: add complex ubo test with matrices

2018-09-27 Thread Alejandro Piñeiro
UBO test using several matrices on one block. All possible size combination, mixing row and column major. --- .../execution/ubo/matrix/complex.shader_test | 624 + 1 file changed, 624 insertions(+) create mode 100644

[Piglit] [PATCH v2 01/17] shader_runner/spirv: log skip reason on ARB_gl_spirv extension check

2018-09-27 Thread Alejandro Piñeiro
--- tests/shaders/shader_runner.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c index 6df8bd860..e5566ee7d 100644 --- a/tests/shaders/shader_runner.c +++ b/tests/shaders/shader_runner.c @@ -814,6 +814,8 @@ static enum

[Piglit] [PATCH v2] shader_runner: add force_no_names mode

2018-09-21 Thread Alejandro Piñeiro
Right now UBO data filling is based on using the name of the ubo and their components, in order to get the block and uniform index. It also uses it to set the binding (so it forces block_index and block_binding to be equal). Since ARB_shading_language_420pack it is possible to set a explicit ubo

Re: [Piglit] [PATCH 12/17] arb_gl_spirv: add ubo array test with different array_stride

2018-09-21 Thread Alejandro Piñeiro
On 21/09/18 00:13, Timothy Arceri wrote: > On 16/9/18 2:22 am, Alejandro Piñeiro wrote: >> For more info, see the long explanation at the commit "arb_gl_spirv: >> add ubo matrix test with different matrix_stride" >> --- >>   .../array-different

Re: [Piglit] [PATCH 03/17] shader_runner: add forcing_no_names mode

2018-09-20 Thread Alejandro Piñeiro
On 20/09/18 17:02, Ian Romanick wrote: > On 09/15/2018 09:22 AM, Alejandro Piñeiro wrote: >> Right now UBO data filling is based on using the name of the ubo and >> their components, in order to get the block and uniform index. It also >> uses it to set the binding (so

  1   2   3   4   5   >