Skip to content

Commit

Permalink
fixup! 655f707
Browse files Browse the repository at this point in the history
  • Loading branch information
jimblandy committed Oct 17, 2023
1 parent 299ef6d commit d899b3d
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/back/msl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3995,9 +3995,15 @@ impl<W: Write> Writer<W> {

if options.lang_version < (1, 2) {
match var.space {
// This restriciton is not documented in the MSL spec but validation will fail if not upheld.
// We imply the version check from the "Function Buffer Read-Writes" section of https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html
// where the feaure sets listed correspond with the ones supporting MSL 1.2.
// This restriction is not documented in the MSL spec
// but validation will fail if it is not upheld.
//
// We infer the required version from the "Function
// Buffer Read-Writes" section of [what's new], where
// the feature sets listed correspond with the ones
// supporting MSL 1.2.
//
// [what's new]: https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html
crate::AddressSpace::Storage { access }
if access.contains(crate::StorageAccess::STORE)
&& ep.stage == crate::ShaderStage::Fragment =>
Expand All @@ -4010,9 +4016,15 @@ impl<W: Write> Writer<W> {
class: crate::ImageClass::Storage { access, .. },
..
} => {
// This restriciton is not documented in the MSL spec but validation will fail if not upheld.
// We imply the version check from the "Function Texture Read-Writes" section of https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html
// where the feaure set listed corresponds with the one supporting MSL 1.2.
// This restriction is not documented in the MSL spec
// but validation will fail if it is not upheld.
//
// We infer the required version from the "Function
// Texture Read-Writes" section of [what's new], where
// the feature sets listed correspond with the ones
// supporting MSL 1.2.
//
// [what's new]: https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html
if access.contains(crate::StorageAccess::STORE)
&& (ep.stage == crate::ShaderStage::Vertex
|| ep.stage == crate::ShaderStage::Fragment)
Expand Down

0 comments on commit d899b3d

Please sign in to comment.