[Mesa-dev] [PATCH 20/21] mesa: move legacy dri config option fthrottle_mode

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.h | 12 src/util/xmlpool/ca.po | 17 - src/util/xmlpool/de.po | 17 - src/util/xmlpool/es.po | 17 - src/util/xmlpool/fr.po

[Mesa-dev] [PATCH 21/21] mesa: move legacy dri config option texture_depth

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.h | 13 + src/util/xmlpool/ca.po | 20 src/util/xmlpool/de.po | 20 src/util/xmlpool/es.po | 20

[Mesa-dev] [PATCH 15/21] mesa: move legacy dri config option texture_units

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.c | 5 + src/util/xmlpool/ca.po | 4 src/util/xmlpool/de.po | 4 src/util/xmlpool/es.po | 4 src/util/xmlpool/fr.po | 4 src/util/xmlpool/nl.po

[Mesa-dev] [PATCH 17/21] mesa: move legacy dri config option round_mode

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.h | 10 ++ src/util/xmlpool/ca.po | 12 src/util/xmlpool/de.po | 12 src/util/xmlpool/es.po | 12 src/util/xmlpool/fr.po

[Mesa-dev] [PATCH 19/21] mesa: move legacy dri config option def_max_anisotropy

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.c | 5 + src/util/xmlpool/ca.po | 4 src/util/xmlpool/de.po | 4 src/util/xmlpool/es.po | 4 src/util/xmlpool/fr.po | 4 src/util/xmlpool/nl.po

[Mesa-dev] [PATCH 06/21] mesa: remove unused dri config option excess_mipmap

2018-08-15 Thread Timothy Arceri
This seems to have only been used by DRI1 drivers which were removed with e4344161bde2. --- src/util/xmlpool/t_options.h | 5 - 1 file changed, 5 deletions(-) diff --git a/src/util/xmlpool/t_options.h b/src/util/xmlpool/t_options.h index 3e5993caf78..f0dc78dd595 100644 ---

[Mesa-dev] [PATCH 14/21] mesa: remove unused dri config option texture_heaps

2018-08-15 Thread Timothy Arceri
This seems to have only been used by DRI1 drivers which were removed with e4344161bde2. --- src/util/xmlpool/ca.po | 16 src/util/xmlpool/de.po | 16 src/util/xmlpool/es.po | 16 src/util/xmlpool/fr.po | 16

[Mesa-dev] [PATCH 16/21] mesa: remove unused dri option float_depth

2018-08-15 Thread Timothy Arceri
This seems to have only been used by DRI1 drivers which were removed with e4344161bde2. --- src/util/xmlpool/ca.po | 4 src/util/xmlpool/de.po | 4 src/util/xmlpool/es.po | 4 src/util/xmlpool/fr.po | 4 src/util/xmlpool/nl.po | 4

[Mesa-dev] [PATCH 08/21] mesa: move legacy hyperz option from dri config

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.c | 5 + src/util/xmlpool/ca.po | 4 src/util/xmlpool/de.po | 4 src/util/xmlpool/es.po | 4 src/util/xmlpool/fr.po | 4 src/util/xmlpool/nl.po

[Mesa-dev] [PATCH 11/21] mesa: move legacy dri config option dither_mode

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.h | 12 src/util/xmlpool/ca.po | 16 src/util/xmlpool/de.po | 16 src/util/xmlpool/es.po | 16 src/util/xmlpool/fr.po

[Mesa-dev] [PATCH 13/21] mesa: move legacy dri config option texture_blend_quality

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.c | 6 ++ src/util/xmlpool/ca.po | 6 -- src/util/xmlpool/de.po | 6 -- src/util/xmlpool/es.po | 6 -- src/util/xmlpool/fr.po | 5 -

[Mesa-dev] [PATCH 12/21] util: remove unused S3TC translation for dri config

2018-08-15 Thread Timothy Arceri
--- src/util/xmlpool/ca.po | 7 --- src/util/xmlpool/de.po | 7 --- src/util/xmlpool/es.po | 7 --- src/util/xmlpool/fr.po | 6 -- src/util/xmlpool/nl.po | 7 --- src/util/xmlpool/sv.po | 5 - 6 files changed, 39 deletions(-) diff --git a/src/util/xmlpool/ca.po

[Mesa-dev] [PATCH 09/21] mesa: remove legacy TCL dri config options

2018-08-15 Thread Timothy Arceri
Use enviroment var overrides in legacy drivers instead. --- src/mesa/drivers/dri/r200/r200_context.c | 4 +--- src/mesa/drivers/dri/radeon/radeon_context.c | 5 ++--- src/mesa/drivers/dri/radeon/radeon_screen.c | 2 -- src/util/xmlpool/ca.po | 23

[Mesa-dev] [PATCH 10/21] mesa: move legacy dri config option color_reduction

2018-08-15 Thread Timothy Arceri
--- src/mesa/drivers/dri/radeon/radeon_screen.h | 10 ++ src/util/xmlpool/ca.po | 12 src/util/xmlpool/de.po | 12 src/util/xmlpool/es.po | 12 src/util/xmlpool/fr.po

[Mesa-dev] [PATCH 04/21] mesa: remove unused dri config option performance_boxes

2018-08-15 Thread Timothy Arceri
This seems to have only been used by DRI1 drivers which were removed with e4344161bde2. --- src/util/xmlpool/ca.po | 4 src/util/xmlpool/de.po | 4 src/util/xmlpool/es.po | 4 src/util/xmlpool/fr.po | 4 src/util/xmlpool/nl.po | 4

[Mesa-dev] [PATCH 02/21] i965: remove unused no_rast bool

2018-08-15 Thread Timothy Arceri
Forcing software fallbacks for i965 hasn't been an option since 5e3c093ff866. --- src/mesa/drivers/dri/i965/brw_context.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 72be8f2a4d0..c32def7c3d7 100644 ---

[Mesa-dev] [PATCH 07/21] mesa: remove dri configs unused software-fallback options

2018-08-15 Thread Timothy Arceri
These seems to have only been used by DRI1 drivers which were removed with e4344161bde2. --- src/util/xmlpool/ca.po | 8 src/util/xmlpool/de.po | 8 src/util/xmlpool/es.po | 8 src/util/xmlpool/fr.po | 8 src/util/xmlpool/nl.po

[Mesa-dev] [PATCH 01/21] i915: remove early_z dri option

2018-08-15 Thread Timothy Arceri
This driver is in maintenance mode so lets remove this hidden unsafe option. --- src/mesa/drivers/dri/i915/i915_vtbl.c | 8 src/mesa/drivers/dri/i915/intel_context.c | 2 -- src/mesa/drivers/dri/i915/intel_context.h | 2 -- src/mesa/drivers/dri/i915/intel_screen.c | 4 4 files

[Mesa-dev] Tidy up dri config options

2018-08-15 Thread Timothy Arceri
This series removes some unused options, replaces some legacy debug options with env vars instead and moves a bunch of old radeon dri driver options directly into the drivers. I haven't bothered copying all the radeon dri translations as I didn't want to waste my time as it seems unlikely anyone

[Mesa-dev] [PATCH 05/21] mesa: remove unused dri config option disable_shader_bit_encoding

2018-08-15 Thread Timothy Arceri
This was added as a workaround for Heaven 3.0 but was later removed by 5ead448719f3 to allow Heaven 4.0 to work correctly. --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 - src/gallium/include/state_tracker/st_api.h | 1 - src/gallium/state_trackers/dri/dri_screen.c

[Mesa-dev] [PATCH 03/21] mesa: drop legacy no_rast dri option

2018-08-15 Thread Timothy Arceri
Add enviroment var overrides to legacy drivers instead. --- src/mesa/drivers/dri/i915/intel_context.c| 2 +- src/mesa/drivers/dri/i915/intel_screen.c | 1 - src/mesa/drivers/dri/i965/intel_screen.c | 1 - src/mesa/drivers/dri/r200/r200_context.c | 2 +-

Re: [Mesa-dev] [PATCH] Revert "intel/nir: Call nir_lower_io_to_scalar_early"

2018-08-14 Thread Timothy Arceri
On 09/08/18 05:05, Jason Ekstrand wrote: Commit 4434591bf56a6b0 caused substantially more URB messages in geometry and tessellation shaders. Before we can really enable this sort of optimization, We either need some way of combining them back together into vectors or we need to do cross-stage

Re: [Mesa-dev] [PATCH 2/3] radeonsi: use radeon_info::name

2018-08-12 Thread Timothy Arceri
patches 1-2: Reviewed-by: Timothy Arceri On 11/08/18 04:32, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_get.c | 49 ++ src/gallium/drivers/radeonsi/si_pipe.c | 2 +- src/gallium/drivers/radeonsi/si_pipe.h | 1 - 3 files changed

Re: [Mesa-dev] [PATCH 11/11] st/mesa: expose EXT_gpu_shader4 if GLSL 1.30 is supported

2018-08-12 Thread Timothy Arceri
I really only skimmed over patch 9. But everything seemed ok so for the series: Reviewed-by: Timothy Arceri On 08/08/18 15:42, Marek Olšák wrote: From: Marek Olšák --- docs/relnotes/18.3.0.html | 1 + src/mesa/state_tracker/st_extensions.c | 1 + 2 files changed, 2

Re: [Mesa-dev] [PATCH 10/10] i965/nir: Use the nir copy of shader_info to handle gl_PatchVerticesIn

2018-08-12 Thread Timothy Arceri
6-10: Reviewed-by: Timothy Arceri On 09/08/18 23:43, Alejandro Piñeiro wrote: From: Neil Roberts Instead of using the copy of shader_info stored in gl_program, it now uses the one in nir_shader. This is needed for SPIR-V because the info.tess.tcs_vertices_out is filled in via

Re: [Mesa-dev] [PATCH 03/10] nir: add how_declared to nir_variable.data

2018-08-12 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 09/08/18 23:43, Alejandro Piñeiro wrote: Equivalent to the already existing how_declared at GLSL IR. The only difference is that we are not adding all the declaration_type available on GLSL, only the one that we will use on the short term. We would add more mode

Re: [Mesa-dev] [PATCH 04/10] nir/linker: take into account hidden uniforms

2018-08-12 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 09/08/18 23:43, Alejandro Piñeiro wrote: So they are not exposed through the introspection API. It is worth to note that the number of hidden uniforms of GLSL linking vs SPIR-V linking would be somewhat different due the differen order of the nir lowerings

Re: [Mesa-dev] [PATCH 01/10] spirv: fill info.gs.input_primitive too

2018-08-12 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 09/08/18 23:43, Alejandro Piñeiro wrote: info.gs.output_primitive was already being filled. Not sure why this is not needed on Vulkan, but we found to be needed for ARB_gl_spirv. Specifically, this is needed to get the following test passing: KHR-GL45

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

2018-08-02 Thread Timothy Arceri
1, 2018 at 2:39 AM, Dieter Nützel wrote: Am 01.08.2018 05:56, schrieb Timothy Arceri: On 01/08/18 13:09, Dieter Nützel wrote: Am 31.07.2018 13:34, schrieb Timothy Arceri: On 31/07/18 13:50, Dieter Nützel wrote: Am 30.07.2018 05:24, schrieb Dieter Nützel: For the series

Re: [Mesa-dev] [PATCH 04/13] nir: Collapse more repeated bcsels on the same argument

2018-08-02 Thread Timothy Arceri
I thought you were trying to move these type of opts to your new pass? Or should I be splitting out and resending some of the bcsel opts in my dirt showdown patch [1]? And trying again to get the other patches from the series reviewed. [1]

[Mesa-dev] [PATCH] nir: add fall through comment to nir_gather_info

2018-08-01 Thread Timothy Arceri
This stops Coverity reporting a defect and helps make the code less error-prone. Cc: Neil Roberts --- src/compiler/nir/nir_gather_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index d0b656ea741..4a030cb6256

Re: [Mesa-dev] [PATCH] ac: fix get_image_coords() for radeonsi

2018-07-31 Thread Timothy Arceri
On 31/07/18 16:52, Bas Nieuwenhuizen wrote: On Fri, Jul 27, 2018 at 11:40 AM, Timothy Arceri wrote: On 27/07/18 19:10, Bas Nieuwenhuizen wrote: On Fri, Jul 27, 2018 at 7:32 AM, Timothy Arceri wrote: Because this was setting image to true we would end up calling si_load_image_desc

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

2018-07-31 Thread Timothy Arceri
On 01/08/18 13:09, Dieter Nützel wrote: Am 31.07.2018 13:34, schrieb Timothy Arceri: On 31/07/18 13:50, Dieter Nützel wrote: Am 30.07.2018 05:24, schrieb Dieter Nützel: For the series Tested-by: Dieter Nützel with glmark2, glxgears, UH, UV, Blender 2.79 and FreeCAD 0.17 on RX 580

Re: [Mesa-dev] [PATCH v2 1/4] intel/nir: Use the correct scalar stage for consumers when linking

2018-07-31 Thread Timothy Arceri
I guess you guys may want to look into Ken's comments on patch 3. But otherwise the series looks good to me and is: Reviewed-by: Timothy Arceri On 01/08/18 05:22, Jason Ekstrand wrote: --- src/intel/compiler/brw_nir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src

Re: [Mesa-dev] [PATCH 10/15] compiler/spirv: add XFB and GeometryStreams capability check support

2018-07-31 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 31/07/18 21:16, Alejandro Piñeiro wrote: FWIW, this is the only patch pending to be reviewed on the series (sorry Timothy, I used wrong patch numbers when I pinged you on IRC). BR On 20/07/18 17:08, Alejandro Piñeiro wrote: --- src/compiler/shader_info.h

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

2018-07-31 Thread Timothy Arceri
. Are you able to bisect? Regards, Dieter Am 28.07.2018 03:07, schrieb Timothy Arceri: On 28/07/18 11:06, 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 the spill changes in shader-db are from Dolphin uber shaders

Re: [Mesa-dev] [PATCH v2 04/11] nir/types: Add array_or_matrix helpers

2018-07-29 Thread Timothy Arceri
1-4: Reviewed-by: Timothy Arceri ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH v3] nir/linker: Add the start of a pure-NIR linker for XFB

2018-07-27 Thread Timothy Arceri
On 24/07/18 23:29, Alejandro Piñeiro wrote: From: Neil Roberts v2: ignore names on purpose, for consistency with other places where we are doing the same (Alejandro) v3: changes proposed by Timothy Arceri, implemented by Alejandro Piñeiro: * Remove redundant 'struct

Re: [Mesa-dev] [PATCH 04/15] mesa/glspirv: Set last_vert_prog

2018-07-27 Thread Timothy Arceri
1 << (MESA_SHADER_GEOMETRY + 1)) - 1)); As ((1 << MESA_SHADER_VERTEX) - 1)) == 0 If you use the above simplification this patch is: Reviewed-by: Timothy Arceri + if (last_vert_stage) + prog->last_vert_prog = prog->_LinkedShaders[last_vert_stage - 1]->Program; }

Re: [Mesa-dev] [PATCH 05/15] spirv: Handle the SpvDecorationStream decoration

2018-07-27 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro Piñeiro wrote: From: Neil Roberts This just sets the stream on the nir_variable. --- src/compiler/spirv/vtn_variables.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compiler/spirv/vtn_variables.c b

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

2018-07-27 Thread Timothy Arceri
On 28/07/18 11:06, 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 the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change is clearly positive. V2: insert new constant

[Mesa-dev] [PATCH v2 1/8] nir: evaluate if condition uses inside the if branches

2018-07-27 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 the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change is clearly positive. V2: insert new constant after any phis in the

Re: [Mesa-dev] [PATCH 1/2] nir: Export deref comparison functions

2018-07-27 Thread Timothy Arceri
eref_path_init(_path, b, NULL); + assert(a_path.path[0]->deref_type == nir_deref_type_var); + assert(b_path.path[0]->deref_type == nir_deref_type_var); + + nir_deref_compare_result result = nir_compare_deref_paths(_path, _path); + + nir_deref_path_finish(_path); + nir_deref_path_finish(_path);

Re: [Mesa-dev] [PATCH 07/12] nir: Add an array splitting pass

2018-07-27 Thread Timothy Arceri
On 27/07/18 02:00, Jason Ekstrand wrote: This pass looks for array variables where at least one level of the array is never indirected and splits it into multiple smaller variables. --- src/compiler/nir/nir.h| 1 + src/compiler/nir/nir_split_vars.c | 525

Re: [Mesa-dev] [PATCH] ac: fix get_image_coords() for radeonsi

2018-07-27 Thread Timothy Arceri
On 27/07/18 19:10, Bas Nieuwenhuizen wrote: On Fri, Jul 27, 2018 at 7:32 AM, Timothy Arceri wrote: Because this was setting image to true we would end up calling si_load_image_desc() when we sould be calling si_load_sampler_desc(). Since the descriptor is part of an image, not a sampler

[Mesa-dev] [PATCH] ac: fix get_image_coords() for radeonsi

2018-07-26 Thread Timothy Arceri
Because this was setting image to true we would end up calling si_load_image_desc() when we sould be calling si_load_sampler_desc(). This fixes an assert() in Deus Ex: MD --- src/amd/common/ac_nir_to_llvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH] ac: pass write param to get_sampler_desc() from get_image_descriptor()

2018-07-26 Thread Timothy Arceri
Looks like a mistake from when the deref stuff landed. Fixes: 506a07e4e3a4 ("ac/nir: Add deref support to image intrinsics.") Cc: Bas Nieuwenhuizen --- src/amd/common/ac_nir_to_llvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/common/ac_nir_to_llvm.c

Re: [Mesa-dev] [PATCH 00/12] nir: Add some optimizations on variables

2018-07-26 Thread Timothy Arceri
Any reason there are no shader-db results to go with the commits that turn on the opts? ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

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

2018-07-26 Thread Timothy Arceri
On 26/07/18 14:04, Timothy Arceri wrote: On 23/07/18 18:02, 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 the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change

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

2018-07-25 Thread Timothy Arceri
On 23/07/18 18:02, 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 the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change is clearly positive. shader-db results IVB

Re: [Mesa-dev] [PATCH 17/18] anv/pipeline: Do cross-stage linking optimizations

2018-07-25 Thread Timothy Arceri
It would be good if you could reply to my comment in patch 13 otherwise 1-17 are: Reviewed-by: Timothy Arceri As mentioned before you really need the varying vector and array splitting passes to get the most from these linking opts. Patch 18 seems ok but you might want to get someone else

Re: [Mesa-dev] [PATCH 13/18] anv/pipeline: Compile to NIR in compile_graphics

2018-07-25 Thread Timothy Arceri
On 12/07/18 07:18, Jason Ekstrand wrote: This pulls the SPIR-V to NIR step out into common code. --- src/intel/vulkan/anv_pipeline.c | 278 +--- 1 file changed, 116 insertions(+), 162 deletions(-) diff --git a/src/intel/vulkan/anv_pipeline.c

Re: [Mesa-dev] [PATCH 08/18] anv/pipeline: Hash the entire pipeline in one go

2018-07-25 Thread Timothy Arceri
1-8 look fine to me and are: Reviewed-by: Timothy Arceri I'll try to finish looking over the rest later tonight or tomorrow. On 12/07/18 07:18, Jason Ekstrand wrote: Instead of hashing each stage separately (and TES and TCS together), we hash the entire pipeline. This means we'll get fewer

Re: [Mesa-dev] [PATCH] nir: Add a couple of iand/ior optimizations

2018-07-24 Thread Timothy Arceri
On 24/07/18 00:10, Jason Ekstrand wrote: On Mon, Jul 23, 2018 at 1:08 AM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: Ian and I have been looking at these type of things recently. Ian has started work on a pass to cover this stuff without having to add dozens of th

Re: [Mesa-dev] [PATCH] st/nir: Fix st_nir_opts() prototype.

2018-07-24 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 25/07/18 07:55, Kenneth Graunke wrote: This wasn't updated for the new scalar ISA parameter. It worked anyway because all the function's callers live in the same file, so it found the correct function. Tim made this external for the new st prog_to_nir

Re: [Mesa-dev] [PATCH 2/2] ac, radeonsi: reduce optimizations for complex compute shaders on older APUs

2018-07-23 Thread Timothy Arceri
On 24/07/18 14:24, Marek Olšák wrote: On Mon, Jul 23, 2018 at 11:33 PM, Timothy Arceri wrote: On 24/07/18 11:15, Marek Olšák wrote: On Fri, Jul 20, 2018 at 12:53 AM, Dave Airlie wrote: On 20 July 2018 at 13:12, Marek Olšák wrote: From: Marek Olšák To make dEQP-GLES31

Re: [Mesa-dev] [PATCH 2/2] ac, radeonsi: reduce optimizations for complex compute shaders on older APUs

2018-07-23 Thread Timothy Arceri
On 24/07/18 11:15, Marek Olšák wrote: On Fri, Jul 20, 2018 at 12:53 AM, Dave Airlie wrote: On 20 July 2018 at 13:12, Marek Olšák wrote: From: Marek Olšák To make dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23 finish sooner on the older CPUs. (otherwise it gets killed and we

Re: [Mesa-dev] [PATCH 12/15] nir/types: Add a wrapper to access gl_type

2018-07-23 Thread Timothy Arceri
On 23/07/18 22:48, Alejandro Piñeiro wrote: On 21/07/18 05:15, Timothy Arceri wrote: On 21/07/18 13:09, Timothy Arceri wrote: Reviewed-by: Timothy Arceri Actually I take that back. This introduces a dependency on GL in NIR, Hmm, but that dependency is already there. nir.h includes GL/gl.h

Re: [Mesa-dev] [PATCH] nir: Add a couple of iand/ior optimizations

2018-07-23 Thread Timothy Arceri
Ian and I have been looking at these type of things recently. Ian has started work on a pass to cover this stuff without having to add dozens of these types of opts. https://lists.freedesktop.org/archives/mesa-dev/2018-July/200583.html On 23/07/18 17:36, Jason Ekstrand wrote: Spotted in a

[Mesa-dev] [PATCH v2 5/8] nir: add complex_loop bool to loop info

2018-07-23 Thread Timothy Arceri
In order to be sure loop_terminator_list is an accurate representation of all the jumps in the loop we need to be sure we didn't encounter any other complex behaviour such as continues, nested breaks, etc during analysis. This will be used in the following patch. --- src/compiler/nir/nir.h

[Mesa-dev] [PATCH v2 8/8] nir: add loop unroll support for complex wrapper loops

2018-07-23 Thread Timothy Arceri
In GLSL IR we cheat with switch statements and simply convert them into loops with a single iteration. This allowed us to make use of the existing jump instruction handling provided by the loop handing code, it also allows dead code to be cleaned up once we have wrapped the code in a loop.

[Mesa-dev] [PATCH v2 6/8] nir/opt_loop_unroll: Remove unneeded phis if we make progress

2018-07-23 Thread Timothy Arceri
Now that SSA values can be derefs and they have special rules, we have to be a bit more careful about our LCSSA phis. In particular, we need to clean up in case LCSSA ended up creating a phi node for a deref. This avoids validation issues with some CTS tests with the following patch, but its

[Mesa-dev] [PATCH v2 3/8] nir: allow more nested loops to be unrolled

2018-07-23 Thread Timothy Arceri
The innermost check was added to stop us from unrolling multiple loops in a single pass, and to stop outer loops from unrolling. When we successfully unroll a loop we need to run the analysis pass again before deciding if we want to go ahead an unroll a second loop. However the logic was flawed

[Mesa-dev] [PATCH v2 7/8] nir: add loop unroll support for wrapper loops

2018-07-23 Thread Timothy Arceri
This adds support for unrolling the classic do { // ... } while (false) that is used to wrap multi-line macros. GLSL IR also wraps switch statements in a loop like this. shader-db results IVB: total loops in shared programs: 2515 -> 2512 (-0.12%) loops in affected programs: 33

[Mesa-dev] [PATCH v2 4/8] nir: always attempt to find loop terminators

2018-07-23 Thread Timothy Arceri
This will help later patches with unrolling loops that end with a break i.e. loops the always exit on their first interation. --- src/compiler/nir/nir_loop_analyze.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir_loop_analyze.c

[Mesa-dev] v2 Loop unrolling and if statement opts

2018-07-23 Thread Timothy Arceri
v2: - make use of nir_block_dominates() in the if-statement opts as suggested by Connor. This allowed for a reduction in code required but also allowed me to implemented some extra optimisations. - implement feedback from Jason on loop unrolling opts.

[Mesa-dev] [PATCH v2 1/8] nir: evaluate if condition uses inside the if branches

2018-07-23 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 the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change is clearly positive. shader-db results IVB: total instructions in shared programs:

[Mesa-dev] [PATCH v2 2/8] nir: propagates if condition evaluation down some alu chains

2018-07-23 Thread Timothy Arceri
shader-db IVB results: total instructions in shared programs: 9993483 -> 9993472 (-0.00%) instructions in affected programs: 1300 -> 1289 (-0.85%) helped: 11 HURT: 0 total cycles in shared programs: 219476091 -> 219476059 (-0.00%) cycles in affected programs: 7675 -> 7643 (-0.42%) helped: 10

Re: [Mesa-dev] [PATCH 07/10] nir: add loop unroll support for wrapper loops

2018-07-23 Thread Timothy Arceri
On 22/07/18 19:50, Jason Ekstrand wrote: On Tue, Jul 10, 2018 at 11:49 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: This adds support for unrolling the classic     do {         // ...     } while (false) that is used to wrap multi-line macros. GLS

Re: [Mesa-dev] [PATCH 07/10] nir: add loop unroll support for wrapper loops

2018-07-22 Thread Timothy Arceri
On 22/07/18 19:50, Jason Ekstrand wrote: On Tue, Jul 10, 2018 at 11:49 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: This adds support for unrolling the classic     do {         // ...     } while (false) that is used to wrap multi-line macros. GLS

Re: [Mesa-dev] [PATCH 03/10] nir: allow more nested loops to be unrolled

2018-07-22 Thread Timothy Arceri
On 22/07/18 19:32, Jason Ekstrand wrote: On Tue, Jul 10, 2018 at 11:49 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: The innermost check was added to stop us from unrolling multiple loops in a single pass, and to stop outer loops from unrolling. Do you mean "m

[Mesa-dev] [PATCH v2] glsl: make a copy of array indices that are used to deref a function out param

2018-07-20 Thread Timothy Arceri
V2: make use of visit_tree() Fixes new piglit test: tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test --- src/compiler/glsl/ast_function.cpp | 54 ++ 1 file changed, 54 insertions(+) diff --git

Re: [Mesa-dev] [PATCH 15/15] i965: enable XFB and GeometryStreams for gen7+

2018-07-20 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro Piñeiro wrote: --- src/mesa/drivers/dri/i965/brw_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 968fc1d43d6..136f1325c6e 100644

Re: [Mesa-dev] [PATCH 14/15] i965: Link XFB varyings for SPIR-V shaders

2018-07-20 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro Piñeiro wrote: From: Neil Roberts --- src/mesa/drivers/dri/i965/brw_link.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index e7a940e15c2

Re: [Mesa-dev] [PATCH 13/15] nir/linker: Add the start of a pure-NIR linker for XFB

2018-07-20 Thread Timothy Arceri
On 21/07/18 01:08, Alejandro Piñeiro wrote: From: Neil Roberts v2: ignore names on purpose, for consistency with other places where we are doing the same (Alejandro) --- src/compiler/Makefile.sources | 1 + src/compiler/glsl/gl_nir_link_xfb.c | 289

Re: [Mesa-dev] [PATCH 12/15] nir/types: Add a wrapper to access gl_type

2018-07-20 Thread Timothy Arceri
On 21/07/18 13:09, Timothy Arceri wrote: Reviewed-by: Timothy Arceri Actually I take that back. This introduces a dependency on GL in NIR, maybe better to put this one in gl_nir_linker.h? If you agree that change would be: Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro

Re: [Mesa-dev] [PATCH 12/15] nir/types: Add a wrapper to access gl_type

2018-07-20 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro Piñeiro wrote: From: Neil Roberts --- src/compiler/nir_types.cpp | 6 ++ src/compiler/nir_types.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp index

Re: [Mesa-dev] [PATCH 11/15] arb_gl_spirv: add calls to several nir lowerings

2018-07-20 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro Piñeiro wrote: For now we are just adding nir lowerings that are needed/mandatory to get things working. After everything is settled, we would start to add good-to-have lowerings. This patch adds the following calls

Re: [Mesa-dev] [PATCH 03/15] spirv: Handle XFB variable decorations

2018-07-20 Thread Timothy Arceri
1-3: Reviewed-by: Timothy Arceri On 21/07/18 01:08, Alejandro Piñeiro wrote: From: Neil Roberts These set the new explicit XFB members on nir_variable. This is needed to support ARB_gl_spirv, as Vulkan doesn't support transform feedback. --- src/compiler/spirv/vtn_variables.c | 12

Re: [Mesa-dev] [PATCH] glsl: make a copy of array indices that are used to deref a function out param

2018-07-20 Thread Timothy Arceri
Hi Ian, Are you able to take a look at this one? Looks like you have been involved in this area in the past. Thanks, Tim On 15/07/18 18:04, Timothy Arceri wrote: Fixes new piglit test: tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test

Re: [Mesa-dev] [PATCH 2/2] ac, radeonsi: reduce optimizations for complex compute shaders on older APUs

2018-07-20 Thread Timothy Arceri
On 20/07/18 14:53, Dave Airlie wrote> On 20 July 2018 at 13:12, Marek Olšák wrote: From: Marek Olšák To make dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23 finish sooner on the older CPUs. (otherwise it gets killed and we fail the test) I think this is possibly a bad idea,

Re: [Mesa-dev] [PATCH 2/3] st: Sweep NIR after linking phase to free held memory

2018-07-19 Thread Timothy Arceri
On 19.07.18 11:47, Timothy Arceri wrote: On 19/07/18 08:31, Eric Anholt wrote: Danylo Piliaiev writes: After optimization passes and many trasfromations most of memory "transformations" NIR holds is a garbage which was being freed only after shader deletion. "is gar

Re: [Mesa-dev] [PATCH 2/3] st: Sweep NIR after linking phase to free held memory

2018-07-19 Thread Timothy Arceri
On 19/07/18 08:31, Eric Anholt wrote: Danylo Piliaiev writes: After optimization passes and many trasfromations most of memory "transformations" NIR holds is a garbage which was being freed only after shader deletion. "is garbage" Freeing it at the end of linking will save memory

[Mesa-dev] [PATCH 2/3] nir: match constant bools with @bool type

2018-07-18 Thread Timothy Arceri
For simplicity we only allow this to work for scalar types. --- src/compiler/nir/nir_search.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index 743ffdf232c..c0224ca4360 100644 ---

[Mesa-dev] [PATCH 3/3] nir: opt_algebraic add some opts to remove spilling in dirt showdown

2018-07-18 Thread Timothy Arceri
These appear in a single Dirt Showdown compute shader. With this VGPR spilling in the radeonsi NIR backend is reduced. --- src/compiler/nir/nir_opt_algebraic.py | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py

[Mesa-dev] [PATCH 1/3] nir: allow nir search type check to see through bcsel

2018-07-18 Thread Timothy Arceri
--- src/compiler/nir/nir_search.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index 28b36b2b863..743ffdf232c 100644 --- a/src/compiler/nir/nir_search.c +++ b/src/compiler/nir/nir_search.c @@ -73,6 +73,9 @@

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

2018-07-18 Thread Timothy Arceri
the code required? On Thu, Jul 19, 2018 at 8:06 AM, 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. V2: make sure we do evaluation when

[Mesa-dev] [PATCH V2 01/10] nir: evaluate if condition uses inside the if branches

2018-07-18 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. V2: make sure we do evaluation when condition is used in else with a single block (we were checking for blocks

Re: [Mesa-dev] [PATCH] libGLw: Use newly introduced GLAPIVAR for variables

2018-07-18 Thread Timothy Arceri
On 19/07/18 03:07, Brian Paul wrote: On 07/17/2018 06:47 PM, Stefan Dirsch wrote: On Tue, Jul 17, 2018 at 04:57:26PM -0600, Brian Paul wrote: Reviewed-by: Brian Paul Do you need me to push this for you? I'm afraid the answer is yes. Tried it but push hangs forever after this # git push

[Mesa-dev] [PATCH] shader-db: simplify and improve SSO handling

2018-07-18 Thread Timothy Arceri
This does two things: 1. Allows cross shader optimisations to be preformed on SSO programs that contain more than one stage (seems like I don't have any of these in my shader-db collection). 2. Allows us to write compilation errors to stderr. With this change I discovered a Deus Ex: MD

Re: [Mesa-dev] [PATCH 5/5] mesa: remove dead code from api_loopback

2018-07-17 Thread Timothy Arceri
Series: Reviewed-by: Timothy Arceri On 17/07/18 15:58, Marek Olšák wrote: From: Marek Olšák This should only contain functions not set in vtxfmt.c. --- src/mesa/main/api_loopback.c | 17 - 1 file changed, 17 deletions(-) diff --git a/src/mesa/main/api_loopback.c b/src

Re: [Mesa-dev] [PATCH 3/4] nir: allow nir_intrinsic_load_ubo in opt_peephole_select

2018-07-16 Thread Timothy Arceri
On 17/07/18 03:41, Eric Anholt wrote: Timothy Arceri writes: This makes this opt behave more like the GLSL IR opt lower_if_to_cond_assign(). With this we can disable that GLSL IR opt on drivers with a NIR backend without causing spill regressions. shader-db results for radeonsi (RX580

[Mesa-dev] [PATCH V2 4/4] nir: add a couple of ior opts to nir_opt_algebraic

2018-07-15 Thread Timothy Arceri
One of these was seen in a Deus Ex shader. V2: make opts more generic. Cc: Jason Ekstrand --- src/compiler/nir/nir_opt_algebraic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index

Re: [Mesa-dev] [PATCH 4/4] nir: add a couple of ior opts to nir_opt_algebraic

2018-07-15 Thread Timothy Arceri
On 16/07/18 14:25, Jason Ekstrand wrote: How about just adding (('ior', 'a@bool', ('ieq', a, 0)), True) and maybe also (('ior', 'a@bool', ('inot', a)), True) while you're at it. Ah yes that's much better. Will do. --Jason On Sun, Jul 15, 2018 at 4:27 PM Timothy Arceri <mailto:t

[Mesa-dev] [PATCH 2/2] radv: make use of nir_lower_load_const_to_scalar()

2018-07-15 Thread Timothy Arceri
This allows NIR to CSE more operations. LLVM does this also so the impact is limited, however doing this in NIR allows other opts to make progress. I didn't have a large vkpipeline-db to run this against but for radeonsi enabling this allowed some loops in Civilization Beyond Earth shaders to

[Mesa-dev] [PATCH 1/2] radeonsi/nir: make use of nir_lower_load_const_to_scalar()

2018-07-15 Thread Timothy Arceri
This allows NIR to CSE more operations. LLVM does this also so the impact is limited, however doing this in NIR allows other opts to make progress. For example some loops in Civilization Beyond Earth shaders are unrolled. --- src/gallium/drivers/radeonsi/si_shader_nir.c | 2 ++ 1 file changed, 2

[Mesa-dev] [PATCH 3/4] nir: allow nir_intrinsic_load_ubo in opt_peephole_select

2018-07-15 Thread Timothy Arceri
This makes this opt behave more like the GLSL IR opt lower_if_to_cond_assign(). With this we can disable that GLSL IR opt on drivers with a NIR backend without causing spill regressions. shader-db results for radeonsi (RX580): Totals from affected shaders: SGPRS: 12200 -> 13072 (7.15 %) VGPRS:

[Mesa-dev] [PATCH 4/4] nir: add a couple of ior opts to nir_opt_algebraic

2018-07-15 Thread Timothy Arceri
One of these was seen in a Deus Ex shader. --- src/compiler/nir/nir_opt_algebraic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 0986dde6851..682d498b79b 100644 ---

[Mesa-dev] [PATCH 2/4] nir: allow opt_peephole_select to handle nir_instr_type_deref

2018-07-15 Thread Timothy Arceri
Cc: Jason Ekstrand --- src/compiler/nir/nir_opt_peephole_select.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_peephole_select.c b/src/compiler/nir/nir_opt_peephole_select.c index 8fa99117f4c..ad9d0abec03 100644 --- a/src/compiler/nir/nir_opt_peephole_select.c

[Mesa-dev] [PATCH 1/4] nir: add inot algebraic opt

2018-07-15 Thread Timothy Arceri
Noticed in a unigine shader. --- 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 5e07d662b07..0986dde6851 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++

<    2   3   4   5   6   7   8   9   10   11   >