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

2018-10-27 Thread Timothy Arceri
); diff --git a/src/compiler/nir/nir_opt_vectorize_io.c b/src/compiler/nir/nir_opt_vectorize_io.c new file mode 100644 index 000..407b5a4c816 --- /dev/null +++ b/src/compiler/nir/nir_opt_vectorize_io.c @@ -0,0 +1,523 @@ +/* + * Copyright © 2018 Timothy Arceri + * + * Permission is hereby g

[Mesa-dev] [PATCH 1/3] nir: add glsl_replace_vector_type()

2018-10-27 Thread Timothy Arceri
This creates a new glsl_type with the specified number on components. We will use this in the folloing patch when vectorising io. --- src/compiler/nir_types.cpp | 24 src/compiler/nir_types.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/src/compiler/nir_type

[Mesa-dev] [PATCH 3/3] i965/anv: use nir_opt_vectorize_io()

2018-10-27 Thread Timothy Arceri
From: Timothy Arceri Commit 8d8222461f9d7f49 caused substantially more URB messages in geometry and tessellation shaders (due to enabling nir_lower_io_to_scalar_early). This combines io again to avoid this regression while still allowing link time optimisation of components. Shader-db results

[Mesa-dev] RFC NIR vectorise varyings

2018-10-27 Thread Timothy Arceri
This fixes the regressions in the glxbench tessellation benchmark [1]. I'm sending as a RFC as there are mixed results with cycles in fs. Also Intels CI system reports some failures but I cannot reproduce these locally. Maybe someone can have a closer look at the internal CI results [2]? [1] h

Re: [Mesa-dev] [PATCH] nir: Allow using nir_lower_io_to_scalar_early on VS input vars.

2018-10-26 Thread Timothy Arceri
mp; > + if (!(shader->info.stage == MESA_SHADER_VERTEX && > + mode == nir_var_shader_in) && > + var->data.location < VARYING_SLOT_VAR0 && As I understand it all current use of this pass skips vetex shader

Re: [Mesa-dev] [PATCH] glsl/linker: validate attribute aliasing before optimizations

2018-10-26 Thread Timothy Arceri
f this rule, we do a 'dry-run' of attribute > assignment for > + * vertex shader inputs here. > + */ > + if (i == MESA_SHADER_VERTEX) { Can we please add a GLES check to the if above so we can skip this for desktop GL. Its a little unfortunate

Re: [Mesa-dev] [PATCH] glsl/linker: Fix out variables linking during single stage

2018-10-26 Thread Timothy Arceri
nk all out vars from a shader > objects on a single stage > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105731 > Signed-off-by: Vadym Shovkoplias Reviewed-by: Timothy Arceri Also please either update the existing piglit or add a new one to better cover the use of the freed v

Re: [Mesa-dev] [PATCH 1/1] util: Change remaining uint32 cache ids to sha1

2018-10-25 Thread Timothy Arceri
Pushed. Thanks again! Ccing stable in case the Fixes tag isnt enough for this to get picked up (since the previous cache fix this fixes was also backported) On 24/10/18 11:51 am, David McFarland wrote: After discussion with Timothy Arceri. disk_cache_get_function_identifier was using only

Re: [Mesa-dev] [Mesa-stable] [PATCH] radeonsi: add a workaround for bitfield_extract when count is 0

2018-10-25 Thread Timothy Arceri
On 26/10/18 10:21 am, Tom Stellard wrote: On 09/27/2018 10:01 PM, Timothy Arceri wrote: On 28/9/18 2:53 am, Tom Stellard wrote: On 09/24/2018 11:51 PM, Samuel Pitoiset wrote: On 9/25/18 6:46 AM, Timothy Arceri wrote: On 25/9/18 10:35 am, Marek Olšák wrote: Do you know what's brok

Re: [Mesa-dev] [PATCH 07/31] nir/opt_if: Rework condition propagation

2018-10-25 Thread Timothy Arceri
Looks ok to me. Reviewed-by: Timothy Arceri On 23/10/18 9:13 am, Jason Ekstrand wrote: Instead of doing our own constant folding, we just emit instructions and let constant folding happen. This is substantially simpler and lets us use the nir_imm_bool helper instead of dealing with the

Re: [Mesa-dev] [PATCH] st/mesa: Don't record garbage streamout information in the non-SSO case.

2018-10-25 Thread Timothy Arceri
This is much nicer. Reviewed-by: Timothy Arceri On 25/10/18 8:16 pm, Kenneth Graunke wrote: In the non-SSO case, where multiple shader stages are linked together, we were recording garbage pipe_stream_output_info structures for all but the last enabled geometry-processing stage. Specifically

Re: [Mesa-dev] [PATCH mesa] util: remove unnecessary random whitespaces

2018-10-24 Thread Timothy Arceri
On 25/10/18 7:42 am, Ian Romanick wrote: On 10/23/2018 04:15 AM, Eric Engestrom wrote: Suggested-by: Timothy Arceri Um no :P I suggested you fix the formatting in your patch to match the Mesa style. Signed-off-by: Eric Engestrom --- Timothy, I opted to remove them all instead of adding

[Mesa-dev] [PATCH 2/3] radv: move nir_lower_io_to_scalar_early() to radv_link_shaders()

2018-10-23 Thread Timothy Arceri
nir_lower_io_to_scalar_early() is really part of the link time optimisations. Moving it here allows the code to be simplified and also keeps the code easy to follow in the next patch. --- src/amd/vulkan/radv_pipeline.c | 44 ++ 1 file changed, 18 insertions(+), 26 d

[Mesa-dev] [PATCH 3/3] radv: call nir_link_xfb_varyings()

2018-10-23 Thread Timothy Arceri
--- src/amd/vulkan/radv_pipeline.c | 4 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 396b44d25a1..c21ca1743a4 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -1792,6 +1792,10 @@ radv_lin

[Mesa-dev] [PATCH 1/3] nir: add linking helper nir_link_xfb_varyings()

2018-10-23 Thread Timothy Arceri
From: Samuel Pitoiset The linking opts shouldn't try removing or compacting XFB varyings in the consumer. To avoid this we copy the always_active_io flag from the producer. --- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_linking_helpers.c | 33 ++

Re: [Mesa-dev] [PATCH mesa 1/2] util: use C99 declaration in the for-loop hash_table_foreach() macro

2018-10-21 Thread Timothy Arceri
_hash_table_rehash(struct hash_table *ht, unsigned new_size_index) { struct hash_table old_ht; - struct hash_entry *table, *entry; + struct hash_entry *table; if (new_size_index >= ARRAY_SIZE(hash_sizes)) return; diff --git a/src/util/hash_table.h b/src/util/hash_table.h inde

Re: [Mesa-dev] [PATCH] mesa/st: Only call nir_lower_io_to_scalar_early on scalar ISAs

2018-10-21 Thread Timothy Arceri
Reviewed-by: Timothy Arceri I'm also working on a pass to recombine io to vectors which should hopefully allow you to have the best of both worlds in future. On 22/10/18 5:29 am, Alyssa Rosenzweig wrote: On scalar ISAs, nir_lower_io_to_scalar_early enables significant optimizations. Ho

[Mesa-dev] [PATCH] st/glsl_to_nir: fix next_stage gathering

2018-10-19 Thread Timothy Arceri
ffs() just returns the bit that is set, we need to know what stage that bit represents so use u_bit_scan() instead. Fixes: 2ca5d9548fc4 ("st/glsl_to_nir: gather next_stage in shader_info") --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[Mesa-dev] [PATCH 2/2] radv: use nir_shrink_vec_array_vars()

2018-10-17 Thread Timothy Arceri
Totals from affected shaders: SGPRS: 1096 -> 1096 (0.00 %) VGPRS: 1192 -> 1056 (-11.41 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 100940 -> 94384 (-6.49 %) bytes LDS: 0 -> 0 (0.00

[Mesa-dev] [PATCH 1/2] radv: use nir_split_array_vars()

2018-10-17 Thread Timothy Arceri
We call in the opt loop in case another pass results in an array with indirect access being turned into direct access. Totals from affected shaders: SGPRS: 512 -> 496 (-3.12 %) VGPRS: 456 -> 452 (-0.88 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0

Re: [Mesa-dev] [PATCH] radv: use nir_opt_copy_prop_vars and nir_opt_dead_write_vars

2018-10-17 Thread Timothy Arceri
On 18/10/18 9:51 am, Bas Nieuwenhuizen wrote: On Thu, Oct 18, 2018 at 12:04 AM Timothy Arceri wrote: Totals from affected shaders: SGPRS: 2856 -> 2856 (0.00 %) VGPRS: 3236 -> 3248 (0.37 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs:

[Mesa-dev] [PATCH] radv: use nir_opt_find_array_copies()

2018-10-17 Thread Timothy Arceri
Totals from affected shaders: SGPRS: 1112 -> 1112 (0.00 %) VGPRS: 1492 -> 1196 (-19.84 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 112172 -> 101316 (-9.68 %) bytes LDS: 0 -> 0 (0.00

[Mesa-dev] [PATCH] radv: use nir_opt_copy_prop_vars and nir_opt_dead_write_vars

2018-10-17 Thread Timothy Arceri
Totals from affected shaders: SGPRS: 2856 -> 2856 (0.00 %) VGPRS: 3236 -> 3248 (0.37 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Private memory VGPRs: 0 -> 0 (0.00 %) Scratch size: 0 -> 0 (0.00 %) dwords per thread Code Size: 236560 -> 233548 (-1.27 %) bytes LDS: 0 -> 0 (0.00 %

Re: [Mesa-dev] [PATCH] nir: remove some redundant bcsel instructions

2018-10-17 Thread Timothy Arceri
On 17/10/18 8:49 pm, Bas Nieuwenhuizen wrote: On Wed, Oct 17, 2018 at 5:49 AM Timothy Arceri wrote: For example: vec1 32 ssa_386 = feq ssa_333.x, ssa_6 vec1 32 ssa_387 = feq ssa_333.x, ssa_2 vec1 32 ssa_391 = bcsel ssa_387, ssa_388, ssa_324 vec1 32 ssa_396 = bcsel ssa_386

[Mesa-dev] [PATCH] nir: remove some redundant bcsel instructions

2018-10-16 Thread Timothy Arceri
For example: vec1 32 ssa_386 = feq ssa_333.x, ssa_6 vec1 32 ssa_387 = feq ssa_333.x, ssa_2 vec1 32 ssa_391 = bcsel ssa_387, ssa_388, ssa_324 vec1 32 ssa_396 = bcsel ssa_386, ssa_324, ssa_391 Can be simplified to: vec1 32 ssa_386 = feq ssa_333.x, ssa_6 vec1 32 ssa_391 = bcsel ss

Re: [Mesa-dev] [PATCH] radv: implement buffer to image operations for R32G32B32

2018-10-15 Thread Timothy Arceri
Tested-by: Timothy Arceri ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 02/15] nir: fix compacting varyings when XFB outputs are present

2018-10-14 Thread Timothy Arceri
What happened to v2? On 13/10/18 11:57 pm, Samuel Pitoiset wrote: We shouldn't try to compact any varyings known as always active IO, especially XFB outputs. For example, if one component of an xfb output is also used as input varying in the next stage, it shouldn't be compacted. Because we loo

Re: [Mesa-dev] [PATCH 05/13] nir: Preserve offsets in lower_io_to_scalar_early

2018-10-14 Thread Timothy Arceri
For xfb in glsl we just set always_active_io for varyings on each side of the interface which should avoid this and the linking problems from the two patches before this. Trying to lower/split xfb varyings just seems like asking for trouble, I suggested Samuel create a linking helper to set al

Re: [Mesa-dev] [Mesa-stable] [PATCH V2 6/6] util: disable cache if we have no build-id and timestamp is zero

2018-10-11 Thread Timothy Arceri
On 11/10/18 7:32 pm, Juan A. Suarez Romero wrote: On Wed, 2018-10-03 at 11:49 +0100, Emil Velikov wrote: HI Tim, On Wed, 19 Sep 2018 at 23:55, Timothy Arceri wrote: Timestamp can be zero for example when Flatpak is used. In this case just disable the cache rather then segfaulting when

Re: [Mesa-dev] [PATCH v2] nir: fix compacting varyings when XFB outputs are present

2018-10-11 Thread Timothy Arceri
On 11/10/18 6:59 pm, Samuel Pitoiset wrote: On 10/10/18 11:46 PM, Timothy Arceri wrote: On 11/10/18 1:46 am, Samuel Pitoiset wrote: We shouldn't try to compact any varyings known as always active IO, especially XFB outputs. For example, if one component of an xfb output is also us

[Mesa-dev] [PATCH] glsl: remove redundant es_shader checks

2018-10-10 Thread Timothy Arceri
The es check is already covered by the is_version() check. --- src/compiler/glsl/ast_to_hir.cpp | 4 src/compiler/glsl_types.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 1082d6c91cf..77

Re: [Mesa-dev] [PATCH v2] nir: fix compacting varyings when XFB outputs are present

2018-10-10 Thread Timothy Arceri
feedback_varyings) nir_link_xfb_varyings(ordered_shaders[i], ordered_shaders[i - 1]); With these changes this patch is: Reviewed-by: Timothy Arceri + get_slot_component_masks_and_interp_types(&producer->outputs, comps,

Re: [Mesa-dev] [PATCH] nir: fix compacting varyings when XFB outputs are present

2018-10-10 Thread Timothy Arceri
On 10/10/18 7:25 pm, Samuel Pitoiset wrote: On 10/10/18 10:14 AM, Timothy Arceri wrote: On 10/10/18 6:44 pm, Samuel Pitoiset wrote: We shouldn't try to compact any varyings known as always active IO, especially XFB outputs. For example, if one component of an xfb output is also used as

Re: [Mesa-dev] [PATCH] nir: fix compacting varyings when XFB outputs are present

2018-10-10 Thread Timothy Arceri
On 10/10/18 6:44 pm, Samuel Pitoiset wrote: We shouldn't try to compact any varyings known as always active IO, especially XFB outputs. For example, if one component of an xfb output is also used as input varying in the next stage, it shouldn't be compacted. Because we look at the input varyings

[Mesa-dev] [PATCH] glsl: ignore trailing whitespace when define redefined

2018-10-09 Thread Timothy Arceri
The Nvidia/AMD binary drivers allow this, as does GCC. This fixes shader compilation issues in the latest update of No Mans Sky. Cc: mesa-sta...@lists.freedesktop.org --- src/compiler/glsl/glcpp/glcpp-parse.y | 14 ++ .../glsl/glcpp/tests/122-redefine-whitespace.c |

Re: [Mesa-dev] [PATCH 3/9] nir/opt_peephole_select: Don't peephole_select expensive math instructions

2018-10-09 Thread Timothy Arceri
On 10/10/18 10:31 am, Ian Romanick wrote: On 10/09/2018 03:42 PM, Timothy Arceri wrote: Hi Ian, You might be interested in doing something like this [1]. It needs some tidy up (and likely further testing) but my initial results showed a fairly large number of select can be converted to ifs

Re: [Mesa-dev] [PATCH 3/9] nir/opt_peephole_select: Don't peephole_select expensive math instructions

2018-10-09 Thread Timothy Arceri
Hi Ian, You might be interested in doing something like this [1]. It needs some tidy up (and likely further testing) but my initial results showed a fairly large number of select can be converted to ifs just based on having a ubo load. [1] https://gitlab.freedesktop.org/tarceri/mesa/commits/

Re: [Mesa-dev] [PATCH V2 6/6] util: disable cache if we have no build-id and timestamp is zero

2018-10-03 Thread Timothy Arceri
On 3/10/18 8:49 pm, Emil Velikov wrote: HI Tim, On Wed, 19 Sep 2018 at 23:55, Timothy Arceri wrote: Timestamp can be zero for example when Flatpak is used. In this case just disable the cache rather then segfaulting when incompatible cache items are loaded. V2: actually return false when

Re: [Mesa-dev] shader cache backward compatibility

2018-10-02 Thread Timothy Arceri
On 3/9/18 6:53 pm, Alexander Larsson wrote: On Mon, Sep 3, 2018 at 10:41 AM Alexander Larsson wrote: On Fri, Aug 31, 2018 at 4:05 PM Emil Velikov wrote: Valid point - I forgot about that. A couple of ideas come to mind: - static link LLVM (Flatpak already does it) No LLVM changes needed.

Re: [Mesa-dev] [PATCH 2/2] nir: Expose nir_remove_unused_io_vars().

2018-10-02 Thread Timothy Arceri
Yeah we depend on the lower to scalar passes and array splitting to get the most out of this function. Series: Reviewed-by: Timothy Arceri + */ +bool +nir_remove_unused_io_vars(nir_shader *shader, struct exec_list *var_list, + uint64_t *used_by_other_stage, +

Re: [Mesa-dev] [PATCH 01/13] mesa: add a list of EXT_direct_state_access to dispatch sanity

2018-10-02 Thread Timothy Arceri
turns out a patch in Wine staging was responsible for Wolfenstein thinking the extension was available (it works fine on older versions of Wine). I'm not sure I'll get back to this extension anytime in the foreseeable future. Marek On Sat, Sep 8, 2018 at 12:32 AM Timothy Arceri wro

Re: [Mesa-dev] [PATCH 1/6] util: rename timestamp param in disk_cache_create()

2018-10-02 Thread Timothy Arceri
Ping on patches 1-5 I've pushed patch 6. On 19/9/18 12:13 pm, Timothy Arceri wrote: Only some drivers use a timestamp here. Others use things such as build-id, or even a combination of build-ids from Mesa and LLVM. --- src/util/disk_cache.c | 8 1 file changed, 4 insertions(

Re: [Mesa-dev] [Mesa-stable] [PATCH] radeonsi: add a workaround for bitfield_extract when count is 0

2018-09-27 Thread Timothy Arceri
On 28/9/18 2:53 am, Tom Stellard wrote: On 09/24/2018 11:51 PM, Samuel Pitoiset wrote: On 9/25/18 6:46 AM, Timothy Arceri wrote: On 25/9/18 10:35 am, Marek Olšák wrote: Do you know what's broken in LLVM? Or is it a problem with the ISA? I haven't actually dug any further. Adding

Re: [Mesa-dev] [PATCH v2 1/4] util: Get program name based on path when possible

2018-09-25 Thread Timothy Arceri
On 26/9/18 12:02 am, Kazlauskas, Nicholas wrote: On 09/24/2018 08:00 PM, Timothy Arceri wrote: On 25/9/18 4:18 am, Nicholas Kazlauskas wrote: Some programs start with the path and command line arguments in argv[0] (program_invocation_name). Chromium is an example of an application using mesa

Re: [Mesa-dev] [Mesa-stable] [PATCH] radeonsi: add a workaround for bitfield_extract when count is 0

2018-09-24 Thread Timothy Arceri
LLVM 7. I see the issue on both polaris and vega. Marek On Fri, Sep 21, 2018 at 10:38 PM, Timothy Arceri wrote: This ports the fix from 3d41757788ac. Both LLVM 7 & 8 continue to have this problem. It fixes rendering issues in some menu and loading screens of Civ VI which can be seen in

Re: [Mesa-dev] [PATCH] Revert "mesa: remove unnecessary 'sort by year' for the GL extensions"

2018-09-24 Thread Timothy Arceri
Assuming testing comes back ok. Reviewed-by: Timothy Arceri On 25/9/18 1:19 am, Emil Velikov wrote: This reverts commit 3d81e11b49366b5636b8524ba0f8c7076e3fdf34. As reported by Federico, some games require the 'sort by year' since they truncate the extensions which do not fit the

Re: [Mesa-dev] [PATCH v2 1/4] util: Get program name based on path when possible

2018-09-24 Thread Timothy Arceri
On 25/9/18 4:18 am, Nicholas Kazlauskas wrote: Some programs start with the path and command line arguments in argv[0] (program_invocation_name). Chromium is an example of an application using mesa that does this. This tries to query the real path for the symbolic link /proc/self/exe to find the

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

2018-09-24 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 in radeonsi more loops are unrolled in Civilization Beyond Earth. The actual pipeline-db stats are not overwhelming but even in the negati

[Mesa-dev] [PATCH] radeonsi: add a workaround for bitfield_extract when count is 0

2018-09-21 Thread Timothy Arceri
This ports the fix from 3d41757788ac. Both LLVM 7 & 8 continue to have this problem. It fixes rendering issues in some menu and loading screens of Civ VI which can be seen in the trace from bug 104602. Note: This does not fix the black triangles on Vega for bug 104602. Cc: mesa-sta...@lists.free

Re: [Mesa-dev] Request to revert commit [3d81e11b49366b5636b8524ba0f8c7076e3fdf34] mesa: remove, unnecessary, 'sort by year' for the GL extensions

2018-09-20 Thread Timothy Arceri
On 20/9/18 11:09 pm, Ian Romanick wrote: On 09/19/2018 11:36 PM, Federico Dossena wrote: As most of you are probably aware of, id2 and id3 games store GL extensions in a buffer that's too small for modern systems. This usually leads to a crash when MESA_EXTENSION_MAX_YEAR is not set, but what th

Re: [Mesa-dev] Request to revert commit [3d81e11b49366b5636b8524ba0f8c7076e3fdf34] mesa: remove, unnecessary, 'sort by year' for the GL extensions

2018-09-20 Thread Timothy Arceri
Makes sense to me. We should also update the comment so it doesn't get removed again. On 20/9/18 4:36 pm, Federico Dossena wrote: As most of you are probably aware of, id2 and id3 games store GL extensions in a buffer that's too small for modern systems. This usually leads to a crash when MESA

[Mesa-dev] [PATCH V2 6/6] util: disable cache if we have no build-id and timestamp is zero

2018-09-19 Thread Timothy Arceri
Timestamp can be zero for example when Flatpak is used. In this case just disable the cache rather then segfaulting when incompatible cache items are loaded. V2: actually return false when mtime is 0. --- src/amd/vulkan/radv_device.c | 4 src/util/disk_cache.h| 8 2 files ch

Re: [Mesa-dev] [PATCH 19/26] nir/linker: use only the array element type for array of ssbo/ubo

2018-09-19 Thread Timothy Arceri
On 19/9/18 11:10 pm, Alejandro Piñeiro wrote: On 19/09/18 14:09, Timothy Arceri wrote: On 19/9/18 7:59 pm, Alejandro Piñeiro wrote: On 19/09/18 07:20, Timothy Arceri wrote: On 16/9/18 2:18 am, Alejandro Piñeiro wrote: For this interfaces, the inner members are added only once as uniforms

Re: [Mesa-dev] [PATCH 6/6] util: disable cache if we have no build-id and timestamp is zero

2018-09-19 Thread Timothy Arceri
On 19/9/18 9:32 pm, Bas Nieuwenhuizen wrote: On Wed, Sep 19, 2018 at 4:14 AM Timothy Arceri wrote: Timestamp can be zero for example when Flatpack is used. In this case just disable the cache rather then segfaulting when incompatible cache items are loaded. --- src/amd/vulkan

Re: [Mesa-dev] [PATCH 19/26] nir/linker: use only the array element type for array of ssbo/ubo

2018-09-19 Thread Timothy Arceri
On 19/9/18 7:59 pm, Alejandro Piñeiro wrote: On 19/09/18 07:20, Timothy Arceri wrote: On 16/9/18 2:18 am, Alejandro Piñeiro wrote: For this interfaces, the inner members are added only once as uniforms or resources, in opposite to other cases, like a uniform array of structs. ---   src

Re: [Mesa-dev] [PATCH 6/6] util: disable cache if we have no build-id and timestamp is zero

2018-09-19 Thread Timothy Arceri
On 19/9/18 9:32 pm, Bas Nieuwenhuizen wrote: On Wed, Sep 19, 2018 at 4:14 AM Timothy Arceri wrote: Timestamp can be zero for example when Flatpack is used. In this case just disable the cache rather then segfaulting when incompatible cache items are loaded. --- src/amd/vulkan/radv_device.c

Re: [Mesa-dev] [PATCH 19/26] nir/linker: use only the array element type for array of ssbo/ubo

2018-09-18 Thread Timothy Arceri
On 16/9/18 2:18 am, Alejandro Piñeiro wrote: For this interfaces, the inner members are added only once as uniforms or resources, in opposite to other cases, like a uniform array of structs. --- src/compiler/glsl/gl_nir_link_uniforms.c | 26 -- 1 file changed, 24 insert

Re: [Mesa-dev] shader cache backward compatibility

2018-09-18 Thread Timothy Arceri
On 3/9/18 6:53 pm, Alexander Larsson wrote: On Mon, Sep 3, 2018 at 10:41 AM Alexander Larsson wrote: On Fri, Aug 31, 2018 at 4:05 PM Emil Velikov wrote: Valid point - I forgot about that. A couple of ideas come to mind: - static link LLVM (Flatpak already does it) No LLVM changes needed.

[Mesa-dev] [PATCH 1/6] util: rename timestamp param in disk_cache_create()

2018-09-18 Thread Timothy Arceri
Only some drivers use a timestamp here. Others use things such as build-id, or even a combination of build-ids from Mesa and LLVM. --- src/util/disk_cache.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 87ddfb86b27..

[Mesa-dev] [PATCH 4/6] nouveau: use build-id when available for disk cache

2018-09-18 Thread Timothy Arceri
--- src/gallium/drivers/nouveau/nouveau_screen.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c index c97b707955c..eb184d3559b 100644 --- a/src/gallium/drivers/nouveau/n

[Mesa-dev] [PATCH 6/6] util: disable cache if we have no build-id and timestamp is zero

2018-09-18 Thread Timothy Arceri
Timestamp can be zero for example when Flatpack is used. In this case just disable the cache rather then segfaulting when incompatible cache items are loaded. --- src/amd/vulkan/radv_device.c | 4 src/util/disk_cache.h| 6 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff

[Mesa-dev] [PATCH 5/6] r600: use build-id when available for disk cache

2018-09-18 Thread Timothy Arceri
--- src/gallium/drivers/r600/r600_pipe_common.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index f7cfd0d46a6..6b581242a18 100644 --- a/src/gallium/drivers/r600/r600_pi

[Mesa-dev] [PATCH 3/6] radeonsi: use build-id when available for disk cache

2018-09-18 Thread Timothy Arceri
--- src/gallium/drivers/radeonsi/si_pipe.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 82af9dd1de7..c38b754bf20 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c

[Mesa-dev] [PATCH 2/6] util: add disk_cache_get_function_identifier()

2018-09-18 Thread Timothy Arceri
This can be used as a drop in replacement for disk_cache_get_function_timestamp(). Here we use build-id to generate a driver-id rather than build timestamp if available. This should resolve issues such as distros using reproducable builds and flatpack not having real build timestamps. --- src/uti

Re: [Mesa-dev] [PATCH] docs/features: add EXT_direct_state_access features

2018-09-18 Thread Timothy Arceri
Acked-by: Timothy Arceri On 18/9/18 1:31 pm, Marek Olšák wrote: From: Marek Olšák --- docs/features.txt | 57 +++ 1 file changed, 57 insertions(+) diff --git a/docs/features.txt b/docs/features.txt index 9ccf803d470..a97f998a5cc 100644 --- a

Re: [Mesa-dev] [PATCH] radv: fix use of unreachable() in the meta blit path

2018-09-17 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 17/9/18 7:18 pm, Samuel Pitoiset wrote: Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_meta_blit.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_meta_blit.c b/src/amd/vulkan/radv_meta_blit.c index

Re: [Mesa-dev] [PATCH] radv: do not segfault when the SPIRV entry point is NULL

2018-09-17 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 17/9/18 7:18 pm, Samuel Pitoiset wrote: And return a better error value. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107954 Signed-off-by: Samuel Pitoiset --- src/amd/vulkan/radv_pipeline.c | 32 +--- src/amd/vulkan

Re: [Mesa-dev] [PATCH] radv: Use build ID if available for cache UUID.

2018-09-16 Thread Timothy Arceri
On 16/9/18 10:58 am, Bas Nieuwenhuizen wrote: To get an useful UUID for systems that have a non-useful mtime for the binaries. I started using using SHA1 to ensure we get reasonable mixing using using - > using So did this return a build id for LLVM on your distro? Reviewed-by: Timo

Re: [Mesa-dev] [PATCH 1/2] glsl: Avoid propagating incompatible type of initializer

2018-09-14 Thread Timothy Arceri
Series: Reviewed-by: Timothy Arceri Are there piglit tests to go with this? On 15/8/18 10:46 pm, Danylo Piliaiev wrote: do_assignment validated assigment but when rhs type was not compatible it proceeded without issues and returned error_emitted = false. On the other hand process_initializer

Re: [Mesa-dev] [PATCH v1] mesa: rotation of 0-vector

2018-09-12 Thread Timothy Arceri
On 13/9/18 12:44 am, Brian Paul wrote: On 09/12/2018 07:30 AM, Sergii Romantsov wrote: Specification doesn't define behaviour for rotation of 0-vector. But khronos.org says that vector has to be normalized. As workaround assumed that for 0-vector x-position will be defined as 1.0f. Bugzilla: h

[Mesa-dev] [PATCH] Revert "radeonsi: avoid syncing the driver thread in si_fence_finish"

2018-09-12 Thread Timothy Arceri
This reverts commit bc65dcab3bc48673ff6180afb036561a4b8b1119. This was manually reverted. Reverting stops the menu hanging in some id tech games such as RAGE and Wolfenstein The New Order. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107891 --- .../auxiliary/util/u_threaded_context.h

Re: [Mesa-dev] [PATCH 4/4] util: Get program name based on path when possible

2018-09-11 Thread Timothy Arceri
On 12/9/18 2:24 am, Nicholas Kazlauskas wrote: Some programs start with the path and command line arguments in argv[0] (program_invocation_name). Chromium is an example of an application using mesa that does this. This change breaks the detection of Wine applications. Can you give an example o

[Mesa-dev] [PATCH 2/2] util: use force_compat_profile for Wolfenstein The Old Blood

2018-09-11 Thread Timothy Arceri
This game is looking for some odd extension after creating a core context such as ARB_vertex_program and EXT_framebuffer_object. Rather then enabling these in core this forces the game to use compat. This allows the game to run and seems to work without issues. All other id tech games/engines use

[Mesa-dev] [PATCH 1/2] mesa/st: add force_compat_profile option to driconfig

2018-09-11 Thread Timothy Arceri
--- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 + src/gallium/state_trackers/dri/dri_context.c| 10 -- src/util/xmlpool/t_options.h| 5 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/gallium/auxiliary/pipe-loader/dri

Re: [Mesa-dev] [PATCH 1/9] mesa: move legacy TCL dri config options

2018-09-11 Thread Timothy Arceri
Ping! On 30/8/18 10:19 am, Timothy Arceri wrote: --- src/mesa/drivers/dri/radeon/radeon_screen.c | 10 + src/mesa/drivers/dri/radeon/radeon_screen.h | 5 + src/util/xmlpool/ca.po | 23 - src/util/xmlpool/de.po | 23

Re: [Mesa-dev] [PATCH 2/2] mesa: enable ARB_vertex_program in core profile

2018-09-10 Thread Timothy Arceri
ofile removes. There is no way this one is valid. On 09/07/2018 09:20 PM, Timothy Arceri wrote: This extension is required by "Wolfenstein: The Old Blood". Without it the app causes wine to crash on startup. --- src/mesa/main/extensions_table.h | 2 +- 1 file changed, 1 insertion

Re: [Mesa-dev] [PATCH] nir: do not remove varyings used for transform feedback

2018-09-10 Thread Timothy Arceri
For GLSL IR we set data.always_active_io = 1 this should skip this pass the array/component splitting/packing passes etc. On 11/9/18 4:52 am, Samuel Pitoiset wrote: When a xfb buffer is explicitely declared on a varying variable, we shouldn't remove it at link time. Signed-off-by: Samuel Pitoi

[Mesa-dev] [PATCH] mesa: tidy up init_matrix_stack()

2018-09-10 Thread Timothy Arceri
--- src/mesa/main/matrix.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 83f081e88e5..8065a83705c 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -657,20 +657,16 @@ void _mesa_update_modelvie

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
On 10/09/18 11:01, Matt Turner wrote: On Sun, Sep 9, 2018 at 5:00 PM Timothy Arceri wrote: On 10/09/18 09:52, Matt Turner wrote: On Sun, Sep 9, 2018 at 4:41 PM Timothy Arceri wrote: On 10/09/18 09:22, Ian Romanick wrote: On 09/08/2018 06:37 AM, Jason Ekstrand wrote: Is there going to be

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
On 10/09/18 10:21, Timothy Arceri wrote: On 10/09/18 10:00, Ian Romanick wrote: On 09/09/2018 04:57 PM, Ian Romanick wrote: On 09/09/2018 04:52 PM, Matt Turner wrote: On Sun, Sep 9, 2018 at 4:41 PM Timothy Arceri wrote: On 10/09/18 09:22, Ian Romanick wrote: On 09/08/2018 06:37 AM, Jason

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
On 10/09/18 10:40, Ian Romanick wrote: On 09/09/2018 05:00 PM, Timothy Arceri wrote: Ian made it pretty clear he didn't want a debate and had already made up his mind. "We decided years ago that we were not going to support this horrible, underspecified steaming pile of an extensi

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
On 10/09/18 10:00, Ian Romanick wrote: On 09/09/2018 04:57 PM, Ian Romanick wrote: On 09/09/2018 04:52 PM, Matt Turner wrote: On Sun, Sep 9, 2018 at 4:41 PM Timothy Arceri wrote: On 10/09/18 09:22, Ian Romanick wrote: On 09/08/2018 06:37 AM, Jason Ekstrand wrote: Is there going to be an

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
On 10/09/18 09:52, Ian Romanick wrote: On 09/09/2018 04:41 PM, Timothy Arceri wrote: On 10/09/18 09:22, Ian Romanick wrote: On 09/08/2018 06:37 AM, Jason Ekstrand wrote: Is there going to be an accompanying series on the piglit list?  I don't see anything there immediately. Which is o

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
On 10/09/18 09:52, Matt Turner wrote: On Sun, Sep 9, 2018 at 4:41 PM Timothy Arceri wrote: On 10/09/18 09:22, Ian Romanick wrote: On 09/08/2018 06:37 AM, Jason Ekstrand wrote: Is there going to be an accompanying series on the piglit list? I don't see anything there immediately.

Re: [Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-09 Thread Timothy Arceri
developer? The game is years old they are not going to rewrite it now just because it doesn't run on Mesa drivers. The game doesn't even support Linux in the first place. On September 7, 2018 23:32:16 Timothy Arceri wrote: EXT_direct_state_access is a huge extension so patch 1 a

Re: [Mesa-dev] [PATCH 01/13] mesa: add a list of EXT_direct_state_access to dispatch sanity

2018-09-09 Thread Timothy Arceri
AMD have also indicated they want to add support for this extension as they continue to add feature parity to radeonsi (vs their pro stack). On 09/07/2018 09:31 PM, Timothy Arceri wrote: This extension is huge and this gives us a TODO list of functions to implement. --- src/mesa/

[Mesa-dev] [PATCH 08/13] mesa: add support for glNamedBufferStorageEXT

2018-09-07 Thread Timothy Arceri
This is available in ARB_buffer_storage when EXT_direct_state_access is present. --- src/mapi/glapi/gen/gl_API.xml | 7 +++ src/mesa/main/bufferobj.c | 15 +++ src/mesa/main/bufferobj.h | 3 +++ src/mesa/main/tests/dispatch_sanity.cpp | 1 +

[Mesa-dev] [PATCH 11/13] mesa: add support for glCompressedTextureSubImage2DEXT()

2018-09-07 Thread Timothy Arceri
--- .../glapi/gen/EXT_direct_state_access.xml | 15 src/mesa/main/tests/dispatch_sanity.cpp | 2 +- src/mesa/main/teximage.c | 75 +-- src/mesa/main/teximage.h | 7 ++ 4 files changed, 74 insertions(+), 25 deletions(-) dif

[Mesa-dev] [PATCH 09/13] mesa: add support for glMapNamedBufferRangeEXT()

2018-09-07 Thread Timothy Arceri
--- .../glapi/gen/EXT_direct_state_access.xml | 10 + src/mesa/main/bufferobj.c | 45 +-- src/mesa/main/bufferobj.h | 3 ++ src/mesa/main/tests/dispatch_sanity.cpp | 2 +- 4 files changed, 46 insertions(+), 14 deletions(-) di

[Mesa-dev] [PATCH 13/13] mesa: add support for glMapNamedBufferEXT()

2018-09-07 Thread Timothy Arceri
--- .../glapi/gen/EXT_direct_state_access.xml | 6 + src/mesa/main/bufferobj.c | 23 +++ src/mesa/main/bufferobj.h | 2 ++ src/mesa/main/tests/dispatch_sanity.cpp | 2 +- 4 files changed, 32 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 12/13] mesa: add support for glUnmapNamedBufferEXT()

2018-09-07 Thread Timothy Arceri
Since the ARB DSA function glUnmapNamedBuffer() is only exposed for 3.1 or above we make glUnmapNamedBuffer() an alias of glUnmapNamedBufferEXT() rather than the other way around. --- src/mapi/glapi/gen/ARB_direct_state_access.xml | 2 +- src/mapi/glapi/gen/EXT_direct_state_access.xml | 5 + s

[Mesa-dev] [PATCH 10/13] mesa: add support for glTextureSubImage2DEXT()

2018-09-07 Thread Timothy Arceri
--- .../glapi/gen/EXT_direct_state_access.xml | 15 ++ src/mesa/main/tests/dispatch_sanity.cpp | 2 +- src/mesa/main/teximage.c | 137 ++ src/mesa/main/teximage.h | 6 + 4 files changed, 131 insertions(+), 29 deletions(-) di

[Mesa-dev] [PATCH 06/13] mesa: add support for glBindMultiTextureEXT

2018-09-07 Thread Timothy Arceri
--- .../glapi/gen/EXT_direct_state_access.xml | 9 +++- src/mesa/main/tests/dispatch_sanity.cpp | 2 +- src/mesa/main/texobj.c| 42 +++ src/mesa/main/texobj.h| 3 ++ 4 files changed, 45 insertions(+), 11 deletions(-) dif

[Mesa-dev] [PATCH 01/13] mesa: add a list of EXT_direct_state_access to dispatch sanity

2018-09-07 Thread Timothy Arceri
This extension is huge and this gives us a TODO list of functions to implement. --- src/mesa/main/tests/dispatch_sanity.cpp | 219 1 file changed, 219 insertions(+) diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index fb2ac

[Mesa-dev] [PATCH 03/13] mesa: EXT_dsa add selectorless matrix stack functions

2018-09-07 Thread Timothy Arceri
From: Chris Forbes Allows the legacy matrix stacks to be manipulated without disturbing the matrix mode selector. Signed-off-by: Chris Forbes --- src/mesa/main/matrix.c | 370 +++-- src/mesa/main/matrix.h | 46 + 2 files changed, 363 insertions(+), 53 d

[Mesa-dev] Get Wolfenstein: The Old Blood running (Part 2)

2018-09-07 Thread Timothy Arceri
EXT_direct_state_access is a huge extension so patch 1 adds a list of the functions to displatch sanity that can be used as a TODO list. Wolfenstein doesn't use the matrix stuff but since Chris implemented it and we are eventually going to add this extension it seemed worth sending out with this s

[Mesa-dev] [PATCH 07/13] mesa: add support for glNamedBuffer*DataEXT()

2018-09-07 Thread Timothy Arceri
--- .../glapi/gen/EXT_direct_state_access.xml | 16 ++ src/mesa/main/bufferobj.c | 31 +++ src/mesa/main/bufferobj.h | 6 src/mesa/main/tests/dispatch_sanity.cpp | 4 +-- 4 files changed, 55 insertions(+), 2 deletions

[Mesa-dev] [PATCH 04/13] glapi: add EXT_direct_state_access

2018-09-07 Thread Timothy Arceri
From: Chris Forbes Signed-off-by: Chris Forbes --- .../glapi/gen/EXT_direct_state_access.xml | 101 ++ src/mapi/glapi/gen/gl_API.xml | 3 + src/mesa/main/tests/dispatch_sanity.cpp | 30 +++--- 3 files changed, 119 insertions(+), 15 deletions(-) crea

[Mesa-dev] [PATCH 05/13] mesa: add new EXT_direct_state_access tokens

2018-09-07 Thread Timothy Arceri
--- src/mapi/glapi/gen/EXT_direct_state_access.xml | 4 1 file changed, 4 insertions(+) diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index c19afe80a22..58adc9da29d 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++

[Mesa-dev] [PATCH 02/13] mesa: factor out enum -> matrix stack lookup

2018-09-07 Thread Timothy Arceri
From: Chris Forbes Split this out from glMatrixMode since we're about to need it independently for EXT_DSA. Signed-off-by: Chris Forbes --- src/mesa/main/matrix.c | 110 - 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/src/mesa/main/matr

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