I drop this patch (for now).
It doesn't fully fix the issue, which is due to our wine implementation
using the wrong window for ID3DPresent_GetWindowInfo.
The issue is fixed either with a wine patch or with a nine workaround.
The nine workaround consists in forcing the backend to use the correct
window, which is simply passing hDestWindowOverride ?
hDestWindowOverride : This->params.hDeviceWindow instead of
hDestWindowOverride.
The problem about the nine patch is that maybe when hDestWindowOverride
is not null, specific handling would be required in wine ? So far not to
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.
Fixes the regression caused by:
commit 2318ca68bbeb4fa6e21a4d8c650cec3f64246596
"st/nine: Handle window resize when a presentation buffer is used"
Fixes: https://github.com/iXit/Mesa-3D/issues/331
Fixes: https://github.com/iXit/Mesa-3D/issues/332
Cc: mesa-sta...@lists.freedesktop.org
Signed-off-by: Axel Davy <davyax...@gmail.com>
---
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 buffers ...*/"
would be replaced by "pipe = NineDevice9_GetPipe(This->base.device);"
src/gallium/state_trackers/nine/swapchain9.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gallium/state_trackers/nine/swapchain9.c
b/src/gallium/state_trackers/nine/swapchain9.c
index 6c22be24c7c..ceaa1cd848a 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -753,6 +753,12 @@ present( struct NineSwapChain9 *This,
ID3DPresent_GetWindowInfo(This->present, hDestWindowOverride, &target_width,
&target_height, &target_depth);
(void)target_depth;
+ /* Can happen for a few frames. */
+ if (target_width == 0 || target_height == 0) {
+ target_width = resource->width0;
+ target_height = resource->height0;
+ }
+
/* Switch to using presentation buffers on window resize.
* Note: Most apps should resize the d3d back buffers when
* a window resize is detected, which will result in a call to
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev