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

* Make constant composites non-constexpr

* Update shadow test
This commit is contained in:
Ashley
2021-04-11 20:21:47 +02:00
committed by GitHub
parent 98db1dedcd
commit 640bfb1f26
2 changed files with 2 additions and 2 deletions

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 {

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,