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.
This commit is contained in:
Corentin Wallez 2018-01-19 12:52:25 -05:00 committed by Corentin Wallez
parent 52cbcb4e47
commit b91022dc23
1 changed files with 3 additions and 0 deletions

View File

@ -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<nxt::TextureFormat>(binding->GetPreferredSwapChainTextureFormat());
}