[Mesa-dev] [PATCH 5/5] radeonsi: initialize ac_gpu_info::name when using SI_FORCE_FAMILY

2018-09-23 Thread Marek Olšák
From: Marek Olšák so that it's not NULL when loading radeonsi and a GCN GPU is not present in the system. --- src/gallium/drivers/radeonsi/si_pipe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index

[Mesa-dev] [PATCH 2/5] ac: add helpers for fast integer division by a constant

2018-09-23 Thread Marek Olšák
From: Marek Olšák --- src/amd/common/ac_llvm_build.c | 44 ++ src/amd/common/ac_llvm_build.h | 13 + 2 files changed, 57 insertions(+) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index ab0ba09..793ff81 100644

[Mesa-dev] [PATCH 3/5] radeonsi: use faster integer division for instance divisors

2018-09-23 Thread Marek Olšák
From: Marek Olšák We know the divisors when we upload them, so instead we can precompute and upload division factors derived from each divisor. This fast division consists of add, mul_hi, and two shifts, and we have to load 4 dwords intead of 1. This probably won't affect any apps. ---

[Mesa-dev] [PATCH 1/5] util: import public domain code for integer division by a constant

2018-09-23 Thread Marek Olšák
From: Marek Olšák Compilers can use this to generate optimal code for integer division by a constant. Additionally, an unsigned division by a uniform that is constant but not known at compile time can still be optimized by passing 2-4 division factors to the shader as uniforms and executing one

[Mesa-dev] [PATCH 07/22] st/nine: Remove clamping when mul_zero_wins

2018-09-23 Thread Axel Davy
Tests show the clamping can be removed when mul_zero_wins is supported. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 55 --- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_shader.c

[Mesa-dev] [PATCH 04/22] st/nine: Fix ff assignment with aliasing

2018-09-23 Thread Axel Davy
"tex_stage[s][D3DTSS_COLORARG0] >> 4" could be a two bit number, thus colorarg_b4 was incorrectly set. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[Mesa-dev] [PATCH 02/22] st/nine: Print transform matrices in debug

2018-09-23 Thread Axel Davy
This is useful to see the matrices content in the log to debug. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index

[Mesa-dev] [PATCH 06/22] st/nine: Implement predicated instructions

2018-09-23 Thread Axel Davy
Most of the work was already there, just not implemented. Fixes: https://github.com/iXit/Mesa-3D/issues/318 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 62 --- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git

[Mesa-dev] [PATCH 01/22] st/nine: Add ff key hash to help debug

2018-09-23 Thread Axel Davy
This is very useful to find in the log the ff shader shource of a given call. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index

[Mesa-dev] [PATCH 15/22] st/nine: Minor refactor of a few NINE_STATE_* flags

2018-09-23 Thread Axel Davy
Rename NINE_STATE_FOG_SHADER, NINE_STATE_POINTSIZE_SHADER and NINE_STATE_PS1X_SHADER into NINE_STATE_VS_PARAMS_MISC and NINE_STATE_PS_PARAMS_MISC. The behaviour is unchanged, except one minor change: D3DRS_FOGTABLEMODE doesn't need to affect VS. Signed-off-by: Axel Davy ---

[Mesa-dev] [PATCH 10/22] st/nine: Init cursor position at device creation

2018-09-23 Thread Axel Davy
This is only useful for software cursor, but at least now we won't start it at (0, 0). Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c

[Mesa-dev] [PATCH 05/22] st/nine: Fix aliased read in ff

2018-09-23 Thread Axel Davy
Fix aliasing of colorarg_b4 with colorarg_b5. Fixes: https://github.com/iXit/Mesa-3D/issues/302 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_ff.c

[Mesa-dev] [PATCH 03/22] st/nine: Clarify some ff assignments

2018-09-23 Thread Axel Davy
colorarg0, etc are 3 bits wide. Make the code more readable by adding an & 0x7 to further indicate we only remember the first 3 bits only. The 4th bit is always 0, and colorarg_b4, colorarg_b5, etc are used to store the 5th and 6th bits. Signed-off-by: Axel Davy ---

[Mesa-dev] [PATCH 11/22] st/nine: Avoid redundant SetCursorPos calls

2018-09-23 Thread Axel Davy
For some applications SetCursorPosition is called when a cursor event is received. Our SetCursorPosition was always calling wine SetCursorPos which would trigger a cursor event. The infinite loop is avoided by not calling SetCursorPos when the position hasn't changed. Found thanks to wine tests.

[Mesa-dev] [PATCH 09/22] st/nine: Initialize manually cursor structure

2018-09-23 Thread Axel Davy
Initialize manually the cursor structure fields for more clarity on its content. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 4 1 file changed, 4 insertions(+) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c

[Mesa-dev] [PATCH 13/22] st/nine: Lock the entire buffer in some cases.

2018-09-23 Thread Axel Davy
Previously we had already found that for MANAGED buffers the buffer started dirty (which meant all writes out of bound before the first draw call using the buffer have to be taken into account). Possibly it is the same for the other types of buffers. For now always lock the entire buffer

[Mesa-dev] [PATCH 08/22] st/nine: Check if format is DS before retrieving flags

2018-09-23 Thread Axel Davy
d3d9_get_pipe_depth_format_bindings assumes the input format is a depth stencil format. Previously the user could hit this function with an invalid format. Protect the last non protected call with a depth_stencil_format check. Another solution is to have d3d9_get_pipe_depth_format_bindings

[Mesa-dev] [PATCH] nv50/ir: fix link-time build failure

2018-09-23 Thread Rhys Perry
Seems this fixes linking problems that occur in some situations. Signed-off-by: Rhys Perry --- src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

Re: [Mesa-dev] [PATCH] nv50/ir: fix link-time build failure

2018-09-23 Thread Ilia Mirkin
Reviewed-by: Ilia Mirkin On Sun, Sep 23, 2018 at 12:59 PM, Rhys Perry wrote: > Seems this fixes linking problems that occur in some situations. > > Signed-off-by: Rhys Perry > --- > src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 2 +- > 1 file changed, 1 insertion(+), 1

[Mesa-dev] [PATCH 4/5] radeonsi: don't set the VS prolog key for the blit VS

2018-09-23 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_shaders.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 157a0e3..0bf783f 100644 ---

[Mesa-dev] [PATCH 18/22] st/nine: Split NINE_STATE_FF_OTHER

2018-09-23 Thread Axel Davy
NINE_STATE_FF_OTHER was mostly ff vs states. Rename it to NINE_STATE_FF_VS_OTHER and move common states with ps to NINE_STATE_FF_PS_CONSTS (renamed from NINE_STATE_FF_PSSTAGES). Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 4 +--

[Mesa-dev] [PATCH 12/22] st/nine: Don't call SetCursor until a cursor is set

2018-09-23 Thread Axel Davy
The previous code was ignoring the input until a cursor is set inside d3d (with SetCursorProperties), as expected by wine tests. However it did still make a call to ID3DPresent_SetCursor, which would result into a SetCursor(NULL) call, thus hidding any cursor set outside d3d, which we shouldn't

[Mesa-dev] [PATCH 16/22] st/nine: Mark pointsize states as ff states

2018-09-23 Thread Axel Davy
The pointsize states were missing the ff NINE_STATE_FF_OTHER flag, and thus might miss state updates when using ff. Fixes some wine tests. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 14/22] st/nine: Increase maximum number of temp registers

2018-09-23 Thread Axel Davy
With some test app I hit the limit. As we allocate on demand (up to the maximum), it is free to increase the limit. Signed-off-by: Axel Davy CC: --- src/gallium/state_trackers/nine/nine_shader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Mesa-dev] [PATCH 19/22] st/nine: Do not mark both ff vs and ps updated

2018-09-23 Thread Axel Davy
Previously if only ff vs or only ff ps was used, the constants for both were marked as updated, while only the constants of the used ff shader were updated. Now that NINE_STATE_FF_VS and NINE_STATE_FF_PS do not intersect anymore, we can correctly mark the correct set of constant as updated.

[Mesa-dev] [PATCH 17/22] st/nine: Add dummy ff shader state

2018-09-23 Thread Axel Davy
Some states only affect the ff shader, not its constants. Currently we don't check anything and always recompute the ff shader key. However we do check for NINE_STATE_FF_OTHER and if set we reupload some constants. Thus for those states which had NINE_STATE_FF_OTHER set but didn't need it,

[Mesa-dev] [PATCH 22/22] radeonsi: NaN should pass kill_if

2018-09-23 Thread Axel Davy
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105333 Fixes: https://github.com/iXit/Mesa-3D/issues/314 For this application, NaN is passed to KILL_IF and is expected to pass. Signed-off-by: Axel Davy --- src/gallium/drivers/radeonsi/si_shader_tgsi_alu.c | 2 +- 1 file changed, 1

[Mesa-dev] [PATCH 20/22] st/nine: Capture also default matrices for D3DSBT_ALL

2018-09-23 Thread Axel Davy
We avoid allocating space for never unused matrices. However we must do as if we had captured them. Thus when a D3DSBT_ALL stateblock apply has fewer matrices than device state, allocate the default matrices for the stateblock before applying. Signed-off-by: Axel Davy ---

[Mesa-dev] [PATCH 21/22] st/nine: Mark transform matrices dirty for D3DSBT_ALL

2018-09-23 Thread Axel Davy
D3DSBT_ALL stateblocks capture the transform matrices. Fixes some d3d test programs not displaying properly. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH] docs: Update FAQ with current OpenGL API version supported

2018-09-23 Thread Bas Nieuwenhuizen
On Sun, Sep 23, 2018 at 2:05 AM Stuart Young wrote: > > Used a variation on the standard boilerplate version info that is used in > the release notes. > > --- > docs/faq.html | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/docs/faq.html b/docs/faq.html >

Re: [Mesa-dev] [PATCH mesa 2/6] nouveau: silence paranoid compiler's -Wclass-memaccess

2018-09-23 Thread Karol Herbst
yeah, you are right, overlooked that "Target target;" inside the inner "tex" struct. On Sat, Sep 22, 2018 at 4:27 PM, Jan Vesely wrote: > The warning is correct. In the first case, memset tries to zero "Target" > object which has a non-trivial constructor and non-trivial copy-constructor. > The

Re: [Mesa-dev] [PATCH] anv,radv: Implement vkAcquireNextImage2

2018-09-23 Thread Emil Velikov
Hi Jason, On 20 September 2018 at 11:33, Jason Ekstrand wrote: > This was added as part of 1.1 but it's very hard to track exactly what > extension added it. In any case, we should implement it. > A small question while skimming through I think we'd want this alongside

Re: [Mesa-dev] [PATCH] docs: Clarify Fixes tag behavior for stable branches.

2018-09-23 Thread Bas Nieuwenhuizen
On Sun, Sep 23, 2018 at 4:34 PM Emil Velikov wrote: > > On 23 September 2018 at 15:28, Bas Nieuwenhuizen > wrote: > > This seems to be the current state of affairs. Emil has plans to > > get feedback about it and possibly change it, but let us put this > > in the documentation now in case that

Re: [Mesa-dev] [Mesa-stable] [PATCH] radv: Fix driver UUID SHA1 init.

2018-09-23 Thread Bas Nieuwenhuizen
On Sun, Sep 23, 2018 at 3:42 PM Emil Velikov wrote: > > On 21 September 2018 at 17:49, Dylan Baker wrote: > > Quoting Emil Velikov (2018-09-21 09:07:58) > >> On 21 September 2018 at 16:55, Dylan Baker wrote: > >> > Quoting Emil Velikov (2018-09-21 08:47:30) > >> >> On 21 September 2018 at

Re: [Mesa-dev] [Mesa-stable] [PATCH] radv: Fix driver UUID SHA1 init.

2018-09-23 Thread Emil Velikov
On 23 September 2018 at 14:53, Bas Nieuwenhuizen wrote: > On Sun, Sep 23, 2018 at 3:42 PM Emil Velikov wrote: >> >> On 21 September 2018 at 17:49, Dylan Baker wrote: >> > Quoting Emil Velikov (2018-09-21 09:07:58) >> >> On 21 September 2018 at 16:55, Dylan Baker wrote: >> >> > Quoting Emil

Re: [Mesa-dev] [PATCH] docs: Clarify Fixes tag behavior for stable branches.

2018-09-23 Thread Emil Velikov
On 23 September 2018 at 15:28, Bas Nieuwenhuizen wrote: > This seems to be the current state of affairs. Emil has plans to > get feedback about it and possibly change it, but let us put this > in the documentation now in case that gets delayed or cancelled. > > This should clarify the

Re: [Mesa-dev] [PATCH] docs: Clarify Fixes tag behavior for stable branches.

2018-09-23 Thread Emil Velikov
On 23 September 2018 at 15:40, Bas Nieuwenhuizen wrote: > On Sun, Sep 23, 2018 at 4:34 PM Emil Velikov wrote: >> >> On 23 September 2018 at 15:28, Bas Nieuwenhuizen >> wrote: >> > This seems to be the current state of affairs. Emil has plans to >> > get feedback about it and possibly change it,

Re: [Mesa-dev] [Mesa-stable] [PATCH] radv: Fix driver UUID SHA1 init.

2018-09-23 Thread Emil Velikov
On 21 September 2018 at 17:49, Dylan Baker wrote: > Quoting Emil Velikov (2018-09-21 09:07:58) >> On 21 September 2018 at 16:55, Dylan Baker wrote: >> > Quoting Emil Velikov (2018-09-21 08:47:30) >> >> On 21 September 2018 at 08:19, Juan A. Suarez Romero >> >> wrote: >> >> > On Thu, 2018-09-20

[Mesa-dev] [PATCH] docs: Clarify Fixes tag behavior for stable branches.

2018-09-23 Thread Bas Nieuwenhuizen
This seems to be the current state of affairs. Emil has plans to get feedback about it and possibly change it, but let us put this in the documentation now in case that gets delayed or cancelled. This should clarify the misunderstanding which started

Re: [Mesa-dev] [PATCH] anv,radv: Implement vkAcquireNextImage2

2018-09-23 Thread Jason Ekstrand
On September 23, 2018 16:17:36 Emil Velikov wrote: Hi Jason, On 20 September 2018 at 11:33, Jason Ekstrand wrote: This was added as part of 1.1 but it's very hard to track exactly what extension added it. In any case, we should implement it. A small question while skimming through I

[Mesa-dev] [Bug 108024] [Debian Stretch]Fail to build because "xcb_randr_lease_t"

2018-09-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108024 --- Comment #3 from Max --- Created attachment 141701 --> https://bugs.freedesktop.org/attachment.cgi?id=141701=edit Disable lease for libxcb < 1.13 Hello, I'm not an expert about Mesa development but i found a workaround to compile Mesa

[Mesa-dev] [Bug 108024] [Debian Stretch]Fail to build because "xcb_randr_lease_t"

2018-09-23 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=108024 --- Comment #4 from Stuart Young --- Hi Maxime, Looks good to me (tho I am not an expert either), and same sort of fix as Dave Airlie's patch to support older versions of libxcb. Will see if I can get this in to Mesa & 18.2.2. If it takes

Re: [Mesa-dev] [PATCH 20/22] st/nine: Capture also default matrices for D3DSBT_ALL

2018-09-23 Thread Axel Davy
It should be last_index += D3DTS_WORLDMATRIX(0) - 10; I drop this patch from the serie and patch 21/22 as they need more testing. On 9/23/18 7:00 PM, Axel Davy wrote: We avoid allocating space for never unused matrices. However we must do as if we had captured them. Thus when a D3DSBT_ALL

[Mesa-dev] [PATCH] radeonsi: avoid sending GS_EMIT in shaders without outputs

2018-09-23 Thread Józef Kucia
Fixes GPU hangs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107857 Signed-off-by: Józef Kucia --- src/gallium/drivers/radeonsi/si_shader.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c

[Mesa-dev] [PATCH v2] docs: Update FAQ re: OpenGL API version supported

2018-09-23 Thread Stuart Young
Used a variation on the standard boilerplate version info that is used in the release notes. v2: Fixed text re: context creation. --- docs/faq.html | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/faq.html b/docs/faq.html index 6270a071da..d1be04bf71 100644

[Mesa-dev] [PATCH] vulkan: Disable randr lease for libxcb < 1.13

2018-09-23 Thread Stuart Young
From: Maxime Since the Randr lease code was added, compiling against libxcb 1.12 no longer works. CC: mesa-sta...@lists.freedesktop.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108024 Fixes: 7ab1fffcd2a504024b16e408de329f7a94553ecc Tested-By: Maxime ---

Re: [Mesa-dev] [PATCH] docs: Update FAQ with current OpenGL API version supported

2018-09-23 Thread Stuart Young
On Sun, 23 Sep 2018 at 20:35, Bas Nieuwenhuizen wrote: > On Sun, Sep 23, 2018 at 2:05 AM Stuart Young wrote: > > > > Used a variation on the standard boilerplate version info that is used in > > the release notes. > > > > --- > > docs/faq.html | 11 ++- > > 1 file changed, 10

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

2018-09-23 Thread Marek Olšák
On Fri, Sep 21, 2018 at 11:34 AM, Emil Velikov wrote: > On 21 September 2018 at 00:42, Timothy Arceri wrote: >> 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

Re: [Mesa-dev] [PATCH] gallium/util: Clarify comment in util_init_thread_pinning

2018-09-23 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Tue, Sep 18, 2018 at 11:26 AM, Michel Dänzer wrote: > From: Michel Dänzer > > As discussed in the review of the patch which added the comment: > > Nothing happens when a thread is created, because pthread_atfork doesn't > affect creating threads. However,

Re: [Mesa-dev] [PATCH 22/22] radeonsi: NaN should pass kill_if

2018-09-23 Thread Marek Olšák
Please add a comment that UGE is used because NaN means no kill. Thanks. You can also nominate this for stable. Other than those: Reviewed-by: Marek Olšák Marek On Sun, Sep 23, 2018 at 1:00 PM, Axel Davy wrote: > Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105333 > Fixes: