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

2018-09-07 Thread Timothy Arceri
This enables a couple more extension that the game expects in the core profile (and yes Nvidia exposes them in core). These changes allow the game to start without crashing. The second part adds some EXT_direct_state_access support so I'm sending it separately. _

[Mesa-dev] [PATCH 1/2] mesa: enable EXT_framebuffer_object in core profile

2018-09-07 Thread Timothy Arceri
Since user defined names are not allowed in core profile we remove the allow_user_names bool and just check if we have a core profile like all other buffer/texture object handling code does. This extension is required by "Wolfenstein: The Old Blood" and is exposed in core in the Nvidia binary driv

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

2018-09-07 Thread Timothy Arceri
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(+), 1 deletion(-) diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index 09bf923

Re: [Mesa-dev] [PATCH] mesa: enable ARB_vertex_buffer_object in core profile

2018-09-07 Thread Timothy Arceri
On 07/09/18 13:36, Timothy Arceri wrote: On 07/09/18 11:49, Ian Romanick wrote: On 09/06/2018 06:08 PM, Timothy Arceri wrote: On 07/09/18 11:00, Ian Romanick wrote: On 09/06/2018 03:24 PM, Timothy Arceri wrote: On 07/09/18 06:18, Ian Romanick wrote: So... this game that requires at least

Re: [Mesa-dev] [PATCH 15/15] radeonsi/nir: port some bindless and sampler code from TGSI

2018-09-07 Thread Timothy Arceri
On 08/09/18 07:37, Marek Olšák wrote: Ping I had additional patches for bindless somewhere, tbh it's hard to know if this is all thats needed since we can't test but if you think this is correct feel free to push. It's not like it's going to break anything and we can always fix it later when

[Mesa-dev] [PATCH] mesa: remove duplicate dispatch sanity tests

2018-09-07 Thread Timothy Arceri
This removes duplicate tests from gl_core_functions_possible that are already covered by common_desktop_functions_possible. --- src/mesa/main/tests/dispatch_sanity.cpp | 265 1 file changed, 265 deletions(-) diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa

Re: [Mesa-dev] [PATCH] mesa: enable ARB_vertex_buffer_object in core profile

2018-09-06 Thread Timothy Arceri
On 07/09/18 11:49, Ian Romanick wrote: On 09/06/2018 06:08 PM, Timothy Arceri wrote: On 07/09/18 11:00, Ian Romanick wrote: On 09/06/2018 03:24 PM, Timothy Arceri wrote: On 07/09/18 06:18, Ian Romanick wrote: So... this game that requires at least OpenGL 3.2 (by virtue of using core profile

Re: [Mesa-dev] [PATCH] mesa: enable ARB_vertex_buffer_object in core profile

2018-09-06 Thread Timothy Arceri
On 07/09/18 11:00, Ian Romanick wrote: On 09/06/2018 03:24 PM, Timothy Arceri wrote: On 07/09/18 06:18, Ian Romanick wrote: So... this game that requires at least OpenGL 3.2 (by virtue of using core profile) is checking for an OpenGL 1.4 feature?  That makes me a little sad. Its a little odd

Re: [Mesa-dev] [ANNOUNCE] mesa 18.2.0-rc6

2018-09-06 Thread Timothy Arceri
On 06/09/18 22:36, Andres Gomez wrote: On Thu, 2018-09-06 at 14:15 +1000, Timothy Arceri wrote: On 06/09/18 07:57, Andres Gomez wrote:> Hello list, [...] Testing reports/general approval Any testing reports (or general approval of the state of the bra

Re: [Mesa-dev] [PATCH] mesa: enable ARB_vertex_buffer_object in core profile

2018-09-06 Thread Timothy Arceri
edit that code. On 09/05/2018 08:45 PM, Timothy Arceri wrote: This extension is required by "Wolfenstein: The Old Blood". All the functions are just alias of the core functions so there should be nothing more to do. --- src/mesa/main/extensions_table.h | 2 +- 1 file changed, 1

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-06 Thread Timothy Arceri
On 06/09/18 04:57, Thomas Hellstrom wrote: On 09/05/2018 04:30 PM, Timothy Arceri wrote: On 05/09/18 23:36, Thomas Hellstrom wrote: On 09/05/2018 02:36 PM, Timothy Arceri wrote: On 05/09/18 22:09, Thomas Hellstrom wrote: On 09/05/2018 01:45 PM, Timothy Arceri wrote: On 16/08/17 04:31

Re: [Mesa-dev] [ANNOUNCE] mesa 18.2.0-rc6

2018-09-05 Thread Timothy Arceri
_STENCIL textures Mauro Rossi (1): egl/android: do not indent HAVE_DRM_GRALLOC preprocessor directive Nanley Chery (1): i965/gen7_urb: Re-emit PUSH_CONSTANT_ALLOC on some gen9 Samuel Pitoiset (1): radv: fix passing clip/cull distances from VS to PS

Re: [Mesa-dev] [PATCH 2/3] radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remap

2018-09-05 Thread Timothy Arceri
On 06/09/18 13:16, Jason Ekstrand wrote: On September 5, 2018 19:46:06 Timothy Arceri wrote: On 01/09/18 13:11, Jason Ekstrand wrote: We were going out of our way to disable dual-location re-mapping in NIR only to then do the remapping in st_glsl_to_nir.cpp.  Presumably, this was so that

[Mesa-dev] [PATCH] mesa: enable ARB_vertex_buffer_object in core profile

2018-09-05 Thread Timothy Arceri
This extension is required by "Wolfenstein: The Old Blood". All the functions are just alias of the core functions so there should be nothing more to do. --- 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

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-05 Thread Timothy Arceri
Cc: mesa-sta...@lists.freedesktop.org On 01/09/18 23:57, Timothy Arceri wrote: If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but the define itself is so this then gets recognised as #if. Until

Re: [Mesa-dev] [PATCH 2/3] radeonsi/nir: Set vs_inputs_dual_locations and let NIR do the remap

2018-09-05 Thread Timothy Arceri
On 01/09/18 13:11, Jason Ekstrand wrote: We were going out of our way to disable dual-location re-mapping in NIR only to then do the remapping in st_glsl_to_nir.cpp. Presumably, this was so that double_inputs would be correct for the core state tracker. However, now that we've it to gl_program::

Re: [Mesa-dev] [PATCH 5/6] mesa: remove duplicate declarations from glheader.h

2018-09-05 Thread Timothy Arceri
On 06/09/18 02:35, Emil Velikov wrote: From: Emil Velikov Remove all the desktop GL and GLX entries from the list. Former are pulled by the gl.h and glext.h includes at the top while the latter are not longer needed. not -> no Series: Reviewed-by: Timothy Arceri Are you consider

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-05 Thread Timothy Arceri
Ping! If I don't have any other feedback by tomorrow I'll push this with the Tested-by. Thanks. On 01/09/18 23:57, Timothy Arceri wrote: If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-05 Thread Timothy Arceri
On 05/09/18 23:36, Thomas Hellstrom wrote: On 09/05/2018 02:36 PM, Timothy Arceri wrote: On 05/09/18 22:09, Thomas Hellstrom wrote: On 09/05/2018 01:45 PM, Timothy Arceri wrote: On 16/08/17 04:31, Thomas Hellstrom wrote: Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-05 Thread Timothy Arceri
On 05/09/18 22:09, Thomas Hellstrom wrote: On 09/05/2018 01:45 PM, Timothy Arceri wrote: On 16/08/17 04:31, Thomas Hellstrom wrote: Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path. Implement dri3 support for GLX_SWAP_EXCHANGE_OML and GLX_SWAP_COPY_OML. The back-to-fake

Re: [Mesa-dev] [PATCH 0/9] dri2: Swapbuffer update v3.

2018-09-05 Thread Timothy Arceri
On 16/08/17 04:31, Thomas Hellstrom wrote: Implement back-to-fake-front flips, Fix EGL_BUFFER_PRESERVED path. Implement dri3 support for GLX_SWAP_EXCHANGE_OML and GLX_SWAP_COPY_OML. The back-to-fake-front flips will save a full buffer copy in the case of a fake front being enabled and GLX_SWAP

Re: [Mesa-dev] [PATCH] radeonsi: clear VRAM buffers on creation if zerovram is set

2018-09-03 Thread Timothy Arceri
This patch causes the corruptions to return in No Mans Sky. On 04/09/18 04:36, Marek Olšák wrote: From: Marek Olšák This includes reused buffers. Prefer DCC clear if DCC is enabled. --- src/gallium/drivers/radeonsi/si_buffer.c | 8 src/gallium/drivers/radeonsi/si_pipe.c

Re: [Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-03 Thread Timothy Arceri
t least it fixed the failing GfxBench ALU2 test. :-) Tested-By: Eero Tamminen - Eero On 01.09.2018 16:57, Timothy Arceri wrote: If we have something like:     #ifdef NOT_DEFINED     #define A_MACRO(x) \ if (x)     #endif The # on the #define is not skipped but the define itself is so

Re: [Mesa-dev] [PATCH 3/4] radeonsi: add radeonsi_zerovram driconfig option

2018-09-03 Thread Timothy Arceri
On 28/08/18 04:26, Marek Olšák wrote: On Fri, Aug 24, 2018 at 10:33 AM, Michel Dänzer wrote: On 2018-08-24 1:06 p.m., Timothy Arceri wrote: More and more games seem to require this so lets make it a config option. --- src/gallium/drivers/radeonsi/driinfo_radeonsi.h | 1 + src/gallium

[Mesa-dev] [PATCH] glsl: fixer lexer for unreachable defines

2018-09-01 Thread Timothy Arceri
If we have something like: #ifdef NOT_DEFINED #define A_MACRO(x) \ if (x) #endif The # on the #define is not skipped but the define itself is so this then gets recognised as #if. Until 28a3731e3f this didn't happen because we ended up in {NONSPACE} where BEGIN INITIAL was called

Re: [Mesa-dev] shader cache backward compatibility

2018-08-31 Thread Timothy Arceri
On 31/08/18 21:07, Emil Velikov wrote: On 31 August 2018 at 11:37, Timothy Arceri wrote: On 31/08/18 20:10, Emil Velikov wrote: Hi Timothy, On 31 August 2018 at 10:57, Timothy Arceri wrote: On 31/08/18 19:40, Bas Nieuwenhuizen wrote: +TImothy On Fri, Aug 31, 2018 at 11:32 AM

Re: [Mesa-dev] shader cache backward compatibility

2018-08-31 Thread Timothy Arceri
On 31/08/18 20:10, Emil Velikov wrote: Hi Timothy, On 31 August 2018 at 10:57, Timothy Arceri wrote: On 31/08/18 19:40, Bas Nieuwenhuizen wrote: +TImothy On Fri, Aug 31, 2018 at 11:32 AM Alexander Larsson wrote: Hi, I'm the developer behind flatpak (https://flatpak.org/) and

Re: [Mesa-dev] shader cache backward compatibility

2018-08-31 Thread Timothy Arceri
On 31/08/18 19:40, Bas Nieuwenhuizen wrote: +TImothy On Fri, Aug 31, 2018 at 11:32 AM Alexander Larsson wrote: Hi, I'm the developer behind flatpak (https://flatpak.org/) and we've recently run into some issues with the mesa shader cache. Flatpak has a app/runtime split where the runtime is s

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

2018-08-29 Thread Timothy Arceri
On 30/08/18 12:56, Jason Ekstrand wrote: On Wed, Aug 29, 2018 at 9:45 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: On 30/08/18 10:57, Ian Romanick wrote: > On 08/27/2018 02:08 AM, Timothy Arceri wrote: >> Since we know what side of the branch we ended

Re: [Mesa-dev] [PATCH v3] nir: propagates if condition evaluation down some alu chains

2018-08-29 Thread Timothy Arceri
08/29/2018 04:48 PM, Timothy Arceri wrote: v2: - only allow nir_op_inot or nir_op_b2i when alu input is 1. - use some helpers as suggested by Jason. v3: - evaluate alu op for single input alu ops - add helper function to decide if to propagate through alu - make use of nir_before_src in an

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

2018-08-29 Thread Timothy Arceri
On 30/08/18 10:57, Ian Romanick wrote: On 08/27/2018 02:08 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 the spill changes in shader-db are from Dolphin uber shaders, despite some small regressions the change is

Re: [Mesa-dev] [PATCH] glsl/linker: Link all out vars from a shader objects on a single stage

2018-08-29 Thread Timothy Arceri
On 30/08/18 08:16, Andres Gomez wrote: Vadym, should we also include this in the stable queues ? Yes. It should be fine to add this to stable. Thanks. On Mon, 2018-08-27 at 15:20 +0300, Vadym Shovkoplias wrote: From: "vadym.shovkoplias" During intra stage linking some out variables can be

[Mesa-dev] [PATCH 3/9] mesa: move legacy dri config option dither_mode

2018-08-29 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 7/9] mesa: move legacy dri config option def_max_anisotropy

2018-08-29 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 1/9] mesa: move legacy TCL dri config options

2018-08-29 Thread Timothy Arceri
--- 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 - src/util/xmlpool/es.po

[Mesa-dev] [PATCH 6/9] mesa: move legacy dri config option no_neg_lod_bias

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

[Mesa-dev] [PATCH 8/9] mesa: move legacy dri config option fthrottle_mode

2018-08-29 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 4/9] mesa: remove unused dri option float_depth

2018-08-29 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 src/util/xm

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

2018-08-29 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 src/util/xmlpool/

[Mesa-dev] [PATCH 2/9] mesa: move legacy dri config option color_reduction

2018-08-29 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 5/9] mesa: move legacy dri config option round_mode

2018-08-29 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 v3] nir: propagates if condition evaluation down some alu chains

2018-08-29 Thread Timothy Arceri
v2: - only allow nir_op_inot or nir_op_b2i when alu input is 1. - use some helpers as suggested by Jason. v3: - evaluate alu op for single input alu ops - add helper function to decide if to propagate through alu - make use of nir_before_src in another spot shader-db IVB results: total inst

Re: [Mesa-dev] [PATCH] glsl/linker: Link all out vars from a shader objects on a single stage

2018-08-29 Thread Timothy Arceri
On 28/08/18 17:34, Vadim Shovkoplias wrote: Hi Timothy, Thanks for the review! Space was removed. Can you please push this patch since I haven't got write permissions ? For some reason the space was still there but I removed it and pushed. Thanks for the patch. Regards, Vadym вт, 28 авг

[Mesa-dev] [PATCH 2/2] st/mesa, gallium: add a workaround for No Mans Sky

2018-08-28 Thread Timothy Arceri
The spec seems clear this is not allowed but the Nvidia binary forces apps to add layout qualifiers so this works around the issue for No Mans Sky until the CTS can be sorted out. --- src/gallium/auxiliary/pipe-loader/driinfo_gallium.h | 1 + src/gallium/include/state_tracker/st_api.h | 1

[Mesa-dev] [PATCH 1/2] glsl: add a mechanism to allow layout qualifiers on function params

2018-08-28 Thread Timothy Arceri
The spec is quite clear this is not allowed: From Section 4.4. (Layout Qualifiers) of the GLSL 4.60 spec: "Layout qualifiers can appear in several forms of declaration. They can appear as part of an interface block definition or block member, as shown in the grammar in th

[Mesa-dev] [PATCH v2] mesa: enable ARB_direct_state_access in compat for GL3.1+

2018-08-28 Thread Timothy Arceri
We could enable it for lower versions of GL but this allows us to just use the existing version/extension checks that are already used by the core profile. v2: fix potential crash in no error path --- src/mapi/glapi/gen/apiexec.py| 194 +++ src/mesa/main/arrayobj.c

[Mesa-dev] [PATCH] glsl: skip stringification in preprocessor if in unreachable branch

2018-08-28 Thread Timothy Arceri
This fixes compilation of some "No Mans Sky" shaders where the stringification happens in branches intended for DX12. --- Piglit tests: https://patchwork.freedesktop.org/series/48850/ src/compiler/glsl/glcpp/glcpp-lex.l | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/

Re: [Mesa-dev] [PATCH v4 7/7] nir: add loop unroll support for complex wrapper loops

2018-08-28 Thread Timothy Arceri
On 29/08/18 03:59, Jason Ekstrand wrote: On Mon, Aug 27, 2018 at 4:10 AM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: 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 exis

Re: [Mesa-dev] [PATCH] glsl/linker: Link all out vars from a shader objects on a single stage

2018-08-27 Thread Timothy Arceri
; num_shaders; i++) { + + /* Skip shader object with main function */ + if (shader_list[i]->symbols->get_function("main")) + continue; + + foreach_in_list (ir_instruction, ir, shader_list[i]->ir) { ^-- Please remove this space Othe

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

2018-08-27 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. However

[Mesa-dev] [PATCH v4 3/7] nir: always attempt to find loop terminators

2018-08-27 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. Reviewed-by: Jason Ekstrand --- src/compiler/nir/nir_loop_analyze.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/ni

[Mesa-dev] [PATCH v4 5/7] nir/opt_loop_unroll: Remove unneeded phis if we make progress

2018-08-27 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 possi

[Mesa-dev] [PATCH v4 4/7] nir: add complex_loop bool to loop info

2018-08-27 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. Reviewed-by: Jason Ekstrand ---

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

2018-08-27 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 v4 1/7] nir: evaluate if condition uses inside the if branches

2018-08-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 use->parent_instr->t

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

2018-08-27 Thread Timothy Arceri
v2: - only allow nir_op_inot or nir_op_b2i when alu input is 1. - use some helpers as suggested by Jason. 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

Re: [Mesa-dev] [PATCH v2] glsl/linker: Allow unused in blocks which are not declated on previous stage

2018-08-26 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 24/08/18 18:25, Alejandro Piñeiro wrote: CCing Timothy just in case he still thinks that the original comment should remain as it is. In any case, it looks to me, so: Reviewed-by: Alejandro Piñeiro On 23/08/18 12:12, vadym.shovkoplias wrote: From Section

Re: [Mesa-dev] [PATCH] nir: Pull block_ends_in_jump into nir.h

2018-08-26 Thread Timothy Arceri
Reviewed-by: Timothy Arceri On 25/08/18 00:34, Jason Ekstrand wrote: We had two different implementations in different files. May as well have one and put it in nir.h. --- src/compiler/nir/nir.h | 7 +++ src/compiler/nir/nir_control_flow.c | 17 + src

[Mesa-dev] [PATCH 4/4] radeonsi: enable radeonsi_zerovram for No Mans Sky

2018-08-24 Thread Timothy Arceri
--- src/util/00-mesa-defaults.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf index ad59efba50b..5d15b3819fb 100644 --- a/src/util/00-mesa-defaults.conf +++ b/src/util/00-mesa-defaults.conf @@ -322,5 +322,8 @@ TODO: docume

[Mesa-dev] [PATCH 3/4] radeonsi: add radeonsi_zerovram driconfig option

2018-08-24 Thread Timothy Arceri
More and more games seem to require this so lets make it a config option. --- src/gallium/drivers/radeonsi/driinfo_radeonsi.h | 1 + src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 10 +++--- src/util/xmlpool/t_options.h| 5 + 3 files changed, 13 insertions(+), 3 de

[Mesa-dev] [PATCH 2/4] radeonsi: enable GL 4.5 in compat profile

2018-08-24 Thread Timothy Arceri
--- src/gallium/drivers/radeonsi/si_get.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 47368fb7c91..f4c61a7e408 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers

[Mesa-dev] [PATCH 1/4] mesa: enable ARB_direct_state_access in compat for GL3.1+

2018-08-24 Thread Timothy Arceri
We could enable it for lower versions of GL but this allows us to just use the existing version/extension checks that are already used by the core profile. --- src/mapi/glapi/gen/apiexec.py| 194 +++ src/mesa/main/extensions_table.h | 2 +- src/mesa/main/fbobject.

Re: [Mesa-dev] [PATCH] radv: remove dead variables after splitting per member structs

2018-08-22 Thread Timothy Arceri
On 23/08/18 09:57, Timothy Arceri wrote: On 22/08/18 20:34, Samuel Pitoiset wrote: Otherwise, nir_lower_clip_cull_distance_arrays might report wrong number of output clips/culls because it relies on shader output variables and some of them might be dead. This fixes a rendering issue with

Re: [Mesa-dev] [PATCH] radv: remove dead variables after splitting per member structs

2018-08-22 Thread Timothy Arceri
On 22/08/18 20:34, Samuel Pitoiset wrote: Otherwise, nir_lower_clip_cull_distance_arrays might report wrong number of output clips/culls because it relies on shader output variables and some of them might be dead. This fixes a rendering issue with Dolphin and Super Mario Sunshine. Fixes: b0c6

Re: [Mesa-dev] [PATCH] glsl/linker: Allow unused in blocks which are not declated on previous stage

2018-08-22 Thread Timothy Arceri
. Worst case scenario we get an error message when we probably shouldn't. I believe the spec text is worded this way so these unused blockes can be removed by opts during linking before validation is done. Ideally that is what we would do too. For now this patch is: Reviewed-by: Timothy Arc

Re: [Mesa-dev] [PATCH] glsl/linker: Allow unused in blocks which are not declated on previous stage

2018-08-20 Thread Timothy Arceri
On 20/08/18 23:31, vadym.shovkoplias wrote: From Section 4.3.4 (Inputs) of the GLSL 1.50 spec: "Only the input variables that are actually read need to be written by the previous stage; it is allowed to have superfluous declarations of input variables." Fixes: * interstag

[Mesa-dev] v2 Tidy up dri config options

2018-08-20 Thread Timothy Arceri
v2: - moved TCL dri config options to old radeon drivers instead of replacing with env var. - some reviewed patches from previous series pushed 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 dir

[Mesa-dev] [PATCH v2 06/14] mesa: move legacy TCL dri config options

2018-08-20 Thread Timothy Arceri
--- 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 - src/util/xmlpool/es.po

[Mesa-dev] [PATCH v2 09/14] mesa: remove unused dri option float_depth

2018-08-20 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 src/util/xm

[Mesa-dev] [PATCH v2 07/14] mesa: move legacy dri config option color_reduction

2018-08-20 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 v2 14/14] mesa: move legacy dri config option texture_depth

2018-08-20 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 src/util/xmlpool/

[Mesa-dev] [PATCH v2 10/14] mesa: move legacy dri config option round_mode

2018-08-20 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 v2 01/14] i915: remove early_z dri option

2018-08-20 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 c

[Mesa-dev] [PATCH v2 08/14] mesa: move legacy dri config option dither_mode

2018-08-20 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 v2 12/14] mesa: move legacy dri config option def_max_anisotropy

2018-08-20 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 v2 05/14] mesa: move legacy hyperz option from dri config

2018-08-20 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 v2 02/14] i965: remove unused no_rast bool

2018-08-20 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 v2 13/14] mesa: move legacy dri config option fthrottle_mode

2018-08-20 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 v3 4/7] nir: add complex_loop bool to loop info

2018-08-20 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. Reviewed-by: Jason Ekstrand ---

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

2018-08-20 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. However

[Mesa-dev] [PATCH v3 3/7] nir: always attempt to find loop terminators

2018-08-20 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. Reviewed-by: Jason Ekstrand --- src/compiler/nir/nir_loop_analyze.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/compiler/nir/ni

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

2018-08-20 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 HURT

[Mesa-dev] [PATCH v2 11/14] mesa: move legacy dri config option no_neg_lod_bias

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

[Mesa-dev] [PATCH v2 04/14] mesa: remove unused dri config option disable_shader_bit_encoding

2018-08-20 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 v3 1/7] nir: evaluate if condition uses inside the if branches

2018-08-20 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 use->parent_instr->t

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

2018-08-20 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 +- src/mesa/drivers/dri/radeon/

[Mesa-dev] [PATCH v3 5/7] nir/opt_loop_unroll: Remove unneeded phis if we make progress

2018-08-20 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 possi

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

2018-08-20 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 -

Re: [Mesa-dev] [PATCH 2/4] nir: mark *prev_block as MAYBE_UNUSED in opt_peel_loop_initial_if

2018-08-17 Thread Timothy Arceri
On 18/08/18 10:28, Timothy Arceri wrote: Thanks I'd been meaning to do this too. Reviewed-by: Timothy Arceri Do you have commit access? Nevermind I should have read the cover letter. I'll push the first 3, I'll leave patch 4 for someone at AMD to comment on. I think all

Re: [Mesa-dev] [PATCH 2/4] nir: mark *prev_block as MAYBE_UNUSED in opt_peel_loop_initial_if

2018-08-17 Thread Timothy Arceri
Thanks I'd been meaning to do this too. Reviewed-by: Timothy Arceri Do you have commit access? On 18/08/18 00:32, Kai Wasserbäch wrote: Only used, when asserts are enabled. Fixes an unused-variable warning with gcc-8: ../../../src/compiler/nir/nir_opt_if.c: In fun

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

2018-08-17 Thread Timothy Arceri
On 18/08/18 07:14, Jason Ekstrand wrote: On Mon, Jul 23, 2018 at 3:02 AM 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 5/5] anv/pipeline: Lower pipeline layouts etc. after linking

2018-08-16 Thread Timothy Arceri
Nice numbers :) I'm not sure I 100% follow the why for patch 1 but the logic seems correct for the way you want to change it, and all other patches look good to me so series: Reviewed-by: Timothy Arceri On 08/08/18 18:12, Jason Ekstrand wrote: This allows us to use the link-opti

[Mesa-dev] [PATCH 2/2] util: add drirc workarounds for RAGE

2018-08-15 Thread Timothy Arceri
This allows the game to run on wine (tested on radeonsi where we have compat profile support). --- src/util/drirc | 8 1 file changed, 8 insertions(+) diff --git a/src/util/drirc b/src/util/drirc index c4f9e060f3a..ad59efba50b 100644 --- a/src/util/drirc +++ b/src/util/drirc @@ -100,6 +1

[Mesa-dev] [PATCH 1/2] util: better handle program names from wine

2018-08-15 Thread Timothy Arceri
For some reason wine will sometimes give us a windows style path for an application. For example when running the 64bit version of Rage wine gives a Unix style path, but when running the 32bit version is gives a windows style path. If we detect no '/' in the path at all it should be safe to assume

Re: [Mesa-dev] [PATCH] radv: Possible demand compilation fix.

2018-08-15 Thread Timothy Arceri
Thanks fixes steamvr for me :) Tested-by: Timothy Arceri Reviewed-by: Timothy Arceri On 16/08/18 00:25, Bas Nieuwenhuizen wrote: Seems that in a single case we use the renderpass before checking the pipeline, so check the renderpass before we use it. Fixes: fbcd1673144 "radv: Add on-d

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

2018-08-15 Thread Timothy Arceri
On 16/08/18 02:10, Jason Ekstrand wrote: On Tue, Aug 14, 2018 at 7:25 PM Timothy Arceri <mailto:tarc...@itsqueeze.com>> wrote: On 09/08/18 05:05, Jason Ekstrand wrote: > Commit 4434591bf56a6b0 caused substantially more URB messages in > geometry and tessellation s

Re: [Mesa-dev] [PATCH] radv: add Doom workaround

2018-08-15 Thread Timothy Arceri
On 15/08/18 22:06, Bas Nieuwenhuizen wrote: On Wed, Aug 15, 2018 at 1:16 PM, Mike Lothian wrote: Do you need the game name here, isn't that set in driconf? There is no driconf for vulkan/radv yet. Reviewed-by: Bas Nieuwenhuizen I assume you tested that it works with the workaround? Yes.

[Mesa-dev] [PATCH] radv: add Doom workaround

2018-08-15 Thread Timothy Arceri
Cc: --- src/amd/vulkan/radv_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 33f24b9d302..cc88abb57a8 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -480,6 +480,9 @@ radv_handle_per_a

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

2018-08-15 Thread Timothy Arceri
On 15/08/18 20:26, Michel Dänzer wrote: On 2018-08-15 12:13 PM, Timothy Arceri wrote: Use enviroment var overrides in legacy drivers instead. This could break existing user configurations using the driconf tcl_mode option. Apart from this, I like the idea of this series. I assumed this

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

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

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