Re: [Mesa-dev] [Nine] 'meson: add -Werror=empty-body to disallow `if(x); `' - 'broke' Nine

2019-10-28 Thread Axel Davy
Hi, I don't remember we had any serious unexpected nine regression except build breaks so far. I'd expect potential regressions to be very subtle, and hard to catch without a lot of tests. Thus I don't think there is much interest to plug only a small testing too in the CI. Axel On

Re: [Mesa-dev] [Nine] 'meson: add -Werror=empty-body to disallow `if(x); `' - 'broke' Nine

2019-10-25 Thread Axel Davy
Hi Dieter, Maybe the best fix would be to change the definition of WARN and DBG when DEBUG is disabled. The definitions are in nine_debug.h I haven't tried by maybe using "(void)" instead of nothing would work ? Yours, Axel On 24/10/2019 16:34, Dieter Nützel wrote: Hello Eric, your

Re: [Mesa-dev] [PATCH] d3dadapter9: Revert to old throttling limit value

2019-06-03 Thread Axel Davy
I've got no comments on this, but it should be safe to push and find a better solution later. Axel On 30/05/2019 12:43, Axel Davy wrote: Thanks Juan for warning me it didn't make it to mesa-dev. Here it is. Axel Forwarded Message Subject:[PATCH] d3dadapter9

[Mesa-dev] [PATCH] d3dadapter9: Revert to old throttling limit value

2019-05-30 Thread Axel Davy
Thanks Juan for warning me it didn't make it to mesa-dev. Here it is. Axel Forwarded Message Subject:[PATCH] d3dadapter9: Revert to old throttling limit value Date: Sun, 26 May 2019 23:23:59 +0200 From: Axel Davy CC: Axel Davy , mesa-sta

Re: [Mesa-dev] [PATCH] st/dri: decrease input lag by syncing sooner in SwapBuffers

2019-05-26 Thread Axel Davy
hi, I haven't done enough testing to have a full understanding of the issue, but it seems there could be a regression with gallium nine. One user is reporting on irc huge slowdowns with d3d8 games (using the d3d8to9 wrapper) when using vsync. Reverting fixes the issues. I don't know

[Mesa-dev] [MR] Gallium nine fixes and improvements for Mesa 19.1

2019-04-27 Thread Axel Davy
Hi, I usually send my patch series via mail, but as this one was rather long, and as people seem to find gitlab easier to work with for long patch series, this time I used the merge request system. Don't hesitate to take a look: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/748

Re: [Mesa-dev] [PATCH] st/dri: decrease input lag by syncing sooner in SwapBuffers

2019-04-27 Thread Axel Davy
On 27/04/2019 21:02, Rob Clark wrote: On Sat, Apr 27, 2019 at 9:52 AM Axel Davy wrote: On 27/04/2019 18:13, Rob Clark wrote: On Thu, Apr 25, 2019 at 7:06 PM Marek Olšák wrote: From: Marek Olšák It's done by: - decrease the number of frames in flight by 1 - flush before throttling

Re: [Mesa-dev] [PATCH] st/dri: decrease input lag by syncing sooner in SwapBuffers

2019-04-27 Thread Axel Davy
On 27/04/2019 18:13, Rob Clark wrote: On Thu, Apr 25, 2019 at 7:06 PM Marek Olšák wrote: From: Marek Olšák It's done by: - decrease the number of frames in flight by 1 - flush before throttling in SwapBuffers (instead of wait-then-flush, do flush-then-wait) The improvement is apparent

Re: [Mesa-dev] [PATCH] st/dri: decrease input lag by syncing sooner in SwapBuffers

2019-04-27 Thread Axel Davy
On 26/04/2019 20:40, Marek Olšák wrote: On Fri, Apr 26, 2019 at 12:56 PM Axel Davy <mailto:davyax...@gmail.com>> wrote: On 26/04/2019 10:08, Michel Dänzer wrote: > On 2019-04-26 4:06 a.m., Marek Olšák wrote: >> From: Marek Olšák mailto:marek.ol...@amd.com>>

Re: [Mesa-dev] [PATCH] st/dri: decrease input lag by syncing sooner in SwapBuffers

2019-04-26 Thread Axel Davy
On 26/04/2019 10:08, Michel Dänzer wrote: On 2019-04-26 4:06 a.m., Marek Olšák wrote: From: Marek Olšák It's done by: - decrease the number of frames in flight by 1 - flush before throttling in SwapBuffers (instead of wait-then-flush, do flush-then-wait) The improvement is apparent with

Re: [Mesa-dev] [PATCH v2] st/nine: skip position checks in SetCursorPosition()

2019-04-09 Thread Axel Davy
Fine by me, but please improve the drm.h description, see below. With that changed, this is: Reviewed-by: Axel Davy Axel On 08/04/2019 09:10, Andre Heider wrote: For HW cursors, "cursor.pos" doesn't hold the current position of the pointer, just the position of the

Re: [Mesa-dev] [PATCH 1/2] st/nine: introduce SetVersion() for present interface v1.4

2019-04-06 Thread Axel Davy
Just to give a follow-up on this patch for the mailing list, we discussed on irc that there was already a way to advertise mesa version (the d3dadapter9 version). Axel On 04/04/2019 12:34, Andre Heider wrote: A follow up patch requires a behaviour change, so we need to negotiate the present

Re: [Mesa-dev] [PATCH] st/nine: enable csmt per default on iris

2019-03-20 Thread Axel Davy
/* We rely on u_upload_mgr using persistent coherent buffers (which don't * require flush to work in multi-pipe_context scenario) for vertex and Could have been an || inside the same if, but maybe it is easier to read that way. Reviewed-by: Axel Davy Axel __

Re: [Mesa-dev] [PATCH] gallium/docs: clarify set_sampler_views

2019-03-15 Thread Axel Davy
On 15/03/2019 13:12, Rob Clark wrote: On Fri, Mar 15, 2019 at 3:49 AM Axel Davy wrote: On 15/03/2019 03:12, Rob Clark wrote: On Thu, Mar 14, 2019 at 9:58 PM Roland Scheidegger wrote: Am 15.03.19 um 02:18 schrieb Rob Clark: On Thu, Mar 14, 2019 at 8:28 PM Roland Scheidegger wrote: Am

Re: [Mesa-dev] [PATCH] gallium/docs: clarify set_sampler_views

2019-03-15 Thread Axel Davy
On 15/03/2019 03:12, Rob Clark wrote: On Thu, Mar 14, 2019 at 9:58 PM Roland Scheidegger wrote: Am 15.03.19 um 02:18 schrieb Rob Clark: On Thu, Mar 14, 2019 at 8:28 PM Roland Scheidegger wrote: Am 14.03.19 um 22:06 schrieb Rob Clark: On Thu, Mar 14, 2019 at 3:58 PM Roland Scheidegger

Re: [Mesa-dev] [PATCH 2/5] d3dadapter9: Support software renderer on any DRI device

2019-03-09 Thread Axel Davy
After pushing this (with my r-b), gitlab's travis complained. It seems there needs to be some ifdefs to check if kms was built. I reverted the patch until it is fixed. Axel On 07/03/2019 23:23, Axel Davy wrote: From: Patrick Rudolph If D3D_ALWAYS_SOFTWARE is set for debugging purposes, run

Re: [Mesa-dev] [PATCH 1/5] st/nine: Disable depth write when nothing gets updated

2019-03-09 Thread Axel Davy
On 08/03/2019 07:26, Kenneth Graunke wrote: On Thursday, March 7, 2019 2:23:53 PM PST Axel Davy wrote: I don't think we actually need the NEVER check, but it seems fine. Patches 1 and 3 are: Reviewed-by: Kenneth Graunke I'm not really up to speed to review the others. Thanks, I got a review

[Mesa-dev] [PATCH 4/5] st/nine: Do not advertise CANMANAGERESOURCE

2019-03-07 Thread Axel Davy
It doesn't seem the main vendors advertise it. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/adapter9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c index 0634d5918ce

[Mesa-dev] [PATCH 5/5] st/nine: Change a few advertised caps

2019-03-07 Thread Axel Davy
the cap. D3DCURSORCAPS_LOWRES: I don't know what is the status of this on X11, but I don't know of any dx9 game running at height < 400 either. D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE: The cap should correspond to what the current generation of hw is doing. Signed-off-by: Axel Davy --- include/D

[Mesa-dev] [PATCH 2/5] d3dadapter9: Support software renderer on any DRI device

2019-03-07 Thread Axel Davy
From: Patrick Rudolph If D3D_ALWAYS_SOFTWARE is set for debugging purposes, run on any DRI enabled platform. Instead of probing for a compatible gallium driver (which might fail if there's none) always use the KMS DRI software renderer. Allows to run nine on i915 when D3D_ALWAYS_SOFTWARE=1.

[Mesa-dev] [PATCH 1/5] st/nine: Disable depth write when nothing gets updated

2019-03-07 Thread Axel Davy
I do not see any perf impact on radeonsi, but it seems iris needs this. It seems something sensible to do. Signed-off-by: Axel Davy Reviewed-by: Timur Kristóf Tested-by: Andre Heider --- It may be argued this kind of stuff should be done in the driver. I don't mind either way. The ogl state

[Mesa-dev] [PATCH 3/5] st/nine: Do not advertise support for D15S1 and D24X4S4

2019-03-07 Thread Axel Davy
The former is supported on Matrox cards but no other hw. The latter isn't supported anywhere. It is fine to not advertise them as supported, and it could prevent apps to trigger weird rendering paths. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_pipe.c | 4 ++-- 1 file

Re: [Mesa-dev] [Mesa-stable] [PATCH] st/nine: Immediately upload user provided textures

2019-03-06 Thread Axel Davy
On 06/03/2019 20:13, Dylan Baker wrote: Quoting Axel Davy (2019-01-22 12:08:05) Fixes regression caused by 42d672fa6a766363e5703f119607f7c7975918aa st/nine: Bind src not dst in nine_context_box_upload Before that patch, for user provided textures, when the texture was destroyed, the safety

Re: [Mesa-dev] [Mesa-stable] [PATCH 1/2] st/nine: Ignore window size if error

2019-02-28 Thread Axel Davy
On 28/02/2019 12:54, Emil Velikov wrote: On Wed, 27 Feb 2019 at 22:49, Axel Davy wrote: Check GetWindowInfo and ignore the computed sizes if there is an error. Fixes the regression caused by: commit 2318ca68bbeb4fa6e21a4d8c650cec3f64246596 "st/nine: Handle window resize when a present

[Mesa-dev] [PATCH 2/2] st/nine: Ignore multisample quality level if no ms

2019-02-27 Thread Axel Davy
Apparently instead of returning error when passing a quality level different than 0 for D3DMULTISAMPLE_NONE, we should pass. Fixes: https://github.com/iXit/Mesa-3D/issues/340 Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_pipe.h | 4

[Mesa-dev] [PATCH 1/2] st/nine: Ignore window size if error

2019-02-27 Thread Axel Davy
github.com/iXit/Mesa-3D/issues/331 https://github.com/iXit/Mesa-3D/issues/332 Fixes also crash at window destruction. Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/swapchain9.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH 00/26] RadeonSI: Primitive culling with async compute

2019-02-13 Thread Axel Davy
On 13/02/2019 17:42, Marek Olšák wrote: On Wed, Feb 13, 2019 at 2:28 AM Axel Davy <mailto:davyax...@gmail.com>> wrote: On 13/02/2019 06:15, Marek Olšák wrote: > I decided to enable this optimization on all Pro graphics cards. > The reason is that I haven't had ti

Re: [Mesa-dev] [PATCH 00/26] RadeonSI: Primitive culling with async compute

2019-02-12 Thread Axel Davy
On 13/02/2019 06:15, Marek Olšák wrote: I decided to enable this optimization on all Pro graphics cards. The reason is that I haven't had time to benchmark games. This decision may be changed based on community feedback, etc. Could the decision to run the optimization be based on some perf

Re: [Mesa-dev] [PATCH 4/4] radeonsi: use SDMA for uploading data through const_uploader

2019-02-07 Thread Axel Davy
On 07/02/2019 02:22, Marek Olšák wrote: + bool use_sdma_upload = sscreen->info.has_dedicated_vram && sctx->dma_cs && debug_get_bool_option("SDMA", true); + sctx->b.const_uploader = u_upload_create(>b, 256 * 1024, +0, PIPE_USAGE_DEFAULT, +

[Mesa-dev] [PATCH] st/nine: Immediately upload user provided textures

2019-01-22 Thread Axel Davy
s the csmt queue right away after queuing the upload for this type of textures. This is more future-proof, as we may want to bind the surface for other reasons in the future. Signed-off-by: Axel Davy Cc: 18.3 --- The regression affects Mesa 18.3.2. At least HL2 lost coast is affected, has artifacts a

Re: [Mesa-dev] [PATCH] radeonsi: use compute for resource_copy_region when possible

2019-01-15 Thread Axel Davy
w which I believe can be more limiting than sampling a buffer when there is a lot of wavefronts. The data conversion can be done for no cost in the shader as it should be memory bound. . (8, 8) is not optimal for linear tiled images (but I guess we don't often get to use them with resource_copy_region). But most likely you already know all that and consider this is not worth complicating the code to speed up corner cases. Yours, Axel Davy ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH v2] st/nine: Enable debug info if NDEBUG is not set

2019-01-13 Thread Axel Davy
We want to have debug info as well if using meson's debugoptimized when ndebug is off. v2: use u_debug functions that do something even if DEBUG is not set. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 6 +++--- src/gallium/state_trackers/nine/basetexture9.h

Re: [Mesa-dev] Thoughts after hitting 100 merge requests?

2019-01-12 Thread Axel Davy
went check the list of gitlab merge requests 3 times, whereas I go through my mails several times a day. Yours, Axel Davy On 11/01/2019 17:57, Jason Ekstrand wrote: All, The mesa project has now hit 100 merge requests (36 are still open).  I (and I'm sure others) would be curious to hea

Re: [Mesa-dev] [PATCH] st/nine: Ignore null sized windows

2019-01-05 Thread Axel Davy
our knowledge, but that may tie our hands. Anyone having opinion on whether I should push the workaround or consider the issue fixed if using an updated wine backend ? Axel On 03/01/2019 21:48, Axel Davy wrote: If for some reason the window size detected is null, just render at normal size. Fi

[Mesa-dev] [PATCH] st/nine: Ignore null sized windows

2019-01-03 Thread Axel Davy
xes: https://github.com/iXit/Mesa-3D/issues/332 Cc: mesa-sta...@lists.freedesktop.org Signed-off-by: Axel Davy --- It may not apply cleanly to mesa stable. I can do another patch for stable if needed. Basically it's the very same code except the part "/* Switch to using presentation buffe

[Mesa-dev] [PATCH] st/nine: Enable debug info if NDEBUG is not set

2018-12-20 Thread Axel Davy
We want to have debug info as well if using meson's debugoptimized when ndebug is off. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/basetexture9.c | 6 +++--- src/gallium/state_trackers/nine/basetexture9.h | 2 +- src/gallium/state_trackers/nine/nine_debug.h | 10

[Mesa-dev] [PATCH 3/6] st/nine: Fix volumetexture dtor on ctor failure

2018-12-16 Thread Axel Davy
The dtor is called on allocation failure, thus we must check the volumes are allocated before trying to release them. Signed-off-by: Axel Davy Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/volumetexture9.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 4/6] st/nine: Bind src not dst in nine_context_box_upload

2018-12-16 Thread Axel Davy
nine_context_box_upload uploads a ram buffer (from src) to a pipe_resource (dst). We already have a refcount on the pipe_resource, what needs to be protected from release is the ram buffer, thus a reference to src. Signed-off-by: Axel Davy Cc: mesa-sta...@lists.freedesktop.org --- src/gallium

[Mesa-dev] [PATCH 5/6] st/nine: Add src reference to nine_context_range_upload

2018-12-16 Thread Axel Davy
Just like nine_context_box_upload, nine_context_range_upload should reference the src, which holds the ram source buffer. Fixes: https://github.com/iXit/Mesa-3D/issues/327 Signed-off-by: Axel Davy Cc: mesa-sta...@lists.freedesktop.org --- src/gallium/state_trackers/nine/buffer9.h| 4

[Mesa-dev] [PATCH 2/6] st/nine: Switch to presentation buffer if resize is detected

2018-12-16 Thread Axel Davy
This enables to match the window size on resize on all cases, as it only works currently with presentation buffers. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/swapchain9.c | 37 +++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/gallium

[Mesa-dev] [PATCH 6/6] st/nine: Increase the limit of cached ff shaders

2018-12-16 Thread Axel Davy
100 is too small for some games, which triggers recompilations every frame. Increase to 1024. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium

[Mesa-dev] [PATCH 1/6] st/nine: Use helper to release swapchain buffers later

2018-12-16 Thread Axel Davy
This patch introduces a structure to release the present_handles only when they are fully released by the server, thus making "DestroyD3DWindowBuffer" actually release the buffer right away when called. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/swapcha

Re: [Mesa-dev] [PATCH 6/6] radeonsi: always unmap texture CPU mappings on 32-bit CPU architectures

2018-12-14 Thread Axel Davy
Hi Marek, That seems a good idea. Several 32bits games have virtual address space issues as well with both Nine and Wine (but Nine seems a bit more affected because more libs are loaded). Maybe the patch could go a little bit further by doing the same for buffers the first time they

Re: [Mesa-dev] [PATCH v2] docs: Document GitLab merge request process (email alternative)

2018-12-13 Thread Axel Davy
On 13/12/2018 17:57, Mathias Fröhlich wrote: Hi, Initially it seemed to me that I am about the only one sticking with mailing lists. And I personally feel like a too small contributor to really try to influence your decisions too much. But these recent hand full of mails all tell me that I am

Re: [Mesa-dev] Let's talk about -DDEBUG

2018-12-13 Thread Axel Davy
On 13/12/2018 17:26, Jason Ekstrand wrote: On Thu, Dec 13, 2018 at 5:06 AM Eric Engestrom mailto:eric.engest...@intel.com>> wrote: On Wednesday, 2018-12-12 15:24:25 -0800, Dylan Baker wrote: > In the autotools discussion I've come to realize that we also need to talk about >

Re: [Mesa-dev] last call for autotools

2018-12-12 Thread Axel Davy
On 12/12/2018 23:06, Dylan Baker wrote: Quoting Marek Olšák (2018-12-12 13:07:10) On Wed, Dec 12, 2018 at 3:52 PM Rob Clark wrote: On Wed, Dec 12, 2018 at 3:45 PM Marek Olšák wrote: > > On Wed, Dec 12, 2018 at 3:37 PM Rob Clark wrote: >> >> On Wed, Dec 12, 2018 at

Re: [Mesa-dev] [PATCH] d3dadapter9: use snprintf(..., "%s", ...) instead of strncpy

2018-12-01 Thread Axel Davy
Well, OK, I guess these snprintf call are an acceptable solution then. Reviewed-by: Axel Davy On 26/11/2018 13:23, Andre Heider wrote: On 25/11/2018 17:23, Axel Davy wrote: Reading https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ I think the snprintf

Re: [Mesa-dev] [PATCH] d3dadapter9: use snprintf(..., "%s", ...) instead of strncpy

2018-11-25 Thread Axel Davy
Reading https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ I think the snprintf variant suffers from the same issue, and the compiler is just not yet able to detect it, and send the same warning (but it might do in later gcc versions). Probably a better fix

Re: [Mesa-dev] [PATCH] st/mesa: disable L3 thread pinning

2018-11-12 Thread Axel Davy
Is there any replacement plan with a new feature ? Axel On 12/11/2018 21:45, Marek Olšák wrote: From: Marek Olšák This implementation can have massive drawbacks. Cc: 18.3 --- src/mesa/state_tracker/st_manager.c | 9 - 1 file changed, 9 deletions(-) diff --git

[Mesa-dev] [PATCH 0/2] Update on thread_submit

2018-11-10 Thread Axel Davy
/141ba5cf73029029a5a0bd2cdcfd5f9f9ab7ee7b Axel Davy (2): st/nine: Allow 'triple buffering' with thread_submit st/nine: Remove thread_submit warning src/gallium/state_trackers/nine/swapchain9.c | 66 +++- src/gallium/state_trackers/nine/swapchain9.h | 1 + src/gallium/targets

[Mesa-dev] [PATCH 2/2] st/nine: Remove thread_submit warning

2018-11-10 Thread Axel Davy
thread_submit can be useful even without DRI_PRIME, as it can help avoid missed pageflips. Signed-off-by: Axel Davy --- src/gallium/targets/d3dadapter9/drm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/gallium/targets/d3dadapter9/drm.c b/src/gallium/targets/d3dadapter9/drm.c

[Mesa-dev] [PATCH 1/2] st/nine: Allow 'triple buffering' with thread_submit

2018-11-10 Thread Axel Davy
The path allowing triple buffering behaviour wasn't implemented yet for thread_submit Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/swapchain9.c | 66 +++- src/gallium/state_trackers/nine/swapchain9.h | 1 + 2 files changed, 50 insertions(+), 17 deletions

Re: [Mesa-dev] [PATCH v2 2/5] gallium: Add new PIPE_CAP_MULTISAMPLED_RENDER_TO_TEXTURE

2018-11-06 Thread Axel Davy
+* FramebufferTexture2DMultisampleEXT. +*/ + unsigned nr_samples:8; + union pipe_surface_desc u; }; Yours, Axel Davy ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/3] st/nine: fix stack corruption due to ABI mismatch

2018-11-06 Thread Axel Davy
Hi, The three patches seem ok. Thanks, Reviewed-by: Axel Davy I assume you don't have push rights. I will push in a few days if nobody complains. Yours, Axel Davy On 06/11/2018 09:27, Andre Heider wrote: This fixes various crashes and hangs when using nine's 'thread_submit' feature

[Mesa-dev] [PATCH v2] st/nine: Reduce MaxSimultaneousTextures to 8

2018-10-24 Thread Axel Davy
requirements. Signed-off-by: Axel Davy --- Thanks to our tester iive who spotted the issue. src/gallium/state_trackers/nine/adapter9.c | 9 - src/gallium/state_trackers/nine/device9.c | 8 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/gallium/state_trackers

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

2018-10-24 Thread Axel Davy
D3DSBT_ALL stateblocks capture the transform matrices. Fixes some d3d test programs not displaying properly. Signed-off-by: Axel Davy --- Notice without the previous patch, D3DSBT_ALL stateblocks would send hundreds of identity matrices to the context every apply. src/gallium/state_trackers

[Mesa-dev] [PATCH 12/12] st/nine: Handle window resize when a presentation buffer is used

2018-10-24 Thread Axel Davy
. ID3DPresent_GetWindowInfo is a function available with D3DPresent v1.0, and thus we don't need to check if the function is available. The function had been introduced to implement this very feature. Signed-off-by: Axel Davy --- A presentation buffer is used when multisampling is used or when

[Mesa-dev] [PATCH 11/12] d3dadapter: Fix wrong naming in header file

2018-10-24 Thread Axel Davy
GetWindowInfo used to be GetWindowSize before gallium nine was merged. A left-over remained... Signed-off-by: Axel Davy --- include/d3dadapter/present.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/d3dadapter/present.h b/include/d3dadapter/present.h index

[Mesa-dev] [PATCH 07/12] st/nine: Fix aliasing states for stateblocks

2018-10-24 Thread Axel Davy
. Fixes: https://github.com/iXit/Mesa-3D/issues/320 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 461b212995b

[Mesa-dev] [PATCH 08/12] st/nine: Do not set unused states for stateblocks

2018-10-24 Thread Axel Davy
A lot of these states are used only for the context, and are unused for stateblocks (which just uses the changed.* fields instead for a lot of them). Signed-off-by: Axel Davy --- Before we implemented csmt, which separated the 'context' states and the application visible states + the stateblocks

[Mesa-dev] [PATCH 10/12] st/nine: Reduce MaxSimultaneousTextures to 8

2018-10-24 Thread Axel Davy
Windows drivers don't set this flag (which affects ff) to more than 8. Do the same in case some games check for 8. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/adapter9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine

[Mesa-dev] [PATCH 09/12] st/nine: Enable shadow mapping for ps 1.X

2018-10-24 Thread Axel Davy
We didn't implement shadow textures for ps 1.X, assuming the case couldn't happen... Well it does. Fixes: https://github.com/iXit/Mesa-3D/issues/261 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_shader.c | 8 +--- src/gallium/state_trackers/nine/pixelshader9.c | 2

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

2018-10-24 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 --- src/gallium

[Mesa-dev] [PATCH 06/12] st/nine: Never update device changed.* fields

2018-10-24 Thread Axel Davy
The device state changed.* field are never used. These fields are used only for stateblocks. Avoid setting them at all for clarity. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 4 +- src/gallium/state_trackers/nine/nine_state.c | 7 +- src/gallium

[Mesa-dev] [PATCH 03/12] st/nine: Don't update unused world matrices

2018-10-24 Thread Axel Davy
to send the updated values for the unreachable matrices. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index c9901209189

[Mesa-dev] [PATCH 02/12] st/nine: Remove two unused states.

2018-10-24 Thread Axel Davy
NINE_STATE_MATERIAL was used incorrectly at one location. Replace it with the correct state. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c| 2 +- src/gallium/state_trackers/nine/nine_state.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 01/12] st/nine: Remove commented nine_context_apply_stateblock

2018-10-24 Thread Axel Davy
At some point the project was to adapt the commented version to csmt. The csmt rework enabled to fix some state aliasing issues between stateblocks and internal state updates. The commented version needs a lot of work to work with that. Just drop it. Signed-off-by: Axel Davy --- src/gallium

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

2018-10-01 Thread Axel Davy
tions"), which was not nominated. WDYT? Should both patches added to the 18.2 release, or just get them out of the release? J.A. Hi, As Marek is the maintainer for radeonsi, I let him choose. Yours, Axel Davy On Mon, Sep 24, 2018 at 2:29 AM, Axel Davy wrote: Fi

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

2018-09-24 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. v2: Explain in the code why UGE is used. Signed-off-by: Axel Davy Reviewed-by: Marek Olšák CC: --- src

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 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 a/src/gallium/state_trackers/nine

[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 --- src/gallium

[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 +-- src/gallium/state_trackers/nine

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

2018-09-23 Thread Axel Davy
do. Add comment about not avoiding redundant ID3DPresent_SetCursor calls once a cursor has been set in d3d, as it has been tested to cause regressions. Fixes: https://github.com/iXit/Mesa-3D/issues/197 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 9 - 1 file

[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 a/src

[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 a/src/gallium/state_trackers/nine

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

2018-09-23 Thread Axel Davy
. Fixes: https://github.com/iXit/Mesa-3D/issues/319 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index addea3dde1f

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

2018-09-23 Thread Axel Davy
it, replace by a dummy ff shader state (which is easier to understand for an external reader than just setting 0 and more future proof). Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_state.c | 16 src/gallium/state_trackers/nine/nine_state.h | 4 2 files changed

[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 --- src/gallium

[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 b/src/gallium

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

2018-09-23 Thread Axel Davy
(starting from the offset) for these (except for DYNAMIC buffers, which might hurt performance too much). Fixes: https://github.com/iXit/Mesa-3D/issues/301 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/buffer9.c | 8 1 file changed, 8 insertions(+) diff --git a/src/gallium

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

2018-09-23 Thread Axel Davy
. Fixes irresponsive GUI for some applications. Fixes: https://github.com/iXit/Mesa-3D/issues/173 Signed-off-by: Axel Davy CC: --- 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

[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 08/22] st/nine: Check if format is DS before retrieving flags

2018-09-23 Thread Axel Davy
support non depth stencil format, but we don't want the user to create depth buffers with d3d formats that can't be one, it's better to check if the format can be depth buffer with d3d. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/surface9.c | 2 ++ 1 file changed, 2 insertions(+) diff

[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 a/src/gallium/sta

[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 a/src/gallium

[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 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 b/src

[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 b/src

[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 --- src/gallium/state_trac

Re: [Mesa-dev] [PATCH 1/5] st/nine: Clamp RCP when 0*inf!=0

2018-09-12 Thread Axel Davy
On 9/12/18 11:44 PM, Roland Scheidegger wrote: Am 12.09.2018 um 23:43 schrieb Roland Scheidegger: I small precision I want to add: This is not the only place clamping makes a difference. Indeed else MUL_ZERO_WINS would be safe to use and remove all the clamping. The rasterizers can produce

Re: [Mesa-dev] [PATCH 1/5] st/nine: Clamp RCP when 0*inf!=0

2018-09-12 Thread Axel Davy
On 9/9/18 9:40 PM, Ilia Mirkin wrote: On Sun, Sep 9, 2018 at 3:19 PM, Axel Davy wrote: Tests showed Intel on windows does always clamp RCP, RSQ and LOG (thus preventing inf/nan generation), for all shader versions (some vendor behaviours vary with shader versions). By the way, this happens

Re: [Mesa-dev] [PATCH 1/5] st/nine: Clamp RCP when 0*inf!=0

2018-09-12 Thread Axel Davy
On 9/12/18 8:17 AM, Axel Davy wrote: The goal is to catch inf and -inf and replace them by FLT_MAX and -FLT_MAX. Without, the NaN would appear when doing mul or mad. Axel I small precision I want to add: This is not the only place clamping makes a difference. Indeed else MUL_ZERO_WINS

Re: [Mesa-dev] [PATCH 1/5] st/nine: Clamp RCP when 0*inf!=0

2018-09-12 Thread Axel Davy
On 9/11/18 11:28 PM, Roland Scheidegger wrote: Am 09.09.2018 um 21:19 schrieb Axel Davy: Tests done on several devices of all 3 vendors and of different generations showed that there are several ways of handling infs and NaN for d3d9. Tests showed Intel on windows does always clamp RCP, RSQ

Re: [Mesa-dev] [PATCH 1/5] st/nine: Clamp RCP when 0*inf!=0

2018-09-09 Thread Axel Davy
On 9/9/18 9:40 PM, Ilia Mirkin wrote: On Sun, Sep 9, 2018 at 3:19 PM, Axel Davy wrote: Tests showed Intel on windows does always clamp RCP, RSQ and LOG (thus preventing inf/nan generation), for all shader versions (some vendor behaviours vary with shader versions). By the way, this happens

Re: [Mesa-dev] [PATCH 1/5] st/nine: Clamp RCP when 0*inf!=0

2018-09-09 Thread Axel Davy
On 9/9/18 9:35 PM, Ilia Mirkin wrote: On Sun, Sep 9, 2018 at 3:19 PM, Axel Davy wrote: For now clamp for all drivers. An ulterior optimization would be to avoid clamping for drivers with MUL_ZERO_WINS for the specific shader versions where NV or AMD don't clamp. Too bad. The whole point

[Mesa-dev] [PATCH 4/5] st/nine: Add new helper for object creation with bind

2018-09-09 Thread Axel Davy
Add a new helper to create objects starting with a bind count instead of a ref count. Signed-off-by: Axel Davy --- .../state_trackers/nine/nine_helpers.h| 26 +++ 1 file changed, 26 insertions(+) diff --git a/src/gallium/state_trackers/nine/nine_helpers.h b/src/gallium

[Mesa-dev] [PATCH 5/5] st/nine: Avoid RefToBind calls in ff

2018-09-09 Thread Axel Davy
is avoided by creating the shaders with a bind count directly. Fixes: https://github.com/iXit/Mesa-3D/issues/295 Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/nine_ff.c | 2 -- src/gallium/state_trackers/nine/pixelshader9.c | 6 +- src/gallium/state_trackers/nine

  1   2   3   4   5   6   7   8   9   10   >