From b91022dc23ab37278541054ba6362c286e0e482f Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 19 Jan 2018 12:52:25 -0500 Subject: [PATCH] SampleUtils: Flush the wire before getting preferred format This makes sure that the swapchain has been created on the server side and that the preferred swapchain format is correctly computed. --- examples/SampleUtils.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/SampleUtils.cpp b/examples/SampleUtils.cpp index 5fe67508e9..0d271266c7 100644 --- a/examples/SampleUtils.cpp +++ b/examples/SampleUtils.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "SampleUtils.h" + #include "common/Platform.h" #include "utils/BackendBinding.h" #include "wire/TerribleCommandBuffer.h" @@ -122,6 +124,7 @@ uint64_t GetSwapChainImplementation() { } nxt::TextureFormat GetPreferredSwapChainTextureFormat() { + DoFlush(); return static_cast(binding->GetPreferredSwapChainTextureFormat()); }