#
#asahi-gpu · 2023-01-08 02:12
TellowKrinkleTrue. You don't have to do the load itself conditionally if it won't fault
#asahi-gpu · 2023-01-08 02:12
alyssaIIRC GLES3.2 only needs the weak one, and Vulkan lets you pick which of the two you want
#asahi-gpu · 2023-01-08 02:12
alyssaand the latter is free
#asahi-gpu · 2023-01-08 02:12
alyssawith the fault control flag, the former is an unconditional load followed by a cheap conditional select or iand
#asahi-gpu · 2023-01-08 02:11
alyssawithout the fault control flag, both of those require wrapping loads in if(..) { }
#asahi-gpu · 2023-01-08 02:11
TellowKrinkleahh
#asahi-gpu · 2023-01-08 02:11
alyssaOne is "out of bounds reads return 0" the other is weaker "out of bounds reads return undefined values but will not fault"
#asahi-gpu · 2023-01-08 02:10
alyssaTellowKrinkle: There are 2 definitions of robustness
#asahi-gpu · 2023-01-08 02:10
TellowKrinkleDoesn't robustness have to work with out of bounds reads too? That doesn't sound like it would protect against accidentally reading from another valid buffer that happened to be nearby
#asahi-gpu · 2023-01-08 02:08
alyssa(gles3.2 or vulkan)
#asahi-gpu · 2023-01-08 02:08
alyssawould be a cheap way to implement robustness
#asahi-gpu · 2023-01-08 02:07
alyssawhat about at the context level?
#asahi-gpu · 2023-01-08 02:07
alyssabtw, is "asahi.fault_control=0xb" something that could be toggled at the process level?
#asahi-gpu · 2023-01-08 02:06
lina^^
#asahi-gpu · 2023-01-08 02:06
alyssawhat it SHOULD be doing is instead writing "if (x) { uniform = load(address) }"
#asahi-gpu · 2023-01-08 02:06
alyssathat seems like a very blunt hammer to work around a fundamentally unsound compiler pass
#asahi-gpu · 2023-01-08 02:05
lina(That's what macOS does)
#asahi-gpu · 2023-01-08 02:05
linaWell, there's always asahi.fault_control=0xb... ^^;;
#asahi-gpu · 2023-01-08 02:04
alyssa" and only binding foo if needed for the material)
#asahi-gpu · 2023-01-08 02:04
alyssa(That can happen with a completely in-spec program that doesn't do any funny UB, like "if (has foo) { load(foo) }
#asahi-gpu · 2023-01-08 02:04
alyssasuddenly you've introduced faulting into a working program
#asahi-gpu · 2023-01-08 02:04
alyssa" is a condition that's only true if the address is valid
#asahi-gpu · 2023-01-08 02:04
alyssaand if "x
#asahi-gpu · 2023-01-08 02:04
alyssatrouble is, load does have a side effect ... faulting if the address is invalid
#asahi-gpu · 2023-01-08 02:03
alyssaIt only moves stuff that doesn't have side effects
#asahi-gpu · 2023-01-08 02:03
alyssaIt will hapilly rewrite "if (x) { load(address) }" to "uniform = load(address); if (x) { uniform }"
#asahi-gpu · 2023-01-08 02:03
alyssaerrr
#asahi-gpu · 2023-01-08 02:03
alyssaIt will hapilly rewrite "if (x) { load(address) }" to "if (x) { uniform }
#asahi-gpu · 2023-01-08 02:02
alyssanir_opt_preamble is fundamentally unsound.
#asahi-gpu · 2023-01-08 02:02
linaWhich bug?
#asahi-gpu · 2023-01-08 02:02
lina;;
#asahi-gpu · 2023-01-08 02:02
alyssaI thought if I just ignored that bug it would go away! :(
#asahi-gpu · 2023-01-08 02:01
alyssaNOOOooooOo
#asahi-gpu · 2023-01-08 02:01
alyssa>________<
#asahi-gpu · 2023-01-08 02:01
alyssaOh nooooooooo
#asahi-gpu · 2023-01-08 02:01
alyssaahaha yeah
#asahi-gpu · 2023-01-08 02:01
linaThose are the faults you get with bad vertex fetches
#asahi-gpu · 2023-01-08 02:01
linaYeah, I think r/w is definitely backwards for UL1C and I think that's the L1 cache yes
#asahi-gpu · 2023-01-08 02:01
alyssawhich I would believe
#asahi-gpu · 2023-01-08 02:01
alyssamaybe
#asahi-gpu · 2023-01-08 02:00
alyssaUL1C sounds like L1 for the USC
#asahi-gpu · 2023-01-08 02:00
alyssaerr... a "write" from UL1C to 0xc021
#asahi-gpu · 2023-01-08 02:00
alyssaSomehow I don't think the issue is a write from DCMP
#asahi-gpu · 2023-01-08 02:00
alyssaMy buffer texture code is causing faults but dmesg isn't much help figuring out why
#asahi-gpu · 2023-01-08 01:59
alyssalina: Nod
#asahi-gpu · 2023-01-08 01:57
linawrite is definitely suspicious though
#asahi-gpu · 2023-01-08 01:57
linaI think the unit names make sense, at least some of them match
#asahi-gpu · 2023-01-08 01:57
linaalyssa: The lod_bias assert has been firing all along as far as I remember ^^
#asahi-gpu · 2023-01-08 01:51
alyssaI'm also suspicious about the unit names
#asahi-gpu · 2023-01-08 01:50
alyssaas in, I see it set sometimes when it's a read instead

plus ›