@@ -168,7 +168,7 @@ bool WSI::init_device()
168
168
device->set_context (*context);
169
169
platform->event_device_created (device.get ());
170
170
171
- #ifdef _WIN32
171
+ #ifdef HAVE_WSI_DXGI_INTEROP
172
172
dxgi.reset (new DXGIInteropSwapchain);
173
173
if (!dxgi->init_interop_device (*device))
174
174
dxgi.reset ();
@@ -184,7 +184,7 @@ bool WSI::init_device(DeviceHandle device_handle)
184
184
device = std::move (device_handle);
185
185
platform->event_device_created (device.get ());
186
186
187
- #ifdef _WIN32
187
+ #ifdef HAVE_WSI_DXGI_INTEROP
188
188
dxgi.reset (new DXGIInteropSwapchain);
189
189
if (!dxgi->init_interop_device (*device))
190
190
dxgi.reset ();
@@ -194,7 +194,7 @@ bool WSI::init_device(DeviceHandle device_handle)
194
194
return true ;
195
195
}
196
196
197
- #ifdef _WIN32
197
+ #ifdef HAVE_WSI_DXGI_INTEROP
198
198
bool WSI::init_surface_swapchain_dxgi (unsigned width, unsigned height)
199
199
{
200
200
if (!dxgi)
@@ -270,7 +270,7 @@ bool WSI::init_surface_swapchain()
270
270
unsigned width = platform->get_surface_width ();
271
271
unsigned height = platform->get_surface_height ();
272
272
273
- #ifdef _WIN32
273
+ #ifdef HAVE_WSI_DXGI_INTEROP
274
274
if (init_surface_swapchain_dxgi (width, height))
275
275
return true ;
276
276
else
@@ -468,7 +468,7 @@ void WSI::drain_swapchain(bool in_tear_down)
468
468
469
469
void WSI::tear_down_swapchain ()
470
470
{
471
- #ifdef _WIN32
471
+ #ifdef HAVE_WSI_DXGI_INTEROP
472
472
// We only do explicit teardown on exit.
473
473
dxgi.reset ();
474
474
#endif
@@ -573,7 +573,7 @@ void WSI::set_low_latency_mode(bool enable)
573
573
low_latency_mode_enable = enable;
574
574
}
575
575
576
- #ifdef _WIN32
576
+ #ifdef HAVE_WSI_DXGI_INTEROP
577
577
bool WSI::begin_frame_dxgi ()
578
578
{
579
579
Semaphore acquire;
@@ -639,7 +639,7 @@ bool WSI::begin_frame()
639
639
LOGI (" Waited for vacant frame context for %.3f ms.\n " , (next_frame_end - next_frame_start) * 1e-6 );
640
640
#endif
641
641
642
- #ifdef _WIN32
642
+ #ifdef HAVE_WSI_DXGI_INTEROP
643
643
if (dxgi)
644
644
{
645
645
if (platform->should_resize ())
@@ -763,7 +763,7 @@ bool WSI::begin_frame()
763
763
return true ;
764
764
}
765
765
766
- #ifdef _WIN32
766
+ #ifdef HAVE_WSI_DXGI_INTEROP
767
767
bool WSI::end_frame_dxgi ()
768
768
{
769
769
auto release = device->consume_release_semaphore ();
@@ -793,7 +793,7 @@ bool WSI::end_frame()
793
793
794
794
has_acquired_swapchain_index = false ;
795
795
796
- #ifdef _WIN32
796
+ #ifdef HAVE_WSI_DXGI_INTEROP
797
797
if (dxgi)
798
798
return end_frame_dxgi ();
799
799
#endif
@@ -935,7 +935,7 @@ void WSI::update_framebuffer(unsigned width, unsigned height)
935
935
{
936
936
if (context && device)
937
937
{
938
- #ifdef _WIN32
938
+ #ifdef HAVE_WSI_DXGI_INTEROP
939
939
if (dxgi)
940
940
{
941
941
if (!init_surface_swapchain_dxgi (width, height))
@@ -963,7 +963,7 @@ bool WSI::update_active_presentation_mode(PresentMode mode)
963
963
if (current_present_mode == mode)
964
964
return true ;
965
965
966
- #ifdef _WIN32
966
+ #ifdef HAVE_WSI_DXGI_INTEROP
967
967
// We set this on Present time.
968
968
if (dxgi)
969
969
{
0 commit comments