[Mesa-dev] [PATCH 3/2] mesa: expose some ARB_viewport_array dependent extensions in compat

2018-06-20 Thread Timothy Arceri
--- src/mesa/main/extensions_table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index bc1f21a2926..b1ee0214d6c 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@

[Mesa-dev] [PATCH 2/2] mesa: enable ARB_viewport_array in compat profile

2018-06-20 Thread Timothy Arceri
--- src/mapi/glapi/gen/apiexec.py| 16 src/mesa/main/extensions_table.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mapi/glapi/gen/apiexec.py b/src/mapi/glapi/gen/apiexec.py index e69c6b4df16..1a91785d375 100644 ---

[Mesa-dev] [PATCH 1/2] mesa: add ARB_viewport_array display list support

2018-06-20 Thread Timothy Arceri
--- src/mesa/main/dlist.c | 211 ++ 1 file changed, 211 insertions(+) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 57ece6c30e0..8b1ddb05038 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -290,6 +290,15 @@ typedef enum

Re: [Mesa-dev] [PATCH] st/nir: Disable varying packing when doing transform feedback.

2018-06-20 Thread Timothy Arceri
nir_compact_varyings() is meant to skip over varyings used by xfb: /* We can't repack xfb varyings. */ if (var->data.always_active_io) continue; Any idea why that isn't working in this case? On 21/06/18 06:30, Eric Anholt wrote: If one of the TF variables got

Re: [Mesa-dev] [PATCH v2 08/21] spirv: translate default-block uniforms

2018-06-20 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Nicolai Hähnle They are supported by SPIR-V for ARB_gl_spirv. v2 (changes on top of Nicolai's original patch): * Handle UniformConstant storage class for uniforms other than samplers and images. (Eduardo

Re: [Mesa-dev] [PATCH] squash! nir/linker: Add gl_nir_link_uniforms()

2018-06-20 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 20/06/18 22:27, Alejandro Piñeiro wrote: From: Neil Roberts Sets var->driver.location if the uniform was found from a previous stage. --- Hi Timothy, thanks for the review of the original patch. Recently we found that we missed a little thing (one l

Re: [Mesa-dev] [PATCH v2 20/21] i965: Setup glsl uniforms by index rather than name matching

2018-06-19 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Neil Roberts Previously when setting up a uniform it would try to walk the uniform storage slots and find one that matches the name of the given variable. However, each variable already has a location which

Re: [Mesa-dev] [PATCH v2 13/21] nir/linker: Add gl_nir_link_uniforms()

2018-06-19 Thread Timothy Arceri
I'm still unsure about some design decisions but in the name of progressing this work this patch is: Reviewed-by: Timothy Arceri We can always rework things later if need be. On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev This function will be the entry point

Re: [Mesa-dev] [PATCH v2 14/21] nir/linker: Set the uniform initial values

2018-06-19 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Neil Roberts This is based on link_uniform_initializers.cpp. v2: move from compiler/nir to compiler/glsl (Timothy Arceri) --- src/compiler/Makefile.sources | 1 + .../glsl

[Mesa-dev] [PATCH 3/6] mesa: enable ARB_gpu_shader_fp64 in compat profile

2018-06-19 Thread Timothy Arceri
--- src/mesa/main/extensions_table.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index 1c55df8a228..423f22b4657 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -76,7

[Mesa-dev] [PATCH 5/6] mesa: add glUniformSubroutinesuiv() display list support

2018-06-19 Thread Timothy Arceri
--- src/mesa/main/dlist.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 0eb665e25e7..57ece6c30e0 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -523,6 +523,9 @@ typedef enum /*

[Mesa-dev] [PATCH 2/6] mesa: add ProgramUniform*d display list support

2018-06-19 Thread Timothy Arceri
This is required for fp64 to be enabled in compat profile. --- src/mesa/main/dlist.c | 514 ++ 1 file changed, 514 insertions(+) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index b0fbc17d017..0eb665e25e7 100644 --- a/src/mesa/main/dlist.c

[Mesa-dev] [PATCH 4/6] mesa: stop hiding remaining query parameters from OpenGL compat

2018-06-19 Thread Timothy Arceri
I managed to miss these two in my last pass at this. --- src/mesa/main/get_hash_params.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 83136108e95..618e306e509 100644 ---

[Mesa-dev] [PATCH 1/6] mesa: add Uniform*d support to display lists

2018-06-19 Thread Timothy Arceri
This is required so we can enable fp64 support in compat profile. --- src/mapi/glapi/gen/apiexec.py | 36 +-- src/mesa/main/dlist.c | 493 ++ 2 files changed, 511 insertions(+), 18 deletions(-) diff --git a/src/mapi/glapi/gen/apiexec.py

[Mesa-dev] [PATCH 6/6] mesa: enable ARB_shader_subroutine in compat profile

2018-06-19 Thread Timothy Arceri
--- src/mapi/glapi/gen/apiexec.py| 16 src/mesa/main/extensions_table.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mapi/glapi/gen/apiexec.py b/src/mapi/glapi/gen/apiexec.py index 00c80171274..e69c6b4df16 100644 ---

Re: [Mesa-dev] [PATCH v2 4/5] mesa/util: add allow_glsl_relaxed_es driconfig override

2018-06-19 Thread Timothy Arceri
On 19/06/18 17:05, Dave Airlie wrote: On 14 June 2018 at 11:00, Timothy Arceri wrote: This relaxes a number of ES shader restrictions allowing shaders to follow more desktop GLSL like rules. This initial implementation relaxes the following: - allows linking ES shaders with desktop

Re: [Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2018-06-18 Thread Timothy Arceri
On 19/06/18 08:40, Ian Romanick wrote: On 06/17/2018 05:15 PM, Timothy Arceri wrote: Since we know what side of the branch we ended up on we can just replace the use with a constant. All helped shaders are from Unreal Engine 4 besides one shader from Dirt Showdown. shader-db results SKL

Re: [Mesa-dev] [PATCH mesa] gallium: simplify util_format_is_supported()

2018-06-18 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 18/06/18 20:15, Eric Engestrom wrote: As of 66673bef941af344314f ("mesa: Unconditionally enable floating-point textures"), the `bind` argument is no longer used, and the format check is now a simple enum range check, so inline it and remove the u

Re: [Mesa-dev] [PATCH] mesa: add better GLSL override support for compat profile

2018-06-18 Thread Timothy Arceri
On 18/06/18 19:38, Iago Toral wrote: On Mon, 2018-06-18 at 12:51 +1000, Timothy Arceri wrote: --- src/mesa/main/version.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 1bdccf4a1df..0d2597a61f4 100644

Re: [Mesa-dev] [PATCH] mesa: add ff fragment shader support for geom and tess shaders

2018-06-18 Thread Timothy Arceri
On 18/06/18 18:45, Gustaw Smolarczyk wrote: 2018-06-18 10:39 GMT+02:00 Iago Toral <mailto:ito...@igalia.com>>: On Mon, 2018-06-18 at 09:43 +0200, Gustaw Smolarczyk wrote: 2018-06-18 4:39 GMT+02:00 Timothy Arceri mailto:tarc...@itsqueeze.com>>: This is required fo

[Mesa-dev] [PATCH] radeonsi: enable OpenGL 3.3 compat profile

2018-06-17 Thread Timothy Arceri
Cc: Marek Olšák --- This is intended to apply on top of: https://patchwork.freedesktop.org/patch/229981/ All the high importance pieces are now implemented and we have a reasonable number of piglit tests for these bits. src/gallium/drivers/radeonsi/si_get.c | 2 +- 1 file changed, 1

[Mesa-dev] [PATCH] mesa: add better GLSL override support for compat profile

2018-06-17 Thread Timothy Arceri
--- src/mesa/main/version.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c index 1bdccf4a1df..0d2597a61f4 100644 --- a/src/mesa/main/version.c +++ b/src/mesa/main/version.c @@ -228,6 +228,7 @@

[Mesa-dev] [PATCH] mesa: add ff fragment shader support for geom and tess shaders

2018-06-17 Thread Timothy Arceri
This is required for compatibility profile support. --- src/mesa/main/ff_fragment_shader.cpp | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index a698931d99e..935a21624af 100644 ---

[Mesa-dev] [PATCH] nir: evaluate if condition uses inside the if branches

2018-06-17 Thread Timothy Arceri
Since we know what side of the branch we ended up on we can just replace the use with a constant. All helped shaders are from Unreal Engine 4 besides one shader from Dirt Showdown. shader-db results SKL: total instructions in shared programs: 13219725 -> 13219643 (<.01%) instructions in

[Mesa-dev] [PATCH] mesa: Unconditionally enable floating-point textures

2018-06-16 Thread Timothy Arceri
ARB_texture_float references US Patent #6,650,327 [1] which has a filing date of June 16 1998. According to [2], patents filed after 1995 expire 20 years from the filing date, giving an expiration of June 17 2018. [1] https://www.google.com/patents/US6650327 [2]

Re: [Mesa-dev] [PATCH 2/2] nir: add comment for loop_unroll pass

2018-06-15 Thread Timothy Arceri
Series: Reviewed-by: Timothy Arceri On 16/06/18 06:13, Rob Clark wrote: Save the next person from digging through the code to figure out what the indirect_mask parameter actually does. Signed-off-by: Rob Clark --- src/compiler/nir/nir_opt_loop_unroll.c | 4 1 file changed, 4

Re: [Mesa-dev] [PATCH] glsl: serialize data from glTransformFeedbackVaryings

2018-06-14 Thread Timothy Arceri
Can we get a piglit test to go along with this? Jordan added some recently that you should be able to use as a base. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v2 1/5] util: manually extract the program name from program_invocation_name

2018-06-14 Thread Timothy Arceri
On 14/06/18 19:40, Eric Engestrom wrote: On Thursday, 2018-06-14 11:00:21 +1000, Timothy Arceri wrote: Glibc has the same code to get program_invocation_short_name. However for some reason the short name gets mangled for some wine apps. For example with Google Earth VR I get

[Mesa-dev] [PATCH v2 4/5] mesa/util: add allow_glsl_relaxed_es driconfig override

2018-06-13 Thread Timothy Arceri
This relaxes a number of ES shader restrictions allowing shaders to follow more desktop GLSL like rules. This initial implementation relaxes the following: - allows linking ES shaders with desktop shaders - allows mismatching precision qualifiers - always enables standard derivative builtins

[Mesa-dev] [PATCH v2 3/5] util: add allow_glsl_builtin_const_expression to drirc for Google Earth VR

2018-06-13 Thread Timothy Arceri
--- src/util/drirc | 4 1 file changed, 4 insertions(+) diff --git a/src/util/drirc b/src/util/drirc index c76f1ca4380..ff706d16001 100644 --- a/src/util/drirc +++ b/src/util/drirc @@ -176,6 +176,10 @@ TODO: document the other workarounds. + + +

[Mesa-dev] [PATCH v2 2/5] mesa/util: add allow_glsl_builtin_const_expression driconf override

2018-06-13 Thread Timothy Arceri
Google Earth VR shaders uses builtins in constant expressions with GLSL 1.10. That feature wasn't allowed until GLSL 1.20. --- src/compiler/glsl/ast_function.cpp | 3 ++- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 + src/gallium/include/state_tracker/st_api.h

[Mesa-dev] [PATCH v2 1/5] util: manually extract the program name from program_invocation_name

2018-06-13 Thread Timothy Arceri
Glibc has the same code to get program_invocation_short_name. However for some reason the short name gets mangled for some wine apps. For example with Google Earth VR I get: program_invocation_name: "/home/tarceri/.local/share/Steam/steamapps/common/EarthVR/Earth.exe"

[Mesa-dev] [PATCH v2 5/5] util: add allow_glsl_relaxed_es to drirc for Google Earth VR

2018-06-13 Thread Timothy Arceri
--- src/util/drirc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/drirc b/src/util/drirc index ff706d16001..7f91035ae8b 100644 --- a/src/util/drirc +++ b/src/util/drirc @@ -178,6 +178,7 @@ TODO: document the other workarounds. +

Re: [Mesa-dev] [PATCH] glsl: allow standalone semicolons outside main()

2018-06-13 Thread Timothy Arceri
{ $$ = NULL; } | layout_defaults{ $$ = $1; } + | ';' { $$ = NULL; } Should the $$ stuff be aligned with above? Otherwise: Acked-by: Timothy Arceri ; function_definition: ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH 1/2] vkpipeline-db: add sType to pipeline info

2018-06-12 Thread Timothy Arceri
On 12/06/18 18:46, Grazvydas Ignotas wrote> On Tue, Jun 12, 2018 at 8:07 AM, Timothy Arceri wrote: From: Timothy Arceri localhost.localdomain? Yeah I wrote these patches from an Intel machine I don't use very often, I've already fixed these loca

[Mesa-dev] [PATCH] anv: implement basic VK_AMD_shader_info support

2018-06-11 Thread Timothy Arceri
From: Timothy Arceri For now this just allows an app to query VK_SHADER_INFO_TYPE_DISASSEMBLY_AMD which for now only returns shader-db information. This will allow us to use anv with vkpipeline-db. We should add shader disassembly in the future so that RenderDoc can display

[Mesa-dev] [PATCH 2/2] vkpipeline-db: add support for anv

2018-06-11 Thread Timothy Arceri
From: Timothy Arceri --- anv-report.py | 191 ++ run.c | 75 +--- 2 files changed, 239 insertions(+), 27 deletions(-) create mode 100755 anv-report.py diff --git a/anv-report.py b/anv-report.py new file mode 100755 index

[Mesa-dev] [PATCH 1/2] vkpipeline-db: add sType to pipeline info

2018-06-11 Thread Timothy Arceri
From: Timothy Arceri This avoids hitting asserts in anv. --- run.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run.c b/run.c index eafbd7d..a962887 100644 --- a/run.c +++ b/run.c @@ -264,6 +264,7 @@ create_graphics_pipeline(VkDevice device, struct pipeline_info *info, return

[Mesa-dev] [PATCH 2/2] vkpipeline-db: add support for anv

2018-06-11 Thread Timothy Arceri
From: Timothy Arceri --- anv-report.py | 191 ++ run.c | 75 +--- 2 files changed, 239 insertions(+), 27 deletions(-) create mode 100755 anv-report.py diff --git a/anv-report.py b/anv-report.py new file mode 100755 index

[Mesa-dev] [PATCH 1/2] vkpipeline-db: add sType to pipeline info

2018-06-11 Thread Timothy Arceri
From: Timothy Arceri This avoids hitting asserts in anv. --- run.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run.c b/run.c index eafbd7d..a962887 100644 --- a/run.c +++ b/run.c @@ -264,6 +264,7 @@ create_graphics_pipeline(VkDevice device, struct pipeline_info *info, return

Re: [Mesa-dev] [PATCH] mesa/st/nir: fix driver_location for arrays of image/sampler

2018-06-11 Thread Timothy Arceri
Looks right to me. I guess we have no piglit tests for it, I ran the CTS a few times on radeonsi but I was more focused on getting piglit working. Reviewed-by: Timothy Arceri On 12/06/18 04:56, Rob Clark wrote: We can have arrays of images or samplers. But I forgot to handle that case long

[Mesa-dev] [PATCH] vkpipeline_db: add support for multi-threading

2018-06-08 Thread Timothy Arceri
--- CMakeLists.txt | 1 + run.c | 169 +++-- 2 files changed, 121 insertions(+), 49 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e1546c..c1d86c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@

Re: [Mesa-dev] [PATCH 6/7] mesa/util: add allow_glsl_relaxed_es driconfig override

2018-06-08 Thread Timothy Arceri
On 09/06/18 00:07, Eero Tamminen wrote: Hi, On 08.06.2018 15:19, Timothy Arceri wrote: This relaxes a number of ES shader restrictions allowing shaders to follow more desktop GLSL like rules. This initial implementation relaxes the following:   - allows linking ES shaders with desktop

[Mesa-dev] [PATCH 6/7] mesa/util: add allow_glsl_relaxed_es driconfig override

2018-06-08 Thread Timothy Arceri
This relaxes a number of ES shader restrictions allowing shaders to follow more desktop GLSL like rules. This initial implementation relaxes the following: - allows linking ES shaders with desktop shaders - allows mismatching precision qualifiers - always enables standard derivative builtins

[Mesa-dev] [PATCH 4/7] mesa/util: add allow_glsl_builtin_const_expression driconf override

2018-06-08 Thread Timothy Arceri
Google Earth VR shaders uses builtins in constant expressions with GLSL 1.10. That feature wasn't allowed until GLSL 1.20. --- src/compiler/glsl/ast_function.cpp | 3 ++- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 + src/gallium/include/state_tracker/st_api.h

[Mesa-dev] [PATCH 7/7] util: add allow_glsl_relaxed_es to drirc for Google Earth VR

2018-06-08 Thread Timothy Arceri
--- src/util/drirc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/drirc b/src/util/drirc index 574374418fd..ee0133f4f40 100644 --- a/src/util/drirc +++ b/src/util/drirc @@ -179,6 +179,7 @@ TODO: document the other workarounds. +

[Mesa-dev] [PATCH 5/7] util: add allow_glsl_builtin_const_expression to drirc for Google Earth VR

2018-06-08 Thread Timothy Arceri
--- src/util/drirc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/drirc b/src/util/drirc index 8e61c32ca71..574374418fd 100644 --- a/src/util/drirc +++ b/src/util/drirc @@ -178,6 +178,7 @@ TODO: document the other workarounds. +

[Mesa-dev] [PATCH 3/7] util: add allow_glsl_semicolon_after_function to drirc for Google Earth VR

2018-06-08 Thread Timothy Arceri
--- src/util/drirc | 4 1 file changed, 4 insertions(+) diff --git a/src/util/drirc b/src/util/drirc index c76f1ca4380..8e61c32ca71 100644 --- a/src/util/drirc +++ b/src/util/drirc @@ -176,6 +176,10 @@ TODO: document the other workarounds. + + +

[Mesa-dev] [PATCH 2/7] mesa/util: add allow_glsl_semicolon_after_function driconfig override

2018-06-08 Thread Timothy Arceri
These are seen in Google Earth VR shaders. --- src/compiler/glsl/glsl_parser.yy | 18 +- .../auxiliary/pipe-loader/driinfo_gallium.h| 1 + src/gallium/include/state_tracker/st_api.h | 1 + src/gallium/state_trackers/dri/dri_screen.c| 2 ++

[Mesa-dev] [PATCH 1/7] util: manually extract the program name from program_invocation_name

2018-06-08 Thread Timothy Arceri
Glibc has the same code to get program_invocation_short_name. However for some reason the short name gets mangled for some wine apps. For example with Google Earth VR I get: program_invocation_name: "/home/tarceri/.local/share/Steam/steamapps/common/EarthVR/Earth.exe"

Re: [Mesa-dev] [PATCH v2 13/21] nir/linker: Add gl_nir_link_uniforms()

2018-06-07 Thread Timothy Arceri
On 06/06/18 19:10, Neil Roberts wrote: Timothy Arceri writes: +static struct type_tree_entry * +build_type_tree_for_type(const struct glsl_type *type) +{ Do we really need this? As far as I can tell we walk the types here to build a tree then in nir_link_uniform() we walk the tree. Why

[Mesa-dev] [PATCH] radeonsi: fix possible truncation on renderer string

2018-06-06 Thread Timothy Arceri
Fixes truncation warning in gcc 8.1 Fixes: 8539c9bf3158 ("gallium/radeon: add the kernel version into the renderer string") --- src/gallium/drivers/radeonsi/si_pipe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.h

[Mesa-dev] [PATCH] ac: fix possible truncation of intrinsic name

2018-06-06 Thread Timothy Arceri
Fixes the gcc warning: snprintf’ output between 26 and 33 bytes into a destination of size 32 Fixes: d5f7ebda3ec0 ("ac: add LLVM build functions for subgroup instrinsics") --- src/amd/common/ac_llvm_build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH] radv: fix Coverity no effect control flow issue

2018-06-06 Thread Timothy Arceri
swizzle is unsigned so "desc->swizzle[c] < 0" is never true. --- src/amd/vulkan/radv_formats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c index 50ec904d514..958f2a2c821 100644 ---

Re: [Mesa-dev] [PATCH] mesa/program_binary: add implicit UseProgram after successful ProgramBinary

2018-06-06 Thread Timothy Arceri
quot;mesa: use gl_program for CurrentProgram rather than gl_shader_program" Cc: Timothy Arceri Cc: Signed-off-by: Jordan Justen --- src/mesa/main/program_binary.c | 33 + 1 file changed, 33 insertions(+) diff --git a/src/mesa/main/program_binary.c b/src/me

Re: [Mesa-dev] [PATCH v2 18/21] i965: Update TexturesUsed after linking the shaders

2018-06-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Neil Roberts Otherwise if the shader is SPIR-V then SamplerUsed won’t have been initialised yet so it will end up thinking no textures are used. This was causing a crash later on if nothing causes it to regenerate

Re: [Mesa-dev] [PATCH v2 17/21] i965: Build SPIR-V programs' resource list using NIR

2018-06-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev v2: tweak after nir_linker.h being renamed to gl_nir_linker.h --- src/mesa/drivers/dri/i965/brw_link.cpp | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mesa

Re: [Mesa-dev] [PATCH v2 21/21] i965: Link uniforms of SPIR-V programs using the NIR linker

2018-06-06 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev v2: nir_link_uniforms renamed to gl_nir_link_uniforms Signed-off-by: Eduardo Lima Signed-off-by: Alejandro Piñeiro --- src/mesa/drivers/dri/i965/brw_link.cpp | 6 ++ 1 file changed, 6

Re: [Mesa-dev] [PATCH v2 19/21] i965: account for NIR uniforms without name

2018-06-06 Thread Timothy Arceri
Look like we should have just always done it this way. Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev Right now, the BRW linker code assumes nir_variable::name is always non-NULL, but thanks to ARB_gl_spirv we will soon be linking SPIR-V

Re: [Mesa-dev] [PATCH v2 13/21] nir/linker: Add gl_nir_link_uniforms()

2018-06-06 Thread Timothy Arceri
On 06/06/18 19:10, Neil Roberts wrote: Timothy Arceri writes: +static struct type_tree_entry * +build_type_tree_for_type(const struct glsl_type *type) +{ Do we really need this? As far as I can tell we walk the types here to build a tree then in nir_link_uniform() we walk the tree. Why

Re: [Mesa-dev] [PATCH v2 13/21] nir/linker: Add gl_nir_link_uniforms()

2018-06-05 Thread Timothy Arceri
internally a location. That will be handled on following patches. A nir_linker.h file is also added. More NIR-linking related API will be added in subsequent patches and those will include stuff from Mesa, so reusing nir.h didn't seem a good idea. v2: move from compiler/nir to compiler/glsl (Timothy

Re: [Mesa-dev] [PATCH v2 11/21] spirv: Set nir_variable->explicit_binding

2018-06-05 Thread Timothy Arceri
Seems reasonable. Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Neil Roberts When SpvDecorationBinding is encountered in the SPIR-V source it now sets explicit_binding on the nir_variable. This will be used to determine whether to initialise sampler and image

Re: [Mesa-dev] [PATCH v2 10/21] anv/nir: Use nir_variable's type if interface_type is null

2018-06-05 Thread Timothy Arceri
On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev Previous patch 'spirv: Get rid of vtn_variable_mode_image/sampler' made possible that interface_type of image/sampler nir_variable may be null. This patch accounts for it and make use of the type of the variable instead of

Re: [Mesa-dev] [PATCH v2 09/21] spirv: Get rid of vtn_variable_mode_image/sampler

2018-06-05 Thread Timothy Arceri
Looks ok to me. Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Neil Roberts vtn_variable_mode_image and _sampler are instead replaced with vtn_variable_mode_uniform which encompasses both of them. In the few places where it was neccessary to distinguish

Re: [Mesa-dev] [PATCH v2 07/21] nir/types: Add a utility wrapper to glsl_type::sampler_index()

2018-06-05 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev I think it is more accurate to call it a sampler target (?). --- src/compiler/nir_types.cpp | 7 +++ src/compiler/nir_types.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src

Re: [Mesa-dev] [PATCH v2 05/21] nir/lower_samplers: Limit assert to GLSL shader programs

2018-06-05 Thread Timothy Arceri
I guess this will need to be rewritten with all the deref stuff almost ready to land. If you manage to get this stuff in before then you can have a: Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: From: Eduardo Lima Mitev Vulkan has the concept of separate image

Re: [Mesa-dev] [PATCH v2 02/21] i965: use gl_shader_program_data::spirv

2018-06-05 Thread Timothy Arceri
I still dislike the idea of this bool but in the name of progress. Patches 1-2 are: Reviewed-by: Timothy Arceri On 12/05/18 19:40, Alejandro Piñeiro wrote: --- src/mesa/drivers/dri/i965/brw_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH] glcpp: Sync line number for macro

2018-06-05 Thread Timothy Arceri
There aren't to many people familiar with this part of the compiler. CCing Ian and Ken in case they missed this patch. On 29/05/18 04:21, zhaowei yuan wrote: Line number of a predefined macro should be set as where it is referenced rather than declared Signed-off-by: zhaowei yuan Bugzilla:

Re: [Mesa-dev] [PATCH 2/2] nir: add opt_if_loop_terminator()

2018-06-04 Thread Timothy Arceri
On 02/06/18 04:34, Ian Romanick wrote: On 05/31/2018 10:37 PM, Timothy Arceri wrote: This pass detects potential loop terminators and moves intructions from the non breaking branch after the if. This enables both the new opt_if_simplification() pass and loop unrolling to potentially progress

[Mesa-dev] [PATCH] nir: fix selection of loop terminator when two or more have the same limit

2018-06-04 Thread Timothy Arceri
We need to add loop terminators to the list in the order we come across them otherwise if two or more have the same exit condition we will select that last one rather than the first one even though its unreachable. This fix is for simple unrolls where we only have a single exit point. When

Re: [Mesa-dev] [PATCH 2/2] nir: add opt_if_loop_terminator()

2018-06-02 Thread Timothy Arceri
On 02/06/18 04:34, Ian Romanick wrote: On 05/31/2018 10:37 PM, Timothy Arceri wrote: This pass detects potential loop terminators and moves intructions from the non breaking branch after the if. This enables both the new opt_if_simplification() pass and loop unrolling to potentially progress

[Mesa-dev] [PATCH 1/2] nir: move ends_in_break() helper to nir_loop_analyze.h

2018-05-31 Thread Timothy Arceri
We will use the helper while simplifying potential loop terminators in the following patch. --- src/compiler/nir/nir_loop_analyze.c | 15 ++- src/compiler/nir/nir_loop_analyze.h | 11 +++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git

[Mesa-dev] [PATCH 2/2] nir: add opt_if_loop_terminator()

2018-05-31 Thread Timothy Arceri
This pass detects potential loop terminators and moves intructions from the non breaking branch after the if. This enables both the new opt_if_simplification() pass and loop unrolling to potentially progress further. Unexpectedly this change speed up shader-db run times by ~3% Ivy Bridge

Re: [Mesa-dev] [PATCH 2/2] nir: implement the GLSL equivalent of if simplication in nir_opt_if

2018-05-31 Thread Timothy Arceri
On 01/06/18 13:08, Timothy Arceri wrote: On 30/05/18 22:21, Samuel Pitoiset wrote: This pass turns:     if (cond) {     } else {    do_work();     } into:     if (!cond) {    do_work();     } else {     } Here's the vkpipeline-db stats (from affected shaders) on Polaris10: Totals

Re: [Mesa-dev] [PATCH 2/2] nir: implement the GLSL equivalent of if simplication in nir_opt_if

2018-05-31 Thread Timothy Arceri
+ nir_cf_reinsert(, nir_before_cf_list(>then_list)); + nir_cf_delete(); + + return true; +} You are missing a new line here. Otherwise for the series: Reviewed-by: Timothy Arceri +static bool +opt_if_cf_list(nir_builder *b, struct exec_list *cf_list) { bool progress = false;

Re: [Mesa-dev] [PATCH 1/2] nir: Add some missing "optimization undo" patterns

2018-05-31 Thread Timothy Arceri
On 01/06/18 10:21, Ian Romanick wrote: From: Ian Romanick d8d18516b0a and 03fb13f6467 added some patterns to undo conversions like (('ior', ('flt', a, b), ('flt', a, c)), ('flt', a, ('fmax', b, c))) Reviewed-by: Timothy Arceri However can you explain where these conversions happen

Re: [Mesa-dev] [PATCH 2/2] nir: Lower !f2b(x) to x == 0.0

2018-05-31 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 01/06/18 10:21, Ian Romanick wrote: From: Ian Romanick Some trivial help now, but it also prevents ~40 regressions caused by Samuel's "nir: implement the GLSL equivalent of if simplication in nir_opt_if" patch. All Gen4+ platforms had similar results

Re: [Mesa-dev] [PATCH] nir: add unsigned less then comparison simplification

2018-05-31 Thread Timothy Arceri
On 01/06/18 02:40, Ian Romanick wrote: On 05/30/2018 07:09 PM, Timothy Arceri wrote: On 31/05/18 11:33, Ian Romanick wrote: "less than" whoops ... luckly I removed that bit from the description before pushing This regression is with  "nir: implement the

Re: [Mesa-dev] [PATCH] st/mesa: relax requirements for ARB_ES3_compatibility

2018-05-31 Thread Timothy Arceri
Seems about right. Reviewed-by: Timothy Arceri On 01/06/18 05:24, Marek Olšák wrote: From: Marek Olšák Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106748 --- src/mesa/state_tracker/st_extensions.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 1/2] nir: optimize min(min(a, b), c) to min3(a, b, c) under an option

2018-05-31 Thread Timothy Arceri
On 31/05/18 19:37, Bas Nieuwenhuizen wrote: On Thu, May 31, 2018 at 11:35 AM, Timothy Arceri wrote: On 31/05/18 19:26, Samuel Pitoiset wrote: On 05/31/2018 11:25 AM, Bas Nieuwenhuizen wrote: On Thu, May 31, 2018 at 11:13 AM, Samuel Pitoiset wrote: On 05/31/2018 01:55 AM, Timothy

[Mesa-dev] [PATCH] nir: fix alarming comment

2018-05-31 Thread Timothy Arceri
safe -> precision safe --- src/compiler/nir/nir_opt_algebraic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 21b9acecbe2..aeb280ffb97 100644 --- a/src/compiler/nir/nir_opt_algebraic.py

Re: [Mesa-dev] [PATCH 1/2] nir: optimize min(min(a, b), c) to min3(a, b, c) under an option

2018-05-31 Thread Timothy Arceri
On 31/05/18 19:26, Samuel Pitoiset wrote: On 05/31/2018 11:25 AM, Bas Nieuwenhuizen wrote: On Thu, May 31, 2018 at 11:13 AM, Samuel Pitoiset wrote: On 05/31/2018 01:55 AM, Timothy Arceri wrote: On 31/05/18 03:06, Samuel Pitoiset wrote: Similar for max(). Signed-off-by: Samuel

Re: [Mesa-dev] [PATCH] nir: optimize iand(ieq(a, 0), ieq(b, 0)) to ieq(ior(a, b), 0)

2018-05-30 Thread Timothy Arceri
On 31/05/18 10:44, Ian Romanick wrote: On 05/30/2018 01:48 AM, Samuel Pitoiset wrote: Totals from affected shaders: SGPRS: 80 -> 80 (0.00 %) VGPRS: 48 -> 48 (0.00 %) Code Size: 2120 -> 2096 (-1.13 %) bytes Max Waves: 16 -> 16 (0.00 %) Only two Rise of Tomb Raider shaders are affected on my

Re: [Mesa-dev] [PATCH] nir: add unsigned less then comparison simplification

2018-05-30 Thread Timothy Arceri
sues that I'm seeing with that patch... Correct. On 05/30/2018 04:09 AM, Timothy Arceri wrote: This avoids loop unrolling regressions in Wolfenstein II on DXVK with an upcoming optimisation series from Samuel. --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --gi

Re: [Mesa-dev] [PATCH 1/3] radv: Make the sem_info allocate/free functions static.

2018-05-30 Thread Timothy Arceri
Series is: Reviewed-by: Timothy Arceri On 31/05/18 09:51, Bas Nieuwenhuizen wrote: They are only used in 1 file. --- src/amd/vulkan/radv_device.c | 16 +--- src/amd/vulkan/radv_private.h | 8 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/amd

Re: [Mesa-dev] [PATCH 1/2] nir: optimize min(min(a, b), c) to min3(a, b, c) under an option

2018-05-30 Thread Timothy Arceri
On 31/05/18 03:06, Samuel Pitoiset wrote: Similar for max(). Signed-off-by: Samuel Pitoiset --- src/compiler/nir/nir.h| 3 +++ src/compiler/nir/nir_opt_algebraic.py | 8 2 files changed, 11 insertions(+) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h

[Mesa-dev] [PATCH] nir: add unsigned less then comparison simplification

2018-05-30 Thread Timothy Arceri
This avoids loop unrolling regressions in Wolfenstein II on DXVK with an upcoming optimisation series from Samuel. --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index

[Mesa-dev] [PATCH] mesa: add display listy support for glPatchParameter{i, fv}()

2018-05-28 Thread Timothy Arceri
This is required for tessellation shader Compat profile support. --- src/mesa/main/dlist.c | 78 +++ 1 file changed, 78 insertions(+) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index 8be223559ab..4fc451000b5 100644 ---

Re: [Mesa-dev] [PATCH 2/2] radv: call nir_lower_io_to_temporaries for VS, GS, TES and FS

2018-05-25 Thread Timothy Arceri
On 25/05/18 20:40, Timothy Arceri wrote: On 25/05/18 19:57, Samuel Pitoiset wrote: On 05/25/2018 04:28 AM, Timothy Arceri wrote: On 25/05/18 11:24, Bas Nieuwenhuizen wrote: On Fri, May 25, 2018 at 2:25 AM, Timothy Arceri <tarc...@itsqueeze.com> wrote:  From what I recall with my t

Re: [Mesa-dev] [PATCH 2/2] radv: call nir_lower_io_to_temporaries for VS, GS, TES and FS

2018-05-25 Thread Timothy Arceri
On 25/05/18 19:57, Samuel Pitoiset wrote: On 05/25/2018 04:28 AM, Timothy Arceri wrote: On 25/05/18 11:24, Bas Nieuwenhuizen wrote: On Fri, May 25, 2018 at 2:25 AM, Timothy Arceri <tarc...@itsqueeze.com> wrote:  From what I recall with my testing on radeonsi this wasn't really the

Re: [Mesa-dev] [PATCH 2/2] radv: call nir_lower_io_to_temporaries for VS, GS, TES and FS

2018-05-24 Thread Timothy Arceri
On 25/05/18 11:24, Bas Nieuwenhuizen wrote: On Fri, May 25, 2018 at 2:25 AM, Timothy Arceri <tarc...@itsqueeze.com> wrote: From what I recall with my testing on radeonsi this wasn't really the ideal thing to do. Especially when varyings arrays are accessed via and indirect index, regist

Re: [Mesa-dev] [PATCH] mesa: do not leak ctx->Shader.ReferencedProgram references

2018-05-24 Thread Timothy Arceri
ked. Explicitely remove the pending references to these shaders. Fixes: e6506b3cd23 ("mesa: retain gl_shader_programs after glDeleteProgram if they are in use") Cc: Timothy Arceri <tarc...@itsqueeze.com> Cc: Kenneth Graunke <kenn...@whitecape.org> --- src/mesa/main/shaderapi.c |

Re: [Mesa-dev] [PATCH 2/2] radv: call nir_lower_io_to_temporaries for VS, GS, TES and FS

2018-05-24 Thread Timothy Arceri
From what I recall with my testing on radeonsi this wasn't really the ideal thing to do. Especially when varyings arrays are accessed via and indirect index, register use very quickly gets out of control. On 23/05/18 22:31, Samuel Pitoiset wrote: Do not lower FS inputs because this moves

Re: [Mesa-dev] [PATCH v2 2/3] glsl: allow built-in variables to be explicitly declared

2018-05-24 Thread Timothy Arceri
On 23/05/18 03:16, Ian Romanick wrote: On 05/11/2018 09:49 PM, Timothy Arceri wrote: Mesa seems to be the only implementation that doesn't allow builtins to be explicitly declared. The GLSL 1.30 spec seems to imply that buitins may be explicitly declared. There was a clarification added

Re: [Mesa-dev] [PATCH 8/8] mesa: expose ARB_tessellation_shader in the compatibility profile

2018-05-24 Thread Timothy Arceri
On 24/05/18 18:41, Nicolai Hähnle wrote: What about selection and feedback mode for geometry shaders and tessellation? For now this will only enable the extension in compat when using env overrides. So this patch should be ok as is IMO. Cheers, Nicolai On 23.05.2018 22:58, Marek Olšák

Re: [Mesa-dev] [PATCH 0/8] GL compatibility: Basic GS and tessellation enablement

2018-05-24 Thread Timothy Arceri
All looks good to me :) Series: Reviewed-by: Timothy Arceri <tarc...@itsqueeze.com> On 24/05/18 06:58, Marek Olšák wrote: Hi, This advances GL compatibility support a little bit. Geometry and tessellation shaders should work if you don't combine them with non-GLSL stages. All GLSL

Re: [Mesa-dev] [RFC PATCH] Replace an flock with a random filename to evade some very ugly system dependent code

2018-05-21 Thread Timothy Arceri
to avoid breaking those builds on windows. Am 21.05.2018 um 01:19 schrieb Timothy Arceri: On 20/05/18 22:16, Benedikt Schemmer wrote: There is exactly one flock in mesa and it caused mesa not to build on windows when shader cache was enabled. It should be possible

Re: [Mesa-dev] [PATCH v2 2/3] glsl: allow built-in variables to be explicitly declared

2018-05-21 Thread Timothy Arceri
Ian can I get your thoughts on this series? On 12/05/18 14:49, Timothy Arceri wrote: Mesa seems to be the only implementation that doesn't allow builtins to be explicitly declared. The GLSL 1.30 spec seems to imply that buitins may be explicitly declared. This this allows the game "Full

Re: [Mesa-dev] [PATCH 1/2] glsl: always enable OES_standard_derivatives features if supported

2018-05-21 Thread Timothy Arceri
On 22/05/18 03:13, Ian Romanick wrote: On 05/16/2018 12:04 AM, Timothy Arceri wrote: The GLSL ES 1.0 spec made these features optional. With OES_standard_derivatives they are guaranteed to be available but currently the extension must be enabled to use them. Instead this changes the code

Re: [Mesa-dev] [PATCH] Revert "st/nir: use NIR for asm programs"

2018-05-21 Thread Timothy Arceri
On 22/05/18 04:15, Eric Anholt wrote: Timothy Arceri <tarc...@itsqueeze.com> writes: On 18/05/18 00:53, Eric Anholt wrote: This reverts commit 5c33e8c7729edd5e16020ebb8703be96523e04f2. It broke fixed function vertex programs on vc4 and v3d, and apparently caused trouble for radeonsi

<    4   5   6   7   8   9   10   11   12   13   >