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:
parent
52cbcb4e47
commit
b91022dc23
|
@ -12,6 +12,8 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
#include "SampleUtils.h"
|
||||||
|
|
||||||
#include "common/Platform.h"
|
#include "common/Platform.h"
|
||||||
#include "utils/BackendBinding.h"
|
#include "utils/BackendBinding.h"
|
||||||
#include "wire/TerribleCommandBuffer.h"
|
#include "wire/TerribleCommandBuffer.h"
|
||||||
|
@ -122,6 +124,7 @@ uint64_t GetSwapChainImplementation() {
|
||||||
}
|
}
|
||||||
|
|
||||||
nxt::TextureFormat GetPreferredSwapChainTextureFormat() {
|
nxt::TextureFormat GetPreferredSwapChainTextureFormat() {
|
||||||
|
DoFlush();
|
||||||
return static_cast<nxt::TextureFormat>(binding->GetPreferredSwapChainTextureFormat());
|
return static_cast<nxt::TextureFormat>(binding->GetPreferredSwapChainTextureFormat());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue