#
#asahi-gpu · 2022-10-02 14:15
karolherbstso you have ot make sure the kernel accepts all of them
#asahi-gpu · 2022-10-02 14:15
karolherbstand submit them explicitly
#asahi-gpu · 2022-10-02 14:14
karolherbstyeah.. it's not special, but vulkan allows application to construct cmd buffers directly
#asahi-gpu · 2022-10-02 14:14
alyssayeah i don't see the problem either
#asahi-gpu · 2022-10-02 14:14
linaWait what's hard about attachment lists?
#asahi-gpu · 2022-10-02 14:14
linaI don't think AGX is special here
#asahi-gpu · 2022-10-02 14:14
karolherbstattachment lists
#asahi-gpu · 2022-10-02 14:14
linaI think separate submissions per render pass is typical for all tiled architectures?
#asahi-gpu · 2022-10-02 14:14
alyssawhat limit?
#asahi-gpu · 2022-10-02 14:14
karolherbstyou will have to workaround that limit
#asahi-gpu · 2022-10-02 14:14
karolherbstfor vulkan.... it's super annoying
#asahi-gpu · 2022-10-02 14:14
karolherbstat least for GL that's easy to solve
#asahi-gpu · 2022-10-02 14:13
alyssadelightful.
#asahi-gpu · 2022-10-02 14:13
alyssayeah okay
#asahi-gpu · 2022-10-02 14:13
linaSo yeah
#asahi-gpu · 2022-10-02 14:13
linaSupplying bad data to firmware crashes the GPU and your entire machine in practice...
#asahi-gpu · 2022-10-02 14:13
alyssagiven the trust model
#asahi-gpu · 2022-10-02 14:13
alyssalina: Yeah, that's fair ... I guess supplying bad data to firmware is different than supplying bad data to hardware
#asahi-gpu · 2022-10-02 14:13
linaEverything else is static
#asahi-gpu · 2022-10-02 14:13
karolherbstthough usually command buffers get that huge that flushing is a must anyway
#asahi-gpu · 2022-10-02 14:13
linaThat's the only variable length structure involved here that I can think of though.
#asahi-gpu · 2022-10-02 14:13
karolherbstso as long things stay simple it's fine, but if games switch the render targets often it's bad
#asahi-gpu · 2022-10-02 14:13
linaalyssa: The kernel needs to copy the attachment list over for one, but I also don't think the firmware will appreciate the count being > the list size
#asahi-gpu · 2022-10-02 14:13
alyssalina: "one batch of rendering to the same set of render targets" is called a render pass :)
#asahi-gpu · 2022-10-02 14:12
karolherbstokay
#asahi-gpu · 2022-10-02 14:12
lina(Because this is a tiler)
#asahi-gpu · 2022-10-02 14:12
linaIf you switch render targets, that does need a separate job
#asahi-gpu · 2022-10-02 14:12
alyssaHow is that different from any other invalid cmdbuf that userspace can prepare and that GPU will fault on
#asahi-gpu · 2022-10-02 14:12
linaOne job submission to the kernel = one batch of rendering to the same set of render targets
#asahi-gpu · 2022-10-02 14:12
alyssaIs that actually a security issue though? Why does kernel need to sanitize?
#asahi-gpu · 2022-10-02 14:12
linakarolherbst: Ah yes, you can do that as many times as you want.
#asahi-gpu · 2022-10-02 14:12
karolherbstlike "draw this shader pipeline"
#asahi-gpu · 2022-10-02 14:12
alyssalina: Oh. Delight.
#asahi-gpu · 2022-10-02 14:12
karolherbstlina: one shader invocation
#asahi-gpu · 2022-10-02 14:12
linaalyssa: There are some things to sanitize (e.g. not exceeding max # of attachments), but it's fairly obvious stuff.
#asahi-gpu · 2022-10-02 14:12
alyssa(all render pass config)
#asahi-gpu · 2022-10-02 14:11
karolherbstright.. I meant it more like error checking and filling out proper structs
#asahi-gpu · 2022-10-02 14:11
alyssaour submit ioctl has fields for the registers that userspace is allowed to set
#asahi-gpu · 2022-10-02 14:11
linaDepends on what you mean by "render job"
#asahi-gpu · 2022-10-02 14:11
alyssakarolherbst: Nothing to sanitize
#asahi-gpu · 2022-10-02 14:11
karolherbstso you can batch multiple render jobs into one submission and the kernel just sanitizes, submits and fence it
#asahi-gpu · 2022-10-02 14:10
karolherbstyeah, that's not as terrible as I initially thought then
#asahi-gpu · 2022-10-02 14:10
linaSo we make up an arbitrary uABI for that to contain the data we need, and the kernel just copies it over to the firmware structs and fires the job
#asahi-gpu · 2022-10-02 14:10
karolherbstokay
#asahi-gpu · 2022-10-02 14:10
karolherbstthe hardware I know is more flexible. E.g. on nvidia you can assign "classes" to context which have priviliged access, which the kernel only allows for itself, and userspace can only allocated classes without special priviliges
#asahi-gpu · 2022-10-02 14:10
linaIt's just that the fixed-sized, job description structures need to be populated by the kernel, partially from userspace data
#asahi-gpu · 2022-10-02 14:10
linaUserspace still fills the actual draw/shader bind/etc command stream of course
#asahi-gpu · 2022-10-02 14:09
linaWell, it's not really problematic, it's just... annoying
#asahi-gpu · 2022-10-02 14:09
karolherbstyeah okay, that's.. problematic
#asahi-gpu · 2022-10-02 14:09
karolherbstahhh

plus ›