File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,18 +88,16 @@ impl SyncItem {
8888 let fence = if out {
8989 None
9090 } else {
91- Some (
92- syncobj
93- . fence_get ( )
94- . ok_or_else ( || {
95- cls_pr_debug ! (
96- Errors ,
97- "Failed to get fence from timeline sync object\n "
98- ) ;
99- EINVAL
100- } ) ?
101- . chain_find_seqno ( data. timeline_value ) ?,
102- )
91+ syncobj
92+ . fence_get ( )
93+ . ok_or_else ( || {
94+ cls_pr_debug ! (
95+ Errors ,
96+ "Failed to get fence from timeline sync object\n "
97+ ) ;
98+ EINVAL
99+ } ) ?
100+ . chain_find_seqno ( data. timeline_value ) ?
103101 } ;
104102
105103 Ok ( SyncItem {
Original file line number Diff line number Diff line change @@ -574,6 +574,12 @@ impl Queue for Queue::ver {
574574
575575 mod_dev_dbg ! ( self . dev, "[Submission {}] Creating job\n " , id) ;
576576
577+ // FIXME: I think this can violate the fence seqno ordering contract.
578+ // If we have e.g. a render submission with no barriers and then a compute submission
579+ // with no barriers, it's possible for the compute submission to complete first, and
580+ // therefore its fence. Maybe we should have separate fence contexts for render
581+ // and compute, and then do a ? (Vert+frag should be fine since there is no vert
582+ // without frag, and frag always serializes.)
577583 let fence: UserFence < JobFence :: ver > = self
578584 . fence_ctx
579585 . new_fence :: < JobFence :: ver > (
@@ -616,7 +622,9 @@ impl Queue for Queue::ver {
616622 in_syncs. len( )
617623 ) ;
618624 for sync in in_syncs {
619- job. add_dependency ( sync. fence . expect ( "in_sync missing fence" ) ) ?;
625+ if let Some ( fence) = sync. fence {
626+ job. add_dependency ( fence) ?;
627+ }
620628 }
621629
622630 let mut last_render = None ;
You can’t perform that action at this time.
0 commit comments