Skip to content

Commit

Permalink
Update Aardvark.Base packages
Browse files Browse the repository at this point in the history
  • Loading branch information
hyazinthh committed Oct 19, 2023
1 parent b8fa49c commit 50edd87
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 300 deletions.
14 changes: 7 additions & 7 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ nuget CSharp.Data.Adaptive ~> 1.2.13

nuget Aardvark.Base.TypeProviders ~> 4.5.15

nuget Aardvark.Base.FSharp ~> 5.2.23
nuget Aardvark.Base.IO ~> 5.2.23
nuget Aardvark.Base.Incremental ~> 5.2.23
nuget Aardvark.Base.Runtime ~> 5.2.23
nuget Aardvark.Base.Essentials ~> 5.2.23
nuget Aardvark.Geometry ~> 5.2.23
nuget Aardvark.Base.Tensors ~> 5.2.23
nuget Aardvark.Base.FSharp ~> 5.2.27
nuget Aardvark.Base.IO ~> 5.2.27
nuget Aardvark.Base.Incremental ~> 5.2.27
nuget Aardvark.Base.Runtime ~> 5.2.27
nuget Aardvark.Base.Essentials ~> 5.2.27
nuget Aardvark.Geometry ~> 5.2.27
nuget Aardvark.Base.Tensors ~> 5.2.27

nuget Aardvark.Assembler ~> 0.0.8

Expand Down
46 changes: 23 additions & 23 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,53 +10,53 @@ NUGET
Aardvark.Base.Runtime (>= 5.2.7 < 5.3)
FSharp.Core (>= 5.0)
FSharp.Data.Adaptive (>= 1.2.13 < 1.3)
Aardvark.Base (5.2.25)
Aardvark.Base.Telemetry (5.2.25)
Aardvark.Base (5.2.27)
Aardvark.Base.Telemetry (5.2.27)
System.Collections.Immutable (>= 5.0)
System.Reflection.Metadata (>= 5.0) - restriction: || (== net471) (&& (== net6.0) (< netcoreapp3.1)) (&& (== net6.0-windows7.0) (< netcoreapp3.1)) (== netstandard2.0)
System.Text.Json (>= 4.7.2)
Aardvark.Base.Essentials (5.2.25)
Aardvark.Base (5.2.25)
Aardvark.Base.Essentials (5.2.27)
Aardvark.Base (5.2.27)
System.Collections.Immutable (>= 5.0)
Aardvark.Base.FSharp (5.2.25)
Aardvark.Base (5.2.25)
Aardvark.Base.FSharp (5.2.27)
Aardvark.Base (5.2.27)
Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6)
FSharp.Core (>= 5.0)
FSharp.Data.Adaptive (>= 1.2 < 1.3)
FsPickler (>= 5.3.2 < 5.4)
System.Dynamic.Runtime (>= 4.3 < 4.4)
Aardvark.Base.Incremental (5.2.25)
Aardvark.Base (5.2.25)
Aardvark.Base.FSharp (5.2.25)
Aardvark.Base.Incremental (5.2.27)
Aardvark.Base (5.2.27)
Aardvark.Base.FSharp (5.2.27)
Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6)
FSharp.Core (>= 5.0)
FSharp.Data.Adaptive (>= 1.2 < 1.3)
FsPickler (>= 5.3.2 < 5.4)
Aardvark.Base.IO (5.2.25)
Aardvark.Base (5.2.25)
Aardvark.Base.Tensors (5.2.25)
Aardvark.Base.IO (5.2.27)
Aardvark.Base (5.2.27)
Aardvark.Base.Tensors (5.2.27)
System.Dynamic.Runtime (>= 4.3 < 4.4)
Aardvark.Base.Runtime (5.2.25)
Aardvark.Base.FSharp (5.2.25)
Aardvark.Base.Incremental (5.2.25)
Aardvark.Base.Runtime (5.2.27)
Aardvark.Base.FSharp (5.2.27)
Aardvark.Base.Incremental (5.2.27)
Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6)
FSharp.Core (>= 5.0)
FSharp.Data.Adaptive (>= 1.2 < 1.3)
FsPickler (>= 5.3.2 < 5.4)
Aardvark.Base.Telemetry (5.2.25)
Aardvark.Base.Tensors (5.2.25)
Aardvark.Base (5.2.25)
Aardvark.Base.FSharp (5.2.25)
Aardvark.Base.Telemetry (5.2.27)
Aardvark.Base.Tensors (5.2.27)
Aardvark.Base (5.2.27)
Aardvark.Base.FSharp (5.2.27)
FSharp.Core (>= 5.0)
SixLabors.ImageSharp (>= 2.1.3 < 2.2)
Aardvark.Base.TypeProviders (4.5.15)
FSharp.Core (>= 3.1.2.5) - restriction: || (== net471) (&& (== net6.0) (>= net45)) (&& (== net6.0-windows7.0) (>= net45)) (&& (== netstandard2.0) (>= net45))
FSharp.Core (>= 4.2.3) - restriction: || (&& (== net471) (< net45)) (== net6.0) (== net6.0-windows7.0) (== netstandard2.0)
Aardvark.Build (1.0.19)
Aardvark.Geometry (5.2.25)
Aardvark.Base (5.2.25)
Aardvark.Base.FSharp (5.2.25)
Aardvark.Base.Tensors (5.2.25)
Aardvark.Geometry (5.2.27)
Aardvark.Base (5.2.27)
Aardvark.Base.FSharp (5.2.27)
Aardvark.Base.Tensors (5.2.27)
Aardvark.Base.TypeProviders (>= 4.5.15 < 4.6)
FSharp.Core (>= 5.0)
FSharp.Data.Adaptive (>= 1.2 < 1.3)
Expand Down
19 changes: 19 additions & 0 deletions src/Aardvark.Rendering.Vulkan/Resources/Buffer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ open KHRBufferDeviceAddress
open KHRAccelerationStructure

#nowarn "9"
#nowarn "44" // RangeSet
// #nowarn "51"

// =======================================================================
Expand Down Expand Up @@ -442,6 +443,7 @@ module Buffer =
let internal updateWriter (writer : nativeint -> unit) (buffer : Buffer) =
updateRangeWriter 0L buffer.Size writer buffer

[<Obsolete("Use uploadRangeSet instead.")>]
let uploadRanges (ptr : nativeint) (ranges : RangeSet) (buffer : Buffer) =
let baseOffset = int64 ranges.Min
let totalSize = int64 (ranges.Max - ranges.Min)
Expand All @@ -453,6 +455,18 @@ module Buffer =
Marshal.Copy(ptr + srcOffset, dst + dstOffset, r.Size + 1)
)

// TODO: Rename back to uploadRanges with next major update
let uploadRangeSet (ptr : nativeint) (ranges : RangeSet1i) (buffer : Buffer) =
let baseOffset = int64 ranges.Min
let totalSize = int64 (ranges.Max - ranges.Min + 1)

buffer |> updateRangeWriter baseOffset totalSize (fun dst ->
for r in ranges do
let srcOffset = nativeint r.Min
let dstOffset = nativeint (r.Min - ranges.Min)
Marshal.Copy(ptr + srcOffset, dst + dstOffset, r.Size + 1)
)

let rec tryUpdate (data : IBuffer) (buffer : Buffer) =
match data with
| :? Buffer as b ->
Expand Down Expand Up @@ -640,10 +654,15 @@ type ContextBufferExtensions private() =
use token = memory.Device.Token
token |> Buffer.ofBufferWithMemory export flags data memory

[<Obsolete("Use overload with RangeSet1i parameter instead.")>]
[<Extension>]
static member inline UploadRanges(buffer : Buffer, ptr : nativeint, ranges : RangeSet) =
buffer |> Buffer.uploadRanges ptr ranges

[<Extension>]
static member inline UploadRanges(buffer : Buffer, ptr : nativeint, ranges : RangeSet1i) =
buffer |> Buffer.uploadRangeSet ptr ranges

[<Extension>]
static member inline TryUpdate(buffer : Buffer, b : IBuffer) =
buffer |> Buffer.tryUpdate b
Expand Down
Loading

0 comments on commit 50edd87

Please sign in to comment.