[Metal] Make constant composites non-constexpr (#707)

* Make constant composites non-constexpr

* Update shadow test
This commit is contained in:
Ashley authored and GitHub committed 2021-04-11 14:21:47 -04:00
1 parent 98db1dedcd
commit 640bfb1f26
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -1531,7 +1531,7 @@ impl<W: Write> Writer<W> {
access: crate::StorageAccess::empty(),
first_time: false,
};
write!(self.out, "constexpr constant {} {} = {{", ty_name, name,)?;
write!(self.out, "constant {} {} = {{", ty_name, name,)?;
for (i, &sub_handle) in components.iter().enumerate() {
let separator = if i != 0 { ", " } else { "" };
let coco = ConstantContext {
+1 -1
View File
@@ -18,7 +18,7 @@ typedef Light type3[1];
struct Lights {
type3 data;
};
constexpr constant metal::float3 c_ambient = {0.05, 0.05, 0.05};
constant metal::float3 c_ambient = {0.05, 0.05, 0.05};
float fetch_shadow(
metal::uint light_id,