@@ -5,7 +5,7 @@ use glam::*;
5
5
use glamour:: { AsRaw , Rect } ;
6
6
use wgpu:: * ;
7
7
8
- #[ cfg( not( target_os = "macos" ) ) ]
8
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
9
9
use wgpu_profiler:: { GpuProfiler , GpuProfilerSettings } ;
10
10
11
11
use crate :: {
@@ -32,7 +32,7 @@ pub struct Renderer {
32
32
pub queue : Queue ,
33
33
pub shaders : HashMap < String , ShaderModule > ,
34
34
35
- #[ cfg( not( target_os = "macos" ) ) ]
35
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
36
36
pub profiler : GpuProfiler ,
37
37
38
38
pub format : TextureFormat ,
@@ -157,7 +157,7 @@ impl Renderer {
157
157
) ;
158
158
let shaders = shaders. await ;
159
159
160
- #[ cfg( not( target_os = "macos" ) ) ]
160
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
161
161
let mut profiler = GpuProfiler :: new_with_tracy_client (
162
162
GpuProfilerSettings {
163
163
// enable_timer_queries: false,
@@ -169,7 +169,7 @@ impl Renderer {
169
169
)
170
170
. expect ( "Could not create profiler" ) ;
171
171
172
- #[ cfg( not( target_os = "macos" ) ) ]
172
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
173
173
profiler
174
174
. change_settings ( GpuProfilerSettings {
175
175
enable_timer_queries : false ,
@@ -183,7 +183,7 @@ impl Renderer {
183
183
queue,
184
184
shaders,
185
185
186
- #[ cfg( not( target_os = "macos" ) ) ]
186
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
187
187
profiler,
188
188
189
189
format,
@@ -248,7 +248,7 @@ impl Renderer {
248
248
// | Features::TIMESTAMP_QUERY_INSIDE_ENCODERS
249
249
}
250
250
251
- #[ cfg( not( target_os = "macos" ) ) ]
251
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
252
252
{
253
253
Features :: PUSH_CONSTANTS
254
254
| Features :: SPIRV_SHADER_PASSTHROUGH
@@ -375,7 +375,7 @@ impl Renderer {
375
375
) ;
376
376
}
377
377
378
- #[ cfg( not( target_os = "macos" ) ) ]
378
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
379
379
{
380
380
self . profiler . resolve_queries ( & mut encoder) ;
381
381
@@ -396,7 +396,7 @@ impl Renderer {
396
396
constants : ShaderConstants ,
397
397
resources : & Resources ,
398
398
) {
399
- #[ cfg( not( target_os = "macos" ) ) ]
399
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
400
400
let mut mask_scope = self . profiler . scope ( "mask" , encoder, & self . device ) ;
401
401
402
402
#[ cfg( target_os = "macos" ) ]
@@ -405,7 +405,7 @@ impl Renderer {
405
405
if let Some ( mask_contents) = mask_contents {
406
406
for batch in mask_contents. primitives . iter ( ) {
407
407
for drawable in self . drawables . iter_mut ( ) {
408
- #[ cfg( not( target_os = "macos" ) ) ]
408
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
409
409
let mut render_pass = mask_scope. scoped_render_pass (
410
410
"Mask" ,
411
411
& self . device ,
@@ -445,7 +445,7 @@ impl Renderer {
445
445
446
446
profiling:: scope!( "drawable" , & drawable. name) ;
447
447
448
- #[ cfg( not( target_os = "macos" ) ) ]
448
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
449
449
let mut drawable_scope = render_pass. scope ( & drawable. name , & self . device ) ;
450
450
451
451
#[ cfg( target_os = "macos" ) ]
@@ -479,7 +479,7 @@ impl Renderer {
479
479
}
480
480
}
481
481
} else {
482
- #[ cfg( not( target_os = "macos" ) ) ]
482
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
483
483
mask_scope. scoped_render_pass (
484
484
"Clear Mask Texture" ,
485
485
& self . device ,
@@ -531,7 +531,7 @@ impl Renderer {
531
531
constants : ShaderConstants ,
532
532
resources : & Resources ,
533
533
) {
534
- #[ cfg( not( target_os = "macos" ) ) ]
534
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
535
535
let mut content_scope = self
536
536
. profiler
537
537
. scope ( "content" , context. encoder , & self . device ) ;
@@ -540,7 +540,7 @@ impl Renderer {
540
540
let content_scope = context. encoder ;
541
541
542
542
if * context. first {
543
- #[ cfg( not( target_os = "macos" ) ) ]
543
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
544
544
content_scope. scoped_render_pass (
545
545
"Clear Offscreen Texture" ,
546
546
& self . device ,
@@ -579,7 +579,7 @@ impl Renderer {
579
579
' offscreen_copy: for batch in contents. primitives . iter ( ) {
580
580
for drawable in self . drawables . iter ( ) {
581
581
if drawable. has_work ( batch) && drawable. requires_offscreen_copy ( ) {
582
- #[ cfg( not( target_os = "macos" ) ) ]
582
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
583
583
let mut copy_scope =
584
584
content_scope. scope ( "Copy Frame to Offscreen" , & self . device ) ;
585
585
@@ -630,7 +630,7 @@ impl Renderer {
630
630
}
631
631
} ;
632
632
633
- #[ cfg( not( target_os = "macos" ) ) ]
633
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
634
634
let mut render_pass = content_scope. scoped_render_pass (
635
635
"Layer Render Pass" ,
636
636
& self . device ,
@@ -660,7 +660,7 @@ impl Renderer {
660
660
661
661
profiling:: scope!( "drawable" , & drawable. name) ;
662
662
663
- #[ cfg( not( target_os = "macos" ) ) ]
663
+ #[ cfg( not( any ( target_os = "macos" , target_os = "linux" ) ) ) ]
664
664
let mut drawable_scope = render_pass. scope ( & drawable. name , & self . device ) ;
665
665
666
666
#[ cfg( target_os = "macos" ) ]
0 commit comments