mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Implement module compaction.
Add a new Naga feature, `"compact"`, which adds a new function `naga::compact::compact`, which removes unused expressions, types, and constants from a `Module`.
This commit is contained in:
committed by
Teodor Tanasoaia
parent
0b7afb3943
commit
8b267218a4
@@ -38,6 +38,7 @@ wgsl-out = []
|
||||
hlsl-out = []
|
||||
span = ["codespan-reporting", "termcolor"]
|
||||
validate = []
|
||||
compact = []
|
||||
|
||||
[[bench]]
|
||||
name = "criterion"
|
||||
|
||||
@@ -10,9 +10,28 @@ keywords = ["shader", "SPIR-V", "GLSL", "MSL"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dependencies]
|
||||
naga = { version = "0.13", path = "../", features = ["validate", "span", "wgsl-in", "wgsl-out", "glsl-in", "glsl-out", "spv-in", "spv-out", "msl-out", "hlsl-out", "dot-out", "serialize", "deserialize"] }
|
||||
bincode = "1"
|
||||
log = "0.4"
|
||||
codespan-reporting = "0.11"
|
||||
env_logger = "0.10"
|
||||
argh = "0.1.5"
|
||||
|
||||
[dependencies.naga]
|
||||
version = "0.13"
|
||||
path = "../"
|
||||
features = [
|
||||
"validate",
|
||||
"compact",
|
||||
"span",
|
||||
"wgsl-in",
|
||||
"wgsl-out",
|
||||
"glsl-in",
|
||||
"glsl-out",
|
||||
"spv-in",
|
||||
"spv-out",
|
||||
"msl-out",
|
||||
"hlsl-out",
|
||||
"dot-out",
|
||||
"serialize",
|
||||
"deserialize"
|
||||
]
|
||||
|
||||
@@ -79,6 +79,20 @@ struct Args {
|
||||
#[argh(switch, short = 'g')]
|
||||
generate_debug_symbols: bool,
|
||||
|
||||
/// compact the module's IR and revalidate.
|
||||
///
|
||||
/// Output files will reflect the compacted IR. If you want to see the IR as
|
||||
/// it was before compaction, use the `--before-compaction` option.
|
||||
#[argh(switch)]
|
||||
compact: bool,
|
||||
|
||||
/// write the module's IR before compaction to the given file.
|
||||
///
|
||||
/// This implies `--compact`. Like any other output file, the filename
|
||||
/// extension determines the form in which the module is written.
|
||||
#[argh(option)]
|
||||
before_compaction: Option<String>,
|
||||
|
||||
/// show version
|
||||
#[argh(switch)]
|
||||
version: bool,
|
||||
@@ -288,7 +302,7 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
!params.keep_coordinate_space,
|
||||
);
|
||||
|
||||
let (module, input_text) = match Path::new(&input_path)
|
||||
let (mut module, input_text) = match Path::new(&input_path)
|
||||
.extension()
|
||||
.ok_or(CliError("Input filename has no extension"))?
|
||||
.to_str()
|
||||
@@ -391,12 +405,13 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
caps & !missing
|
||||
});
|
||||
|
||||
// validate the IR
|
||||
// Validate the IR before compaction.
|
||||
let info = match naga::valid::Validator::new(params.validation_flags, validation_caps)
|
||||
.validate(&module)
|
||||
{
|
||||
Ok(info) => Some(info),
|
||||
Err(error) => {
|
||||
// Validation failure is not fatal. Just report the error.
|
||||
if let Some(input) = &input_text {
|
||||
let filename = input_path.file_name().and_then(std::ffi::OsStr::to_str);
|
||||
emit_annotated_error(&error, filename.unwrap_or("input"), input);
|
||||
@@ -406,6 +421,45 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
};
|
||||
|
||||
// Compact the module, if requested.
|
||||
let info = if args.compact || args.before_compaction.is_some() {
|
||||
// Compact only if validation succeeded. Otherwise, compaction may panic.
|
||||
if info.is_some() {
|
||||
// Write out the module state before compaction, if requested.
|
||||
if let Some(ref before_compaction) = args.before_compaction {
|
||||
write_output(&module, &info, ¶ms, before_compaction)?;
|
||||
}
|
||||
|
||||
naga::compact::compact(&mut module);
|
||||
|
||||
// Re-validate the IR after compaction.
|
||||
match naga::valid::Validator::new(params.validation_flags, validation_caps)
|
||||
.validate(&module)
|
||||
{
|
||||
Ok(info) => Some(info),
|
||||
Err(error) => {
|
||||
// Validation failure is not fatal. Just report the error.
|
||||
eprintln!("Error validating compacted module:");
|
||||
if let Some(input) = &input_text {
|
||||
let filename = input_path.file_name().and_then(std::ffi::OsStr::to_str);
|
||||
emit_annotated_error(&error, filename.unwrap_or("input"), input);
|
||||
}
|
||||
print_err(&error);
|
||||
None
|
||||
}
|
||||
}
|
||||
} else {
|
||||
eprintln!("Skipping compaction due to validation failure.");
|
||||
None
|
||||
}
|
||||
} else {
|
||||
info
|
||||
};
|
||||
|
||||
// If no output was requested, then report validation results and stop here.
|
||||
//
|
||||
// If the user asked for output, don't stop: some output formats (".txt",
|
||||
// ".dot", ".bin") can be generated even without a `ModuleInfo`.
|
||||
if output_paths.is_empty() {
|
||||
if info.is_some() {
|
||||
println!("Validation successful");
|
||||
|
||||
70
src/arena.rs
70
src/arena.rs
@@ -192,12 +192,31 @@ impl<T> Iterator for Range<T> {
|
||||
}
|
||||
|
||||
impl<T> Range<T> {
|
||||
/// Return a range enclosing handles `first` through `last`, inclusive.
|
||||
pub fn new_from_bounds(first: Handle<T>, last: Handle<T>) -> Self {
|
||||
Self {
|
||||
inner: (first.index() as u32)..(last.index() as u32 + 1),
|
||||
marker: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Return the first and last handles included in `self`.
|
||||
///
|
||||
/// If `self` is an empty range, there are no handles included, so
|
||||
/// return `None`.
|
||||
pub fn first_and_last(&self) -> Option<(Handle<T>, Handle<T>)> {
|
||||
if self.inner.start < self.inner.end {
|
||||
Some((
|
||||
// `Range::new_from_bounds` expects a 1-based, start- and
|
||||
// end-inclusive range, but `self.inner` is a zero-based,
|
||||
// end-exclusive range.
|
||||
Handle::new(Index::new(self.inner.start + 1).unwrap()),
|
||||
Handle::new(Index::new(self.inner.end).unwrap()),
|
||||
))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// An arena holding some kind of component (e.g., type, constant,
|
||||
@@ -382,6 +401,19 @@ impl<T> Arena<T> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "compact")]
|
||||
pub(crate) fn retain_mut<P>(&mut self, mut predicate: P)
|
||||
where
|
||||
P: FnMut(Handle<T>, &mut T) -> bool,
|
||||
{
|
||||
let mut index = 0;
|
||||
self.data.retain_mut(|elt| {
|
||||
index += 1;
|
||||
let handle = Handle::new(Index::new(index).unwrap());
|
||||
predicate(handle, elt)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "deserialize")]
|
||||
@@ -544,6 +576,44 @@ impl<T> UniqueArena<T> {
|
||||
Span::default()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "compact")]
|
||||
pub(crate) fn drain_all(&mut self) -> UniqueArenaDrain<T> {
|
||||
UniqueArenaDrain {
|
||||
inner_elts: self.set.drain(..),
|
||||
#[cfg(feature = "span")]
|
||||
inner_spans: self.span_info.drain(..),
|
||||
index: Index::new(1).unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "compact")]
|
||||
pub(crate) struct UniqueArenaDrain<'a, T> {
|
||||
inner_elts: indexmap::set::Drain<'a, T>,
|
||||
#[cfg(feature = "span")]
|
||||
inner_spans: std::vec::Drain<'a, Span>,
|
||||
index: Index,
|
||||
}
|
||||
|
||||
#[cfg(feature = "compact")]
|
||||
impl<'a, T> Iterator for UniqueArenaDrain<'a, T> {
|
||||
type Item = (Handle<T>, T, Span);
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
match self.inner_elts.next() {
|
||||
Some(elt) => {
|
||||
let handle = Handle::new(self.index);
|
||||
self.index = self.index.checked_add(1).unwrap();
|
||||
#[cfg(feature = "span")]
|
||||
let span = self.inner_spans.next().unwrap();
|
||||
#[cfg(not(feature = "span"))]
|
||||
let span = Span::default();
|
||||
Some((handle, elt, span))
|
||||
}
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Eq + hash::Hash> UniqueArena<T> {
|
||||
|
||||
395
src/compact/expressions.rs
Normal file
395
src/compact/expressions.rs
Normal file
@@ -0,0 +1,395 @@
|
||||
use super::{HandleMap, HandleSet, ModuleMap};
|
||||
use crate::arena::{Arena, Handle, UniqueArena};
|
||||
|
||||
pub struct ExpressionTracer<'tracer> {
|
||||
pub types: &'tracer UniqueArena<crate::Type>,
|
||||
pub constants: &'tracer Arena<crate::Constant>,
|
||||
|
||||
/// The arena in which we are currently tracing expressions.
|
||||
pub expressions: &'tracer Arena<crate::Expression>,
|
||||
|
||||
/// The used map for `types`.
|
||||
pub types_used: &'tracer mut HandleSet<crate::Type>,
|
||||
|
||||
/// The used map for `constants`.
|
||||
pub constants_used: &'tracer mut HandleSet<crate::Constant>,
|
||||
|
||||
/// The used set for `arena`.
|
||||
///
|
||||
/// This points to whatever arena holds the expressions we are
|
||||
/// currently tracing: either a function's expression arena, or
|
||||
/// the module's constant expression arena.
|
||||
pub expressions_used: &'tracer mut HandleSet<crate::Expression>,
|
||||
|
||||
/// The constant expression arena and its used map, if we haven't
|
||||
/// switched to tracing constant expressions yet.
|
||||
pub const_expressions: Option<(
|
||||
&'tracer Arena<crate::Expression>,
|
||||
&'tracer mut HandleSet<crate::Expression>,
|
||||
)>,
|
||||
}
|
||||
|
||||
impl<'tracer> ExpressionTracer<'tracer> {
|
||||
pub fn trace_expression(&mut self, expr: Handle<crate::Expression>) {
|
||||
log::trace!(
|
||||
"entering trace_expression of {}",
|
||||
if self.const_expressions.is_some() {
|
||||
"function expressions"
|
||||
} else {
|
||||
"const expressions"
|
||||
}
|
||||
);
|
||||
let mut work_list = vec![expr];
|
||||
while let Some(expr) = work_list.pop() {
|
||||
// If we've already seen this expression, no need to trace further.
|
||||
if !self.expressions_used.insert(expr) {
|
||||
continue;
|
||||
}
|
||||
log::trace!("tracing new expression {:?}", expr);
|
||||
|
||||
use crate::Expression as Ex;
|
||||
match self.expressions[expr] {
|
||||
// Expressions that do not contain handles that need to be traced.
|
||||
Ex::Literal(_)
|
||||
| Ex::FunctionArgument(_)
|
||||
| Ex::GlobalVariable(_)
|
||||
| Ex::LocalVariable(_)
|
||||
| Ex::CallResult(_)
|
||||
| Ex::RayQueryProceedResult => {}
|
||||
|
||||
Ex::Constant(handle) => {
|
||||
self.constants_used.insert(handle);
|
||||
let constant = &self.constants[handle];
|
||||
self.trace_type(constant.ty);
|
||||
self.trace_const_expression(constant.init);
|
||||
}
|
||||
Ex::ZeroValue(ty) => self.trace_type(ty),
|
||||
Ex::Compose { ty, ref components } => {
|
||||
self.trace_type(ty);
|
||||
work_list.extend(components);
|
||||
}
|
||||
Ex::Access { base, index } => work_list.extend([base, index]),
|
||||
Ex::AccessIndex { base, index: _ } => work_list.push(base),
|
||||
Ex::Splat { size: _, value } => work_list.push(value),
|
||||
Ex::Swizzle {
|
||||
size: _,
|
||||
vector,
|
||||
pattern: _,
|
||||
} => work_list.push(vector),
|
||||
Ex::Load { pointer } => work_list.push(pointer),
|
||||
Ex::ImageSample {
|
||||
image,
|
||||
sampler,
|
||||
gather: _,
|
||||
coordinate,
|
||||
array_index,
|
||||
offset,
|
||||
ref level,
|
||||
depth_ref,
|
||||
} => {
|
||||
work_list.push(image);
|
||||
work_list.push(sampler);
|
||||
work_list.push(coordinate);
|
||||
work_list.extend(array_index);
|
||||
if let Some(offset) = offset {
|
||||
self.trace_const_expression(offset);
|
||||
}
|
||||
use crate::SampleLevel as Sl;
|
||||
match *level {
|
||||
Sl::Auto | Sl::Zero => {}
|
||||
Sl::Exact(expr) | Sl::Bias(expr) => work_list.push(expr),
|
||||
Sl::Gradient { x, y } => work_list.extend([x, y]),
|
||||
}
|
||||
work_list.extend(depth_ref);
|
||||
}
|
||||
Ex::ImageLoad {
|
||||
image,
|
||||
coordinate,
|
||||
array_index,
|
||||
sample,
|
||||
level,
|
||||
} => {
|
||||
work_list.push(image);
|
||||
work_list.push(coordinate);
|
||||
work_list.extend(array_index);
|
||||
work_list.extend(sample);
|
||||
work_list.extend(level);
|
||||
}
|
||||
Ex::ImageQuery { image, ref query } => {
|
||||
work_list.push(image);
|
||||
use crate::ImageQuery as Iq;
|
||||
match *query {
|
||||
Iq::Size { level } => work_list.extend(level),
|
||||
Iq::NumLevels | Iq::NumLayers | Iq::NumSamples => {}
|
||||
}
|
||||
}
|
||||
Ex::Unary { op: _, expr } => work_list.push(expr),
|
||||
Ex::Binary { op: _, left, right } => work_list.extend([left, right]),
|
||||
Ex::Select {
|
||||
condition,
|
||||
accept,
|
||||
reject,
|
||||
} => work_list.extend([condition, accept, reject]),
|
||||
Ex::Derivative {
|
||||
axis: _,
|
||||
ctrl: _,
|
||||
expr,
|
||||
} => work_list.push(expr),
|
||||
Ex::Relational { fun: _, argument } => work_list.push(argument),
|
||||
Ex::Math {
|
||||
fun: _,
|
||||
arg,
|
||||
arg1,
|
||||
arg2,
|
||||
arg3,
|
||||
} => {
|
||||
work_list.push(arg);
|
||||
work_list.extend(arg1);
|
||||
work_list.extend(arg2);
|
||||
work_list.extend(arg3);
|
||||
}
|
||||
Ex::As {
|
||||
expr,
|
||||
kind: _,
|
||||
convert: _,
|
||||
} => work_list.push(expr),
|
||||
Ex::AtomicResult { ty, comparison: _ } => self.trace_type(ty),
|
||||
Ex::WorkGroupUniformLoadResult { ty } => self.trace_type(ty),
|
||||
Ex::ArrayLength(expr) => work_list.push(expr),
|
||||
Ex::RayQueryGetIntersection {
|
||||
query,
|
||||
committed: _,
|
||||
} => work_list.push(query),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn trace_type(&mut self, ty: Handle<crate::Type>) {
|
||||
let mut types_used = super::types::TypeTracer {
|
||||
types: self.types,
|
||||
types_used: self.types_used,
|
||||
};
|
||||
types_used.trace_type(ty);
|
||||
}
|
||||
|
||||
pub fn as_const_expression(&mut self) -> ExpressionTracer {
|
||||
match self.const_expressions {
|
||||
Some((ref mut exprs, ref mut exprs_used)) => ExpressionTracer {
|
||||
expressions: exprs,
|
||||
expressions_used: exprs_used,
|
||||
types: self.types,
|
||||
constants: self.constants,
|
||||
types_used: self.types_used,
|
||||
constants_used: self.constants_used,
|
||||
const_expressions: None,
|
||||
},
|
||||
None => ExpressionTracer {
|
||||
types: self.types,
|
||||
constants: self.constants,
|
||||
expressions: self.expressions,
|
||||
types_used: self.types_used,
|
||||
constants_used: self.constants_used,
|
||||
expressions_used: self.expressions_used,
|
||||
const_expressions: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fn trace_const_expression(&mut self, const_expr: Handle<crate::Expression>) {
|
||||
self.as_const_expression().trace_expression(const_expr);
|
||||
}
|
||||
}
|
||||
|
||||
impl ModuleMap {
|
||||
/// Fix up all handles in `expr`.
|
||||
///
|
||||
/// Use the expression handle remappings in `operand_map`, and all
|
||||
/// other mappings from `self`.
|
||||
pub fn adjust_expression(
|
||||
&self,
|
||||
expr: &mut crate::Expression,
|
||||
operand_map: &HandleMap<crate::Expression>,
|
||||
) {
|
||||
let adjust = |expr: &mut Handle<crate::Expression>| {
|
||||
operand_map.adjust(expr);
|
||||
};
|
||||
|
||||
use crate::Expression as Ex;
|
||||
match *expr {
|
||||
// Expressions that do not contain handles that need to be adjusted.
|
||||
Ex::Literal(_)
|
||||
| Ex::FunctionArgument(_)
|
||||
| Ex::GlobalVariable(_)
|
||||
| Ex::LocalVariable(_)
|
||||
| Ex::CallResult(_)
|
||||
| Ex::RayQueryProceedResult => {}
|
||||
|
||||
// Expressions that contain handles that need to be adjusted.
|
||||
Ex::Constant(ref mut constant) => self.constants.adjust(constant),
|
||||
Ex::ZeroValue(ref mut ty) => self.types.adjust(ty),
|
||||
Ex::Compose {
|
||||
ref mut ty,
|
||||
ref mut components,
|
||||
} => {
|
||||
self.types.adjust(ty);
|
||||
for component in components {
|
||||
adjust(component);
|
||||
}
|
||||
}
|
||||
Ex::Access {
|
||||
ref mut base,
|
||||
ref mut index,
|
||||
} => {
|
||||
adjust(base);
|
||||
adjust(index);
|
||||
}
|
||||
Ex::AccessIndex {
|
||||
ref mut base,
|
||||
index: _,
|
||||
} => adjust(base),
|
||||
Ex::Splat {
|
||||
size: _,
|
||||
ref mut value,
|
||||
} => adjust(value),
|
||||
Ex::Swizzle {
|
||||
size: _,
|
||||
ref mut vector,
|
||||
pattern: _,
|
||||
} => adjust(vector),
|
||||
Ex::Load { ref mut pointer } => adjust(pointer),
|
||||
Ex::ImageSample {
|
||||
ref mut image,
|
||||
ref mut sampler,
|
||||
gather: _,
|
||||
ref mut coordinate,
|
||||
ref mut array_index,
|
||||
ref mut offset,
|
||||
ref mut level,
|
||||
ref mut depth_ref,
|
||||
} => {
|
||||
adjust(image);
|
||||
adjust(sampler);
|
||||
adjust(coordinate);
|
||||
operand_map.adjust_option(array_index);
|
||||
// TEST: try adjusting this with plain operand_map
|
||||
if let Some(ref mut offset) = *offset {
|
||||
self.const_expressions.adjust(offset);
|
||||
}
|
||||
self.adjust_sample_level(level, operand_map);
|
||||
operand_map.adjust_option(depth_ref);
|
||||
}
|
||||
Ex::ImageLoad {
|
||||
ref mut image,
|
||||
ref mut coordinate,
|
||||
ref mut array_index,
|
||||
ref mut sample,
|
||||
ref mut level,
|
||||
} => {
|
||||
adjust(image);
|
||||
adjust(coordinate);
|
||||
operand_map.adjust_option(array_index);
|
||||
operand_map.adjust_option(sample);
|
||||
operand_map.adjust_option(level);
|
||||
}
|
||||
Ex::ImageQuery {
|
||||
ref mut image,
|
||||
ref mut query,
|
||||
} => {
|
||||
adjust(image);
|
||||
self.adjust_image_query(query, operand_map);
|
||||
}
|
||||
Ex::Unary {
|
||||
op: _,
|
||||
ref mut expr,
|
||||
} => adjust(expr),
|
||||
Ex::Binary {
|
||||
op: _,
|
||||
ref mut left,
|
||||
ref mut right,
|
||||
} => {
|
||||
adjust(left);
|
||||
adjust(right);
|
||||
}
|
||||
Ex::Select {
|
||||
ref mut condition,
|
||||
ref mut accept,
|
||||
ref mut reject,
|
||||
} => {
|
||||
adjust(condition);
|
||||
adjust(accept);
|
||||
adjust(reject);
|
||||
}
|
||||
Ex::Derivative {
|
||||
axis: _,
|
||||
ctrl: _,
|
||||
ref mut expr,
|
||||
} => adjust(expr),
|
||||
Ex::Relational {
|
||||
fun: _,
|
||||
ref mut argument,
|
||||
} => adjust(argument),
|
||||
Ex::Math {
|
||||
fun: _,
|
||||
ref mut arg,
|
||||
ref mut arg1,
|
||||
ref mut arg2,
|
||||
ref mut arg3,
|
||||
} => {
|
||||
adjust(arg);
|
||||
operand_map.adjust_option(arg1);
|
||||
operand_map.adjust_option(arg2);
|
||||
operand_map.adjust_option(arg3);
|
||||
}
|
||||
Ex::As {
|
||||
ref mut expr,
|
||||
kind: _,
|
||||
convert: _,
|
||||
} => adjust(expr),
|
||||
Ex::AtomicResult {
|
||||
ref mut ty,
|
||||
comparison: _,
|
||||
} => self.types.adjust(ty),
|
||||
Ex::WorkGroupUniformLoadResult { ref mut ty } => self.types.adjust(ty),
|
||||
Ex::ArrayLength(ref mut expr) => adjust(expr),
|
||||
Ex::RayQueryGetIntersection {
|
||||
ref mut query,
|
||||
committed: _,
|
||||
} => adjust(query),
|
||||
}
|
||||
}
|
||||
|
||||
fn adjust_sample_level(
|
||||
&self,
|
||||
level: &mut crate::SampleLevel,
|
||||
operand_map: &HandleMap<crate::Expression>,
|
||||
) {
|
||||
let adjust = |expr: &mut Handle<crate::Expression>| operand_map.adjust(expr);
|
||||
|
||||
use crate::SampleLevel as Sl;
|
||||
match *level {
|
||||
Sl::Auto | Sl::Zero => {}
|
||||
Sl::Exact(ref mut expr) => adjust(expr),
|
||||
Sl::Bias(ref mut expr) => adjust(expr),
|
||||
Sl::Gradient {
|
||||
ref mut x,
|
||||
ref mut y,
|
||||
} => {
|
||||
adjust(x);
|
||||
adjust(y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn adjust_image_query(
|
||||
&self,
|
||||
query: &mut crate::ImageQuery,
|
||||
operand_map: &HandleMap<crate::Expression>,
|
||||
) {
|
||||
use crate::ImageQuery as Iq;
|
||||
|
||||
match *query {
|
||||
Iq::Size { ref mut level } => operand_map.adjust_option(level),
|
||||
Iq::NumLevels | Iq::NumLayers | Iq::NumSamples => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
134
src/compact/functions.rs
Normal file
134
src/compact/functions.rs
Normal file
@@ -0,0 +1,134 @@
|
||||
use super::handle_set_map::HandleSet;
|
||||
use super::{FunctionMap, ModuleMap};
|
||||
use crate::arena::Handle;
|
||||
|
||||
pub(super) struct FunctionTracer<'a> {
|
||||
pub(super) module: &'a crate::Module,
|
||||
pub(super) function: &'a crate::Function,
|
||||
|
||||
pub(super) types_used: &'a mut HandleSet<crate::Type>,
|
||||
pub(super) constants_used: &'a mut HandleSet<crate::Constant>,
|
||||
pub(super) const_expressions_used: &'a mut HandleSet<crate::Expression>,
|
||||
|
||||
/// Function-local expressions used.
|
||||
pub(super) expressions_used: HandleSet<crate::Expression>,
|
||||
}
|
||||
|
||||
impl<'a> FunctionTracer<'a> {
|
||||
pub fn trace(&mut self) {
|
||||
for argument in self.function.arguments.iter() {
|
||||
self.trace_type(argument.ty);
|
||||
}
|
||||
|
||||
if let Some(ref result) = self.function.result {
|
||||
self.trace_type(result.ty);
|
||||
}
|
||||
|
||||
for (_, local) in self.function.local_variables.iter() {
|
||||
self.trace_type(local.ty);
|
||||
if let Some(init) = local.init {
|
||||
// TEST: try changing this to trace_expression
|
||||
self.trace_const_expression(init);
|
||||
}
|
||||
}
|
||||
|
||||
// Treat named expressions as alive, for the sake of our test suite,
|
||||
// which uses `let blah = expr;` to exercise lots of things.
|
||||
for (value, _name) in &self.function.named_expressions {
|
||||
self.trace_expression(*value);
|
||||
}
|
||||
|
||||
self.trace_block(&self.function.body);
|
||||
}
|
||||
|
||||
pub fn trace_type(&mut self, ty: Handle<crate::Type>) {
|
||||
self.as_type().trace_type(ty)
|
||||
}
|
||||
|
||||
pub fn trace_expression(&mut self, expr: Handle<crate::Expression>) {
|
||||
self.as_expression().trace_expression(expr);
|
||||
}
|
||||
|
||||
pub fn trace_const_expression(&mut self, expr: Handle<crate::Expression>) {
|
||||
self.as_expression()
|
||||
.as_const_expression()
|
||||
.trace_expression(expr);
|
||||
}
|
||||
|
||||
/*
|
||||
pub fn trace_const_expression(&mut self, const_expr: Handle<crate::Expression>) {
|
||||
self.as_expression().as_const_expression().trace_expression(const_expr);
|
||||
}
|
||||
*/
|
||||
|
||||
fn as_type(&mut self) -> super::types::TypeTracer {
|
||||
super::types::TypeTracer {
|
||||
types: &self.module.types,
|
||||
types_used: self.types_used,
|
||||
}
|
||||
}
|
||||
|
||||
fn as_expression(&mut self) -> super::expressions::ExpressionTracer {
|
||||
super::expressions::ExpressionTracer {
|
||||
types: &self.module.types,
|
||||
constants: &self.module.constants,
|
||||
expressions: &self.function.expressions,
|
||||
|
||||
types_used: self.types_used,
|
||||
constants_used: self.constants_used,
|
||||
expressions_used: &mut self.expressions_used,
|
||||
const_expressions: Some((
|
||||
&self.module.const_expressions,
|
||||
&mut self.const_expressions_used,
|
||||
)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FunctionMap {
|
||||
pub fn compact(
|
||||
&self,
|
||||
function: &mut crate::Function,
|
||||
module_map: &ModuleMap,
|
||||
reuse: &mut crate::NamedExpressions,
|
||||
) {
|
||||
assert!(reuse.is_empty());
|
||||
|
||||
for argument in function.arguments.iter_mut() {
|
||||
module_map.types.adjust(&mut argument.ty);
|
||||
}
|
||||
|
||||
if let Some(ref mut result) = function.result {
|
||||
module_map.types.adjust(&mut result.ty);
|
||||
}
|
||||
|
||||
for (_, local) in function.local_variables.iter_mut() {
|
||||
log::trace!("adjusting local variable {:?}", local.name);
|
||||
module_map.types.adjust(&mut local.ty);
|
||||
if let Some(ref mut init) = local.init {
|
||||
module_map.const_expressions.adjust(init);
|
||||
}
|
||||
}
|
||||
|
||||
// Drop unused expressions, reusing existing storage.
|
||||
function.expressions.retain_mut(|handle, expr| {
|
||||
if self.expressions.used(handle) {
|
||||
module_map.adjust_expression(expr, &self.expressions);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
});
|
||||
|
||||
// Adjust named expressions.
|
||||
for (mut handle, name) in function.named_expressions.drain(..) {
|
||||
self.expressions.adjust(&mut handle);
|
||||
reuse.insert(handle, name);
|
||||
}
|
||||
std::mem::swap(&mut function.named_expressions, reuse);
|
||||
assert!(reuse.is_empty());
|
||||
|
||||
// Adjust statements.
|
||||
self.adjust_block(&mut function.body);
|
||||
}
|
||||
}
|
||||
125
src/compact/handle_set_map.rs
Normal file
125
src/compact/handle_set_map.rs
Normal file
@@ -0,0 +1,125 @@
|
||||
use crate::arena::{Arena, Handle, UniqueArena};
|
||||
|
||||
type Index = std::num::NonZeroU32;
|
||||
|
||||
/// A set of `Handle<T>` values.
|
||||
pub struct HandleSet<T> {
|
||||
/// Bound on zero-based indexes of handles stored in this set.
|
||||
len: usize,
|
||||
|
||||
/// `members[i]` is true if the handle with zero-based index `i`
|
||||
/// is a member.
|
||||
members: bit_set::BitSet,
|
||||
|
||||
/// This type is indexed by values of type `T`.
|
||||
as_keys: std::marker::PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T> HandleSet<T> {
|
||||
pub fn for_arena(arena: &impl ArenaType<T>) -> Self {
|
||||
let len = arena.len();
|
||||
Self {
|
||||
len,
|
||||
members: bit_set::BitSet::with_capacity(len),
|
||||
as_keys: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
/// Add `handle` to the set.
|
||||
///
|
||||
/// Return `true` if the handle was not already in the set. In
|
||||
/// other words, return true if it was newly inserted.
|
||||
pub fn insert(&mut self, handle: Handle<T>) -> bool {
|
||||
// Note that, oddly, `Handle::index` does not return a 1-based
|
||||
// `Index`, but rather a zero-based `usize`.
|
||||
self.members.insert(handle.index())
|
||||
}
|
||||
}
|
||||
|
||||
pub trait ArenaType<T> {
|
||||
fn len(&self) -> usize;
|
||||
}
|
||||
|
||||
impl<T> ArenaType<T> for Arena<T> {
|
||||
fn len(&self) -> usize {
|
||||
self.len()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: std::hash::Hash + Eq> ArenaType<T> for UniqueArena<T> {
|
||||
fn len(&self) -> usize {
|
||||
self.len()
|
||||
}
|
||||
}
|
||||
|
||||
/// A map from old handle indices to new, compressed handle indices.
|
||||
pub struct HandleMap<T> {
|
||||
/// The indices assigned to handles in the compacted module.
|
||||
///
|
||||
/// If `new_index[i]` is `Some(n)`, then `n` is the 1-based
|
||||
/// `Index` of the compacted `Handle` corresponding to the
|
||||
/// pre-compacted `Handle` whose zero-based index is `i`. ("Clear
|
||||
/// as mud.")
|
||||
new_index: Vec<Option<Index>>,
|
||||
|
||||
/// This type is indexed by values of type `T`.
|
||||
as_keys: std::marker::PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T: 'static> HandleMap<T> {
|
||||
pub fn from_set(set: HandleSet<T>) -> Self {
|
||||
let mut next_index = Index::new(1).unwrap();
|
||||
Self {
|
||||
new_index: (0..set.len)
|
||||
.map(|zero_based_index| {
|
||||
if set.members.contains(zero_based_index) {
|
||||
// This handle will be retained in the compacted version,
|
||||
// so assign it a new index.
|
||||
let this = next_index;
|
||||
next_index = next_index.checked_add(1).unwrap();
|
||||
Some(this)
|
||||
} else {
|
||||
// This handle will be omitted in the compacted version.
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
as_keys: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
/// Return true if `old` is used in the compacted module.
|
||||
pub fn used(&self, old: Handle<T>) -> bool {
|
||||
self.new_index[old.index()].is_some()
|
||||
}
|
||||
|
||||
/// Return the counterpart to `old` in the compacted module.
|
||||
///
|
||||
/// If we thought `old` wouldn't be used in the compacted module, return
|
||||
/// `None`.
|
||||
pub fn try_adjust(&self, old: Handle<T>) -> Option<Handle<T>> {
|
||||
log::trace!(
|
||||
"adjusting {} handle [{}] -> [{:?}]",
|
||||
std::any::type_name::<T>(),
|
||||
old.index() + 1,
|
||||
self.new_index[old.index()]
|
||||
);
|
||||
// Note that `Handle::index` returns a zero-based index,
|
||||
// but `Handle::new` accepts a 1-based `Index`.
|
||||
self.new_index[old.index()].map(Handle::new)
|
||||
}
|
||||
|
||||
/// Return the counterpart to `old` in the compacted module.
|
||||
///
|
||||
/// If we thought `old` wouldn't be used in the compacted module, panic.
|
||||
pub fn adjust(&self, handle: &mut Handle<T>) {
|
||||
*handle = self.try_adjust(*handle).unwrap();
|
||||
}
|
||||
|
||||
/// Like `adjust`, but for optional handles.
|
||||
pub fn adjust_option(&self, handle: &mut Option<Handle<T>>) {
|
||||
if let Some(ref mut handle) = *handle {
|
||||
self.adjust(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
286
src/compact/mod.rs
Normal file
286
src/compact/mod.rs
Normal file
@@ -0,0 +1,286 @@
|
||||
mod expressions;
|
||||
mod functions;
|
||||
mod handle_set_map;
|
||||
mod statements;
|
||||
mod types;
|
||||
|
||||
use crate::{arena, compact::functions::FunctionTracer};
|
||||
use handle_set_map::{HandleMap, HandleSet};
|
||||
|
||||
/// Remove unused types, expressions, and constants from `module`.
|
||||
///
|
||||
/// Assuming that all globals, named constants, special types,
|
||||
/// functions and entry points in `module` are used, determine which
|
||||
/// types, constants, and expressions (both function-local and global
|
||||
/// constant expressions) are actually used, and remove the rest,
|
||||
/// adjusting all handles as necessary. The result should be a module
|
||||
/// functionally identical to the original.
|
||||
///
|
||||
/// This may be useful to apply to modules generated in the snapshot
|
||||
/// tests. Our backends often generate temporary names based on handle
|
||||
/// indices, which means that adding or removing unused arena entries
|
||||
/// can affect the output even though they have no semantic effect.
|
||||
/// Such meaningless changes add noise to snapshot diffs, making
|
||||
/// accurate patch review difficult. Compacting the modules before
|
||||
/// generating snapshots makes the output independent of unused arena
|
||||
/// entries.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// If `module` has not passed validation, this may panic.
|
||||
pub fn compact(module: &mut crate::Module) {
|
||||
let mut module_tracer = ModuleTracer::new(module);
|
||||
|
||||
// We treat all globals as used by definition.
|
||||
log::trace!("tracing global variables");
|
||||
{
|
||||
for (_, global) in module.global_variables.iter() {
|
||||
log::trace!("tracing global {:?}", global.name);
|
||||
module_tracer.as_type().trace_type(global.ty);
|
||||
if let Some(init) = global.init {
|
||||
module_tracer.as_const_expression().trace_expression(init);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// We treat all special types as used by definition.
|
||||
module_tracer.trace_special_types(&module.special_types);
|
||||
|
||||
// We treat all named constants as used by definition.
|
||||
for (handle, constant) in module.constants.iter() {
|
||||
if constant.name.is_some() {
|
||||
module_tracer.constants_used.insert(handle);
|
||||
module_tracer.as_type().trace_type(constant.ty);
|
||||
module_tracer
|
||||
.as_const_expression()
|
||||
.trace_expression(constant.init);
|
||||
}
|
||||
}
|
||||
|
||||
// We assume that all functions are used.
|
||||
//
|
||||
// Observe which types, constant expressions, constants, and
|
||||
// expressions each function uses, and produce maps from
|
||||
// pre-compaction to post-compaction handles.
|
||||
log::trace!("tracing functions");
|
||||
let function_maps: Vec<FunctionMap> = module
|
||||
.functions
|
||||
.iter()
|
||||
.map(|(_, f)| {
|
||||
log::trace!("tracing function {:?}", f.name);
|
||||
let mut function_tracer = module_tracer.enter_function(f);
|
||||
function_tracer.trace();
|
||||
FunctionMap::from(function_tracer)
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Similiarly, observe what each entry point actually uses.
|
||||
log::trace!("tracing entry points");
|
||||
let entry_point_maps: Vec<FunctionMap> = module
|
||||
.entry_points
|
||||
.iter()
|
||||
.map(|e| {
|
||||
log::trace!("tracing entry point {:?}", e.function.name);
|
||||
let mut used = module_tracer.enter_function(&e.function);
|
||||
used.trace();
|
||||
FunctionMap::from(used)
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Now that we know what is used and what is never touched,
|
||||
// produce maps from the `Handle`s that appear in `module` now to
|
||||
// the corresponding `Handle`s that will refer to the same items
|
||||
// in the compacted module.
|
||||
let module_map = ModuleMap::from(module_tracer);
|
||||
|
||||
// Drop unused types from the type arena.
|
||||
//
|
||||
// `IndexSet`s don't have an underlying Vec<T> that we can steal, compact in
|
||||
// place, and then rebuild the `IndexSet` from. So we have to rebuild the
|
||||
// type arena from scratch.
|
||||
log::trace!("compacting types");
|
||||
let mut new_types = arena::UniqueArena::new();
|
||||
for (old_handle, mut ty, span) in module.types.drain_all() {
|
||||
if let Some(expected_new_handle) = module_map.types.try_adjust(old_handle) {
|
||||
module_map.adjust_type(&mut ty);
|
||||
let actual_new_handle = new_types.insert(ty, span);
|
||||
assert_eq!(actual_new_handle, expected_new_handle);
|
||||
}
|
||||
}
|
||||
module.types = new_types;
|
||||
log::trace!("adjusting special types");
|
||||
module_map.adjust_special_types(&mut module.special_types);
|
||||
|
||||
// Drop unused constant expressions, reusing existing storage.
|
||||
log::trace!("adjusting constant expressions");
|
||||
module.const_expressions.retain_mut(|handle, expr| {
|
||||
if module_map.const_expressions.used(handle) {
|
||||
module_map.adjust_expression(expr, &module_map.const_expressions);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
});
|
||||
|
||||
// Drop unused constants in place, reusing existing storage.
|
||||
log::trace!("adjusting constants");
|
||||
module.constants.retain_mut(|handle, constant| {
|
||||
if module_map.constants.used(handle) {
|
||||
module_map.types.adjust(&mut constant.ty);
|
||||
module_map.const_expressions.adjust(&mut constant.init);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
});
|
||||
|
||||
// Adjust global variables' types and initializers.
|
||||
log::trace!("adjusting global variables");
|
||||
for (_, global) in module.global_variables.iter_mut() {
|
||||
log::trace!("adjusting global {:?}", global.name);
|
||||
module_map.types.adjust(&mut global.ty);
|
||||
if let Some(ref mut init) = global.init {
|
||||
module_map.const_expressions.adjust(init);
|
||||
}
|
||||
}
|
||||
|
||||
// Temporary storage to help us reuse allocations of existing
|
||||
// named expression tables.
|
||||
let mut reused_named_expressions = crate::NamedExpressions::default();
|
||||
|
||||
// Compact each function.
|
||||
for ((_, function), map) in module.functions.iter_mut().zip(function_maps.iter()) {
|
||||
log::trace!("compacting function {:?}", function.name);
|
||||
map.compact(function, &module_map, &mut reused_named_expressions);
|
||||
}
|
||||
|
||||
// Compact each entry point.
|
||||
for (entry, map) in module.entry_points.iter_mut().zip(entry_point_maps.iter()) {
|
||||
log::trace!("compacting entry point {:?}", entry.function.name);
|
||||
map.compact(
|
||||
&mut entry.function,
|
||||
&module_map,
|
||||
&mut reused_named_expressions,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
struct ModuleTracer<'module> {
|
||||
module: &'module crate::Module,
|
||||
types_used: HandleSet<crate::Type>,
|
||||
constants_used: HandleSet<crate::Constant>,
|
||||
const_expressions_used: HandleSet<crate::Expression>,
|
||||
}
|
||||
|
||||
impl<'module> ModuleTracer<'module> {
|
||||
fn new(module: &'module crate::Module) -> Self {
|
||||
Self {
|
||||
module,
|
||||
types_used: HandleSet::for_arena(&module.types),
|
||||
constants_used: HandleSet::for_arena(&module.constants),
|
||||
const_expressions_used: HandleSet::for_arena(&module.const_expressions),
|
||||
}
|
||||
}
|
||||
|
||||
fn trace_special_types(&mut self, special_types: &crate::SpecialTypes) {
|
||||
let crate::SpecialTypes {
|
||||
ref ray_desc,
|
||||
ref ray_intersection,
|
||||
ref predeclared_types,
|
||||
} = *special_types;
|
||||
|
||||
let mut type_tracer = self.as_type();
|
||||
if let Some(ray_desc) = *ray_desc {
|
||||
type_tracer.trace_type(ray_desc);
|
||||
}
|
||||
if let Some(ray_intersection) = *ray_intersection {
|
||||
type_tracer.trace_type(ray_intersection);
|
||||
}
|
||||
for (_, &handle) in predeclared_types {
|
||||
type_tracer.trace_type(handle);
|
||||
}
|
||||
}
|
||||
|
||||
fn as_type(&mut self) -> types::TypeTracer {
|
||||
types::TypeTracer {
|
||||
types: &self.module.types,
|
||||
types_used: &mut self.types_used,
|
||||
}
|
||||
}
|
||||
|
||||
fn as_const_expression(&mut self) -> expressions::ExpressionTracer {
|
||||
expressions::ExpressionTracer {
|
||||
types: &self.module.types,
|
||||
constants: &self.module.constants,
|
||||
expressions: &self.module.const_expressions,
|
||||
types_used: &mut self.types_used,
|
||||
constants_used: &mut self.constants_used,
|
||||
expressions_used: &mut self.const_expressions_used,
|
||||
const_expressions: None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn enter_function<'tracer>(
|
||||
&'tracer mut self,
|
||||
function: &'tracer crate::Function,
|
||||
) -> FunctionTracer<'tracer> {
|
||||
FunctionTracer {
|
||||
module: self.module,
|
||||
function,
|
||||
|
||||
types_used: &mut self.types_used,
|
||||
constants_used: &mut self.constants_used,
|
||||
const_expressions_used: &mut self.const_expressions_used,
|
||||
expressions_used: HandleSet::for_arena(&function.expressions),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ModuleMap {
|
||||
types: HandleMap<crate::Type>,
|
||||
constants: HandleMap<crate::Constant>,
|
||||
const_expressions: HandleMap<crate::Expression>,
|
||||
}
|
||||
|
||||
impl From<ModuleTracer<'_>> for ModuleMap {
|
||||
fn from(used: ModuleTracer) -> Self {
|
||||
ModuleMap {
|
||||
types: HandleMap::from_set(used.types_used),
|
||||
constants: HandleMap::from_set(used.constants_used),
|
||||
const_expressions: HandleMap::from_set(used.const_expressions_used),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ModuleMap {
|
||||
fn adjust_special_types(&self, special: &mut crate::SpecialTypes) {
|
||||
let crate::SpecialTypes {
|
||||
ref mut ray_desc,
|
||||
ref mut ray_intersection,
|
||||
ref mut predeclared_types,
|
||||
} = *special;
|
||||
|
||||
if let Some(ref mut ray_desc) = *ray_desc {
|
||||
self.types.adjust(ray_desc);
|
||||
}
|
||||
if let Some(ref mut ray_intersection) = *ray_intersection {
|
||||
self.types.adjust(ray_intersection);
|
||||
}
|
||||
|
||||
for handle in predeclared_types.values_mut() {
|
||||
self.types.adjust(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct FunctionMap {
|
||||
expressions: HandleMap<crate::Expression>,
|
||||
}
|
||||
|
||||
impl From<FunctionTracer<'_>> for FunctionMap {
|
||||
fn from(used: FunctionTracer) -> Self {
|
||||
FunctionMap {
|
||||
expressions: HandleMap::from_set(used.expressions_used),
|
||||
}
|
||||
}
|
||||
}
|
||||
302
src/compact/statements.rs
Normal file
302
src/compact/statements.rs
Normal file
@@ -0,0 +1,302 @@
|
||||
use super::functions::FunctionTracer;
|
||||
use super::FunctionMap;
|
||||
use crate::arena::Handle;
|
||||
|
||||
impl FunctionTracer<'_> {
|
||||
pub fn trace_block(&mut self, block: &[crate::Statement]) {
|
||||
let mut worklist: Vec<&[crate::Statement]> = vec![block];
|
||||
while let Some(last) = worklist.pop() {
|
||||
for stmt in last {
|
||||
use crate::Statement as St;
|
||||
match *stmt {
|
||||
St::Emit(ref range) => {
|
||||
for expr in range.clone() {
|
||||
log::trace!("trace emitted expression {:?}", expr);
|
||||
self.trace_expression(expr);
|
||||
}
|
||||
}
|
||||
St::Block(ref block) => worklist.push(block),
|
||||
St::If {
|
||||
condition,
|
||||
ref accept,
|
||||
ref reject,
|
||||
} => {
|
||||
self.trace_expression(condition);
|
||||
worklist.push(accept);
|
||||
worklist.push(reject);
|
||||
}
|
||||
St::Switch {
|
||||
selector,
|
||||
ref cases,
|
||||
} => {
|
||||
self.trace_expression(selector);
|
||||
for case in cases {
|
||||
worklist.push(&case.body);
|
||||
}
|
||||
}
|
||||
St::Loop {
|
||||
ref body,
|
||||
ref continuing,
|
||||
break_if,
|
||||
} => {
|
||||
if let Some(break_if) = break_if {
|
||||
self.trace_expression(break_if);
|
||||
}
|
||||
worklist.push(body);
|
||||
worklist.push(continuing);
|
||||
}
|
||||
St::Return { value: Some(value) } => self.trace_expression(value),
|
||||
St::Store { pointer, value } => {
|
||||
self.trace_expression(pointer);
|
||||
self.trace_expression(value);
|
||||
}
|
||||
St::ImageStore {
|
||||
image,
|
||||
coordinate,
|
||||
array_index,
|
||||
value,
|
||||
} => {
|
||||
self.trace_expression(image);
|
||||
self.trace_expression(coordinate);
|
||||
if let Some(array_index) = array_index {
|
||||
self.trace_expression(array_index);
|
||||
}
|
||||
self.trace_expression(value);
|
||||
}
|
||||
St::Atomic {
|
||||
pointer,
|
||||
ref fun,
|
||||
value,
|
||||
result,
|
||||
} => {
|
||||
self.trace_expression(pointer);
|
||||
self.trace_atomic_function(fun);
|
||||
self.trace_expression(value);
|
||||
self.trace_expression(result);
|
||||
}
|
||||
St::WorkGroupUniformLoad { pointer, result } => {
|
||||
self.trace_expression(pointer);
|
||||
self.trace_expression(result);
|
||||
}
|
||||
St::Call {
|
||||
function: _,
|
||||
ref arguments,
|
||||
result,
|
||||
} => {
|
||||
for expr in arguments {
|
||||
self.trace_expression(*expr);
|
||||
}
|
||||
if let Some(result) = result {
|
||||
self.trace_expression(result);
|
||||
}
|
||||
}
|
||||
St::RayQuery { query, ref fun } => {
|
||||
self.trace_expression(query);
|
||||
self.trace_ray_query_function(fun);
|
||||
}
|
||||
|
||||
// Trivial statements.
|
||||
St::Break
|
||||
| St::Continue
|
||||
| St::Kill
|
||||
| St::Barrier(_)
|
||||
| St::Return { value: None } => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn trace_atomic_function(&mut self, fun: &crate::AtomicFunction) {
|
||||
use crate::AtomicFunction as Af;
|
||||
match *fun {
|
||||
Af::Exchange {
|
||||
compare: Some(expr),
|
||||
} => self.trace_expression(expr),
|
||||
Af::Exchange { compare: None }
|
||||
| Af::Add
|
||||
| Af::Subtract
|
||||
| Af::And
|
||||
| Af::ExclusiveOr
|
||||
| Af::InclusiveOr
|
||||
| Af::Min
|
||||
| Af::Max => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn trace_ray_query_function(&mut self, fun: &crate::RayQueryFunction) {
|
||||
use crate::RayQueryFunction as Qf;
|
||||
match *fun {
|
||||
Qf::Initialize {
|
||||
acceleration_structure,
|
||||
descriptor,
|
||||
} => {
|
||||
self.trace_expression(acceleration_structure);
|
||||
self.trace_expression(descriptor);
|
||||
}
|
||||
Qf::Proceed { result } => self.trace_expression(result),
|
||||
Qf::Terminate => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl FunctionMap {
|
||||
pub fn adjust_block(&self, block: &mut [crate::Statement]) {
|
||||
let mut worklist: Vec<&mut [crate::Statement]> = vec![block];
|
||||
let adjust = |handle: &mut Handle<crate::Expression>| {
|
||||
self.expressions.adjust(handle);
|
||||
};
|
||||
while let Some(last) = worklist.pop() {
|
||||
for stmt in last {
|
||||
use crate::Statement as St;
|
||||
match *stmt {
|
||||
St::Emit(ref mut range) => {
|
||||
// Fortunately, compaction doesn't arbitrarily scramble
|
||||
// the expressions in the arena, but instead preserves
|
||||
// the order of the elements while squeezing out unused
|
||||
// ones. That means that a contiguous range in the
|
||||
// pre-compacted arena always maps to a contiguous range
|
||||
// in the post-compacted arena. So we just need to
|
||||
// adjust the endpoints.
|
||||
let (mut first, mut last) = range.first_and_last().unwrap();
|
||||
self.expressions.adjust(&mut first);
|
||||
self.expressions.adjust(&mut last);
|
||||
*range = crate::arena::Range::new_from_bounds(first, last);
|
||||
}
|
||||
St::Block(ref mut block) => worklist.push(block),
|
||||
St::If {
|
||||
ref mut condition,
|
||||
ref mut accept,
|
||||
ref mut reject,
|
||||
} => {
|
||||
adjust(condition);
|
||||
worklist.push(accept);
|
||||
worklist.push(reject);
|
||||
}
|
||||
St::Switch {
|
||||
ref mut selector,
|
||||
ref mut cases,
|
||||
} => {
|
||||
adjust(selector);
|
||||
for case in cases {
|
||||
worklist.push(&mut case.body);
|
||||
}
|
||||
}
|
||||
St::Loop {
|
||||
ref mut body,
|
||||
ref mut continuing,
|
||||
ref mut break_if,
|
||||
} => {
|
||||
if let Some(ref mut break_if) = *break_if {
|
||||
adjust(break_if);
|
||||
}
|
||||
worklist.push(body);
|
||||
worklist.push(continuing);
|
||||
}
|
||||
St::Return {
|
||||
value: Some(ref mut value),
|
||||
} => adjust(value),
|
||||
St::Store {
|
||||
ref mut pointer,
|
||||
ref mut value,
|
||||
} => {
|
||||
adjust(pointer);
|
||||
adjust(value);
|
||||
}
|
||||
St::ImageStore {
|
||||
ref mut image,
|
||||
ref mut coordinate,
|
||||
ref mut array_index,
|
||||
ref mut value,
|
||||
} => {
|
||||
adjust(image);
|
||||
adjust(coordinate);
|
||||
if let Some(ref mut array_index) = *array_index {
|
||||
adjust(array_index);
|
||||
}
|
||||
adjust(value);
|
||||
}
|
||||
St::Atomic {
|
||||
ref mut pointer,
|
||||
ref mut fun,
|
||||
ref mut value,
|
||||
ref mut result,
|
||||
} => {
|
||||
adjust(pointer);
|
||||
self.adjust_atomic_function(fun);
|
||||
adjust(value);
|
||||
adjust(result);
|
||||
}
|
||||
St::WorkGroupUniformLoad {
|
||||
ref mut pointer,
|
||||
ref mut result,
|
||||
} => {
|
||||
adjust(pointer);
|
||||
adjust(result);
|
||||
}
|
||||
St::Call {
|
||||
function: _,
|
||||
ref mut arguments,
|
||||
ref mut result,
|
||||
} => {
|
||||
for expr in arguments {
|
||||
adjust(expr);
|
||||
}
|
||||
if let Some(ref mut result) = *result {
|
||||
adjust(result);
|
||||
}
|
||||
}
|
||||
St::RayQuery {
|
||||
ref mut query,
|
||||
ref mut fun,
|
||||
} => {
|
||||
adjust(query);
|
||||
self.adjust_ray_query_function(fun);
|
||||
}
|
||||
|
||||
// Trivial statements.
|
||||
St::Break
|
||||
| St::Continue
|
||||
| St::Kill
|
||||
| St::Barrier(_)
|
||||
| St::Return { value: None } => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn adjust_atomic_function(&self, fun: &mut crate::AtomicFunction) {
|
||||
use crate::AtomicFunction as Af;
|
||||
match *fun {
|
||||
Af::Exchange {
|
||||
compare: Some(ref mut expr),
|
||||
} => {
|
||||
self.expressions.adjust(expr);
|
||||
}
|
||||
Af::Exchange { compare: None }
|
||||
| Af::Add
|
||||
| Af::Subtract
|
||||
| Af::And
|
||||
| Af::ExclusiveOr
|
||||
| Af::InclusiveOr
|
||||
| Af::Min
|
||||
| Af::Max => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn adjust_ray_query_function(&self, fun: &mut crate::RayQueryFunction) {
|
||||
use crate::RayQueryFunction as Qf;
|
||||
match *fun {
|
||||
Qf::Initialize {
|
||||
ref mut acceleration_structure,
|
||||
ref mut descriptor,
|
||||
} => {
|
||||
self.expressions.adjust(acceleration_structure);
|
||||
self.expressions.adjust(descriptor);
|
||||
}
|
||||
Qf::Proceed { ref mut result } => {
|
||||
self.expressions.adjust(result);
|
||||
}
|
||||
Qf::Terminate => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
93
src/compact/types.rs
Normal file
93
src/compact/types.rs
Normal file
@@ -0,0 +1,93 @@
|
||||
use super::{HandleSet, ModuleMap};
|
||||
use crate::{Handle, UniqueArena};
|
||||
|
||||
pub struct TypeTracer<'a> {
|
||||
pub types: &'a UniqueArena<crate::Type>,
|
||||
pub types_used: &'a mut HandleSet<crate::Type>,
|
||||
}
|
||||
|
||||
impl<'a> TypeTracer<'a> {
|
||||
pub fn trace_type(&mut self, ty: Handle<crate::Type>) {
|
||||
let mut work_list = vec![ty];
|
||||
while let Some(ty) = work_list.pop() {
|
||||
// If we've already seen this type, no need to traverse further.
|
||||
if !self.types_used.insert(ty) {
|
||||
continue;
|
||||
}
|
||||
|
||||
use crate::TypeInner as Ti;
|
||||
match self.types[ty].inner {
|
||||
// Types that do not contain handles.
|
||||
Ti::Scalar { .. }
|
||||
| Ti::Vector { .. }
|
||||
| Ti::Matrix { .. }
|
||||
| Ti::Atomic { .. }
|
||||
| Ti::ValuePointer { .. }
|
||||
| Ti::Image { .. }
|
||||
| Ti::Sampler { .. }
|
||||
| Ti::AccelerationStructure
|
||||
| Ti::RayQuery => {}
|
||||
|
||||
// Types that do contain handles.
|
||||
Ti::Pointer { base, space: _ } => work_list.push(base),
|
||||
Ti::Array {
|
||||
base,
|
||||
size: _,
|
||||
stride: _,
|
||||
} => work_list.push(base),
|
||||
Ti::Struct {
|
||||
ref members,
|
||||
span: _,
|
||||
} => {
|
||||
work_list.extend(members.iter().map(|m| m.ty));
|
||||
}
|
||||
Ti::BindingArray { base, size: _ } => work_list.push(base),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ModuleMap {
|
||||
pub fn adjust_type(&self, ty: &mut crate::Type) {
|
||||
let adjust = |ty: &mut Handle<crate::Type>| self.types.adjust(ty);
|
||||
|
||||
use crate::TypeInner as Ti;
|
||||
match ty.inner {
|
||||
// Types that do not contain handles.
|
||||
Ti::Scalar { .. }
|
||||
| Ti::Vector { .. }
|
||||
| Ti::Matrix { .. }
|
||||
| Ti::Atomic { .. }
|
||||
| Ti::ValuePointer { .. }
|
||||
| Ti::Image { .. }
|
||||
| Ti::Sampler { .. }
|
||||
| Ti::AccelerationStructure
|
||||
| Ti::RayQuery => {}
|
||||
|
||||
// Types that do contain handles.
|
||||
Ti::Pointer {
|
||||
ref mut base,
|
||||
space: _,
|
||||
} => adjust(base),
|
||||
Ti::Array {
|
||||
ref mut base,
|
||||
size: _,
|
||||
stride: _,
|
||||
} => adjust(base),
|
||||
Ti::Struct {
|
||||
ref mut members,
|
||||
span: _,
|
||||
} => {
|
||||
for member in members {
|
||||
self.types.adjust(&mut member.ty);
|
||||
}
|
||||
}
|
||||
Ti::BindingArray {
|
||||
ref mut base,
|
||||
size: _,
|
||||
} => {
|
||||
adjust(base);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -279,6 +279,8 @@ An override expression can be evaluated at pipeline creation time.
|
||||
mod arena;
|
||||
pub mod back;
|
||||
mod block;
|
||||
#[cfg(feature = "compact")]
|
||||
pub mod compact;
|
||||
pub mod front;
|
||||
pub mod keywords;
|
||||
pub mod proc;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -41,31 +41,31 @@ void test_matrix_within_struct_accesses() {
|
||||
idx = (_e3 - 1);
|
||||
mat3x2 l0_ = _group_0_binding_1_vs.m;
|
||||
vec2 l1_ = _group_0_binding_1_vs.m[0];
|
||||
int _e15 = idx;
|
||||
vec2 l2_ = _group_0_binding_1_vs.m[_e15];
|
||||
int _e14 = idx;
|
||||
vec2 l2_ = _group_0_binding_1_vs.m[_e14];
|
||||
float l3_ = _group_0_binding_1_vs.m[0][1];
|
||||
int _e29 = idx;
|
||||
float l4_ = _group_0_binding_1_vs.m[0][_e29];
|
||||
int _e34 = idx;
|
||||
float l5_ = _group_0_binding_1_vs.m[_e34][1];
|
||||
int _e41 = idx;
|
||||
int _e43 = idx;
|
||||
float l6_ = _group_0_binding_1_vs.m[_e41][_e43];
|
||||
int _e25 = idx;
|
||||
float l4_ = _group_0_binding_1_vs.m[0][_e25];
|
||||
int _e30 = idx;
|
||||
float l5_ = _group_0_binding_1_vs.m[_e30][1];
|
||||
int _e36 = idx;
|
||||
int _e38 = idx;
|
||||
float l6_ = _group_0_binding_1_vs.m[_e36][_e38];
|
||||
t = Baz(mat3x2(vec2(1.0), vec2(2.0), vec2(3.0)));
|
||||
int _e56 = idx;
|
||||
idx = (_e56 + 1);
|
||||
int _e51 = idx;
|
||||
idx = (_e51 + 1);
|
||||
t.m = mat3x2(vec2(6.0), vec2(5.0), vec2(4.0));
|
||||
t.m[0] = vec2(9.0);
|
||||
int _e72 = idx;
|
||||
t.m[_e72] = vec2(90.0);
|
||||
int _e66 = idx;
|
||||
t.m[_e66] = vec2(90.0);
|
||||
t.m[0][1] = 10.0;
|
||||
int _e76 = idx;
|
||||
t.m[0][_e76] = 20.0;
|
||||
int _e80 = idx;
|
||||
t.m[_e80][1] = 30.0;
|
||||
int _e85 = idx;
|
||||
t.m[0][_e85] = 20.0;
|
||||
int _e89 = idx;
|
||||
t.m[_e89][1] = 30.0;
|
||||
int _e95 = idx;
|
||||
int _e97 = idx;
|
||||
t.m[_e95][_e97] = 40.0;
|
||||
int _e87 = idx;
|
||||
t.m[_e85][_e87] = 40.0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -78,32 +78,32 @@ void test_matrix_within_array_within_struct_accesses() {
|
||||
mat4x2 l0_1[2] = _group_0_binding_3_vs.am;
|
||||
mat4x2 l1_1 = _group_0_binding_3_vs.am[0];
|
||||
vec2 l2_1 = _group_0_binding_3_vs.am[0][0];
|
||||
int _e24 = idx_1;
|
||||
vec2 l3_1 = _group_0_binding_3_vs.am[0][_e24];
|
||||
int _e20 = idx_1;
|
||||
vec2 l3_1 = _group_0_binding_3_vs.am[0][_e20];
|
||||
float l4_1 = _group_0_binding_3_vs.am[0][0][1];
|
||||
int _e42 = idx_1;
|
||||
float l5_1 = _group_0_binding_3_vs.am[0][0][_e42];
|
||||
int _e49 = idx_1;
|
||||
float l6_1 = _group_0_binding_3_vs.am[0][_e49][1];
|
||||
int _e58 = idx_1;
|
||||
int _e60 = idx_1;
|
||||
float l7_ = _group_0_binding_3_vs.am[0][_e58][_e60];
|
||||
int _e33 = idx_1;
|
||||
float l5_1 = _group_0_binding_3_vs.am[0][0][_e33];
|
||||
int _e39 = idx_1;
|
||||
float l6_1 = _group_0_binding_3_vs.am[0][_e39][1];
|
||||
int _e46 = idx_1;
|
||||
int _e48 = idx_1;
|
||||
float l7_ = _group_0_binding_3_vs.am[0][_e46][_e48];
|
||||
t_1 = MatCx2InArray(mat4x2[2](mat4x2(0.0), mat4x2(0.0)));
|
||||
int _e67 = idx_1;
|
||||
idx_1 = (_e67 + 1);
|
||||
int _e55 = idx_1;
|
||||
idx_1 = (_e55 + 1);
|
||||
t_1.am = mat4x2[2](mat4x2(0.0), mat4x2(0.0));
|
||||
t_1.am[0] = mat4x2(vec2(8.0), vec2(7.0), vec2(6.0), vec2(5.0));
|
||||
t_1.am[0][0] = vec2(9.0);
|
||||
int _e93 = idx_1;
|
||||
t_1.am[0][_e93] = vec2(90.0);
|
||||
int _e77 = idx_1;
|
||||
t_1.am[0][_e77] = vec2(90.0);
|
||||
t_1.am[0][0][1] = 10.0;
|
||||
int _e110 = idx_1;
|
||||
t_1.am[0][0][_e110] = 20.0;
|
||||
int _e116 = idx_1;
|
||||
t_1.am[0][_e116][1] = 30.0;
|
||||
int _e124 = idx_1;
|
||||
int _e126 = idx_1;
|
||||
t_1.am[0][_e124][_e126] = 40.0;
|
||||
int _e89 = idx_1;
|
||||
t_1.am[0][0][_e89] = 20.0;
|
||||
int _e94 = idx_1;
|
||||
t_1.am[0][_e94][1] = 30.0;
|
||||
int _e100 = idx_1;
|
||||
int _e102 = idx_1;
|
||||
t_1.am[0][_e100][_e102] = 40.0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -140,11 +140,11 @@ void main() {
|
||||
float b = _group_0_binding_0_vs._matrix[3][0];
|
||||
int a_1 = _group_0_binding_0_vs.data[(uint(_group_0_binding_0_vs.data.length()) - 2u)].value;
|
||||
ivec2 c = _group_0_binding_2_vs;
|
||||
float _e34 = read_from_private(foo);
|
||||
float _e33 = read_from_private(foo);
|
||||
c2_ = int[5](a_1, int(b), 3, 4, 5);
|
||||
c2_[(vi + 1u)] = 42;
|
||||
int value = c2_[vi];
|
||||
float _e48 = test_arr_as_arg(float[5][10](float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
|
||||
float _e47 = test_arr_as_arg(float[5][10](float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0), float[10](0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
|
||||
gl_Position = vec4((_matrix * vec4(ivec4(value))), 2.0);
|
||||
gl_Position.yz = vec2(-gl_Position.y, gl_Position.z * 2.0 - gl_Position.w);
|
||||
return;
|
||||
|
||||
@@ -51,82 +51,82 @@ void main() {
|
||||
int l7_ = workgroup_struct.atomic_arr[1];
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e59 = atomicAdd(_group_0_binding_0_cs, 1u);
|
||||
int _e64 = atomicAdd(_group_0_binding_1_cs[1], 1);
|
||||
uint _e68 = atomicAdd(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e74 = atomicAdd(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e77 = atomicAdd(workgroup_atomic_scalar, 1u);
|
||||
int _e82 = atomicAdd(workgroup_atomic_arr[1], 1);
|
||||
uint _e86 = atomicAdd(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e92 = atomicAdd(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e51 = atomicAdd(_group_0_binding_0_cs, 1u);
|
||||
int _e55 = atomicAdd(_group_0_binding_1_cs[1], 1);
|
||||
uint _e59 = atomicAdd(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e64 = atomicAdd(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e67 = atomicAdd(workgroup_atomic_scalar, 1u);
|
||||
int _e71 = atomicAdd(workgroup_atomic_arr[1], 1);
|
||||
uint _e75 = atomicAdd(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e80 = atomicAdd(workgroup_struct.atomic_arr[1], 1);
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e95 = atomicAdd(_group_0_binding_0_cs, -1u);
|
||||
int _e100 = atomicAdd(_group_0_binding_1_cs[1], -1);
|
||||
uint _e104 = atomicAdd(_group_0_binding_2_cs.atomic_scalar, -1u);
|
||||
int _e110 = atomicAdd(_group_0_binding_2_cs.atomic_arr[1], -1);
|
||||
uint _e113 = atomicAdd(workgroup_atomic_scalar, -1u);
|
||||
int _e118 = atomicAdd(workgroup_atomic_arr[1], -1);
|
||||
uint _e122 = atomicAdd(workgroup_struct.atomic_scalar, -1u);
|
||||
int _e128 = atomicAdd(workgroup_struct.atomic_arr[1], -1);
|
||||
uint _e83 = atomicAdd(_group_0_binding_0_cs, -1u);
|
||||
int _e87 = atomicAdd(_group_0_binding_1_cs[1], -1);
|
||||
uint _e91 = atomicAdd(_group_0_binding_2_cs.atomic_scalar, -1u);
|
||||
int _e96 = atomicAdd(_group_0_binding_2_cs.atomic_arr[1], -1);
|
||||
uint _e99 = atomicAdd(workgroup_atomic_scalar, -1u);
|
||||
int _e103 = atomicAdd(workgroup_atomic_arr[1], -1);
|
||||
uint _e107 = atomicAdd(workgroup_struct.atomic_scalar, -1u);
|
||||
int _e112 = atomicAdd(workgroup_struct.atomic_arr[1], -1);
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e131 = atomicMax(_group_0_binding_0_cs, 1u);
|
||||
int _e136 = atomicMax(_group_0_binding_1_cs[1], 1);
|
||||
uint _e140 = atomicMax(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e146 = atomicMax(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e149 = atomicMax(workgroup_atomic_scalar, 1u);
|
||||
int _e154 = atomicMax(workgroup_atomic_arr[1], 1);
|
||||
uint _e158 = atomicMax(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e164 = atomicMax(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e115 = atomicMax(_group_0_binding_0_cs, 1u);
|
||||
int _e119 = atomicMax(_group_0_binding_1_cs[1], 1);
|
||||
uint _e123 = atomicMax(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e128 = atomicMax(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e131 = atomicMax(workgroup_atomic_scalar, 1u);
|
||||
int _e135 = atomicMax(workgroup_atomic_arr[1], 1);
|
||||
uint _e139 = atomicMax(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e144 = atomicMax(workgroup_struct.atomic_arr[1], 1);
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e167 = atomicMin(_group_0_binding_0_cs, 1u);
|
||||
int _e172 = atomicMin(_group_0_binding_1_cs[1], 1);
|
||||
uint _e176 = atomicMin(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e182 = atomicMin(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e185 = atomicMin(workgroup_atomic_scalar, 1u);
|
||||
int _e190 = atomicMin(workgroup_atomic_arr[1], 1);
|
||||
uint _e194 = atomicMin(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e200 = atomicMin(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e147 = atomicMin(_group_0_binding_0_cs, 1u);
|
||||
int _e151 = atomicMin(_group_0_binding_1_cs[1], 1);
|
||||
uint _e155 = atomicMin(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e160 = atomicMin(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e163 = atomicMin(workgroup_atomic_scalar, 1u);
|
||||
int _e167 = atomicMin(workgroup_atomic_arr[1], 1);
|
||||
uint _e171 = atomicMin(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e176 = atomicMin(workgroup_struct.atomic_arr[1], 1);
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e203 = atomicAnd(_group_0_binding_0_cs, 1u);
|
||||
int _e208 = atomicAnd(_group_0_binding_1_cs[1], 1);
|
||||
uint _e212 = atomicAnd(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e218 = atomicAnd(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e221 = atomicAnd(workgroup_atomic_scalar, 1u);
|
||||
int _e226 = atomicAnd(workgroup_atomic_arr[1], 1);
|
||||
uint _e230 = atomicAnd(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e236 = atomicAnd(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e179 = atomicAnd(_group_0_binding_0_cs, 1u);
|
||||
int _e183 = atomicAnd(_group_0_binding_1_cs[1], 1);
|
||||
uint _e187 = atomicAnd(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e192 = atomicAnd(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e195 = atomicAnd(workgroup_atomic_scalar, 1u);
|
||||
int _e199 = atomicAnd(workgroup_atomic_arr[1], 1);
|
||||
uint _e203 = atomicAnd(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e208 = atomicAnd(workgroup_struct.atomic_arr[1], 1);
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e239 = atomicOr(_group_0_binding_0_cs, 1u);
|
||||
int _e244 = atomicOr(_group_0_binding_1_cs[1], 1);
|
||||
uint _e248 = atomicOr(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e254 = atomicOr(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e257 = atomicOr(workgroup_atomic_scalar, 1u);
|
||||
int _e262 = atomicOr(workgroup_atomic_arr[1], 1);
|
||||
uint _e266 = atomicOr(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e272 = atomicOr(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e211 = atomicOr(_group_0_binding_0_cs, 1u);
|
||||
int _e215 = atomicOr(_group_0_binding_1_cs[1], 1);
|
||||
uint _e219 = atomicOr(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e224 = atomicOr(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e227 = atomicOr(workgroup_atomic_scalar, 1u);
|
||||
int _e231 = atomicOr(workgroup_atomic_arr[1], 1);
|
||||
uint _e235 = atomicOr(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e240 = atomicOr(workgroup_struct.atomic_arr[1], 1);
|
||||
memoryBarrierShared();
|
||||
barrier();
|
||||
uint _e275 = atomicXor(_group_0_binding_0_cs, 1u);
|
||||
int _e280 = atomicXor(_group_0_binding_1_cs[1], 1);
|
||||
uint _e284 = atomicXor(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e290 = atomicXor(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e293 = atomicXor(workgroup_atomic_scalar, 1u);
|
||||
int _e298 = atomicXor(workgroup_atomic_arr[1], 1);
|
||||
uint _e302 = atomicXor(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e308 = atomicXor(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e311 = atomicExchange(_group_0_binding_0_cs, 1u);
|
||||
int _e316 = atomicExchange(_group_0_binding_1_cs[1], 1);
|
||||
uint _e320 = atomicExchange(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e326 = atomicExchange(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e329 = atomicExchange(workgroup_atomic_scalar, 1u);
|
||||
int _e334 = atomicExchange(workgroup_atomic_arr[1], 1);
|
||||
uint _e338 = atomicExchange(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e344 = atomicExchange(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e243 = atomicXor(_group_0_binding_0_cs, 1u);
|
||||
int _e247 = atomicXor(_group_0_binding_1_cs[1], 1);
|
||||
uint _e251 = atomicXor(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e256 = atomicXor(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e259 = atomicXor(workgroup_atomic_scalar, 1u);
|
||||
int _e263 = atomicXor(workgroup_atomic_arr[1], 1);
|
||||
uint _e267 = atomicXor(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e272 = atomicXor(workgroup_struct.atomic_arr[1], 1);
|
||||
uint _e275 = atomicExchange(_group_0_binding_0_cs, 1u);
|
||||
int _e279 = atomicExchange(_group_0_binding_1_cs[1], 1);
|
||||
uint _e283 = atomicExchange(_group_0_binding_2_cs.atomic_scalar, 1u);
|
||||
int _e288 = atomicExchange(_group_0_binding_2_cs.atomic_arr[1], 1);
|
||||
uint _e291 = atomicExchange(workgroup_atomic_scalar, 1u);
|
||||
int _e295 = atomicExchange(workgroup_atomic_arr[1], 1);
|
||||
uint _e299 = atomicExchange(workgroup_struct.atomic_scalar, 1u);
|
||||
int _e304 = atomicExchange(workgroup_struct.atomic_arr[1], 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ void fb1_(inout bool cond) {
|
||||
bool loop_init = true;
|
||||
while(true) {
|
||||
if (!loop_init) {
|
||||
bool _e2 = cond;
|
||||
if (!(_e2)) {
|
||||
bool _e1 = cond;
|
||||
if (!(_e1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ void test_msl_packed_vec3_() {
|
||||
idx = 1;
|
||||
_group_0_binding_1_cs.v3_.x = 1.0;
|
||||
_group_0_binding_1_cs.v3_.x = 2.0;
|
||||
int _e17 = idx;
|
||||
_group_0_binding_1_cs.v3_[_e17] = 3.0;
|
||||
int _e16 = idx;
|
||||
_group_0_binding_1_cs.v3_[_e16] = 3.0;
|
||||
FooStruct data = _group_0_binding_1_cs;
|
||||
vec3 l0_ = data.v3_;
|
||||
vec2 l1_ = data.v3_.zx;
|
||||
@@ -62,20 +62,20 @@ void main() {
|
||||
float Foo = 0.0;
|
||||
bool at = false;
|
||||
test_msl_packed_vec3_();
|
||||
mat4x2 _e8 = _group_0_binding_7_cs[0][0];
|
||||
vec4 _e16 = _group_0_binding_6_cs[0][0][0];
|
||||
wg[7] = (_e8 * _e16).x;
|
||||
mat3x2 _e23 = _group_0_binding_5_cs;
|
||||
vec3 _e25 = _group_0_binding_4_cs;
|
||||
wg[6] = (_e23 * _e25).x;
|
||||
float _e35 = _group_0_binding_2_cs[1].y;
|
||||
wg[5] = _e35;
|
||||
float _e43 = _group_0_binding_3_cs[0].w;
|
||||
wg[4] = _e43;
|
||||
float _e49 = _group_0_binding_1_cs.v1_;
|
||||
wg[3] = _e49;
|
||||
float _e56 = _group_0_binding_1_cs.v3_.x;
|
||||
wg[2] = _e56;
|
||||
mat4x2 _e5 = _group_0_binding_7_cs[0][0];
|
||||
vec4 _e10 = _group_0_binding_6_cs[0][0][0];
|
||||
wg[7] = (_e5 * _e10).x;
|
||||
mat3x2 _e16 = _group_0_binding_5_cs;
|
||||
vec3 _e18 = _group_0_binding_4_cs;
|
||||
wg[6] = (_e16 * _e18).x;
|
||||
float _e26 = _group_0_binding_2_cs[1].y;
|
||||
wg[5] = _e26;
|
||||
float _e32 = _group_0_binding_3_cs[0].w;
|
||||
wg[4] = _e32;
|
||||
float _e37 = _group_0_binding_1_cs.v1_;
|
||||
wg[3] = _e37;
|
||||
float _e43 = _group_0_binding_1_cs.v3_.x;
|
||||
wg[2] = _e43;
|
||||
_group_0_binding_1_cs.v1_ = 4.0;
|
||||
wg[1] = float(uint(_group_0_binding_2_cs.length()));
|
||||
at_1 = 2u;
|
||||
|
||||
@@ -229,10 +229,10 @@ void assignment() {
|
||||
int _e36 = a_1;
|
||||
a_1 = (_e36 - 1);
|
||||
vec0_ = ivec3(0);
|
||||
int _e43 = vec0_.y;
|
||||
vec0_.y = (_e43 + 1);
|
||||
int _e48 = vec0_.y;
|
||||
vec0_.y = (_e48 - 1);
|
||||
int _e42 = vec0_.y;
|
||||
vec0_.y = (_e42 + 1);
|
||||
int _e46 = vec0_.y;
|
||||
vec0_.y = (_e46 - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ struct gen_gl_PerVertex {
|
||||
float gen_gl_ClipDistance[1];
|
||||
float gen_gl_CullDistance[1];
|
||||
};
|
||||
struct type_9 {
|
||||
struct type_4 {
|
||||
vec2 member;
|
||||
vec4 gen_gl_Position;
|
||||
};
|
||||
@@ -26,10 +26,10 @@ layout(location = 0) in vec2 _p2vs_location0;
|
||||
layout(location = 0) smooth out vec2 _vs2fs_location0;
|
||||
|
||||
void main_1() {
|
||||
vec2 _e8 = a_uv_1;
|
||||
v_uv = _e8;
|
||||
vec2 _e9 = a_pos_1;
|
||||
perVertexStruct.gen_gl_Position = vec4(_e9.x, _e9.y, 0.0, 1.0);
|
||||
vec2 _e6 = a_uv_1;
|
||||
v_uv = _e6;
|
||||
vec2 _e7 = a_pos_1;
|
||||
perVertexStruct.gen_gl_Position = vec4(_e7.x, _e7.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void main() {
|
||||
main_1();
|
||||
vec2 _e7 = v_uv;
|
||||
vec4 _e8 = perVertexStruct.gen_gl_Position;
|
||||
type_9 _tmp_return = type_9(_e7, _e8);
|
||||
type_4 _tmp_return = type_4(_e7, _e8);
|
||||
_vs2fs_location0 = _tmp_return.member;
|
||||
gl_Position = _tmp_return.gen_gl_Position;
|
||||
gl_Position.yz = vec2(-gl_Position.y, gl_Position.z * 2.0 - gl_Position.w);
|
||||
|
||||
@@ -127,31 +127,31 @@ void test_matrix_within_struct_accesses()
|
||||
idx = (_expr3 - 1);
|
||||
float3x2 l0_ = GetMatmOnBaz(baz);
|
||||
float2 l1_ = GetMatmOnBaz(baz)[0];
|
||||
int _expr15 = idx;
|
||||
float2 l2_ = GetMatmOnBaz(baz)[_expr15];
|
||||
int _expr14 = idx;
|
||||
float2 l2_ = GetMatmOnBaz(baz)[_expr14];
|
||||
float l3_ = GetMatmOnBaz(baz)[0].y;
|
||||
int _expr29 = idx;
|
||||
float l4_ = GetMatmOnBaz(baz)[0][_expr29];
|
||||
int _expr34 = idx;
|
||||
float l5_ = GetMatmOnBaz(baz)[_expr34].y;
|
||||
int _expr41 = idx;
|
||||
int _expr43 = idx;
|
||||
float l6_ = GetMatmOnBaz(baz)[_expr41][_expr43];
|
||||
int _expr25 = idx;
|
||||
float l4_ = GetMatmOnBaz(baz)[0][_expr25];
|
||||
int _expr30 = idx;
|
||||
float l5_ = GetMatmOnBaz(baz)[_expr30].y;
|
||||
int _expr36 = idx;
|
||||
int _expr38 = idx;
|
||||
float l6_ = GetMatmOnBaz(baz)[_expr36][_expr38];
|
||||
t = ConstructBaz(float3x2((1.0).xx, (2.0).xx, (3.0).xx));
|
||||
int _expr56 = idx;
|
||||
idx = (_expr56 + 1);
|
||||
int _expr51 = idx;
|
||||
idx = (_expr51 + 1);
|
||||
SetMatmOnBaz(t, float3x2((6.0).xx, (5.0).xx, (4.0).xx));
|
||||
t.m_0 = (9.0).xx;
|
||||
int _expr72 = idx;
|
||||
SetMatVecmOnBaz(t, (90.0).xx, _expr72);
|
||||
int _expr66 = idx;
|
||||
SetMatVecmOnBaz(t, (90.0).xx, _expr66);
|
||||
t.m_0[1] = 10.0;
|
||||
int _expr76 = idx;
|
||||
t.m_0[_expr76] = 20.0;
|
||||
int _expr80 = idx;
|
||||
SetMatScalarmOnBaz(t, 30.0, _expr80, 1);
|
||||
int _expr85 = idx;
|
||||
t.m_0[_expr85] = 20.0;
|
||||
int _expr89 = idx;
|
||||
SetMatScalarmOnBaz(t, 30.0, _expr89, 1);
|
||||
int _expr95 = idx;
|
||||
int _expr97 = idx;
|
||||
SetMatScalarmOnBaz(t, 40.0, _expr95, _expr97);
|
||||
int _expr87 = idx;
|
||||
SetMatScalarmOnBaz(t, 40.0, _expr85, _expr87);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -172,32 +172,32 @@ void test_matrix_within_array_within_struct_accesses()
|
||||
float4x2 l0_1[2] = ((float4x2[2])nested_mat_cx2_.am);
|
||||
float4x2 l1_1 = ((float4x2)nested_mat_cx2_.am[0]);
|
||||
float2 l2_1 = nested_mat_cx2_.am[0]._0;
|
||||
int _expr24 = idx_1;
|
||||
float2 l3_1 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr24);
|
||||
int _expr20 = idx_1;
|
||||
float2 l3_1 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr20);
|
||||
float l4_1 = nested_mat_cx2_.am[0]._0.y;
|
||||
int _expr42 = idx_1;
|
||||
float l5_1 = nested_mat_cx2_.am[0]._0[_expr42];
|
||||
int _expr49 = idx_1;
|
||||
float l6_1 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr49).y;
|
||||
int _expr58 = idx_1;
|
||||
int _expr60 = idx_1;
|
||||
float l7_ = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr58)[_expr60];
|
||||
int _expr33 = idx_1;
|
||||
float l5_1 = nested_mat_cx2_.am[0]._0[_expr33];
|
||||
int _expr39 = idx_1;
|
||||
float l6_1 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr39).y;
|
||||
int _expr46 = idx_1;
|
||||
int _expr48 = idx_1;
|
||||
float l7_ = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr46)[_expr48];
|
||||
t_1 = ConstructMatCx2InArray((float4x2[2])0);
|
||||
int _expr67 = idx_1;
|
||||
idx_1 = (_expr67 + 1);
|
||||
int _expr55 = idx_1;
|
||||
idx_1 = (_expr55 + 1);
|
||||
t_1.am = (__mat4x2[2])(float4x2[2])0;
|
||||
t_1.am[0] = (__mat4x2)float4x2((8.0).xx, (7.0).xx, (6.0).xx, (5.0).xx);
|
||||
t_1.am[0]._0 = (9.0).xx;
|
||||
int _expr93 = idx_1;
|
||||
__set_col_of_mat4x2(t_1.am[0], _expr93, (90.0).xx);
|
||||
int _expr77 = idx_1;
|
||||
__set_col_of_mat4x2(t_1.am[0], _expr77, (90.0).xx);
|
||||
t_1.am[0]._0.y = 10.0;
|
||||
int _expr110 = idx_1;
|
||||
t_1.am[0]._0[_expr110] = 20.0;
|
||||
int _expr116 = idx_1;
|
||||
__set_el_of_mat4x2(t_1.am[0], _expr116, 1, 30.0);
|
||||
int _expr124 = idx_1;
|
||||
int _expr126 = idx_1;
|
||||
__set_el_of_mat4x2(t_1.am[0], _expr124, _expr126, 40.0);
|
||||
int _expr89 = idx_1;
|
||||
t_1.am[0]._0[_expr89] = 20.0;
|
||||
int _expr94 = idx_1;
|
||||
__set_el_of_mat4x2(t_1.am[0], _expr94, 1, 30.0);
|
||||
int _expr100 = idx_1;
|
||||
int _expr102 = idx_1;
|
||||
__set_el_of_mat4x2(t_1.am[0], _expr100, _expr102, 40.0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -264,11 +264,11 @@ float4 foo_vert(uint vi : SV_VertexID) : SV_Position
|
||||
float b = asfloat(bar.Load(0+48+0));
|
||||
int a_1 = asint(bar.Load(0+(((NagaBufferLengthRW(bar) - 160) / 8) - 2u)*8+160));
|
||||
int2 c = asint(qux.Load2(0));
|
||||
const float _e34 = read_from_private(foo);
|
||||
const float _e33 = read_from_private(foo);
|
||||
c2_ = Constructarray5_int_(a_1, int(b), 3, 4, 5);
|
||||
c2_[(vi + 1u)] = 42;
|
||||
int value = c2_[vi];
|
||||
const float _e48 = test_arr_as_arg((float[5][10])0);
|
||||
const float _e47 = test_arr_as_arg((float[5][10])0);
|
||||
return float4(mul(float4((value).xxxx), _matrix), 2.0);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,75 +37,75 @@ void cs_main(uint3 id : SV_GroupThreadID, uint3 __local_invocation_id : SV_Group
|
||||
uint l6_ = workgroup_struct.atomic_scalar;
|
||||
int l7_ = workgroup_struct.atomic_arr[1];
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e59; storage_atomic_scalar.InterlockedAdd(0, 1u, _e59);
|
||||
int _e64; storage_atomic_arr.InterlockedAdd(4, 1, _e64);
|
||||
uint _e68; storage_struct.InterlockedAdd(0, 1u, _e68);
|
||||
int _e74; storage_struct.InterlockedAdd(4+4, 1, _e74);
|
||||
uint _e77; InterlockedAdd(workgroup_atomic_scalar, 1u, _e77);
|
||||
int _e82; InterlockedAdd(workgroup_atomic_arr[1], 1, _e82);
|
||||
uint _e86; InterlockedAdd(workgroup_struct.atomic_scalar, 1u, _e86);
|
||||
int _e92; InterlockedAdd(workgroup_struct.atomic_arr[1], 1, _e92);
|
||||
uint _e51; storage_atomic_scalar.InterlockedAdd(0, 1u, _e51);
|
||||
int _e55; storage_atomic_arr.InterlockedAdd(4, 1, _e55);
|
||||
uint _e59; storage_struct.InterlockedAdd(0, 1u, _e59);
|
||||
int _e64; storage_struct.InterlockedAdd(4+4, 1, _e64);
|
||||
uint _e67; InterlockedAdd(workgroup_atomic_scalar, 1u, _e67);
|
||||
int _e71; InterlockedAdd(workgroup_atomic_arr[1], 1, _e71);
|
||||
uint _e75; InterlockedAdd(workgroup_struct.atomic_scalar, 1u, _e75);
|
||||
int _e80; InterlockedAdd(workgroup_struct.atomic_arr[1], 1, _e80);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e95; storage_atomic_scalar.InterlockedAdd(0, -1u, _e95);
|
||||
int _e100; storage_atomic_arr.InterlockedAdd(4, -1, _e100);
|
||||
uint _e104; storage_struct.InterlockedAdd(0, -1u, _e104);
|
||||
int _e110; storage_struct.InterlockedAdd(4+4, -1, _e110);
|
||||
uint _e113; InterlockedAdd(workgroup_atomic_scalar, -1u, _e113);
|
||||
int _e118; InterlockedAdd(workgroup_atomic_arr[1], -1, _e118);
|
||||
uint _e122; InterlockedAdd(workgroup_struct.atomic_scalar, -1u, _e122);
|
||||
int _e128; InterlockedAdd(workgroup_struct.atomic_arr[1], -1, _e128);
|
||||
uint _e83; storage_atomic_scalar.InterlockedAdd(0, -1u, _e83);
|
||||
int _e87; storage_atomic_arr.InterlockedAdd(4, -1, _e87);
|
||||
uint _e91; storage_struct.InterlockedAdd(0, -1u, _e91);
|
||||
int _e96; storage_struct.InterlockedAdd(4+4, -1, _e96);
|
||||
uint _e99; InterlockedAdd(workgroup_atomic_scalar, -1u, _e99);
|
||||
int _e103; InterlockedAdd(workgroup_atomic_arr[1], -1, _e103);
|
||||
uint _e107; InterlockedAdd(workgroup_struct.atomic_scalar, -1u, _e107);
|
||||
int _e112; InterlockedAdd(workgroup_struct.atomic_arr[1], -1, _e112);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e131; storage_atomic_scalar.InterlockedMax(0, 1u, _e131);
|
||||
int _e136; storage_atomic_arr.InterlockedMax(4, 1, _e136);
|
||||
uint _e140; storage_struct.InterlockedMax(0, 1u, _e140);
|
||||
int _e146; storage_struct.InterlockedMax(4+4, 1, _e146);
|
||||
uint _e149; InterlockedMax(workgroup_atomic_scalar, 1u, _e149);
|
||||
int _e154; InterlockedMax(workgroup_atomic_arr[1], 1, _e154);
|
||||
uint _e158; InterlockedMax(workgroup_struct.atomic_scalar, 1u, _e158);
|
||||
int _e164; InterlockedMax(workgroup_struct.atomic_arr[1], 1, _e164);
|
||||
uint _e115; storage_atomic_scalar.InterlockedMax(0, 1u, _e115);
|
||||
int _e119; storage_atomic_arr.InterlockedMax(4, 1, _e119);
|
||||
uint _e123; storage_struct.InterlockedMax(0, 1u, _e123);
|
||||
int _e128; storage_struct.InterlockedMax(4+4, 1, _e128);
|
||||
uint _e131; InterlockedMax(workgroup_atomic_scalar, 1u, _e131);
|
||||
int _e135; InterlockedMax(workgroup_atomic_arr[1], 1, _e135);
|
||||
uint _e139; InterlockedMax(workgroup_struct.atomic_scalar, 1u, _e139);
|
||||
int _e144; InterlockedMax(workgroup_struct.atomic_arr[1], 1, _e144);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e167; storage_atomic_scalar.InterlockedMin(0, 1u, _e167);
|
||||
int _e172; storage_atomic_arr.InterlockedMin(4, 1, _e172);
|
||||
uint _e176; storage_struct.InterlockedMin(0, 1u, _e176);
|
||||
int _e182; storage_struct.InterlockedMin(4+4, 1, _e182);
|
||||
uint _e185; InterlockedMin(workgroup_atomic_scalar, 1u, _e185);
|
||||
int _e190; InterlockedMin(workgroup_atomic_arr[1], 1, _e190);
|
||||
uint _e194; InterlockedMin(workgroup_struct.atomic_scalar, 1u, _e194);
|
||||
int _e200; InterlockedMin(workgroup_struct.atomic_arr[1], 1, _e200);
|
||||
uint _e147; storage_atomic_scalar.InterlockedMin(0, 1u, _e147);
|
||||
int _e151; storage_atomic_arr.InterlockedMin(4, 1, _e151);
|
||||
uint _e155; storage_struct.InterlockedMin(0, 1u, _e155);
|
||||
int _e160; storage_struct.InterlockedMin(4+4, 1, _e160);
|
||||
uint _e163; InterlockedMin(workgroup_atomic_scalar, 1u, _e163);
|
||||
int _e167; InterlockedMin(workgroup_atomic_arr[1], 1, _e167);
|
||||
uint _e171; InterlockedMin(workgroup_struct.atomic_scalar, 1u, _e171);
|
||||
int _e176; InterlockedMin(workgroup_struct.atomic_arr[1], 1, _e176);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e203; storage_atomic_scalar.InterlockedAnd(0, 1u, _e203);
|
||||
int _e208; storage_atomic_arr.InterlockedAnd(4, 1, _e208);
|
||||
uint _e212; storage_struct.InterlockedAnd(0, 1u, _e212);
|
||||
int _e218; storage_struct.InterlockedAnd(4+4, 1, _e218);
|
||||
uint _e221; InterlockedAnd(workgroup_atomic_scalar, 1u, _e221);
|
||||
int _e226; InterlockedAnd(workgroup_atomic_arr[1], 1, _e226);
|
||||
uint _e230; InterlockedAnd(workgroup_struct.atomic_scalar, 1u, _e230);
|
||||
int _e236; InterlockedAnd(workgroup_struct.atomic_arr[1], 1, _e236);
|
||||
uint _e179; storage_atomic_scalar.InterlockedAnd(0, 1u, _e179);
|
||||
int _e183; storage_atomic_arr.InterlockedAnd(4, 1, _e183);
|
||||
uint _e187; storage_struct.InterlockedAnd(0, 1u, _e187);
|
||||
int _e192; storage_struct.InterlockedAnd(4+4, 1, _e192);
|
||||
uint _e195; InterlockedAnd(workgroup_atomic_scalar, 1u, _e195);
|
||||
int _e199; InterlockedAnd(workgroup_atomic_arr[1], 1, _e199);
|
||||
uint _e203; InterlockedAnd(workgroup_struct.atomic_scalar, 1u, _e203);
|
||||
int _e208; InterlockedAnd(workgroup_struct.atomic_arr[1], 1, _e208);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e239; storage_atomic_scalar.InterlockedOr(0, 1u, _e239);
|
||||
int _e244; storage_atomic_arr.InterlockedOr(4, 1, _e244);
|
||||
uint _e248; storage_struct.InterlockedOr(0, 1u, _e248);
|
||||
int _e254; storage_struct.InterlockedOr(4+4, 1, _e254);
|
||||
uint _e257; InterlockedOr(workgroup_atomic_scalar, 1u, _e257);
|
||||
int _e262; InterlockedOr(workgroup_atomic_arr[1], 1, _e262);
|
||||
uint _e266; InterlockedOr(workgroup_struct.atomic_scalar, 1u, _e266);
|
||||
int _e272; InterlockedOr(workgroup_struct.atomic_arr[1], 1, _e272);
|
||||
uint _e211; storage_atomic_scalar.InterlockedOr(0, 1u, _e211);
|
||||
int _e215; storage_atomic_arr.InterlockedOr(4, 1, _e215);
|
||||
uint _e219; storage_struct.InterlockedOr(0, 1u, _e219);
|
||||
int _e224; storage_struct.InterlockedOr(4+4, 1, _e224);
|
||||
uint _e227; InterlockedOr(workgroup_atomic_scalar, 1u, _e227);
|
||||
int _e231; InterlockedOr(workgroup_atomic_arr[1], 1, _e231);
|
||||
uint _e235; InterlockedOr(workgroup_struct.atomic_scalar, 1u, _e235);
|
||||
int _e240; InterlockedOr(workgroup_struct.atomic_arr[1], 1, _e240);
|
||||
GroupMemoryBarrierWithGroupSync();
|
||||
uint _e275; storage_atomic_scalar.InterlockedXor(0, 1u, _e275);
|
||||
int _e280; storage_atomic_arr.InterlockedXor(4, 1, _e280);
|
||||
uint _e284; storage_struct.InterlockedXor(0, 1u, _e284);
|
||||
int _e290; storage_struct.InterlockedXor(4+4, 1, _e290);
|
||||
uint _e293; InterlockedXor(workgroup_atomic_scalar, 1u, _e293);
|
||||
int _e298; InterlockedXor(workgroup_atomic_arr[1], 1, _e298);
|
||||
uint _e302; InterlockedXor(workgroup_struct.atomic_scalar, 1u, _e302);
|
||||
int _e308; InterlockedXor(workgroup_struct.atomic_arr[1], 1, _e308);
|
||||
uint _e311; storage_atomic_scalar.InterlockedExchange(0, 1u, _e311);
|
||||
int _e316; storage_atomic_arr.InterlockedExchange(4, 1, _e316);
|
||||
uint _e320; storage_struct.InterlockedExchange(0, 1u, _e320);
|
||||
int _e326; storage_struct.InterlockedExchange(4+4, 1, _e326);
|
||||
uint _e329; InterlockedExchange(workgroup_atomic_scalar, 1u, _e329);
|
||||
int _e334; InterlockedExchange(workgroup_atomic_arr[1], 1, _e334);
|
||||
uint _e338; InterlockedExchange(workgroup_struct.atomic_scalar, 1u, _e338);
|
||||
int _e344; InterlockedExchange(workgroup_struct.atomic_arr[1], 1, _e344);
|
||||
uint _e243; storage_atomic_scalar.InterlockedXor(0, 1u, _e243);
|
||||
int _e247; storage_atomic_arr.InterlockedXor(4, 1, _e247);
|
||||
uint _e251; storage_struct.InterlockedXor(0, 1u, _e251);
|
||||
int _e256; storage_struct.InterlockedXor(4+4, 1, _e256);
|
||||
uint _e259; InterlockedXor(workgroup_atomic_scalar, 1u, _e259);
|
||||
int _e263; InterlockedXor(workgroup_atomic_arr[1], 1, _e263);
|
||||
uint _e267; InterlockedXor(workgroup_struct.atomic_scalar, 1u, _e267);
|
||||
int _e272; InterlockedXor(workgroup_struct.atomic_arr[1], 1, _e272);
|
||||
uint _e275; storage_atomic_scalar.InterlockedExchange(0, 1u, _e275);
|
||||
int _e279; storage_atomic_arr.InterlockedExchange(4, 1, _e279);
|
||||
uint _e283; storage_struct.InterlockedExchange(0, 1u, _e283);
|
||||
int _e288; storage_struct.InterlockedExchange(4+4, 1, _e288);
|
||||
uint _e291; InterlockedExchange(workgroup_atomic_scalar, 1u, _e291);
|
||||
int _e295; InterlockedExchange(workgroup_atomic_arr[1], 1, _e295);
|
||||
uint _e299; InterlockedExchange(workgroup_struct.atomic_scalar, 1u, _e299);
|
||||
int _e304; InterlockedExchange(workgroup_struct.atomic_arr[1], 1, _e304);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -64,121 +64,121 @@ float4 main(FragmentInput_main fragmentinput_main) : SV_Target0
|
||||
v4_ = (0.0).xxxx;
|
||||
float2 uv = (0.0).xx;
|
||||
int2 pix = (0).xx;
|
||||
uint2 _expr23 = u2_;
|
||||
u2_ = (_expr23 + NagaDimensions2D(texture_array_unbounded[0]));
|
||||
uint2 _expr28 = u2_;
|
||||
u2_ = (_expr28 + NagaDimensions2D(texture_array_unbounded[uniform_index]));
|
||||
uint2 _expr33 = u2_;
|
||||
u2_ = (_expr33 + NagaDimensions2D(texture_array_unbounded[NonUniformResourceIndex(non_uniform_index)]));
|
||||
float4 _expr42 = texture_array_bounded[0].Gather(samp[0], uv);
|
||||
float4 _expr43 = v4_;
|
||||
v4_ = (_expr43 + _expr42);
|
||||
float4 _expr50 = texture_array_bounded[uniform_index].Gather(samp[uniform_index], uv);
|
||||
float4 _expr51 = v4_;
|
||||
v4_ = (_expr51 + _expr50);
|
||||
float4 _expr58 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].Gather(samp[NonUniformResourceIndex(non_uniform_index)], uv);
|
||||
float4 _expr59 = v4_;
|
||||
v4_ = (_expr59 + _expr58);
|
||||
float4 _expr68 = texture_array_depth[0].GatherCmp(samp_comp[0], uv, 0.0);
|
||||
uint2 _expr22 = u2_;
|
||||
u2_ = (_expr22 + NagaDimensions2D(texture_array_unbounded[0]));
|
||||
uint2 _expr27 = u2_;
|
||||
u2_ = (_expr27 + NagaDimensions2D(texture_array_unbounded[uniform_index]));
|
||||
uint2 _expr32 = u2_;
|
||||
u2_ = (_expr32 + NagaDimensions2D(texture_array_unbounded[NonUniformResourceIndex(non_uniform_index)]));
|
||||
float4 _expr38 = texture_array_bounded[0].Gather(samp[0], uv);
|
||||
float4 _expr39 = v4_;
|
||||
v4_ = (_expr39 + _expr38);
|
||||
float4 _expr45 = texture_array_bounded[uniform_index].Gather(samp[uniform_index], uv);
|
||||
float4 _expr46 = v4_;
|
||||
v4_ = (_expr46 + _expr45);
|
||||
float4 _expr52 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].Gather(samp[NonUniformResourceIndex(non_uniform_index)], uv);
|
||||
float4 _expr53 = v4_;
|
||||
v4_ = (_expr53 + _expr52);
|
||||
float4 _expr60 = texture_array_depth[0].GatherCmp(samp_comp[0], uv, 0.0);
|
||||
float4 _expr61 = v4_;
|
||||
v4_ = (_expr61 + _expr60);
|
||||
float4 _expr68 = texture_array_depth[uniform_index].GatherCmp(samp_comp[uniform_index], uv, 0.0);
|
||||
float4 _expr69 = v4_;
|
||||
v4_ = (_expr69 + _expr68);
|
||||
float4 _expr76 = texture_array_depth[uniform_index].GatherCmp(samp_comp[uniform_index], uv, 0.0);
|
||||
float4 _expr76 = texture_array_depth[NonUniformResourceIndex(non_uniform_index)].GatherCmp(samp_comp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float4 _expr77 = v4_;
|
||||
v4_ = (_expr77 + _expr76);
|
||||
float4 _expr84 = texture_array_depth[NonUniformResourceIndex(non_uniform_index)].GatherCmp(samp_comp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float4 _expr85 = v4_;
|
||||
v4_ = (_expr85 + _expr84);
|
||||
float4 _expr91 = texture_array_unbounded[0].Load(int3(pix, 0));
|
||||
float4 _expr92 = v4_;
|
||||
v4_ = (_expr92 + _expr91);
|
||||
float4 _expr97 = texture_array_unbounded[uniform_index].Load(int3(pix, 0));
|
||||
float4 _expr98 = v4_;
|
||||
v4_ = (_expr98 + _expr97);
|
||||
float4 _expr103 = texture_array_unbounded[NonUniformResourceIndex(non_uniform_index)].Load(int3(pix, 0));
|
||||
float4 _expr104 = v4_;
|
||||
v4_ = (_expr104 + _expr103);
|
||||
float4 _expr82 = texture_array_unbounded[0].Load(int3(pix, 0));
|
||||
float4 _expr83 = v4_;
|
||||
v4_ = (_expr83 + _expr82);
|
||||
float4 _expr88 = texture_array_unbounded[uniform_index].Load(int3(pix, 0));
|
||||
float4 _expr89 = v4_;
|
||||
v4_ = (_expr89 + _expr88);
|
||||
float4 _expr94 = texture_array_unbounded[NonUniformResourceIndex(non_uniform_index)].Load(int3(pix, 0));
|
||||
float4 _expr95 = v4_;
|
||||
v4_ = (_expr95 + _expr94);
|
||||
uint _expr100 = u1_;
|
||||
u1_ = (_expr100 + NagaNumLayers2DArray(texture_array_2darray[0]));
|
||||
uint _expr105 = u1_;
|
||||
u1_ = (_expr105 + NagaNumLayers2DArray(texture_array_2darray[uniform_index]));
|
||||
uint _expr110 = u1_;
|
||||
u1_ = (_expr110 + NagaNumLayers2DArray(texture_array_2darray[0]));
|
||||
u1_ = (_expr110 + NagaNumLayers2DArray(texture_array_2darray[NonUniformResourceIndex(non_uniform_index)]));
|
||||
uint _expr115 = u1_;
|
||||
u1_ = (_expr115 + NagaNumLayers2DArray(texture_array_2darray[uniform_index]));
|
||||
u1_ = (_expr115 + NagaNumLevels2D(texture_array_bounded[0]));
|
||||
uint _expr120 = u1_;
|
||||
u1_ = (_expr120 + NagaNumLayers2DArray(texture_array_2darray[NonUniformResourceIndex(non_uniform_index)]));
|
||||
uint _expr126 = u1_;
|
||||
u1_ = (_expr126 + NagaNumLevels2D(texture_array_bounded[0]));
|
||||
uint _expr131 = u1_;
|
||||
u1_ = (_expr131 + NagaNumLevels2D(texture_array_bounded[uniform_index]));
|
||||
uint _expr136 = u1_;
|
||||
u1_ = (_expr136 + NagaNumLevels2D(texture_array_bounded[NonUniformResourceIndex(non_uniform_index)]));
|
||||
uint _expr142 = u1_;
|
||||
u1_ = (_expr142 + NagaMSNumSamples2D(texture_array_multisampled[0]));
|
||||
uint _expr147 = u1_;
|
||||
u1_ = (_expr147 + NagaMSNumSamples2D(texture_array_multisampled[uniform_index]));
|
||||
uint _expr152 = u1_;
|
||||
u1_ = (_expr152 + NagaMSNumSamples2D(texture_array_multisampled[NonUniformResourceIndex(non_uniform_index)]));
|
||||
float4 _expr160 = texture_array_bounded[0].Sample(samp[0], uv);
|
||||
u1_ = (_expr120 + NagaNumLevels2D(texture_array_bounded[uniform_index]));
|
||||
uint _expr125 = u1_;
|
||||
u1_ = (_expr125 + NagaNumLevels2D(texture_array_bounded[NonUniformResourceIndex(non_uniform_index)]));
|
||||
uint _expr130 = u1_;
|
||||
u1_ = (_expr130 + NagaMSNumSamples2D(texture_array_multisampled[0]));
|
||||
uint _expr135 = u1_;
|
||||
u1_ = (_expr135 + NagaMSNumSamples2D(texture_array_multisampled[uniform_index]));
|
||||
uint _expr140 = u1_;
|
||||
u1_ = (_expr140 + NagaMSNumSamples2D(texture_array_multisampled[NonUniformResourceIndex(non_uniform_index)]));
|
||||
float4 _expr146 = texture_array_bounded[0].Sample(samp[0], uv);
|
||||
float4 _expr147 = v4_;
|
||||
v4_ = (_expr147 + _expr146);
|
||||
float4 _expr153 = texture_array_bounded[uniform_index].Sample(samp[uniform_index], uv);
|
||||
float4 _expr154 = v4_;
|
||||
v4_ = (_expr154 + _expr153);
|
||||
float4 _expr160 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].Sample(samp[NonUniformResourceIndex(non_uniform_index)], uv);
|
||||
float4 _expr161 = v4_;
|
||||
v4_ = (_expr161 + _expr160);
|
||||
float4 _expr167 = texture_array_bounded[uniform_index].Sample(samp[uniform_index], uv);
|
||||
float4 _expr168 = v4_;
|
||||
v4_ = (_expr168 + _expr167);
|
||||
float4 _expr174 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].Sample(samp[NonUniformResourceIndex(non_uniform_index)], uv);
|
||||
float4 _expr175 = v4_;
|
||||
v4_ = (_expr175 + _expr174);
|
||||
float4 _expr184 = texture_array_bounded[0].SampleBias(samp[0], uv, 0.0);
|
||||
float4 _expr168 = texture_array_bounded[0].SampleBias(samp[0], uv, 0.0);
|
||||
float4 _expr169 = v4_;
|
||||
v4_ = (_expr169 + _expr168);
|
||||
float4 _expr176 = texture_array_bounded[uniform_index].SampleBias(samp[uniform_index], uv, 0.0);
|
||||
float4 _expr177 = v4_;
|
||||
v4_ = (_expr177 + _expr176);
|
||||
float4 _expr184 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].SampleBias(samp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float4 _expr185 = v4_;
|
||||
v4_ = (_expr185 + _expr184);
|
||||
float4 _expr192 = texture_array_bounded[uniform_index].SampleBias(samp[uniform_index], uv, 0.0);
|
||||
float4 _expr193 = v4_;
|
||||
v4_ = (_expr193 + _expr192);
|
||||
float4 _expr200 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].SampleBias(samp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float4 _expr201 = v4_;
|
||||
v4_ = (_expr201 + _expr200);
|
||||
float _expr210 = texture_array_depth[0].SampleCmp(samp_comp[0], uv, 0.0);
|
||||
float _expr211 = v1_;
|
||||
v1_ = (_expr211 + _expr210);
|
||||
float _expr218 = texture_array_depth[uniform_index].SampleCmp(samp_comp[uniform_index], uv, 0.0);
|
||||
float _expr219 = v1_;
|
||||
v1_ = (_expr219 + _expr218);
|
||||
float _expr226 = texture_array_depth[NonUniformResourceIndex(non_uniform_index)].SampleCmp(samp_comp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float _expr227 = v1_;
|
||||
v1_ = (_expr227 + _expr226);
|
||||
float _expr236 = texture_array_depth[0].SampleCmpLevelZero(samp_comp[0], uv, 0.0);
|
||||
float _expr237 = v1_;
|
||||
v1_ = (_expr237 + _expr236);
|
||||
float _expr244 = texture_array_depth[uniform_index].SampleCmpLevelZero(samp_comp[uniform_index], uv, 0.0);
|
||||
float _expr245 = v1_;
|
||||
v1_ = (_expr245 + _expr244);
|
||||
float _expr252 = texture_array_depth[NonUniformResourceIndex(non_uniform_index)].SampleCmpLevelZero(samp_comp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float _expr253 = v1_;
|
||||
v1_ = (_expr253 + _expr252);
|
||||
float4 _expr261 = texture_array_bounded[0].SampleGrad(samp[0], uv, uv, uv);
|
||||
float _expr192 = texture_array_depth[0].SampleCmp(samp_comp[0], uv, 0.0);
|
||||
float _expr193 = v1_;
|
||||
v1_ = (_expr193 + _expr192);
|
||||
float _expr200 = texture_array_depth[uniform_index].SampleCmp(samp_comp[uniform_index], uv, 0.0);
|
||||
float _expr201 = v1_;
|
||||
v1_ = (_expr201 + _expr200);
|
||||
float _expr208 = texture_array_depth[NonUniformResourceIndex(non_uniform_index)].SampleCmp(samp_comp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float _expr209 = v1_;
|
||||
v1_ = (_expr209 + _expr208);
|
||||
float _expr216 = texture_array_depth[0].SampleCmpLevelZero(samp_comp[0], uv, 0.0);
|
||||
float _expr217 = v1_;
|
||||
v1_ = (_expr217 + _expr216);
|
||||
float _expr224 = texture_array_depth[uniform_index].SampleCmpLevelZero(samp_comp[uniform_index], uv, 0.0);
|
||||
float _expr225 = v1_;
|
||||
v1_ = (_expr225 + _expr224);
|
||||
float _expr232 = texture_array_depth[NonUniformResourceIndex(non_uniform_index)].SampleCmpLevelZero(samp_comp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float _expr233 = v1_;
|
||||
v1_ = (_expr233 + _expr232);
|
||||
float4 _expr239 = texture_array_bounded[0].SampleGrad(samp[0], uv, uv, uv);
|
||||
float4 _expr240 = v4_;
|
||||
v4_ = (_expr240 + _expr239);
|
||||
float4 _expr246 = texture_array_bounded[uniform_index].SampleGrad(samp[uniform_index], uv, uv, uv);
|
||||
float4 _expr247 = v4_;
|
||||
v4_ = (_expr247 + _expr246);
|
||||
float4 _expr253 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].SampleGrad(samp[NonUniformResourceIndex(non_uniform_index)], uv, uv, uv);
|
||||
float4 _expr254 = v4_;
|
||||
v4_ = (_expr254 + _expr253);
|
||||
float4 _expr261 = texture_array_bounded[0].SampleLevel(samp[0], uv, 0.0);
|
||||
float4 _expr262 = v4_;
|
||||
v4_ = (_expr262 + _expr261);
|
||||
float4 _expr268 = texture_array_bounded[uniform_index].SampleGrad(samp[uniform_index], uv, uv, uv);
|
||||
float4 _expr269 = v4_;
|
||||
v4_ = (_expr269 + _expr268);
|
||||
float4 _expr275 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].SampleGrad(samp[NonUniformResourceIndex(non_uniform_index)], uv, uv, uv);
|
||||
float4 _expr276 = v4_;
|
||||
v4_ = (_expr276 + _expr275);
|
||||
float4 _expr285 = texture_array_bounded[0].SampleLevel(samp[0], uv, 0.0);
|
||||
float4 _expr286 = v4_;
|
||||
v4_ = (_expr286 + _expr285);
|
||||
float4 _expr293 = texture_array_bounded[uniform_index].SampleLevel(samp[uniform_index], uv, 0.0);
|
||||
float4 _expr269 = texture_array_bounded[uniform_index].SampleLevel(samp[uniform_index], uv, 0.0);
|
||||
float4 _expr270 = v4_;
|
||||
v4_ = (_expr270 + _expr269);
|
||||
float4 _expr277 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].SampleLevel(samp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float4 _expr278 = v4_;
|
||||
v4_ = (_expr278 + _expr277);
|
||||
float4 _expr282 = v4_;
|
||||
texture_array_storage[0][pix] = _expr282;
|
||||
float4 _expr285 = v4_;
|
||||
texture_array_storage[uniform_index][pix] = _expr285;
|
||||
float4 _expr288 = v4_;
|
||||
texture_array_storage[NonUniformResourceIndex(non_uniform_index)][pix] = _expr288;
|
||||
uint2 _expr289 = u2_;
|
||||
uint _expr290 = u1_;
|
||||
float2 v2_ = float2((_expr289 + (_expr290).xx));
|
||||
float4 _expr294 = v4_;
|
||||
v4_ = (_expr294 + _expr293);
|
||||
float4 _expr301 = texture_array_bounded[NonUniformResourceIndex(non_uniform_index)].SampleLevel(samp[NonUniformResourceIndex(non_uniform_index)], uv, 0.0);
|
||||
float4 _expr302 = v4_;
|
||||
v4_ = (_expr302 + _expr301);
|
||||
float4 _expr307 = v4_;
|
||||
texture_array_storage[0][pix] = _expr307;
|
||||
float4 _expr310 = v4_;
|
||||
texture_array_storage[uniform_index][pix] = _expr310;
|
||||
float4 _expr313 = v4_;
|
||||
texture_array_storage[NonUniformResourceIndex(non_uniform_index)][pix] = _expr313;
|
||||
uint2 _expr314 = u2_;
|
||||
uint _expr315 = u1_;
|
||||
float2 v2_ = float2((_expr314 + (_expr315).xx));
|
||||
float4 _expr319 = v4_;
|
||||
float _expr326 = v1_;
|
||||
return ((_expr319 + float4(v2_.x, v2_.y, v2_.x, v2_.y)) + (_expr326).xxxx);
|
||||
float _expr301 = v1_;
|
||||
return ((_expr294 + float4(v2_.x, v2_.y, v2_.x, v2_.y)) + (_expr301).xxxx);
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ void fb1_(inout bool cond)
|
||||
bool loop_init = true;
|
||||
while(true) {
|
||||
if (!loop_init) {
|
||||
bool _expr2 = cond;
|
||||
if (!(_expr2)) {
|
||||
bool _expr1 = cond;
|
||||
if (!(_expr1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ RWByteAddressBuffer unnamed : register(u0);
|
||||
|
||||
void function()
|
||||
{
|
||||
int _expr4 = asint(unnamed.Load(0));
|
||||
unnamed.Store(0, asuint((_expr4 + 1)));
|
||||
int _expr3 = asint(unnamed.Load(0));
|
||||
unnamed.Store(0, asuint((_expr3 + 1)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ void test_msl_packed_vec3_()
|
||||
idx = 1;
|
||||
alignment.Store(0+0, asuint(1.0));
|
||||
alignment.Store(0+0, asuint(2.0));
|
||||
int _expr17 = idx;
|
||||
alignment.Store(_expr17*4+0, asuint(3.0));
|
||||
int _expr16 = idx;
|
||||
alignment.Store(_expr16*4+0, asuint(3.0));
|
||||
FooStruct data = ConstructFooStruct(asfloat(alignment.Load3(0)), asfloat(alignment.Load(12)));
|
||||
float3 l0_ = data.v3_;
|
||||
float2 l1_ = data.v3_.zx;
|
||||
@@ -117,20 +117,20 @@ void main(uint3 __local_invocation_id : SV_GroupThreadID)
|
||||
bool at = (bool)0;
|
||||
|
||||
test_msl_packed_vec3_();
|
||||
float4x2 _expr8 = ((float4x2)global_nested_arrays_of_matrices_4x2_[0][0]);
|
||||
float4 _expr16 = global_nested_arrays_of_matrices_2x4_[0][0][0];
|
||||
wg[7] = mul(_expr16, _expr8).x;
|
||||
float3x2 _expr23 = ((float3x2)global_mat);
|
||||
float3 _expr25 = global_vec;
|
||||
wg[6] = mul(_expr25, _expr23).x;
|
||||
float _expr35 = asfloat(dummy.Load(4+8));
|
||||
wg[5] = _expr35;
|
||||
float _expr43 = float_vecs[0].w;
|
||||
wg[4] = _expr43;
|
||||
float _expr49 = asfloat(alignment.Load(12));
|
||||
wg[3] = _expr49;
|
||||
float _expr56 = asfloat(alignment.Load(0+0));
|
||||
wg[2] = _expr56;
|
||||
float4x2 _expr5 = ((float4x2)global_nested_arrays_of_matrices_4x2_[0][0]);
|
||||
float4 _expr10 = global_nested_arrays_of_matrices_2x4_[0][0][0];
|
||||
wg[7] = mul(_expr10, _expr5).x;
|
||||
float3x2 _expr16 = ((float3x2)global_mat);
|
||||
float3 _expr18 = global_vec;
|
||||
wg[6] = mul(_expr18, _expr16).x;
|
||||
float _expr26 = asfloat(dummy.Load(4+8));
|
||||
wg[5] = _expr26;
|
||||
float _expr32 = float_vecs[0].w;
|
||||
wg[4] = _expr32;
|
||||
float _expr37 = asfloat(alignment.Load(12));
|
||||
wg[3] = _expr37;
|
||||
float _expr43 = asfloat(alignment.Load(0+0));
|
||||
wg[2] = _expr43;
|
||||
alignment.Store(12, asuint(4.0));
|
||||
wg[1] = float(((NagaBufferLength(dummy) - 0) / 8));
|
||||
at_1 = 2u;
|
||||
|
||||
@@ -232,10 +232,10 @@ void assignment()
|
||||
int _expr36 = a_1;
|
||||
a_1 = (_expr36 - 1);
|
||||
vec0_ = (int3)0;
|
||||
int _expr43 = vec0_.y;
|
||||
vec0_.y = (_expr43 + 1);
|
||||
int _expr48 = vec0_.y;
|
||||
vec0_.y = (_expr48 - 1);
|
||||
int _expr42 = vec0_.y;
|
||||
vec0_.y = (_expr42 + 1);
|
||||
int _expr46 = vec0_.y;
|
||||
vec0_.y = (_expr46 - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ struct gl_PerVertex {
|
||||
int _end_pad_0;
|
||||
};
|
||||
|
||||
struct type_9 {
|
||||
struct type_4 {
|
||||
float2 member : LOC0;
|
||||
float4 gl_Position : SV_Position;
|
||||
};
|
||||
@@ -32,15 +32,15 @@ struct VertexOutput_main {
|
||||
|
||||
void main_1()
|
||||
{
|
||||
float2 _expr8 = a_uv_1;
|
||||
v_uv = _expr8;
|
||||
float2 _expr9 = a_pos_1;
|
||||
perVertexStruct.gl_Position = float4(_expr9.x, _expr9.y, 0.0, 1.0);
|
||||
float2 _expr6 = a_uv_1;
|
||||
v_uv = _expr6;
|
||||
float2 _expr7 = a_pos_1;
|
||||
perVertexStruct.gl_Position = float4(_expr7.x, _expr7.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
type_9 Constructtype_9(float2 arg0, float4 arg1) {
|
||||
type_9 ret = (type_9)0;
|
||||
type_4 Constructtype_4(float2 arg0, float4 arg1) {
|
||||
type_4 ret = (type_4)0;
|
||||
ret.member = arg0;
|
||||
ret.gl_Position = arg1;
|
||||
return ret;
|
||||
@@ -53,7 +53,7 @@ VertexOutput_main main(float2 a_uv : LOC1, float2 a_pos : LOC0)
|
||||
main_1();
|
||||
float2 _expr7 = v_uv;
|
||||
float4 _expr8 = perVertexStruct.gl_Position;
|
||||
const type_9 type_9_ = Constructtype_9(_expr7, _expr8);
|
||||
const VertexOutput_main type_9_1 = { type_9_.member, type_9_.gl_Position };
|
||||
return type_9_1;
|
||||
const type_4 type_4_ = Constructtype_4(_expr7, _expr8);
|
||||
const VertexOutput_main type_4_1 = { type_4_.member, type_4_.gl_Position };
|
||||
return type_4_1;
|
||||
}
|
||||
|
||||
2222
tests/out/ir/access.compact.ron
Normal file
2222
tests/out/ir/access.compact.ron
Normal file
File diff suppressed because it is too large
Load Diff
334
tests/out/ir/collatz.compact.ron
Normal file
334
tests/out/ir/collatz.compact.ron
Normal file
@@ -0,0 +1,334 @@
|
||||
(
|
||||
types: [
|
||||
(
|
||||
name: None,
|
||||
inner: Scalar(
|
||||
kind: Uint,
|
||||
width: 4,
|
||||
),
|
||||
),
|
||||
(
|
||||
name: None,
|
||||
inner: Array(
|
||||
base: 1,
|
||||
size: Dynamic,
|
||||
stride: 4,
|
||||
),
|
||||
),
|
||||
(
|
||||
name: Some("PrimeIndices"),
|
||||
inner: Struct(
|
||||
members: [
|
||||
(
|
||||
name: Some("data"),
|
||||
ty: 2,
|
||||
binding: None,
|
||||
offset: 0,
|
||||
),
|
||||
],
|
||||
span: 4,
|
||||
),
|
||||
),
|
||||
(
|
||||
name: None,
|
||||
inner: Vector(
|
||||
size: Tri,
|
||||
kind: Uint,
|
||||
width: 4,
|
||||
),
|
||||
),
|
||||
],
|
||||
special_types: (
|
||||
ray_desc: None,
|
||||
ray_intersection: None,
|
||||
predeclared_types: {},
|
||||
),
|
||||
constants: [],
|
||||
global_variables: [
|
||||
(
|
||||
name: Some("v_indices"),
|
||||
space: Storage(
|
||||
access: ("LOAD | STORE"),
|
||||
),
|
||||
binding: Some((
|
||||
group: 0,
|
||||
binding: 0,
|
||||
)),
|
||||
ty: 3,
|
||||
init: None,
|
||||
),
|
||||
],
|
||||
const_expressions: [],
|
||||
functions: [
|
||||
(
|
||||
name: Some("collatz_iterations"),
|
||||
arguments: [
|
||||
(
|
||||
name: Some("n_base"),
|
||||
ty: 1,
|
||||
binding: None,
|
||||
),
|
||||
],
|
||||
result: Some((
|
||||
ty: 1,
|
||||
binding: None,
|
||||
)),
|
||||
local_variables: [
|
||||
(
|
||||
name: Some("n"),
|
||||
ty: 1,
|
||||
init: None,
|
||||
),
|
||||
(
|
||||
name: Some("i"),
|
||||
ty: 1,
|
||||
init: None,
|
||||
),
|
||||
],
|
||||
expressions: [
|
||||
FunctionArgument(0),
|
||||
LocalVariable(1),
|
||||
Literal(U32(0)),
|
||||
LocalVariable(2),
|
||||
Load(
|
||||
pointer: 2,
|
||||
),
|
||||
Literal(U32(1)),
|
||||
Binary(
|
||||
op: Greater,
|
||||
left: 5,
|
||||
right: 6,
|
||||
),
|
||||
Load(
|
||||
pointer: 2,
|
||||
),
|
||||
Literal(U32(2)),
|
||||
Binary(
|
||||
op: Modulo,
|
||||
left: 8,
|
||||
right: 9,
|
||||
),
|
||||
Literal(U32(0)),
|
||||
Binary(
|
||||
op: Equal,
|
||||
left: 10,
|
||||
right: 11,
|
||||
),
|
||||
Load(
|
||||
pointer: 2,
|
||||
),
|
||||
Literal(U32(2)),
|
||||
Binary(
|
||||
op: Divide,
|
||||
left: 13,
|
||||
right: 14,
|
||||
),
|
||||
Literal(U32(3)),
|
||||
Load(
|
||||
pointer: 2,
|
||||
),
|
||||
Binary(
|
||||
op: Multiply,
|
||||
left: 16,
|
||||
right: 17,
|
||||
),
|
||||
Literal(U32(1)),
|
||||
Binary(
|
||||
op: Add,
|
||||
left: 18,
|
||||
right: 19,
|
||||
),
|
||||
Load(
|
||||
pointer: 4,
|
||||
),
|
||||
Literal(U32(1)),
|
||||
Binary(
|
||||
op: Add,
|
||||
left: 21,
|
||||
right: 22,
|
||||
),
|
||||
Load(
|
||||
pointer: 4,
|
||||
),
|
||||
],
|
||||
named_expressions: {
|
||||
1: "n_base",
|
||||
},
|
||||
body: [
|
||||
Store(
|
||||
pointer: 2,
|
||||
value: 1,
|
||||
),
|
||||
Store(
|
||||
pointer: 4,
|
||||
value: 3,
|
||||
),
|
||||
Loop(
|
||||
body: [
|
||||
Emit((
|
||||
start: 4,
|
||||
end: 5,
|
||||
)),
|
||||
Emit((
|
||||
start: 6,
|
||||
end: 7,
|
||||
)),
|
||||
If(
|
||||
condition: 7,
|
||||
accept: [],
|
||||
reject: [
|
||||
Break,
|
||||
],
|
||||
),
|
||||
Block([
|
||||
Emit((
|
||||
start: 7,
|
||||
end: 8,
|
||||
)),
|
||||
Emit((
|
||||
start: 9,
|
||||
end: 10,
|
||||
)),
|
||||
Emit((
|
||||
start: 11,
|
||||
end: 12,
|
||||
)),
|
||||
If(
|
||||
condition: 12,
|
||||
accept: [
|
||||
Emit((
|
||||
start: 12,
|
||||
end: 13,
|
||||
)),
|
||||
Emit((
|
||||
start: 14,
|
||||
end: 15,
|
||||
)),
|
||||
Store(
|
||||
pointer: 2,
|
||||
value: 15,
|
||||
),
|
||||
],
|
||||
reject: [
|
||||
Emit((
|
||||
start: 16,
|
||||
end: 18,
|
||||
)),
|
||||
Emit((
|
||||
start: 19,
|
||||
end: 20,
|
||||
)),
|
||||
Store(
|
||||
pointer: 2,
|
||||
value: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
Emit((
|
||||
start: 20,
|
||||
end: 21,
|
||||
)),
|
||||
Emit((
|
||||
start: 22,
|
||||
end: 23,
|
||||
)),
|
||||
Store(
|
||||
pointer: 4,
|
||||
value: 23,
|
||||
),
|
||||
]),
|
||||
],
|
||||
continuing: [],
|
||||
break_if: None,
|
||||
),
|
||||
Emit((
|
||||
start: 23,
|
||||
end: 24,
|
||||
)),
|
||||
Return(
|
||||
value: Some(24),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
entry_points: [
|
||||
(
|
||||
name: "main",
|
||||
stage: Compute,
|
||||
early_depth_test: None,
|
||||
workgroup_size: (1, 1, 1),
|
||||
function: (
|
||||
name: Some("main"),
|
||||
arguments: [
|
||||
(
|
||||
name: Some("global_id"),
|
||||
ty: 4,
|
||||
binding: Some(BuiltIn(GlobalInvocationId)),
|
||||
),
|
||||
],
|
||||
result: None,
|
||||
local_variables: [],
|
||||
expressions: [
|
||||
FunctionArgument(0),
|
||||
GlobalVariable(1),
|
||||
AccessIndex(
|
||||
base: 2,
|
||||
index: 0,
|
||||
),
|
||||
AccessIndex(
|
||||
base: 1,
|
||||
index: 0,
|
||||
),
|
||||
Access(
|
||||
base: 3,
|
||||
index: 4,
|
||||
),
|
||||
GlobalVariable(1),
|
||||
AccessIndex(
|
||||
base: 6,
|
||||
index: 0,
|
||||
),
|
||||
AccessIndex(
|
||||
base: 1,
|
||||
index: 0,
|
||||
),
|
||||
Access(
|
||||
base: 7,
|
||||
index: 8,
|
||||
),
|
||||
Load(
|
||||
pointer: 9,
|
||||
),
|
||||
CallResult(1),
|
||||
],
|
||||
named_expressions: {
|
||||
1: "global_id",
|
||||
},
|
||||
body: [
|
||||
Emit((
|
||||
start: 2,
|
||||
end: 5,
|
||||
)),
|
||||
Emit((
|
||||
start: 6,
|
||||
end: 10,
|
||||
)),
|
||||
Call(
|
||||
function: 1,
|
||||
arguments: [
|
||||
10,
|
||||
],
|
||||
result: Some(11),
|
||||
),
|
||||
Store(
|
||||
pointer: 5,
|
||||
value: 11,
|
||||
),
|
||||
Return(
|
||||
value: None,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
1036
tests/out/ir/shadow.compact.ron
Normal file
1036
tests/out/ir/shadow.compact.ron
Normal file
File diff suppressed because it is too large
Load Diff
@@ -39,22 +39,22 @@ struct Bar {
|
||||
struct Baz {
|
||||
metal::float3x2 m;
|
||||
};
|
||||
struct type_15 {
|
||||
struct type_14 {
|
||||
metal::float4x2 inner[2];
|
||||
};
|
||||
struct MatCx2InArray {
|
||||
type_15 am;
|
||||
type_14 am;
|
||||
};
|
||||
struct type_18 {
|
||||
struct type_17 {
|
||||
float inner[10];
|
||||
};
|
||||
struct type_19 {
|
||||
type_18 inner[5];
|
||||
struct type_18 {
|
||||
type_17 inner[5];
|
||||
};
|
||||
struct type_22 {
|
||||
struct type_20 {
|
||||
int inner[5];
|
||||
};
|
||||
struct type_26 {
|
||||
struct type_22 {
|
||||
metal::float4 inner[2];
|
||||
};
|
||||
|
||||
@@ -68,31 +68,31 @@ void test_matrix_within_struct_accesses(
|
||||
idx = _e3 - 1;
|
||||
metal::float3x2 l0_ = baz.m;
|
||||
metal::float2 l1_ = baz.m[0];
|
||||
int _e15 = idx;
|
||||
metal::float2 l2_ = baz.m[_e15];
|
||||
int _e14 = idx;
|
||||
metal::float2 l2_ = baz.m[_e14];
|
||||
float l3_ = baz.m[0].y;
|
||||
int _e29 = idx;
|
||||
float l4_ = baz.m[0][_e29];
|
||||
int _e34 = idx;
|
||||
float l5_ = baz.m[_e34].y;
|
||||
int _e41 = idx;
|
||||
int _e43 = idx;
|
||||
float l6_ = baz.m[_e41][_e43];
|
||||
int _e25 = idx;
|
||||
float l4_ = baz.m[0][_e25];
|
||||
int _e30 = idx;
|
||||
float l5_ = baz.m[_e30].y;
|
||||
int _e36 = idx;
|
||||
int _e38 = idx;
|
||||
float l6_ = baz.m[_e36][_e38];
|
||||
t = Baz {metal::float3x2(metal::float2(1.0), metal::float2(2.0), metal::float2(3.0))};
|
||||
int _e56 = idx;
|
||||
idx = _e56 + 1;
|
||||
int _e51 = idx;
|
||||
idx = _e51 + 1;
|
||||
t.m = metal::float3x2(metal::float2(6.0), metal::float2(5.0), metal::float2(4.0));
|
||||
t.m[0] = metal::float2(9.0);
|
||||
int _e72 = idx;
|
||||
t.m[_e72] = metal::float2(90.0);
|
||||
int _e66 = idx;
|
||||
t.m[_e66] = metal::float2(90.0);
|
||||
t.m[0].y = 10.0;
|
||||
int _e76 = idx;
|
||||
t.m[0][_e76] = 20.0;
|
||||
int _e80 = idx;
|
||||
t.m[_e80].y = 30.0;
|
||||
int _e85 = idx;
|
||||
t.m[0][_e85] = 20.0;
|
||||
int _e89 = idx;
|
||||
t.m[_e89].y = 30.0;
|
||||
int _e95 = idx;
|
||||
int _e97 = idx;
|
||||
t.m[_e95][_e97] = 40.0;
|
||||
int _e87 = idx;
|
||||
t.m[_e85][_e87] = 40.0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -104,35 +104,35 @@ void test_matrix_within_array_within_struct_accesses(
|
||||
idx_1 = 1;
|
||||
int _e3 = idx_1;
|
||||
idx_1 = _e3 - 1;
|
||||
type_15 l0_1 = nested_mat_cx2_.am;
|
||||
type_14 l0_1 = nested_mat_cx2_.am;
|
||||
metal::float4x2 l1_1 = nested_mat_cx2_.am.inner[0];
|
||||
metal::float2 l2_1 = nested_mat_cx2_.am.inner[0][0];
|
||||
int _e24 = idx_1;
|
||||
metal::float2 l3_1 = nested_mat_cx2_.am.inner[0][_e24];
|
||||
int _e20 = idx_1;
|
||||
metal::float2 l3_1 = nested_mat_cx2_.am.inner[0][_e20];
|
||||
float l4_1 = nested_mat_cx2_.am.inner[0][0].y;
|
||||
int _e42 = idx_1;
|
||||
float l5_1 = nested_mat_cx2_.am.inner[0][0][_e42];
|
||||
int _e49 = idx_1;
|
||||
float l6_1 = nested_mat_cx2_.am.inner[0][_e49].y;
|
||||
int _e58 = idx_1;
|
||||
int _e60 = idx_1;
|
||||
float l7_ = nested_mat_cx2_.am.inner[0][_e58][_e60];
|
||||
t_1 = MatCx2InArray {type_15 {}};
|
||||
int _e67 = idx_1;
|
||||
idx_1 = _e67 + 1;
|
||||
t_1.am = type_15 {};
|
||||
int _e33 = idx_1;
|
||||
float l5_1 = nested_mat_cx2_.am.inner[0][0][_e33];
|
||||
int _e39 = idx_1;
|
||||
float l6_1 = nested_mat_cx2_.am.inner[0][_e39].y;
|
||||
int _e46 = idx_1;
|
||||
int _e48 = idx_1;
|
||||
float l7_ = nested_mat_cx2_.am.inner[0][_e46][_e48];
|
||||
t_1 = MatCx2InArray {type_14 {}};
|
||||
int _e55 = idx_1;
|
||||
idx_1 = _e55 + 1;
|
||||
t_1.am = type_14 {};
|
||||
t_1.am.inner[0] = metal::float4x2(metal::float2(8.0), metal::float2(7.0), metal::float2(6.0), metal::float2(5.0));
|
||||
t_1.am.inner[0][0] = metal::float2(9.0);
|
||||
int _e93 = idx_1;
|
||||
t_1.am.inner[0][_e93] = metal::float2(90.0);
|
||||
int _e77 = idx_1;
|
||||
t_1.am.inner[0][_e77] = metal::float2(90.0);
|
||||
t_1.am.inner[0][0].y = 10.0;
|
||||
int _e110 = idx_1;
|
||||
t_1.am.inner[0][0][_e110] = 20.0;
|
||||
int _e116 = idx_1;
|
||||
t_1.am.inner[0][_e116].y = 30.0;
|
||||
int _e124 = idx_1;
|
||||
int _e126 = idx_1;
|
||||
t_1.am.inner[0][_e124][_e126] = 40.0;
|
||||
int _e89 = idx_1;
|
||||
t_1.am.inner[0][0][_e89] = 20.0;
|
||||
int _e94 = idx_1;
|
||||
t_1.am.inner[0][_e94].y = 30.0;
|
||||
int _e100 = idx_1;
|
||||
int _e102 = idx_1;
|
||||
t_1.am.inner[0][_e100][_e102] = 40.0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ float read_from_private(
|
||||
}
|
||||
|
||||
float test_arr_as_arg(
|
||||
type_19 a
|
||||
type_18 a
|
||||
) {
|
||||
return a.inner[4].inner[9];
|
||||
}
|
||||
@@ -157,9 +157,9 @@ void assign_through_ptr_fn(
|
||||
}
|
||||
|
||||
void assign_array_through_ptr_fn(
|
||||
thread type_26& foo_2
|
||||
thread type_22& foo_2
|
||||
) {
|
||||
foo_2 = type_26 {metal::float4(1.0), metal::float4(2.0)};
|
||||
foo_2 = type_22 {metal::float4(1.0), metal::float4(2.0)};
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ vertex foo_vertOutput foo_vert(
|
||||
, constant _mslBufferSizes& _buffer_sizes [[buffer(24)]]
|
||||
) {
|
||||
float foo = {};
|
||||
type_22 c2_ = {};
|
||||
type_20 c2_ = {};
|
||||
foo = 0.0;
|
||||
float baz_1 = foo;
|
||||
foo = 1.0;
|
||||
@@ -188,11 +188,11 @@ vertex foo_vertOutput foo_vert(
|
||||
float b = bar._matrix[3].x;
|
||||
int a_1 = bar.data[(1 + (_buffer_sizes.size1 - 160 - 8) / 8) - 2u].value;
|
||||
metal::int2 c = qux;
|
||||
float _e34 = read_from_private(foo);
|
||||
c2_ = type_22 {a_1, static_cast<int>(b), 3, 4, 5};
|
||||
float _e33 = read_from_private(foo);
|
||||
c2_ = type_20 {a_1, static_cast<int>(b), 3, 4, 5};
|
||||
c2_.inner[vi + 1u] = 42;
|
||||
int value = c2_.inner[vi];
|
||||
float _e48 = test_arr_as_arg(type_19 {});
|
||||
float _e47 = test_arr_as_arg(type_18 {});
|
||||
return foo_vertOutput { metal::float4(_matrix * static_cast<metal::float4>(metal::int4(value)), 2.0) };
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@ kernel void assign_through_ptr(
|
||||
val = {};
|
||||
}
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
type_26 arr = {};
|
||||
arr = type_26 {metal::float4(6.0), metal::float4(7.0)};
|
||||
type_22 arr = {};
|
||||
arr = type_22 {metal::float4(6.0), metal::float4(7.0)};
|
||||
assign_through_ptr_fn(val);
|
||||
assign_array_through_ptr_fn(arr);
|
||||
return;
|
||||
|
||||
@@ -52,75 +52,75 @@ kernel void cs_main(
|
||||
uint l6_ = metal::atomic_load_explicit(&workgroup_struct.atomic_scalar, metal::memory_order_relaxed);
|
||||
int l7_ = metal::atomic_load_explicit(&workgroup_struct.atomic_arr.inner[1], metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e59 = metal::atomic_fetch_add_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e64 = metal::atomic_fetch_add_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e68 = metal::atomic_fetch_add_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e74 = metal::atomic_fetch_add_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e77 = metal::atomic_fetch_add_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e82 = metal::atomic_fetch_add_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e86 = metal::atomic_fetch_add_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e92 = metal::atomic_fetch_add_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e51 = metal::atomic_fetch_add_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e55 = metal::atomic_fetch_add_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e59 = metal::atomic_fetch_add_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e64 = metal::atomic_fetch_add_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e67 = metal::atomic_fetch_add_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e71 = metal::atomic_fetch_add_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e75 = metal::atomic_fetch_add_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e80 = metal::atomic_fetch_add_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e95 = metal::atomic_fetch_sub_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e100 = metal::atomic_fetch_sub_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e104 = metal::atomic_fetch_sub_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e110 = metal::atomic_fetch_sub_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e113 = metal::atomic_fetch_sub_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e118 = metal::atomic_fetch_sub_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e122 = metal::atomic_fetch_sub_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e128 = metal::atomic_fetch_sub_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e83 = metal::atomic_fetch_sub_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e87 = metal::atomic_fetch_sub_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e91 = metal::atomic_fetch_sub_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e96 = metal::atomic_fetch_sub_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e99 = metal::atomic_fetch_sub_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e103 = metal::atomic_fetch_sub_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e107 = metal::atomic_fetch_sub_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e112 = metal::atomic_fetch_sub_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e131 = metal::atomic_fetch_max_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e136 = metal::atomic_fetch_max_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e140 = metal::atomic_fetch_max_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e146 = metal::atomic_fetch_max_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e149 = metal::atomic_fetch_max_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e154 = metal::atomic_fetch_max_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e158 = metal::atomic_fetch_max_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e164 = metal::atomic_fetch_max_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e115 = metal::atomic_fetch_max_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e119 = metal::atomic_fetch_max_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e123 = metal::atomic_fetch_max_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e128 = metal::atomic_fetch_max_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e131 = metal::atomic_fetch_max_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e135 = metal::atomic_fetch_max_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e139 = metal::atomic_fetch_max_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e144 = metal::atomic_fetch_max_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e167 = metal::atomic_fetch_min_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e172 = metal::atomic_fetch_min_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e176 = metal::atomic_fetch_min_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e182 = metal::atomic_fetch_min_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e185 = metal::atomic_fetch_min_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e190 = metal::atomic_fetch_min_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e194 = metal::atomic_fetch_min_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e200 = metal::atomic_fetch_min_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e147 = metal::atomic_fetch_min_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e151 = metal::atomic_fetch_min_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e155 = metal::atomic_fetch_min_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e160 = metal::atomic_fetch_min_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e163 = metal::atomic_fetch_min_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e167 = metal::atomic_fetch_min_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e171 = metal::atomic_fetch_min_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e176 = metal::atomic_fetch_min_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e203 = metal::atomic_fetch_and_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e208 = metal::atomic_fetch_and_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e212 = metal::atomic_fetch_and_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e218 = metal::atomic_fetch_and_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e221 = metal::atomic_fetch_and_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e226 = metal::atomic_fetch_and_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e230 = metal::atomic_fetch_and_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e236 = metal::atomic_fetch_and_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e179 = metal::atomic_fetch_and_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e183 = metal::atomic_fetch_and_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e187 = metal::atomic_fetch_and_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e192 = metal::atomic_fetch_and_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e195 = metal::atomic_fetch_and_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e199 = metal::atomic_fetch_and_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e203 = metal::atomic_fetch_and_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e208 = metal::atomic_fetch_and_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e239 = metal::atomic_fetch_or_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e244 = metal::atomic_fetch_or_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e248 = metal::atomic_fetch_or_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e254 = metal::atomic_fetch_or_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e257 = metal::atomic_fetch_or_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e262 = metal::atomic_fetch_or_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e266 = metal::atomic_fetch_or_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e272 = metal::atomic_fetch_or_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e211 = metal::atomic_fetch_or_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e215 = metal::atomic_fetch_or_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e219 = metal::atomic_fetch_or_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e224 = metal::atomic_fetch_or_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e227 = metal::atomic_fetch_or_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e231 = metal::atomic_fetch_or_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e235 = metal::atomic_fetch_or_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e240 = metal::atomic_fetch_or_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
|
||||
uint _e275 = metal::atomic_fetch_xor_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e280 = metal::atomic_fetch_xor_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e284 = metal::atomic_fetch_xor_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e290 = metal::atomic_fetch_xor_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e293 = metal::atomic_fetch_xor_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e298 = metal::atomic_fetch_xor_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e302 = metal::atomic_fetch_xor_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e308 = metal::atomic_fetch_xor_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e311 = metal::atomic_exchange_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e316 = metal::atomic_exchange_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e320 = metal::atomic_exchange_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e326 = metal::atomic_exchange_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e329 = metal::atomic_exchange_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e334 = metal::atomic_exchange_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e338 = metal::atomic_exchange_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e344 = metal::atomic_exchange_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e243 = metal::atomic_fetch_xor_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e247 = metal::atomic_fetch_xor_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e251 = metal::atomic_fetch_xor_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e256 = metal::atomic_fetch_xor_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e259 = metal::atomic_fetch_xor_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e263 = metal::atomic_fetch_xor_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e267 = metal::atomic_fetch_xor_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e272 = metal::atomic_fetch_xor_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e275 = metal::atomic_exchange_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e279 = metal::atomic_exchange_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e283 = metal::atomic_exchange_explicit(&storage_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e288 = metal::atomic_exchange_explicit(&storage_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e291 = metal::atomic_exchange_explicit(&workgroup_atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e295 = metal::atomic_exchange_explicit(&workgroup_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
uint _e299 = metal::atomic_exchange_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
|
||||
int _e304 = metal::atomic_exchange_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,127 +48,127 @@ fragment main_Output main_(
|
||||
v4_ = metal::float4(0.0);
|
||||
metal::float2 uv = metal::float2(0.0);
|
||||
metal::int2 pix = metal::int2(0);
|
||||
metal::uint2 _e23 = u2_;
|
||||
u2_ = _e23 + metal::uint2(texture_array_unbounded[0].get_width(), texture_array_unbounded[0].get_height());
|
||||
metal::uint2 _e28 = u2_;
|
||||
u2_ = _e28 + metal::uint2(texture_array_unbounded[uniform_index].get_width(), texture_array_unbounded[uniform_index].get_height());
|
||||
metal::uint2 _e33 = u2_;
|
||||
u2_ = _e33 + metal::uint2(texture_array_unbounded[non_uniform_index].get_width(), texture_array_unbounded[non_uniform_index].get_height());
|
||||
metal::float4 _e42 = texture_array_bounded[0].gather(samp[0], uv);
|
||||
metal::float4 _e43 = v4_;
|
||||
v4_ = _e43 + _e42;
|
||||
metal::float4 _e50 = texture_array_bounded[uniform_index].gather(samp[uniform_index], uv);
|
||||
metal::float4 _e51 = v4_;
|
||||
v4_ = _e51 + _e50;
|
||||
metal::float4 _e58 = texture_array_bounded[non_uniform_index].gather(samp[non_uniform_index], uv);
|
||||
metal::float4 _e59 = v4_;
|
||||
v4_ = _e59 + _e58;
|
||||
metal::float4 _e68 = texture_array_depth[0].gather_compare(samp_comp[0], uv, 0.0);
|
||||
metal::uint2 _e22 = u2_;
|
||||
u2_ = _e22 + metal::uint2(texture_array_unbounded[0].get_width(), texture_array_unbounded[0].get_height());
|
||||
metal::uint2 _e27 = u2_;
|
||||
u2_ = _e27 + metal::uint2(texture_array_unbounded[uniform_index].get_width(), texture_array_unbounded[uniform_index].get_height());
|
||||
metal::uint2 _e32 = u2_;
|
||||
u2_ = _e32 + metal::uint2(texture_array_unbounded[non_uniform_index].get_width(), texture_array_unbounded[non_uniform_index].get_height());
|
||||
metal::float4 _e38 = texture_array_bounded[0].gather(samp[0], uv);
|
||||
metal::float4 _e39 = v4_;
|
||||
v4_ = _e39 + _e38;
|
||||
metal::float4 _e45 = texture_array_bounded[uniform_index].gather(samp[uniform_index], uv);
|
||||
metal::float4 _e46 = v4_;
|
||||
v4_ = _e46 + _e45;
|
||||
metal::float4 _e52 = texture_array_bounded[non_uniform_index].gather(samp[non_uniform_index], uv);
|
||||
metal::float4 _e53 = v4_;
|
||||
v4_ = _e53 + _e52;
|
||||
metal::float4 _e60 = texture_array_depth[0].gather_compare(samp_comp[0], uv, 0.0);
|
||||
metal::float4 _e61 = v4_;
|
||||
v4_ = _e61 + _e60;
|
||||
metal::float4 _e68 = texture_array_depth[uniform_index].gather_compare(samp_comp[uniform_index], uv, 0.0);
|
||||
metal::float4 _e69 = v4_;
|
||||
v4_ = _e69 + _e68;
|
||||
metal::float4 _e76 = texture_array_depth[uniform_index].gather_compare(samp_comp[uniform_index], uv, 0.0);
|
||||
metal::float4 _e76 = texture_array_depth[non_uniform_index].gather_compare(samp_comp[non_uniform_index], uv, 0.0);
|
||||
metal::float4 _e77 = v4_;
|
||||
v4_ = _e77 + _e76;
|
||||
metal::float4 _e84 = texture_array_depth[non_uniform_index].gather_compare(samp_comp[non_uniform_index], uv, 0.0);
|
||||
metal::float4 _e85 = v4_;
|
||||
v4_ = _e85 + _e84;
|
||||
metal::float4 _e91 = (uint(0) < texture_array_unbounded[0].get_num_mip_levels() && metal::all(metal::uint2(pix) < metal::uint2(texture_array_unbounded[0].get_width(0), texture_array_unbounded[0].get_height(0))) ? texture_array_unbounded[0].read(metal::uint2(pix), 0): DefaultConstructible());
|
||||
metal::float4 _e92 = v4_;
|
||||
v4_ = _e92 + _e91;
|
||||
metal::float4 _e97 = (uint(0) < texture_array_unbounded[uniform_index].get_num_mip_levels() && metal::all(metal::uint2(pix) < metal::uint2(texture_array_unbounded[uniform_index].get_width(0), texture_array_unbounded[uniform_index].get_height(0))) ? texture_array_unbounded[uniform_index].read(metal::uint2(pix), 0): DefaultConstructible());
|
||||
metal::float4 _e98 = v4_;
|
||||
v4_ = _e98 + _e97;
|
||||
metal::float4 _e103 = (uint(0) < texture_array_unbounded[non_uniform_index].get_num_mip_levels() && metal::all(metal::uint2(pix) < metal::uint2(texture_array_unbounded[non_uniform_index].get_width(0), texture_array_unbounded[non_uniform_index].get_height(0))) ? texture_array_unbounded[non_uniform_index].read(metal::uint2(pix), 0): DefaultConstructible());
|
||||
metal::float4 _e104 = v4_;
|
||||
v4_ = _e104 + _e103;
|
||||
metal::float4 _e82 = (uint(0) < texture_array_unbounded[0].get_num_mip_levels() && metal::all(metal::uint2(pix) < metal::uint2(texture_array_unbounded[0].get_width(0), texture_array_unbounded[0].get_height(0))) ? texture_array_unbounded[0].read(metal::uint2(pix), 0): DefaultConstructible());
|
||||
metal::float4 _e83 = v4_;
|
||||
v4_ = _e83 + _e82;
|
||||
metal::float4 _e88 = (uint(0) < texture_array_unbounded[uniform_index].get_num_mip_levels() && metal::all(metal::uint2(pix) < metal::uint2(texture_array_unbounded[uniform_index].get_width(0), texture_array_unbounded[uniform_index].get_height(0))) ? texture_array_unbounded[uniform_index].read(metal::uint2(pix), 0): DefaultConstructible());
|
||||
metal::float4 _e89 = v4_;
|
||||
v4_ = _e89 + _e88;
|
||||
metal::float4 _e94 = (uint(0) < texture_array_unbounded[non_uniform_index].get_num_mip_levels() && metal::all(metal::uint2(pix) < metal::uint2(texture_array_unbounded[non_uniform_index].get_width(0), texture_array_unbounded[non_uniform_index].get_height(0))) ? texture_array_unbounded[non_uniform_index].read(metal::uint2(pix), 0): DefaultConstructible());
|
||||
metal::float4 _e95 = v4_;
|
||||
v4_ = _e95 + _e94;
|
||||
uint _e100 = u1_;
|
||||
u1_ = _e100 + texture_array_2darray[0].get_array_size();
|
||||
uint _e105 = u1_;
|
||||
u1_ = _e105 + texture_array_2darray[uniform_index].get_array_size();
|
||||
uint _e110 = u1_;
|
||||
u1_ = _e110 + texture_array_2darray[0].get_array_size();
|
||||
u1_ = _e110 + texture_array_2darray[non_uniform_index].get_array_size();
|
||||
uint _e115 = u1_;
|
||||
u1_ = _e115 + texture_array_2darray[uniform_index].get_array_size();
|
||||
u1_ = _e115 + texture_array_bounded[0].get_num_mip_levels();
|
||||
uint _e120 = u1_;
|
||||
u1_ = _e120 + texture_array_2darray[non_uniform_index].get_array_size();
|
||||
uint _e126 = u1_;
|
||||
u1_ = _e126 + texture_array_bounded[0].get_num_mip_levels();
|
||||
uint _e131 = u1_;
|
||||
u1_ = _e131 + texture_array_bounded[uniform_index].get_num_mip_levels();
|
||||
uint _e136 = u1_;
|
||||
u1_ = _e136 + texture_array_bounded[non_uniform_index].get_num_mip_levels();
|
||||
uint _e142 = u1_;
|
||||
u1_ = _e142 + texture_array_multisampled[0].get_num_samples();
|
||||
uint _e147 = u1_;
|
||||
u1_ = _e147 + texture_array_multisampled[uniform_index].get_num_samples();
|
||||
uint _e152 = u1_;
|
||||
u1_ = _e152 + texture_array_multisampled[non_uniform_index].get_num_samples();
|
||||
metal::float4 _e160 = texture_array_bounded[0].sample(samp[0], uv);
|
||||
u1_ = _e120 + texture_array_bounded[uniform_index].get_num_mip_levels();
|
||||
uint _e125 = u1_;
|
||||
u1_ = _e125 + texture_array_bounded[non_uniform_index].get_num_mip_levels();
|
||||
uint _e130 = u1_;
|
||||
u1_ = _e130 + texture_array_multisampled[0].get_num_samples();
|
||||
uint _e135 = u1_;
|
||||
u1_ = _e135 + texture_array_multisampled[uniform_index].get_num_samples();
|
||||
uint _e140 = u1_;
|
||||
u1_ = _e140 + texture_array_multisampled[non_uniform_index].get_num_samples();
|
||||
metal::float4 _e146 = texture_array_bounded[0].sample(samp[0], uv);
|
||||
metal::float4 _e147 = v4_;
|
||||
v4_ = _e147 + _e146;
|
||||
metal::float4 _e153 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv);
|
||||
metal::float4 _e154 = v4_;
|
||||
v4_ = _e154 + _e153;
|
||||
metal::float4 _e160 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv);
|
||||
metal::float4 _e161 = v4_;
|
||||
v4_ = _e161 + _e160;
|
||||
metal::float4 _e167 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv);
|
||||
metal::float4 _e168 = v4_;
|
||||
v4_ = _e168 + _e167;
|
||||
metal::float4 _e174 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv);
|
||||
metal::float4 _e175 = v4_;
|
||||
v4_ = _e175 + _e174;
|
||||
metal::float4 _e184 = texture_array_bounded[0].sample(samp[0], uv, metal::bias(0.0));
|
||||
metal::float4 _e168 = texture_array_bounded[0].sample(samp[0], uv, metal::bias(0.0));
|
||||
metal::float4 _e169 = v4_;
|
||||
v4_ = _e169 + _e168;
|
||||
metal::float4 _e176 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv, metal::bias(0.0));
|
||||
metal::float4 _e177 = v4_;
|
||||
v4_ = _e177 + _e176;
|
||||
metal::float4 _e184 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv, metal::bias(0.0));
|
||||
metal::float4 _e185 = v4_;
|
||||
v4_ = _e185 + _e184;
|
||||
metal::float4 _e192 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv, metal::bias(0.0));
|
||||
metal::float4 _e193 = v4_;
|
||||
v4_ = _e193 + _e192;
|
||||
metal::float4 _e200 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv, metal::bias(0.0));
|
||||
metal::float4 _e201 = v4_;
|
||||
v4_ = _e201 + _e200;
|
||||
float _e210 = texture_array_depth[0].sample_compare(samp_comp[0], uv, 0.0);
|
||||
float _e211 = v1_;
|
||||
v1_ = _e211 + _e210;
|
||||
float _e218 = texture_array_depth[uniform_index].sample_compare(samp_comp[uniform_index], uv, 0.0);
|
||||
float _e219 = v1_;
|
||||
v1_ = _e219 + _e218;
|
||||
float _e226 = texture_array_depth[non_uniform_index].sample_compare(samp_comp[non_uniform_index], uv, 0.0);
|
||||
float _e227 = v1_;
|
||||
v1_ = _e227 + _e226;
|
||||
float _e236 = texture_array_depth[0].sample_compare(samp_comp[0], uv, 0.0);
|
||||
float _e237 = v1_;
|
||||
v1_ = _e237 + _e236;
|
||||
float _e244 = texture_array_depth[uniform_index].sample_compare(samp_comp[uniform_index], uv, 0.0);
|
||||
float _e245 = v1_;
|
||||
v1_ = _e245 + _e244;
|
||||
float _e252 = texture_array_depth[non_uniform_index].sample_compare(samp_comp[non_uniform_index], uv, 0.0);
|
||||
float _e253 = v1_;
|
||||
v1_ = _e253 + _e252;
|
||||
metal::float4 _e261 = texture_array_bounded[0].sample(samp[0], uv, metal::gradient2d(uv, uv));
|
||||
float _e192 = texture_array_depth[0].sample_compare(samp_comp[0], uv, 0.0);
|
||||
float _e193 = v1_;
|
||||
v1_ = _e193 + _e192;
|
||||
float _e200 = texture_array_depth[uniform_index].sample_compare(samp_comp[uniform_index], uv, 0.0);
|
||||
float _e201 = v1_;
|
||||
v1_ = _e201 + _e200;
|
||||
float _e208 = texture_array_depth[non_uniform_index].sample_compare(samp_comp[non_uniform_index], uv, 0.0);
|
||||
float _e209 = v1_;
|
||||
v1_ = _e209 + _e208;
|
||||
float _e216 = texture_array_depth[0].sample_compare(samp_comp[0], uv, 0.0);
|
||||
float _e217 = v1_;
|
||||
v1_ = _e217 + _e216;
|
||||
float _e224 = texture_array_depth[uniform_index].sample_compare(samp_comp[uniform_index], uv, 0.0);
|
||||
float _e225 = v1_;
|
||||
v1_ = _e225 + _e224;
|
||||
float _e232 = texture_array_depth[non_uniform_index].sample_compare(samp_comp[non_uniform_index], uv, 0.0);
|
||||
float _e233 = v1_;
|
||||
v1_ = _e233 + _e232;
|
||||
metal::float4 _e239 = texture_array_bounded[0].sample(samp[0], uv, metal::gradient2d(uv, uv));
|
||||
metal::float4 _e240 = v4_;
|
||||
v4_ = _e240 + _e239;
|
||||
metal::float4 _e246 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv, metal::gradient2d(uv, uv));
|
||||
metal::float4 _e247 = v4_;
|
||||
v4_ = _e247 + _e246;
|
||||
metal::float4 _e253 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv, metal::gradient2d(uv, uv));
|
||||
metal::float4 _e254 = v4_;
|
||||
v4_ = _e254 + _e253;
|
||||
metal::float4 _e261 = texture_array_bounded[0].sample(samp[0], uv, metal::level(0.0));
|
||||
metal::float4 _e262 = v4_;
|
||||
v4_ = _e262 + _e261;
|
||||
metal::float4 _e268 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv, metal::gradient2d(uv, uv));
|
||||
metal::float4 _e269 = v4_;
|
||||
v4_ = _e269 + _e268;
|
||||
metal::float4 _e275 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv, metal::gradient2d(uv, uv));
|
||||
metal::float4 _e276 = v4_;
|
||||
v4_ = _e276 + _e275;
|
||||
metal::float4 _e285 = texture_array_bounded[0].sample(samp[0], uv, metal::level(0.0));
|
||||
metal::float4 _e286 = v4_;
|
||||
v4_ = _e286 + _e285;
|
||||
metal::float4 _e293 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv, metal::level(0.0));
|
||||
metal::float4 _e294 = v4_;
|
||||
v4_ = _e294 + _e293;
|
||||
metal::float4 _e301 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv, metal::level(0.0));
|
||||
metal::float4 _e302 = v4_;
|
||||
v4_ = _e302 + _e301;
|
||||
metal::float4 _e307 = v4_;
|
||||
metal::float4 _e269 = texture_array_bounded[uniform_index].sample(samp[uniform_index], uv, metal::level(0.0));
|
||||
metal::float4 _e270 = v4_;
|
||||
v4_ = _e270 + _e269;
|
||||
metal::float4 _e277 = texture_array_bounded[non_uniform_index].sample(samp[non_uniform_index], uv, metal::level(0.0));
|
||||
metal::float4 _e278 = v4_;
|
||||
v4_ = _e278 + _e277;
|
||||
metal::float4 _e282 = v4_;
|
||||
if (metal::all(metal::uint2(pix) < metal::uint2(texture_array_storage[0].get_width(), texture_array_storage[0].get_height()))) {
|
||||
texture_array_storage[0].write(_e307, metal::uint2(pix));
|
||||
texture_array_storage[0].write(_e282, metal::uint2(pix));
|
||||
}
|
||||
metal::float4 _e310 = v4_;
|
||||
metal::float4 _e285 = v4_;
|
||||
if (metal::all(metal::uint2(pix) < metal::uint2(texture_array_storage[uniform_index].get_width(), texture_array_storage[uniform_index].get_height()))) {
|
||||
texture_array_storage[uniform_index].write(_e310, metal::uint2(pix));
|
||||
texture_array_storage[uniform_index].write(_e285, metal::uint2(pix));
|
||||
}
|
||||
metal::float4 _e313 = v4_;
|
||||
metal::float4 _e288 = v4_;
|
||||
if (metal::all(metal::uint2(pix) < metal::uint2(texture_array_storage[non_uniform_index].get_width(), texture_array_storage[non_uniform_index].get_height()))) {
|
||||
texture_array_storage[non_uniform_index].write(_e313, metal::uint2(pix));
|
||||
texture_array_storage[non_uniform_index].write(_e288, metal::uint2(pix));
|
||||
}
|
||||
metal::uint2 _e314 = u2_;
|
||||
uint _e315 = u1_;
|
||||
metal::float2 v2_ = static_cast<metal::float2>(_e314 + metal::uint2(_e315));
|
||||
metal::float4 _e319 = v4_;
|
||||
float _e326 = v1_;
|
||||
return main_Output { (_e319 + metal::float4(v2_.x, v2_.y, v2_.x, v2_.y)) + metal::float4(_e326) };
|
||||
metal::uint2 _e289 = u2_;
|
||||
uint _e290 = u1_;
|
||||
metal::float2 v2_ = static_cast<metal::float2>(_e289 + metal::uint2(_e290));
|
||||
metal::float4 _e294 = v4_;
|
||||
float _e301 = v1_;
|
||||
return main_Output { (_e294 + metal::float4(v2_.x, v2_.y, v2_.x, v2_.y)) + metal::float4(_e301) };
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@ float index_in_bounds(
|
||||
device Globals const& globals,
|
||||
constant _mslBufferSizes& _buffer_sizes
|
||||
) {
|
||||
float _e4 = globals.a.inner[9];
|
||||
float _e9 = globals.v.w;
|
||||
float _e17 = globals.m[2].w;
|
||||
return (_e4 + _e9) + _e17;
|
||||
float _e3 = globals.a.inner[9];
|
||||
float _e7 = globals.v.w;
|
||||
float _e13 = globals.m[2].w;
|
||||
return (_e3 + _e7) + _e13;
|
||||
}
|
||||
|
||||
void set_array(
|
||||
|
||||
@@ -93,10 +93,10 @@ float index_in_bounds(
|
||||
device Globals const& globals,
|
||||
constant _mslBufferSizes& _buffer_sizes
|
||||
) {
|
||||
float _e4 = globals.a.inner[9];
|
||||
float _e9 = globals.v.w;
|
||||
float _e17 = globals.m[2].w;
|
||||
return (_e4 + _e9) + _e17;
|
||||
float _e3 = globals.a.inner[9];
|
||||
float _e7 = globals.v.w;
|
||||
float _e13 = globals.m[2].w;
|
||||
return (_e3 + _e7) + _e13;
|
||||
}
|
||||
|
||||
void set_array(
|
||||
|
||||
@@ -11,7 +11,7 @@ void fb1_(
|
||||
bool loop_init = true;
|
||||
while(true) {
|
||||
if (!loop_init) {
|
||||
bool _e2 = cond;
|
||||
bool _e1 = cond;
|
||||
if (!(cond)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ struct type_1 {
|
||||
void function(
|
||||
device type_1& unnamed
|
||||
) {
|
||||
int _e4 = unnamed.member;
|
||||
unnamed.member = _e4 + 1;
|
||||
int _e3 = unnamed.member;
|
||||
unnamed.member = _e3 + 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,8 +47,8 @@ void test_msl_packed_vec3_(
|
||||
idx = 1;
|
||||
alignment.v3_[0] = 1.0;
|
||||
alignment.v3_[0] = 2.0;
|
||||
int _e17 = idx;
|
||||
alignment.v3_[_e17] = 3.0;
|
||||
int _e16 = idx;
|
||||
alignment.v3_[_e16] = 3.0;
|
||||
FooStruct data = alignment;
|
||||
metal::float3 l0_ = data.v3_;
|
||||
metal::float2 l1_ = metal::float3(data.v3_).zx;
|
||||
@@ -80,20 +80,20 @@ kernel void main_(
|
||||
float Foo = {};
|
||||
bool at = {};
|
||||
test_msl_packed_vec3_(alignment);
|
||||
metal::float4x2 _e8 = global_nested_arrays_of_matrices_4x2_.inner[0].inner[0];
|
||||
metal::float4 _e16 = global_nested_arrays_of_matrices_2x4_.inner[0].inner[0][0];
|
||||
wg.inner[7] = (_e8 * _e16).x;
|
||||
metal::float3x2 _e23 = global_mat;
|
||||
metal::float3 _e25 = global_vec;
|
||||
wg.inner[6] = (_e23 * _e25).x;
|
||||
float _e35 = dummy[1].y;
|
||||
wg.inner[5] = _e35;
|
||||
float _e43 = float_vecs.inner[0].w;
|
||||
wg.inner[4] = _e43;
|
||||
float _e49 = alignment.v1_;
|
||||
wg.inner[3] = _e49;
|
||||
float _e56 = alignment.v3_[0];
|
||||
wg.inner[2] = _e56;
|
||||
metal::float4x2 _e5 = global_nested_arrays_of_matrices_4x2_.inner[0].inner[0];
|
||||
metal::float4 _e10 = global_nested_arrays_of_matrices_2x4_.inner[0].inner[0][0];
|
||||
wg.inner[7] = (_e5 * _e10).x;
|
||||
metal::float3x2 _e16 = global_mat;
|
||||
metal::float3 _e18 = global_vec;
|
||||
wg.inner[6] = (_e16 * _e18).x;
|
||||
float _e26 = dummy[1].y;
|
||||
wg.inner[5] = _e26;
|
||||
float _e32 = float_vecs.inner[0].w;
|
||||
wg.inner[4] = _e32;
|
||||
float _e37 = alignment.v1_;
|
||||
wg.inner[3] = _e37;
|
||||
float _e43 = alignment.v3_[0];
|
||||
wg.inner[2] = _e43;
|
||||
alignment.v1_ = 4.0;
|
||||
wg.inner[1] = static_cast<float>(1 + (_buffer_sizes.size3 - 0 - 8) / 8);
|
||||
metal::atomic_store_explicit(&at_1, 2u, metal::memory_order_relaxed);
|
||||
|
||||
@@ -237,10 +237,10 @@ void assignment(
|
||||
int _e36 = a_1;
|
||||
a_1 = _e36 - 1;
|
||||
vec0_ = metal::int3 {};
|
||||
int _e43 = vec0_.y;
|
||||
vec0_.y = _e43 + 1;
|
||||
int _e48 = vec0_.y;
|
||||
vec0_.y = _e48 - 1;
|
||||
int _e42 = vec0_.y;
|
||||
vec0_.y = _e42 + 1;
|
||||
int _e46 = vec0_.y;
|
||||
vec0_.y = _e46 - 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
|
||||
using metal::uint;
|
||||
|
||||
struct type_5 {
|
||||
struct type_3 {
|
||||
float inner[1];
|
||||
};
|
||||
struct gl_PerVertex {
|
||||
metal::float4 gl_Position;
|
||||
float gl_PointSize;
|
||||
type_5 gl_ClipDistance;
|
||||
type_5 gl_CullDistance;
|
||||
type_3 gl_ClipDistance;
|
||||
type_3 gl_CullDistance;
|
||||
};
|
||||
struct type_9 {
|
||||
struct type_4 {
|
||||
metal::float2 member;
|
||||
metal::float4 gl_Position;
|
||||
};
|
||||
@@ -24,10 +24,10 @@ void main_1(
|
||||
thread gl_PerVertex& perVertexStruct,
|
||||
thread metal::float2& a_pos_1
|
||||
) {
|
||||
metal::float2 _e8 = a_uv_1;
|
||||
v_uv = _e8;
|
||||
metal::float2 _e9 = a_pos_1;
|
||||
perVertexStruct.gl_Position = metal::float4(_e9.x, _e9.y, 0.0, 1.0);
|
||||
metal::float2 _e6 = a_uv_1;
|
||||
v_uv = _e6;
|
||||
metal::float2 _e7 = a_pos_1;
|
||||
perVertexStruct.gl_Position = metal::float4(_e7.x, _e7.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ vertex main_Output main_(
|
||||
) {
|
||||
metal::float2 v_uv = {};
|
||||
metal::float2 a_uv_1 = {};
|
||||
gl_PerVertex perVertexStruct = gl_PerVertex {metal::float4(0.0, 0.0, 0.0, 1.0), 1.0, type_5 {}, type_5 {}};
|
||||
gl_PerVertex perVertexStruct = gl_PerVertex {metal::float4(0.0, 0.0, 0.0, 1.0), 1.0, type_3 {}, type_3 {}};
|
||||
metal::float2 a_pos_1 = {};
|
||||
const auto a_uv = varyings.a_uv;
|
||||
const auto a_pos = varyings.a_pos;
|
||||
@@ -53,6 +53,6 @@ vertex main_Output main_(
|
||||
main_1(v_uv, a_uv_1, perVertexStruct, a_pos_1);
|
||||
metal::float2 _e7 = v_uv;
|
||||
metal::float4 _e8 = perVertexStruct.gl_Position;
|
||||
const auto _tmp = type_9 {_e7, _e8};
|
||||
const auto _tmp = type_4 {_e7, _e8};
|
||||
return main_Output { _tmp.member, _tmp.gl_Position };
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 324
|
||||
; Bound: 322
|
||||
OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %237 "foo_vert" %232 %235
|
||||
OpEntryPoint Fragment %284 "foo_frag" %283
|
||||
OpEntryPoint GLCompute %304 "assign_through_ptr" %307
|
||||
OpExecutionMode %284 OriginUpperLeft
|
||||
OpExecutionMode %304 LocalSize 1 1 1
|
||||
OpEntryPoint Vertex %232 "foo_vert" %227 %230
|
||||
OpEntryPoint Fragment %282 "foo_frag" %281
|
||||
OpEntryPoint GLCompute %302 "assign_through_ptr" %305
|
||||
OpExecutionMode %282 OriginUpperLeft
|
||||
OpExecutionMode %302 LocalSize 1 1 1
|
||||
OpMemberName %6 0 "a"
|
||||
OpMemberName %6 1 "b"
|
||||
OpMemberName %6 2 "c"
|
||||
@@ -28,33 +28,33 @@ OpMemberName %22 0 "m"
|
||||
OpName %22 "Baz"
|
||||
OpMemberName %26 0 "am"
|
||||
OpName %26 "MatCx2InArray"
|
||||
OpName %45 "global_const"
|
||||
OpName %47 "bar"
|
||||
OpName %49 "baz"
|
||||
OpName %52 "qux"
|
||||
OpName %55 "nested_mat_cx2"
|
||||
OpName %58 "val"
|
||||
OpName %59 "idx"
|
||||
OpName %62 "t"
|
||||
OpName %66 "test_matrix_within_struct_accesses"
|
||||
OpName %137 "idx"
|
||||
OpName %138 "t"
|
||||
OpName %142 "test_matrix_within_array_within_struct_accesses"
|
||||
OpName %200 "foo"
|
||||
OpName %201 "read_from_private"
|
||||
OpName %206 "a"
|
||||
OpName %207 "test_arr_as_arg"
|
||||
OpName %213 "p"
|
||||
OpName %214 "assign_through_ptr_fn"
|
||||
OpName %219 "foo"
|
||||
OpName %220 "assign_array_through_ptr_fn"
|
||||
OpName %226 "foo"
|
||||
OpName %228 "c2"
|
||||
OpName %232 "vi"
|
||||
OpName %237 "foo_vert"
|
||||
OpName %284 "foo_frag"
|
||||
OpName %301 "arr"
|
||||
OpName %304 "assign_through_ptr"
|
||||
OpName %40 "global_const"
|
||||
OpName %42 "bar"
|
||||
OpName %44 "baz"
|
||||
OpName %47 "qux"
|
||||
OpName %50 "nested_mat_cx2"
|
||||
OpName %53 "val"
|
||||
OpName %54 "idx"
|
||||
OpName %57 "t"
|
||||
OpName %61 "test_matrix_within_struct_accesses"
|
||||
OpName %132 "idx"
|
||||
OpName %133 "t"
|
||||
OpName %137 "test_matrix_within_array_within_struct_accesses"
|
||||
OpName %195 "foo"
|
||||
OpName %196 "read_from_private"
|
||||
OpName %201 "a"
|
||||
OpName %202 "test_arr_as_arg"
|
||||
OpName %208 "p"
|
||||
OpName %209 "assign_through_ptr_fn"
|
||||
OpName %214 "foo"
|
||||
OpName %215 "assign_array_through_ptr_fn"
|
||||
OpName %221 "foo"
|
||||
OpName %223 "c2"
|
||||
OpName %227 "vi"
|
||||
OpName %232 "foo_vert"
|
||||
OpName %282 "foo_frag"
|
||||
OpName %299 "arr"
|
||||
OpName %302 "assign_through_ptr"
|
||||
OpMemberDecorate %6 0 Offset 0
|
||||
OpMemberDecorate %6 1 Offset 16
|
||||
OpMemberDecorate %6 2 Offset 28
|
||||
@@ -83,26 +83,26 @@ OpMemberDecorate %26 0 ColMajor
|
||||
OpMemberDecorate %26 0 MatrixStride 8
|
||||
OpDecorate %28 ArrayStride 4
|
||||
OpDecorate %29 ArrayStride 40
|
||||
OpDecorate %33 ArrayStride 4
|
||||
OpDecorate %36 ArrayStride 16
|
||||
OpDecorate %32 ArrayStride 4
|
||||
OpDecorate %34 ArrayStride 16
|
||||
OpDecorate %42 DescriptorSet 0
|
||||
OpDecorate %42 Binding 0
|
||||
OpDecorate %44 DescriptorSet 0
|
||||
OpDecorate %44 Binding 1
|
||||
OpDecorate %45 Block
|
||||
OpMemberDecorate %45 0 Offset 0
|
||||
OpDecorate %47 DescriptorSet 0
|
||||
OpDecorate %47 Binding 0
|
||||
OpDecorate %49 DescriptorSet 0
|
||||
OpDecorate %49 Binding 1
|
||||
OpDecorate %50 Block
|
||||
OpMemberDecorate %50 0 Offset 0
|
||||
OpDecorate %52 DescriptorSet 0
|
||||
OpDecorate %52 Binding 2
|
||||
OpDecorate %53 Block
|
||||
OpMemberDecorate %53 0 Offset 0
|
||||
OpDecorate %55 DescriptorSet 0
|
||||
OpDecorate %55 Binding 3
|
||||
OpDecorate %56 Block
|
||||
OpMemberDecorate %56 0 Offset 0
|
||||
OpDecorate %232 BuiltIn VertexIndex
|
||||
OpDecorate %235 BuiltIn Position
|
||||
OpDecorate %283 Location 0
|
||||
OpDecorate %307 BuiltIn LocalInvocationId
|
||||
OpDecorate %47 Binding 2
|
||||
OpDecorate %48 Block
|
||||
OpMemberDecorate %48 0 Offset 0
|
||||
OpDecorate %50 DescriptorSet 0
|
||||
OpDecorate %50 Binding 3
|
||||
OpDecorate %51 Block
|
||||
OpMemberDecorate %51 0 Offset 0
|
||||
OpDecorate %227 BuiltIn VertexIndex
|
||||
OpDecorate %230 BuiltIn Position
|
||||
OpDecorate %281 Location 0
|
||||
OpDecorate %305 BuiltIn LocalInvocationId
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeInt 32 0
|
||||
%4 = OpTypeVector %3 3
|
||||
@@ -133,365 +133,363 @@ OpDecorate %307 BuiltIn LocalInvocationId
|
||||
%30 = OpConstant %3 5
|
||||
%29 = OpTypeArray %28 %30
|
||||
%31 = OpTypeVector %10 4
|
||||
%32 = OpTypePointer StorageBuffer %5
|
||||
%33 = OpTypeArray %5 %30
|
||||
%34 = OpTypeVector %5 4
|
||||
%35 = OpTypePointer Workgroup %3
|
||||
%36 = OpTypeArray %31 %14
|
||||
%37 = OpTypePointer Function %36
|
||||
%38 = OpConstant %3 0
|
||||
%39 = OpConstantComposite %4 %38 %38 %38
|
||||
%40 = OpConstant %5 0
|
||||
%41 = OpConstantComposite %6 %38 %39 %40
|
||||
%42 = OpConstant %5 2
|
||||
%43 = OpConstant %5 10
|
||||
%44 = OpConstant %5 5
|
||||
%46 = OpTypePointer Private %6
|
||||
%45 = OpVariable %46 Private %41
|
||||
%48 = OpTypePointer StorageBuffer %20
|
||||
%47 = OpVariable %48 StorageBuffer
|
||||
%50 = OpTypeStruct %22
|
||||
%51 = OpTypePointer Uniform %50
|
||||
%49 = OpVariable %51 Uniform
|
||||
%53 = OpTypeStruct %23
|
||||
%54 = OpTypePointer StorageBuffer %53
|
||||
%52 = OpVariable %54 StorageBuffer
|
||||
%56 = OpTypeStruct %26
|
||||
%57 = OpTypePointer Uniform %56
|
||||
%55 = OpVariable %57 Uniform
|
||||
%58 = OpVariable %35 Workgroup
|
||||
%60 = OpTypePointer Function %5
|
||||
%61 = OpConstantNull %5
|
||||
%63 = OpTypePointer Function %22
|
||||
%64 = OpConstantNull %22
|
||||
%67 = OpTypeFunction %2
|
||||
%68 = OpTypePointer Uniform %22
|
||||
%70 = OpConstant %5 1
|
||||
%71 = OpConstant %10 1.0
|
||||
%72 = OpConstant %10 2.0
|
||||
%73 = OpConstant %10 3.0
|
||||
%74 = OpConstant %10 6.0
|
||||
%75 = OpConstant %10 5.0
|
||||
%76 = OpConstant %10 4.0
|
||||
%77 = OpConstant %10 9.0
|
||||
%78 = OpConstant %10 90.0
|
||||
%79 = OpConstant %10 10.0
|
||||
%80 = OpConstant %10 20.0
|
||||
%81 = OpConstant %10 30.0
|
||||
%82 = OpConstant %10 40.0
|
||||
%86 = OpTypePointer Uniform %21
|
||||
%89 = OpTypePointer Uniform %12
|
||||
%95 = OpTypePointer Uniform %10
|
||||
%96 = OpConstant %3 1
|
||||
%116 = OpTypePointer Function %21
|
||||
%122 = OpTypePointer Function %12
|
||||
%128 = OpTypePointer Function %10
|
||||
%139 = OpTypePointer Function %26
|
||||
%140 = OpConstantNull %26
|
||||
%143 = OpTypePointer Uniform %26
|
||||
%145 = OpConstantNull %25
|
||||
%146 = OpConstant %10 8.0
|
||||
%147 = OpConstant %10 7.0
|
||||
%151 = OpTypePointer Uniform %25
|
||||
%154 = OpTypePointer Uniform %24
|
||||
%177 = OpTypePointer Function %25
|
||||
%179 = OpTypePointer Function %24
|
||||
%202 = OpTypeFunction %10 %27
|
||||
%208 = OpTypeFunction %10 %29
|
||||
%215 = OpTypeFunction %2 %35
|
||||
%216 = OpConstant %3 42
|
||||
%221 = OpTypeFunction %2 %37
|
||||
%227 = OpConstantNull %10
|
||||
%229 = OpTypePointer Function %33
|
||||
%230 = OpConstantNull %33
|
||||
%233 = OpTypePointer Input %3
|
||||
%232 = OpVariable %233 Input
|
||||
%236 = OpTypePointer Output %31
|
||||
%235 = OpVariable %236 Output
|
||||
%239 = OpTypePointer StorageBuffer %23
|
||||
%242 = OpConstant %10 0.0
|
||||
%243 = OpConstant %3 3
|
||||
%244 = OpConstant %5 3
|
||||
%245 = OpConstant %5 4
|
||||
%246 = OpConstant %5 42
|
||||
%247 = OpConstantNull %29
|
||||
%252 = OpTypePointer StorageBuffer %8
|
||||
%255 = OpTypePointer StorageBuffer %18
|
||||
%256 = OpConstant %3 4
|
||||
%259 = OpTypePointer StorageBuffer %9
|
||||
%260 = OpTypePointer StorageBuffer %10
|
||||
%263 = OpTypePointer StorageBuffer %19
|
||||
%266 = OpTypePointer StorageBuffer %7
|
||||
%283 = OpVariable %236 Output
|
||||
%286 = OpConstantNull %23
|
||||
%302 = OpConstantNull %36
|
||||
%306 = OpConstantNull %3
|
||||
%308 = OpTypePointer Input %4
|
||||
%307 = OpVariable %308 Input
|
||||
%310 = OpConstantNull %4
|
||||
%312 = OpTypeBool
|
||||
%311 = OpTypeVector %312 3
|
||||
%317 = OpConstant %3 264
|
||||
%66 = OpFunction %2 None %67
|
||||
%65 = OpLabel
|
||||
%59 = OpVariable %60 Function %61
|
||||
%62 = OpVariable %63 Function %64
|
||||
%69 = OpAccessChain %68 %49 %38
|
||||
OpBranch %83
|
||||
%83 = OpLabel
|
||||
OpStore %59 %70
|
||||
%84 = OpLoad %5 %59
|
||||
%85 = OpISub %5 %84 %70
|
||||
OpStore %59 %85
|
||||
%87 = OpAccessChain %86 %69 %38
|
||||
%88 = OpLoad %21 %87
|
||||
%90 = OpAccessChain %89 %69 %38 %38
|
||||
%91 = OpLoad %12 %90
|
||||
%92 = OpLoad %5 %59
|
||||
%93 = OpAccessChain %89 %69 %38 %92
|
||||
%94 = OpLoad %12 %93
|
||||
%97 = OpAccessChain %95 %69 %38 %38 %96
|
||||
%98 = OpLoad %10 %97
|
||||
%99 = OpLoad %5 %59
|
||||
%100 = OpAccessChain %95 %69 %38 %38 %99
|
||||
%101 = OpLoad %10 %100
|
||||
%102 = OpLoad %5 %59
|
||||
%103 = OpAccessChain %95 %69 %38 %102 %96
|
||||
%104 = OpLoad %10 %103
|
||||
%105 = OpLoad %5 %59
|
||||
%106 = OpLoad %5 %59
|
||||
%107 = OpAccessChain %95 %69 %38 %105 %106
|
||||
%108 = OpLoad %10 %107
|
||||
%109 = OpCompositeConstruct %12 %71 %71
|
||||
%110 = OpCompositeConstruct %12 %72 %72
|
||||
%111 = OpCompositeConstruct %12 %73 %73
|
||||
%112 = OpCompositeConstruct %21 %109 %110 %111
|
||||
%113 = OpCompositeConstruct %22 %112
|
||||
OpStore %62 %113
|
||||
%114 = OpLoad %5 %59
|
||||
%115 = OpIAdd %5 %114 %70
|
||||
OpStore %59 %115
|
||||
%117 = OpCompositeConstruct %12 %74 %74
|
||||
%118 = OpCompositeConstruct %12 %75 %75
|
||||
%119 = OpCompositeConstruct %12 %76 %76
|
||||
%120 = OpCompositeConstruct %21 %117 %118 %119
|
||||
%121 = OpAccessChain %116 %62 %38
|
||||
OpStore %121 %120
|
||||
%123 = OpCompositeConstruct %12 %77 %77
|
||||
%124 = OpAccessChain %122 %62 %38 %38
|
||||
OpStore %124 %123
|
||||
%125 = OpLoad %5 %59
|
||||
%126 = OpCompositeConstruct %12 %78 %78
|
||||
%127 = OpAccessChain %122 %62 %38 %125
|
||||
OpStore %127 %126
|
||||
%129 = OpAccessChain %128 %62 %38 %38 %96
|
||||
OpStore %129 %79
|
||||
%130 = OpLoad %5 %59
|
||||
%131 = OpAccessChain %128 %62 %38 %38 %130
|
||||
OpStore %131 %80
|
||||
%132 = OpLoad %5 %59
|
||||
%133 = OpAccessChain %128 %62 %38 %132 %96
|
||||
OpStore %133 %81
|
||||
%134 = OpLoad %5 %59
|
||||
%135 = OpLoad %5 %59
|
||||
%136 = OpAccessChain %128 %62 %38 %134 %135
|
||||
OpStore %136 %82
|
||||
%32 = OpTypeArray %5 %30
|
||||
%33 = OpTypePointer Workgroup %3
|
||||
%34 = OpTypeArray %31 %14
|
||||
%35 = OpTypePointer Function %34
|
||||
%36 = OpConstant %3 0
|
||||
%37 = OpConstantComposite %4 %36 %36 %36
|
||||
%38 = OpConstant %5 0
|
||||
%39 = OpConstantComposite %6 %36 %37 %38
|
||||
%41 = OpTypePointer Private %6
|
||||
%40 = OpVariable %41 Private %39
|
||||
%43 = OpTypePointer StorageBuffer %20
|
||||
%42 = OpVariable %43 StorageBuffer
|
||||
%45 = OpTypeStruct %22
|
||||
%46 = OpTypePointer Uniform %45
|
||||
%44 = OpVariable %46 Uniform
|
||||
%48 = OpTypeStruct %23
|
||||
%49 = OpTypePointer StorageBuffer %48
|
||||
%47 = OpVariable %49 StorageBuffer
|
||||
%51 = OpTypeStruct %26
|
||||
%52 = OpTypePointer Uniform %51
|
||||
%50 = OpVariable %52 Uniform
|
||||
%53 = OpVariable %33 Workgroup
|
||||
%55 = OpTypePointer Function %5
|
||||
%56 = OpConstantNull %5
|
||||
%58 = OpTypePointer Function %22
|
||||
%59 = OpConstantNull %22
|
||||
%62 = OpTypeFunction %2
|
||||
%63 = OpTypePointer Uniform %22
|
||||
%65 = OpConstant %5 1
|
||||
%66 = OpConstant %10 1.0
|
||||
%67 = OpConstant %10 2.0
|
||||
%68 = OpConstant %10 3.0
|
||||
%69 = OpConstant %10 6.0
|
||||
%70 = OpConstant %10 5.0
|
||||
%71 = OpConstant %10 4.0
|
||||
%72 = OpConstant %10 9.0
|
||||
%73 = OpConstant %10 90.0
|
||||
%74 = OpConstant %10 10.0
|
||||
%75 = OpConstant %10 20.0
|
||||
%76 = OpConstant %10 30.0
|
||||
%77 = OpConstant %10 40.0
|
||||
%81 = OpTypePointer Uniform %21
|
||||
%84 = OpTypePointer Uniform %12
|
||||
%90 = OpTypePointer Uniform %10
|
||||
%91 = OpConstant %3 1
|
||||
%111 = OpTypePointer Function %21
|
||||
%117 = OpTypePointer Function %12
|
||||
%123 = OpTypePointer Function %10
|
||||
%134 = OpTypePointer Function %26
|
||||
%135 = OpConstantNull %26
|
||||
%138 = OpTypePointer Uniform %26
|
||||
%140 = OpConstantNull %25
|
||||
%141 = OpConstant %10 8.0
|
||||
%142 = OpConstant %10 7.0
|
||||
%146 = OpTypePointer Uniform %25
|
||||
%149 = OpTypePointer Uniform %24
|
||||
%172 = OpTypePointer Function %25
|
||||
%174 = OpTypePointer Function %24
|
||||
%197 = OpTypeFunction %10 %27
|
||||
%203 = OpTypeFunction %10 %29
|
||||
%210 = OpTypeFunction %2 %33
|
||||
%211 = OpConstant %3 42
|
||||
%216 = OpTypeFunction %2 %35
|
||||
%222 = OpConstantNull %10
|
||||
%224 = OpTypePointer Function %32
|
||||
%225 = OpConstantNull %32
|
||||
%228 = OpTypePointer Input %3
|
||||
%227 = OpVariable %228 Input
|
||||
%231 = OpTypePointer Output %31
|
||||
%230 = OpVariable %231 Output
|
||||
%234 = OpTypePointer StorageBuffer %23
|
||||
%237 = OpConstant %10 0.0
|
||||
%238 = OpConstant %3 3
|
||||
%239 = OpConstant %5 3
|
||||
%240 = OpConstant %5 4
|
||||
%241 = OpConstant %5 5
|
||||
%242 = OpConstant %5 42
|
||||
%243 = OpConstantNull %29
|
||||
%248 = OpTypePointer StorageBuffer %8
|
||||
%251 = OpTypePointer StorageBuffer %18
|
||||
%252 = OpConstant %3 4
|
||||
%255 = OpTypePointer StorageBuffer %9
|
||||
%256 = OpTypePointer StorageBuffer %10
|
||||
%259 = OpTypePointer StorageBuffer %19
|
||||
%262 = OpTypePointer StorageBuffer %7
|
||||
%263 = OpTypePointer StorageBuffer %5
|
||||
%275 = OpTypeVector %5 4
|
||||
%281 = OpVariable %231 Output
|
||||
%284 = OpConstantNull %23
|
||||
%300 = OpConstantNull %34
|
||||
%304 = OpConstantNull %3
|
||||
%306 = OpTypePointer Input %4
|
||||
%305 = OpVariable %306 Input
|
||||
%308 = OpConstantNull %4
|
||||
%310 = OpTypeBool
|
||||
%309 = OpTypeVector %310 3
|
||||
%315 = OpConstant %3 264
|
||||
%61 = OpFunction %2 None %62
|
||||
%60 = OpLabel
|
||||
%54 = OpVariable %55 Function %56
|
||||
%57 = OpVariable %58 Function %59
|
||||
%64 = OpAccessChain %63 %44 %36
|
||||
OpBranch %78
|
||||
%78 = OpLabel
|
||||
OpStore %54 %65
|
||||
%79 = OpLoad %5 %54
|
||||
%80 = OpISub %5 %79 %65
|
||||
OpStore %54 %80
|
||||
%82 = OpAccessChain %81 %64 %36
|
||||
%83 = OpLoad %21 %82
|
||||
%85 = OpAccessChain %84 %64 %36 %36
|
||||
%86 = OpLoad %12 %85
|
||||
%87 = OpLoad %5 %54
|
||||
%88 = OpAccessChain %84 %64 %36 %87
|
||||
%89 = OpLoad %12 %88
|
||||
%92 = OpAccessChain %90 %64 %36 %36 %91
|
||||
%93 = OpLoad %10 %92
|
||||
%94 = OpLoad %5 %54
|
||||
%95 = OpAccessChain %90 %64 %36 %36 %94
|
||||
%96 = OpLoad %10 %95
|
||||
%97 = OpLoad %5 %54
|
||||
%98 = OpAccessChain %90 %64 %36 %97 %91
|
||||
%99 = OpLoad %10 %98
|
||||
%100 = OpLoad %5 %54
|
||||
%101 = OpLoad %5 %54
|
||||
%102 = OpAccessChain %90 %64 %36 %100 %101
|
||||
%103 = OpLoad %10 %102
|
||||
%104 = OpCompositeConstruct %12 %66 %66
|
||||
%105 = OpCompositeConstruct %12 %67 %67
|
||||
%106 = OpCompositeConstruct %12 %68 %68
|
||||
%107 = OpCompositeConstruct %21 %104 %105 %106
|
||||
%108 = OpCompositeConstruct %22 %107
|
||||
OpStore %57 %108
|
||||
%109 = OpLoad %5 %54
|
||||
%110 = OpIAdd %5 %109 %65
|
||||
OpStore %54 %110
|
||||
%112 = OpCompositeConstruct %12 %69 %69
|
||||
%113 = OpCompositeConstruct %12 %70 %70
|
||||
%114 = OpCompositeConstruct %12 %71 %71
|
||||
%115 = OpCompositeConstruct %21 %112 %113 %114
|
||||
%116 = OpAccessChain %111 %57 %36
|
||||
OpStore %116 %115
|
||||
%118 = OpCompositeConstruct %12 %72 %72
|
||||
%119 = OpAccessChain %117 %57 %36 %36
|
||||
OpStore %119 %118
|
||||
%120 = OpLoad %5 %54
|
||||
%121 = OpCompositeConstruct %12 %73 %73
|
||||
%122 = OpAccessChain %117 %57 %36 %120
|
||||
OpStore %122 %121
|
||||
%124 = OpAccessChain %123 %57 %36 %36 %91
|
||||
OpStore %124 %74
|
||||
%125 = OpLoad %5 %54
|
||||
%126 = OpAccessChain %123 %57 %36 %36 %125
|
||||
OpStore %126 %75
|
||||
%127 = OpLoad %5 %54
|
||||
%128 = OpAccessChain %123 %57 %36 %127 %91
|
||||
OpStore %128 %76
|
||||
%129 = OpLoad %5 %54
|
||||
%130 = OpLoad %5 %54
|
||||
%131 = OpAccessChain %123 %57 %36 %129 %130
|
||||
OpStore %131 %77
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%142 = OpFunction %2 None %67
|
||||
%141 = OpLabel
|
||||
%137 = OpVariable %60 Function %61
|
||||
%138 = OpVariable %139 Function %140
|
||||
%144 = OpAccessChain %143 %55 %38
|
||||
OpBranch %148
|
||||
%148 = OpLabel
|
||||
OpStore %137 %70
|
||||
%149 = OpLoad %5 %137
|
||||
%150 = OpISub %5 %149 %70
|
||||
OpStore %137 %150
|
||||
%152 = OpAccessChain %151 %144 %38
|
||||
%153 = OpLoad %25 %152
|
||||
%155 = OpAccessChain %154 %144 %38 %38
|
||||
%156 = OpLoad %24 %155
|
||||
%157 = OpAccessChain %89 %144 %38 %38 %38
|
||||
%158 = OpLoad %12 %157
|
||||
%159 = OpLoad %5 %137
|
||||
%160 = OpAccessChain %89 %144 %38 %38 %159
|
||||
%161 = OpLoad %12 %160
|
||||
%162 = OpAccessChain %95 %144 %38 %38 %38 %96
|
||||
%163 = OpLoad %10 %162
|
||||
%164 = OpLoad %5 %137
|
||||
%165 = OpAccessChain %95 %144 %38 %38 %38 %164
|
||||
%166 = OpLoad %10 %165
|
||||
%167 = OpLoad %5 %137
|
||||
%168 = OpAccessChain %95 %144 %38 %38 %167 %96
|
||||
%169 = OpLoad %10 %168
|
||||
%170 = OpLoad %5 %137
|
||||
%171 = OpLoad %5 %137
|
||||
%172 = OpAccessChain %95 %144 %38 %38 %170 %171
|
||||
%173 = OpLoad %10 %172
|
||||
%174 = OpCompositeConstruct %26 %145
|
||||
OpStore %138 %174
|
||||
%175 = OpLoad %5 %137
|
||||
%176 = OpIAdd %5 %175 %70
|
||||
OpStore %137 %176
|
||||
%178 = OpAccessChain %177 %138 %38
|
||||
OpStore %178 %145
|
||||
%180 = OpCompositeConstruct %12 %146 %146
|
||||
%181 = OpCompositeConstruct %12 %147 %147
|
||||
%182 = OpCompositeConstruct %12 %74 %74
|
||||
%183 = OpCompositeConstruct %12 %75 %75
|
||||
%184 = OpCompositeConstruct %24 %180 %181 %182 %183
|
||||
%185 = OpAccessChain %179 %138 %38 %38
|
||||
%137 = OpFunction %2 None %62
|
||||
%136 = OpLabel
|
||||
%132 = OpVariable %55 Function %56
|
||||
%133 = OpVariable %134 Function %135
|
||||
%139 = OpAccessChain %138 %50 %36
|
||||
OpBranch %143
|
||||
%143 = OpLabel
|
||||
OpStore %132 %65
|
||||
%144 = OpLoad %5 %132
|
||||
%145 = OpISub %5 %144 %65
|
||||
OpStore %132 %145
|
||||
%147 = OpAccessChain %146 %139 %36
|
||||
%148 = OpLoad %25 %147
|
||||
%150 = OpAccessChain %149 %139 %36 %36
|
||||
%151 = OpLoad %24 %150
|
||||
%152 = OpAccessChain %84 %139 %36 %36 %36
|
||||
%153 = OpLoad %12 %152
|
||||
%154 = OpLoad %5 %132
|
||||
%155 = OpAccessChain %84 %139 %36 %36 %154
|
||||
%156 = OpLoad %12 %155
|
||||
%157 = OpAccessChain %90 %139 %36 %36 %36 %91
|
||||
%158 = OpLoad %10 %157
|
||||
%159 = OpLoad %5 %132
|
||||
%160 = OpAccessChain %90 %139 %36 %36 %36 %159
|
||||
%161 = OpLoad %10 %160
|
||||
%162 = OpLoad %5 %132
|
||||
%163 = OpAccessChain %90 %139 %36 %36 %162 %91
|
||||
%164 = OpLoad %10 %163
|
||||
%165 = OpLoad %5 %132
|
||||
%166 = OpLoad %5 %132
|
||||
%167 = OpAccessChain %90 %139 %36 %36 %165 %166
|
||||
%168 = OpLoad %10 %167
|
||||
%169 = OpCompositeConstruct %26 %140
|
||||
OpStore %133 %169
|
||||
%170 = OpLoad %5 %132
|
||||
%171 = OpIAdd %5 %170 %65
|
||||
OpStore %132 %171
|
||||
%173 = OpAccessChain %172 %133 %36
|
||||
OpStore %173 %140
|
||||
%175 = OpCompositeConstruct %12 %141 %141
|
||||
%176 = OpCompositeConstruct %12 %142 %142
|
||||
%177 = OpCompositeConstruct %12 %69 %69
|
||||
%178 = OpCompositeConstruct %12 %70 %70
|
||||
%179 = OpCompositeConstruct %24 %175 %176 %177 %178
|
||||
%180 = OpAccessChain %174 %133 %36 %36
|
||||
OpStore %180 %179
|
||||
%181 = OpCompositeConstruct %12 %72 %72
|
||||
%182 = OpAccessChain %117 %133 %36 %36 %36
|
||||
OpStore %182 %181
|
||||
%183 = OpLoad %5 %132
|
||||
%184 = OpCompositeConstruct %12 %73 %73
|
||||
%185 = OpAccessChain %117 %133 %36 %36 %183
|
||||
OpStore %185 %184
|
||||
%186 = OpCompositeConstruct %12 %77 %77
|
||||
%187 = OpAccessChain %122 %138 %38 %38 %38
|
||||
OpStore %187 %186
|
||||
%188 = OpLoad %5 %137
|
||||
%189 = OpCompositeConstruct %12 %78 %78
|
||||
%190 = OpAccessChain %122 %138 %38 %38 %188
|
||||
OpStore %190 %189
|
||||
%191 = OpAccessChain %128 %138 %38 %38 %38 %96
|
||||
OpStore %191 %79
|
||||
%192 = OpLoad %5 %137
|
||||
%193 = OpAccessChain %128 %138 %38 %38 %38 %192
|
||||
OpStore %193 %80
|
||||
%194 = OpLoad %5 %137
|
||||
%195 = OpAccessChain %128 %138 %38 %38 %194 %96
|
||||
OpStore %195 %81
|
||||
%196 = OpLoad %5 %137
|
||||
%197 = OpLoad %5 %137
|
||||
%198 = OpAccessChain %128 %138 %38 %38 %196 %197
|
||||
OpStore %198 %82
|
||||
%186 = OpAccessChain %123 %133 %36 %36 %36 %91
|
||||
OpStore %186 %74
|
||||
%187 = OpLoad %5 %132
|
||||
%188 = OpAccessChain %123 %133 %36 %36 %36 %187
|
||||
OpStore %188 %75
|
||||
%189 = OpLoad %5 %132
|
||||
%190 = OpAccessChain %123 %133 %36 %36 %189 %91
|
||||
OpStore %190 %76
|
||||
%191 = OpLoad %5 %132
|
||||
%192 = OpLoad %5 %132
|
||||
%193 = OpAccessChain %123 %133 %36 %36 %191 %192
|
||||
OpStore %193 %77
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%201 = OpFunction %10 None %202
|
||||
%200 = OpFunctionParameter %27
|
||||
%199 = OpLabel
|
||||
OpBranch %203
|
||||
%203 = OpLabel
|
||||
%204 = OpLoad %10 %200
|
||||
OpReturnValue %204
|
||||
%196 = OpFunction %10 None %197
|
||||
%195 = OpFunctionParameter %27
|
||||
%194 = OpLabel
|
||||
OpBranch %198
|
||||
%198 = OpLabel
|
||||
%199 = OpLoad %10 %195
|
||||
OpReturnValue %199
|
||||
OpFunctionEnd
|
||||
%207 = OpFunction %10 None %208
|
||||
%206 = OpFunctionParameter %29
|
||||
%205 = OpLabel
|
||||
OpBranch %209
|
||||
%209 = OpLabel
|
||||
%210 = OpCompositeExtract %28 %206 4
|
||||
%211 = OpCompositeExtract %10 %210 9
|
||||
OpReturnValue %211
|
||||
%202 = OpFunction %10 None %203
|
||||
%201 = OpFunctionParameter %29
|
||||
%200 = OpLabel
|
||||
OpBranch %204
|
||||
%204 = OpLabel
|
||||
%205 = OpCompositeExtract %28 %201 4
|
||||
%206 = OpCompositeExtract %10 %205 9
|
||||
OpReturnValue %206
|
||||
OpFunctionEnd
|
||||
%214 = OpFunction %2 None %215
|
||||
%213 = OpFunctionParameter %35
|
||||
%209 = OpFunction %2 None %210
|
||||
%208 = OpFunctionParameter %33
|
||||
%207 = OpLabel
|
||||
OpBranch %212
|
||||
%212 = OpLabel
|
||||
OpStore %208 %211
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%215 = OpFunction %2 None %216
|
||||
%214 = OpFunctionParameter %35
|
||||
%213 = OpLabel
|
||||
OpBranch %217
|
||||
%217 = OpLabel
|
||||
OpStore %213 %216
|
||||
%218 = OpCompositeConstruct %31 %66 %66 %66 %66
|
||||
%219 = OpCompositeConstruct %31 %67 %67 %67 %67
|
||||
%220 = OpCompositeConstruct %34 %218 %219
|
||||
OpStore %214 %220
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%220 = OpFunction %2 None %221
|
||||
%219 = OpFunctionParameter %37
|
||||
%218 = OpLabel
|
||||
OpBranch %222
|
||||
%222 = OpLabel
|
||||
%223 = OpCompositeConstruct %31 %71 %71 %71 %71
|
||||
%224 = OpCompositeConstruct %31 %72 %72 %72 %72
|
||||
%225 = OpCompositeConstruct %36 %223 %224
|
||||
OpStore %219 %225
|
||||
%232 = OpFunction %2 None %62
|
||||
%226 = OpLabel
|
||||
%221 = OpVariable %27 Function %222
|
||||
%223 = OpVariable %224 Function %225
|
||||
%229 = OpLoad %3 %227
|
||||
%233 = OpAccessChain %63 %44 %36
|
||||
%235 = OpAccessChain %234 %47 %36
|
||||
%236 = OpAccessChain %138 %50 %36
|
||||
OpBranch %244
|
||||
%244 = OpLabel
|
||||
OpStore %221 %237
|
||||
%245 = OpLoad %10 %221
|
||||
OpStore %221 %66
|
||||
%246 = OpFunctionCall %2 %61
|
||||
%247 = OpFunctionCall %2 %137
|
||||
%249 = OpAccessChain %248 %42 %36
|
||||
%250 = OpLoad %8 %249
|
||||
%253 = OpAccessChain %251 %42 %252
|
||||
%254 = OpLoad %18 %253
|
||||
%257 = OpAccessChain %256 %42 %36 %238 %36
|
||||
%258 = OpLoad %10 %257
|
||||
%260 = OpArrayLength %3 %42 5
|
||||
%261 = OpISub %3 %260 %14
|
||||
%264 = OpAccessChain %263 %42 %30 %261 %36
|
||||
%265 = OpLoad %5 %264
|
||||
%266 = OpLoad %23 %235
|
||||
%267 = OpFunctionCall %10 %196 %221
|
||||
%268 = OpConvertFToS %5 %258
|
||||
%269 = OpCompositeConstruct %32 %265 %268 %239 %240 %241
|
||||
OpStore %223 %269
|
||||
%270 = OpIAdd %3 %229 %91
|
||||
%271 = OpAccessChain %55 %223 %270
|
||||
OpStore %271 %242
|
||||
%272 = OpAccessChain %55 %223 %229
|
||||
%273 = OpLoad %5 %272
|
||||
%274 = OpFunctionCall %10 %202 %243
|
||||
%276 = OpCompositeConstruct %275 %273 %273 %273 %273
|
||||
%277 = OpConvertSToF %31 %276
|
||||
%278 = OpMatrixTimesVector %9 %250 %277
|
||||
%279 = OpCompositeConstruct %31 %278 %67
|
||||
OpStore %230 %279
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%237 = OpFunction %2 None %67
|
||||
%231 = OpLabel
|
||||
%226 = OpVariable %27 Function %227
|
||||
%228 = OpVariable %229 Function %230
|
||||
%234 = OpLoad %3 %232
|
||||
%238 = OpAccessChain %68 %49 %38
|
||||
%240 = OpAccessChain %239 %52 %38
|
||||
%241 = OpAccessChain %143 %55 %38
|
||||
OpBranch %248
|
||||
%248 = OpLabel
|
||||
OpStore %226 %242
|
||||
%249 = OpLoad %10 %226
|
||||
OpStore %226 %71
|
||||
%250 = OpFunctionCall %2 %66
|
||||
%251 = OpFunctionCall %2 %142
|
||||
%253 = OpAccessChain %252 %47 %38
|
||||
%254 = OpLoad %8 %253
|
||||
%257 = OpAccessChain %255 %47 %256
|
||||
%258 = OpLoad %18 %257
|
||||
%261 = OpAccessChain %260 %47 %38 %243 %38
|
||||
%262 = OpLoad %10 %261
|
||||
%264 = OpArrayLength %3 %47 5
|
||||
%265 = OpISub %3 %264 %14
|
||||
%267 = OpAccessChain %32 %47 %30 %265 %38
|
||||
%268 = OpLoad %5 %267
|
||||
%269 = OpLoad %23 %240
|
||||
%270 = OpFunctionCall %10 %201 %226
|
||||
%271 = OpConvertFToS %5 %262
|
||||
%272 = OpCompositeConstruct %33 %268 %271 %244 %245 %44
|
||||
OpStore %228 %272
|
||||
%273 = OpIAdd %3 %234 %96
|
||||
%274 = OpAccessChain %60 %228 %273
|
||||
OpStore %274 %246
|
||||
%275 = OpAccessChain %60 %228 %234
|
||||
%276 = OpLoad %5 %275
|
||||
%277 = OpFunctionCall %10 %207 %247
|
||||
%278 = OpCompositeConstruct %34 %276 %276 %276 %276
|
||||
%279 = OpConvertSToF %31 %278
|
||||
%280 = OpMatrixTimesVector %9 %254 %279
|
||||
%281 = OpCompositeConstruct %31 %280 %72
|
||||
OpStore %235 %281
|
||||
%282 = OpFunction %2 None %62
|
||||
%280 = OpLabel
|
||||
%283 = OpAccessChain %234 %47 %36
|
||||
OpBranch %285
|
||||
%285 = OpLabel
|
||||
%286 = OpAccessChain %256 %42 %36 %91 %14
|
||||
OpStore %286 %66
|
||||
%287 = OpCompositeConstruct %9 %237 %237 %237
|
||||
%288 = OpCompositeConstruct %9 %66 %66 %66
|
||||
%289 = OpCompositeConstruct %9 %67 %67 %67
|
||||
%290 = OpCompositeConstruct %9 %68 %68 %68
|
||||
%291 = OpCompositeConstruct %8 %287 %288 %289 %290
|
||||
%292 = OpAccessChain %248 %42 %36
|
||||
OpStore %292 %291
|
||||
%293 = OpCompositeConstruct %17 %36 %36
|
||||
%294 = OpCompositeConstruct %17 %91 %91
|
||||
%295 = OpCompositeConstruct %18 %293 %294
|
||||
%296 = OpAccessChain %251 %42 %252
|
||||
OpStore %296 %295
|
||||
%297 = OpAccessChain %263 %42 %30 %91 %36
|
||||
OpStore %297 %65
|
||||
OpStore %283 %284
|
||||
%298 = OpCompositeConstruct %31 %237 %237 %237 %237
|
||||
OpStore %281 %298
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%284 = OpFunction %2 None %67
|
||||
%282 = OpLabel
|
||||
%285 = OpAccessChain %239 %52 %38
|
||||
OpBranch %287
|
||||
%287 = OpLabel
|
||||
%288 = OpAccessChain %260 %47 %38 %96 %14
|
||||
OpStore %288 %71
|
||||
%289 = OpCompositeConstruct %9 %242 %242 %242
|
||||
%290 = OpCompositeConstruct %9 %71 %71 %71
|
||||
%291 = OpCompositeConstruct %9 %72 %72 %72
|
||||
%292 = OpCompositeConstruct %9 %73 %73 %73
|
||||
%293 = OpCompositeConstruct %8 %289 %290 %291 %292
|
||||
%294 = OpAccessChain %252 %47 %38
|
||||
OpStore %294 %293
|
||||
%295 = OpCompositeConstruct %17 %38 %38
|
||||
%296 = OpCompositeConstruct %17 %96 %96
|
||||
%297 = OpCompositeConstruct %18 %295 %296
|
||||
%298 = OpAccessChain %255 %47 %256
|
||||
OpStore %298 %297
|
||||
%299 = OpAccessChain %32 %47 %30 %96 %38
|
||||
OpStore %299 %70
|
||||
OpStore %285 %286
|
||||
%300 = OpCompositeConstruct %31 %242 %242 %242 %242
|
||||
OpStore %283 %300
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%304 = OpFunction %2 None %67
|
||||
%302 = OpFunction %2 None %62
|
||||
%301 = OpLabel
|
||||
%299 = OpVariable %35 Function %300
|
||||
OpBranch %303
|
||||
%303 = OpLabel
|
||||
%301 = OpVariable %37 Function %302
|
||||
OpBranch %305
|
||||
%305 = OpLabel
|
||||
%309 = OpLoad %4 %307
|
||||
%313 = OpIEqual %311 %309 %310
|
||||
%314 = OpAll %312 %313
|
||||
OpSelectionMerge %315 None
|
||||
OpBranchConditional %314 %316 %315
|
||||
%307 = OpLoad %4 %305
|
||||
%311 = OpIEqual %309 %307 %308
|
||||
%312 = OpAll %310 %311
|
||||
OpSelectionMerge %313 None
|
||||
OpBranchConditional %312 %314 %313
|
||||
%314 = OpLabel
|
||||
OpStore %53 %304
|
||||
OpBranch %313
|
||||
%313 = OpLabel
|
||||
OpControlBarrier %14 %14 %315
|
||||
OpBranch %316
|
||||
%316 = OpLabel
|
||||
OpStore %58 %306
|
||||
OpBranch %315
|
||||
%315 = OpLabel
|
||||
OpControlBarrier %14 %14 %317
|
||||
OpBranch %318
|
||||
%318 = OpLabel
|
||||
%319 = OpCompositeConstruct %31 %74 %74 %74 %74
|
||||
%320 = OpCompositeConstruct %31 %147 %147 %147 %147
|
||||
%321 = OpCompositeConstruct %36 %319 %320
|
||||
OpStore %301 %321
|
||||
%322 = OpFunctionCall %2 %214 %58
|
||||
%323 = OpFunctionCall %2 %220 %301
|
||||
%317 = OpCompositeConstruct %31 %69 %69 %69 %69
|
||||
%318 = OpCompositeConstruct %31 %142 %142 %142 %142
|
||||
%319 = OpCompositeConstruct %34 %317 %318
|
||||
OpStore %299 %319
|
||||
%320 = OpFunctionCall %2 %209 %53
|
||||
%321 = OpFunctionCall %2 %215 %299
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,39 +1,37 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 21
|
||||
; Bound: 19
|
||||
OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %14 "cs_main"
|
||||
OpExecutionMode %14 LocalSize 1 1 1
|
||||
OpEntryPoint GLCompute %12 "cs_main"
|
||||
OpExecutionMode %12 LocalSize 1 1 1
|
||||
OpDecorate %4 ArrayStride 4
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
OpDecorate %10 NonWritable
|
||||
OpDecorate %10 DescriptorSet 0
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %11 Block
|
||||
OpMemberDecorate %11 0 Offset 0
|
||||
OpDecorate %8 NonWritable
|
||||
OpDecorate %8 DescriptorSet 0
|
||||
OpDecorate %8 Binding 0
|
||||
OpDecorate %9 Block
|
||||
OpMemberDecorate %9 0 Offset 0
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeFloat 32
|
||||
%6 = OpTypeInt 32 0
|
||||
%5 = OpConstant %6 2
|
||||
%4 = OpTypeArray %3 %5
|
||||
%7 = OpTypeStruct %4
|
||||
%9 = OpTypeInt 32 1
|
||||
%8 = OpConstant %9 2
|
||||
%11 = OpTypeStruct %7
|
||||
%12 = OpTypePointer StorageBuffer %11
|
||||
%10 = OpVariable %12 StorageBuffer
|
||||
%15 = OpTypeFunction %2
|
||||
%16 = OpTypePointer StorageBuffer %7
|
||||
%17 = OpConstant %6 0
|
||||
%14 = OpFunction %2 None %15
|
||||
%13 = OpLabel
|
||||
%18 = OpAccessChain %16 %10 %17
|
||||
OpBranch %19
|
||||
%19 = OpLabel
|
||||
%20 = OpLoad %7 %18
|
||||
%9 = OpTypeStruct %7
|
||||
%10 = OpTypePointer StorageBuffer %9
|
||||
%8 = OpVariable %10 StorageBuffer
|
||||
%13 = OpTypeFunction %2
|
||||
%14 = OpTypePointer StorageBuffer %7
|
||||
%15 = OpConstant %6 0
|
||||
%12 = OpFunction %2 None %13
|
||||
%11 = OpLabel
|
||||
%16 = OpAccessChain %14 %8 %15
|
||||
OpBranch %17
|
||||
%17 = OpLabel
|
||||
%18 = OpLoad %7 %16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,44 +1,42 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 28
|
||||
; Bound: 26
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %20 "main" %18
|
||||
OpExecutionMode %20 OriginUpperLeft
|
||||
OpEntryPoint Fragment %18 "main" %16
|
||||
OpExecutionMode %18 OriginUpperLeft
|
||||
OpDecorate %4 ArrayStride 4
|
||||
OpDecorate %18 Location 0
|
||||
OpDecorate %16 Location 0
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeFloat 32
|
||||
%6 = OpTypeInt 32 0
|
||||
%5 = OpConstant %6 2
|
||||
%4 = OpTypeArray %3 %5
|
||||
%7 = OpTypeVector %3 4
|
||||
%9 = OpTypeInt 32 1
|
||||
%8 = OpConstant %9 2
|
||||
%12 = OpTypeFunction %4
|
||||
%13 = OpConstant %3 1.0
|
||||
%14 = OpConstant %3 2.0
|
||||
%19 = OpTypePointer Output %7
|
||||
%18 = OpVariable %19 Output
|
||||
%21 = OpTypeFunction %2
|
||||
%22 = OpConstant %3 0.0
|
||||
%11 = OpFunction %4 None %12
|
||||
%10 = OpLabel
|
||||
OpBranch %15
|
||||
%15 = OpLabel
|
||||
%16 = OpCompositeConstruct %4 %13 %14
|
||||
OpReturnValue %16
|
||||
%10 = OpTypeFunction %4
|
||||
%11 = OpConstant %3 1.0
|
||||
%12 = OpConstant %3 2.0
|
||||
%17 = OpTypePointer Output %7
|
||||
%16 = OpVariable %17 Output
|
||||
%19 = OpTypeFunction %2
|
||||
%20 = OpConstant %3 0.0
|
||||
%9 = OpFunction %4 None %10
|
||||
%8 = OpLabel
|
||||
OpBranch %13
|
||||
%13 = OpLabel
|
||||
%14 = OpCompositeConstruct %4 %11 %12
|
||||
OpReturnValue %14
|
||||
OpFunctionEnd
|
||||
%20 = OpFunction %2 None %21
|
||||
%17 = OpLabel
|
||||
OpBranch %23
|
||||
%23 = OpLabel
|
||||
%24 = OpFunctionCall %4 %11
|
||||
%25 = OpCompositeExtract %3 %24 0
|
||||
%26 = OpCompositeExtract %3 %24 1
|
||||
%27 = OpCompositeConstruct %7 %25 %26 %22 %13
|
||||
OpStore %18 %27
|
||||
%18 = OpFunction %2 None %19
|
||||
%15 = OpLabel
|
||||
OpBranch %21
|
||||
%21 = OpLabel
|
||||
%22 = OpFunctionCall %4 %9
|
||||
%23 = OpCompositeExtract %3 %22 0
|
||||
%24 = OpCompositeExtract %3 %22 1
|
||||
%25 = OpCompositeConstruct %7 %23 %24 %20 %11
|
||||
OpStore %16 %25
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -6,24 +6,24 @@ OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %28 "test_atomic_compare_exchange_i32"
|
||||
OpEntryPoint GLCompute %27 "test_atomic_compare_exchange_i32"
|
||||
OpEntryPoint GLCompute %81 "test_atomic_compare_exchange_u32"
|
||||
OpExecutionMode %28 LocalSize 1 1 1
|
||||
OpExecutionMode %27 LocalSize 1 1 1
|
||||
OpExecutionMode %81 LocalSize 1 1 1
|
||||
OpDecorate %5 ArrayStride 4
|
||||
OpDecorate %7 ArrayStride 4
|
||||
OpMemberDecorate %9 0 Offset 0
|
||||
OpMemberDecorate %9 1 Offset 4
|
||||
OpMemberDecorate %10 0 Offset 0
|
||||
OpMemberDecorate %10 1 Offset 4
|
||||
OpMemberDecorate %11 0 Offset 0
|
||||
OpMemberDecorate %11 1 Offset 4
|
||||
OpDecorate %12 DescriptorSet 0
|
||||
OpDecorate %12 Binding 0
|
||||
OpDecorate %13 Block
|
||||
OpMemberDecorate %13 0 Offset 0
|
||||
OpDecorate %15 DescriptorSet 0
|
||||
OpDecorate %15 Binding 1
|
||||
OpDecorate %16 Block
|
||||
OpMemberDecorate %16 0 Offset 0
|
||||
OpDecorate %11 DescriptorSet 0
|
||||
OpDecorate %11 Binding 0
|
||||
OpDecorate %12 Block
|
||||
OpMemberDecorate %12 0 Offset 0
|
||||
OpDecorate %14 DescriptorSet 0
|
||||
OpDecorate %14 Binding 1
|
||||
OpDecorate %15 Block
|
||||
OpMemberDecorate %15 0 Offset 0
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeInt 32 0
|
||||
%4 = OpTypeInt 32 1
|
||||
@@ -31,47 +31,47 @@ OpMemberDecorate %16 0 Offset 0
|
||||
%5 = OpTypeArray %4 %6
|
||||
%7 = OpTypeArray %3 %6
|
||||
%8 = OpTypeBool
|
||||
%9 = OpTypeFloat 32
|
||||
%10 = OpTypeStruct %4 %8
|
||||
%11 = OpTypeStruct %3 %8
|
||||
%13 = OpTypeStruct %5
|
||||
%14 = OpTypePointer StorageBuffer %13
|
||||
%12 = OpVariable %14 StorageBuffer
|
||||
%16 = OpTypeStruct %7
|
||||
%17 = OpTypePointer StorageBuffer %16
|
||||
%15 = OpVariable %17 StorageBuffer
|
||||
%19 = OpTypePointer Function %3
|
||||
%20 = OpConstantNull %3
|
||||
%22 = OpTypePointer Function %4
|
||||
%23 = OpConstantNull %4
|
||||
%25 = OpTypePointer Function %8
|
||||
%26 = OpConstantNull %8
|
||||
%29 = OpTypeFunction %2
|
||||
%30 = OpTypePointer StorageBuffer %5
|
||||
%31 = OpConstant %3 0
|
||||
%33 = OpConstantFalse %8
|
||||
%34 = OpConstant %9 1.0
|
||||
%9 = OpTypeStruct %4 %8
|
||||
%10 = OpTypeStruct %3 %8
|
||||
%12 = OpTypeStruct %5
|
||||
%13 = OpTypePointer StorageBuffer %12
|
||||
%11 = OpVariable %13 StorageBuffer
|
||||
%15 = OpTypeStruct %7
|
||||
%16 = OpTypePointer StorageBuffer %15
|
||||
%14 = OpVariable %16 StorageBuffer
|
||||
%18 = OpTypePointer Function %3
|
||||
%19 = OpConstantNull %3
|
||||
%21 = OpTypePointer Function %4
|
||||
%22 = OpConstantNull %4
|
||||
%24 = OpTypePointer Function %8
|
||||
%25 = OpConstantNull %8
|
||||
%28 = OpTypeFunction %2
|
||||
%29 = OpTypePointer StorageBuffer %5
|
||||
%30 = OpConstant %3 0
|
||||
%32 = OpConstantFalse %8
|
||||
%33 = OpTypeFloat 32
|
||||
%34 = OpConstant %33 1.0
|
||||
%35 = OpConstant %3 1
|
||||
%48 = OpTypePointer StorageBuffer %4
|
||||
%51 = OpConstant %4 1
|
||||
%52 = OpConstant %3 64
|
||||
%82 = OpTypePointer StorageBuffer %7
|
||||
%96 = OpTypePointer StorageBuffer %3
|
||||
%28 = OpFunction %2 None %29
|
||||
%27 = OpLabel
|
||||
%18 = OpVariable %19 Function %20
|
||||
%21 = OpVariable %22 Function %23
|
||||
%24 = OpVariable %25 Function %26
|
||||
%32 = OpAccessChain %30 %12 %31
|
||||
%27 = OpFunction %2 None %28
|
||||
%26 = OpLabel
|
||||
%17 = OpVariable %18 Function %19
|
||||
%20 = OpVariable %21 Function %22
|
||||
%23 = OpVariable %24 Function %25
|
||||
%31 = OpAccessChain %29 %11 %30
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
OpStore %18 %31
|
||||
OpStore %17 %30
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
OpLoopMerge %38 %40 None
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%41 = OpLoad %3 %18
|
||||
%41 = OpLoad %3 %17
|
||||
%42 = OpULessThan %8 %41 %6
|
||||
OpSelectionMerge %43 None
|
||||
OpBranchConditional %42 %43 %44
|
||||
@@ -80,17 +80,17 @@ OpBranch %38
|
||||
%43 = OpLabel
|
||||
OpBranch %45
|
||||
%45 = OpLabel
|
||||
%47 = OpLoad %3 %18
|
||||
%49 = OpAccessChain %48 %32 %47
|
||||
%47 = OpLoad %3 %17
|
||||
%49 = OpAccessChain %48 %31 %47
|
||||
%50 = OpAtomicLoad %4 %49 %51 %52
|
||||
OpStore %21 %50
|
||||
OpStore %24 %33
|
||||
OpStore %20 %50
|
||||
OpStore %23 %32
|
||||
OpBranch %53
|
||||
%53 = OpLabel
|
||||
OpLoopMerge %54 %56 None
|
||||
OpBranch %55
|
||||
%55 = OpLabel
|
||||
%57 = OpLoad %8 %24
|
||||
%57 = OpLoad %8 %23
|
||||
%58 = OpLogicalNot %8 %57
|
||||
OpSelectionMerge %59 None
|
||||
OpBranchConditional %58 %59 %60
|
||||
@@ -99,20 +99,20 @@ OpBranch %54
|
||||
%59 = OpLabel
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
%63 = OpLoad %4 %21
|
||||
%64 = OpBitcast %9 %63
|
||||
%65 = OpFAdd %9 %64 %34
|
||||
%63 = OpLoad %4 %20
|
||||
%64 = OpBitcast %33 %63
|
||||
%65 = OpFAdd %33 %64 %34
|
||||
%66 = OpBitcast %4 %65
|
||||
%67 = OpLoad %3 %18
|
||||
%68 = OpLoad %4 %21
|
||||
%70 = OpAccessChain %48 %32 %67
|
||||
%67 = OpLoad %3 %17
|
||||
%68 = OpLoad %4 %20
|
||||
%70 = OpAccessChain %48 %31 %67
|
||||
%71 = OpAtomicCompareExchange %4 %70 %51 %52 %52 %66 %68
|
||||
%72 = OpIEqual %8 %71 %68
|
||||
%69 = OpCompositeConstruct %10 %71 %72
|
||||
%69 = OpCompositeConstruct %9 %71 %72
|
||||
%73 = OpCompositeExtract %4 %69 0
|
||||
OpStore %21 %73
|
||||
OpStore %20 %73
|
||||
%74 = OpCompositeExtract %8 %69 1
|
||||
OpStore %24 %74
|
||||
OpStore %23 %74
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
OpBranch %56
|
||||
@@ -123,22 +123,22 @@ OpBranch %46
|
||||
%46 = OpLabel
|
||||
OpBranch %40
|
||||
%40 = OpLabel
|
||||
%75 = OpLoad %3 %18
|
||||
%75 = OpLoad %3 %17
|
||||
%76 = OpIAdd %3 %75 %35
|
||||
OpStore %18 %76
|
||||
OpStore %17 %76
|
||||
OpBranch %37
|
||||
%38 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%81 = OpFunction %2 None %29
|
||||
%81 = OpFunction %2 None %28
|
||||
%80 = OpLabel
|
||||
%77 = OpVariable %19 Function %20
|
||||
%78 = OpVariable %19 Function %20
|
||||
%79 = OpVariable %25 Function %26
|
||||
%83 = OpAccessChain %82 %15 %31
|
||||
%77 = OpVariable %18 Function %19
|
||||
%78 = OpVariable %18 Function %19
|
||||
%79 = OpVariable %24 Function %25
|
||||
%83 = OpAccessChain %82 %14 %30
|
||||
OpBranch %84
|
||||
%84 = OpLabel
|
||||
OpStore %77 %31
|
||||
OpStore %77 %30
|
||||
OpBranch %85
|
||||
%85 = OpLabel
|
||||
OpLoopMerge %86 %88 None
|
||||
@@ -157,7 +157,7 @@ OpBranch %93
|
||||
%97 = OpAccessChain %96 %83 %95
|
||||
%98 = OpAtomicLoad %3 %97 %51 %52
|
||||
OpStore %78 %98
|
||||
OpStore %79 %33
|
||||
OpStore %79 %32
|
||||
OpBranch %99
|
||||
%99 = OpLabel
|
||||
OpLoopMerge %100 %102 None
|
||||
@@ -173,15 +173,15 @@ OpBranch %100
|
||||
OpBranch %107
|
||||
%107 = OpLabel
|
||||
%109 = OpLoad %3 %78
|
||||
%110 = OpBitcast %9 %109
|
||||
%111 = OpFAdd %9 %110 %34
|
||||
%110 = OpBitcast %33 %109
|
||||
%111 = OpFAdd %33 %110 %34
|
||||
%112 = OpBitcast %3 %111
|
||||
%113 = OpLoad %3 %77
|
||||
%114 = OpLoad %3 %78
|
||||
%116 = OpAccessChain %96 %83 %113
|
||||
%117 = OpAtomicCompareExchange %3 %116 %51 %52 %52 %112 %114
|
||||
%118 = OpIEqual %8 %117 %114
|
||||
%115 = OpCompositeConstruct %11 %117 %118
|
||||
%115 = OpCompositeConstruct %10 %117 %118
|
||||
%119 = OpCompositeExtract %3 %115 0
|
||||
OpStore %78 %119
|
||||
%120 = OpCompositeExtract %8 %115 1
|
||||
|
||||
@@ -6,24 +6,24 @@ OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %29 "cs_main" %26
|
||||
OpExecutionMode %29 LocalSize 2 1 1
|
||||
OpEntryPoint GLCompute %28 "cs_main" %25
|
||||
OpExecutionMode %28 LocalSize 2 1 1
|
||||
OpDecorate %5 ArrayStride 4
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
OpMemberDecorate %7 1 Offset 4
|
||||
OpDecorate %10 DescriptorSet 0
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %11 Block
|
||||
OpMemberDecorate %11 0 Offset 0
|
||||
OpDecorate %13 DescriptorSet 0
|
||||
OpDecorate %13 Binding 1
|
||||
OpDecorate %14 Block
|
||||
OpMemberDecorate %14 0 Offset 0
|
||||
OpDecorate %16 DescriptorSet 0
|
||||
OpDecorate %16 Binding 2
|
||||
OpDecorate %17 Block
|
||||
OpMemberDecorate %17 0 Offset 0
|
||||
OpDecorate %26 BuiltIn LocalInvocationId
|
||||
OpDecorate %9 DescriptorSet 0
|
||||
OpDecorate %9 Binding 0
|
||||
OpDecorate %10 Block
|
||||
OpMemberDecorate %10 0 Offset 0
|
||||
OpDecorate %12 DescriptorSet 0
|
||||
OpDecorate %12 Binding 1
|
||||
OpDecorate %13 Block
|
||||
OpMemberDecorate %13 0 Offset 0
|
||||
OpDecorate %15 DescriptorSet 0
|
||||
OpDecorate %15 Binding 2
|
||||
OpDecorate %16 Block
|
||||
OpMemberDecorate %16 0 Offset 0
|
||||
OpDecorate %25 BuiltIn LocalInvocationId
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeInt 32 0
|
||||
%4 = OpTypeInt 32 1
|
||||
@@ -31,210 +31,210 @@ OpDecorate %26 BuiltIn LocalInvocationId
|
||||
%5 = OpTypeArray %4 %6
|
||||
%7 = OpTypeStruct %3 %5
|
||||
%8 = OpTypeVector %3 3
|
||||
%9 = OpConstant %4 2
|
||||
%11 = OpTypeStruct %3
|
||||
%12 = OpTypePointer StorageBuffer %11
|
||||
%10 = OpVariable %12 StorageBuffer
|
||||
%14 = OpTypeStruct %5
|
||||
%15 = OpTypePointer StorageBuffer %14
|
||||
%13 = OpVariable %15 StorageBuffer
|
||||
%17 = OpTypeStruct %7
|
||||
%18 = OpTypePointer StorageBuffer %17
|
||||
%16 = OpVariable %18 StorageBuffer
|
||||
%20 = OpTypePointer Workgroup %3
|
||||
%19 = OpVariable %20 Workgroup
|
||||
%22 = OpTypePointer Workgroup %5
|
||||
%21 = OpVariable %22 Workgroup
|
||||
%24 = OpTypePointer Workgroup %7
|
||||
%23 = OpVariable %24 Workgroup
|
||||
%27 = OpTypePointer Input %8
|
||||
%26 = OpVariable %27 Input
|
||||
%30 = OpTypeFunction %2
|
||||
%31 = OpTypePointer StorageBuffer %3
|
||||
%32 = OpConstant %3 0
|
||||
%34 = OpTypePointer StorageBuffer %5
|
||||
%36 = OpTypePointer StorageBuffer %7
|
||||
%38 = OpConstant %3 1
|
||||
%39 = OpConstant %4 1
|
||||
%41 = OpConstantNull %3
|
||||
%42 = OpConstantNull %5
|
||||
%43 = OpConstantNull %7
|
||||
%44 = OpConstantNull %8
|
||||
%46 = OpTypeBool
|
||||
%45 = OpTypeVector %46 3
|
||||
%51 = OpConstant %3 264
|
||||
%53 = OpConstant %3 64
|
||||
%54 = OpTypePointer StorageBuffer %4
|
||||
%10 = OpTypeStruct %3
|
||||
%11 = OpTypePointer StorageBuffer %10
|
||||
%9 = OpVariable %11 StorageBuffer
|
||||
%13 = OpTypeStruct %5
|
||||
%14 = OpTypePointer StorageBuffer %13
|
||||
%12 = OpVariable %14 StorageBuffer
|
||||
%16 = OpTypeStruct %7
|
||||
%17 = OpTypePointer StorageBuffer %16
|
||||
%15 = OpVariable %17 StorageBuffer
|
||||
%19 = OpTypePointer Workgroup %3
|
||||
%18 = OpVariable %19 Workgroup
|
||||
%21 = OpTypePointer Workgroup %5
|
||||
%20 = OpVariable %21 Workgroup
|
||||
%23 = OpTypePointer Workgroup %7
|
||||
%22 = OpVariable %23 Workgroup
|
||||
%26 = OpTypePointer Input %8
|
||||
%25 = OpVariable %26 Input
|
||||
%29 = OpTypeFunction %2
|
||||
%30 = OpTypePointer StorageBuffer %3
|
||||
%31 = OpConstant %3 0
|
||||
%33 = OpTypePointer StorageBuffer %5
|
||||
%35 = OpTypePointer StorageBuffer %7
|
||||
%37 = OpConstant %3 1
|
||||
%38 = OpConstant %4 1
|
||||
%40 = OpConstantNull %3
|
||||
%41 = OpConstantNull %5
|
||||
%42 = OpConstantNull %7
|
||||
%43 = OpConstantNull %8
|
||||
%45 = OpTypeBool
|
||||
%44 = OpTypeVector %45 3
|
||||
%50 = OpConstant %3 264
|
||||
%52 = OpConstant %3 64
|
||||
%53 = OpTypePointer StorageBuffer %4
|
||||
%57 = OpConstant %4 2
|
||||
%58 = OpConstant %3 256
|
||||
%59 = OpTypePointer Workgroup %4
|
||||
%29 = OpFunction %2 None %30
|
||||
%25 = OpLabel
|
||||
%28 = OpLoad %8 %26
|
||||
%33 = OpAccessChain %31 %10 %32
|
||||
%35 = OpAccessChain %34 %13 %32
|
||||
%37 = OpAccessChain %36 %16 %32
|
||||
OpBranch %40
|
||||
%40 = OpLabel
|
||||
%47 = OpIEqual %45 %28 %44
|
||||
%48 = OpAll %46 %47
|
||||
OpSelectionMerge %49 None
|
||||
OpBranchConditional %48 %50 %49
|
||||
%50 = OpLabel
|
||||
OpStore %19 %41
|
||||
OpStore %21 %42
|
||||
OpStore %23 %43
|
||||
OpBranch %49
|
||||
%28 = OpFunction %2 None %29
|
||||
%24 = OpLabel
|
||||
%27 = OpLoad %8 %25
|
||||
%32 = OpAccessChain %30 %9 %31
|
||||
%34 = OpAccessChain %33 %12 %31
|
||||
%36 = OpAccessChain %35 %15 %31
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%46 = OpIEqual %44 %27 %43
|
||||
%47 = OpAll %45 %46
|
||||
OpSelectionMerge %48 None
|
||||
OpBranchConditional %47 %49 %48
|
||||
%49 = OpLabel
|
||||
OpControlBarrier %6 %6 %51
|
||||
OpBranch %52
|
||||
%52 = OpLabel
|
||||
OpAtomicStore %33 %39 %53 %38
|
||||
%55 = OpAccessChain %54 %35 %38
|
||||
OpAtomicStore %55 %39 %53 %39
|
||||
%56 = OpAccessChain %31 %37 %32
|
||||
OpAtomicStore %56 %39 %53 %38
|
||||
%57 = OpAccessChain %54 %37 %38 %38
|
||||
OpAtomicStore %57 %39 %53 %39
|
||||
OpAtomicStore %19 %9 %58 %38
|
||||
%60 = OpAccessChain %59 %21 %38
|
||||
OpAtomicStore %60 %9 %58 %39
|
||||
%61 = OpAccessChain %20 %23 %32
|
||||
OpAtomicStore %61 %9 %58 %38
|
||||
%62 = OpAccessChain %59 %23 %38 %38
|
||||
OpAtomicStore %62 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%63 = OpAtomicLoad %3 %33 %39 %53
|
||||
%64 = OpAccessChain %54 %35 %38
|
||||
%65 = OpAtomicLoad %4 %64 %39 %53
|
||||
%66 = OpAccessChain %31 %37 %32
|
||||
%67 = OpAtomicLoad %3 %66 %39 %53
|
||||
%68 = OpAccessChain %54 %37 %38 %38
|
||||
%69 = OpAtomicLoad %4 %68 %39 %53
|
||||
%70 = OpAtomicLoad %3 %19 %9 %58
|
||||
%71 = OpAccessChain %59 %21 %38
|
||||
%72 = OpAtomicLoad %4 %71 %9 %58
|
||||
%73 = OpAccessChain %20 %23 %32
|
||||
%74 = OpAtomicLoad %3 %73 %9 %58
|
||||
%75 = OpAccessChain %59 %23 %38 %38
|
||||
%76 = OpAtomicLoad %4 %75 %9 %58
|
||||
OpControlBarrier %6 %6 %51
|
||||
%77 = OpAtomicIAdd %3 %33 %39 %53 %38
|
||||
%79 = OpAccessChain %54 %35 %38
|
||||
%78 = OpAtomicIAdd %4 %79 %39 %53 %39
|
||||
%81 = OpAccessChain %31 %37 %32
|
||||
%80 = OpAtomicIAdd %3 %81 %39 %53 %38
|
||||
%83 = OpAccessChain %54 %37 %38 %38
|
||||
%82 = OpAtomicIAdd %4 %83 %39 %53 %39
|
||||
%84 = OpAtomicIAdd %3 %19 %9 %58 %38
|
||||
%86 = OpAccessChain %59 %21 %38
|
||||
%85 = OpAtomicIAdd %4 %86 %9 %58 %39
|
||||
%88 = OpAccessChain %20 %23 %32
|
||||
%87 = OpAtomicIAdd %3 %88 %9 %58 %38
|
||||
%90 = OpAccessChain %59 %23 %38 %38
|
||||
%89 = OpAtomicIAdd %4 %90 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%91 = OpAtomicISub %3 %33 %39 %53 %38
|
||||
%93 = OpAccessChain %54 %35 %38
|
||||
%92 = OpAtomicISub %4 %93 %39 %53 %39
|
||||
%95 = OpAccessChain %31 %37 %32
|
||||
%94 = OpAtomicISub %3 %95 %39 %53 %38
|
||||
%97 = OpAccessChain %54 %37 %38 %38
|
||||
%96 = OpAtomicISub %4 %97 %39 %53 %39
|
||||
%98 = OpAtomicISub %3 %19 %9 %58 %38
|
||||
%100 = OpAccessChain %59 %21 %38
|
||||
%99 = OpAtomicISub %4 %100 %9 %58 %39
|
||||
%102 = OpAccessChain %20 %23 %32
|
||||
%101 = OpAtomicISub %3 %102 %9 %58 %38
|
||||
%104 = OpAccessChain %59 %23 %38 %38
|
||||
%103 = OpAtomicISub %4 %104 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%105 = OpAtomicUMax %3 %33 %39 %53 %38
|
||||
%107 = OpAccessChain %54 %35 %38
|
||||
%106 = OpAtomicSMax %4 %107 %39 %53 %39
|
||||
%109 = OpAccessChain %31 %37 %32
|
||||
%108 = OpAtomicUMax %3 %109 %39 %53 %38
|
||||
%111 = OpAccessChain %54 %37 %38 %38
|
||||
%110 = OpAtomicSMax %4 %111 %39 %53 %39
|
||||
%112 = OpAtomicUMax %3 %19 %9 %58 %38
|
||||
%114 = OpAccessChain %59 %21 %38
|
||||
%113 = OpAtomicSMax %4 %114 %9 %58 %39
|
||||
%116 = OpAccessChain %20 %23 %32
|
||||
%115 = OpAtomicUMax %3 %116 %9 %58 %38
|
||||
%118 = OpAccessChain %59 %23 %38 %38
|
||||
%117 = OpAtomicSMax %4 %118 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%119 = OpAtomicUMin %3 %33 %39 %53 %38
|
||||
%121 = OpAccessChain %54 %35 %38
|
||||
%120 = OpAtomicSMin %4 %121 %39 %53 %39
|
||||
%123 = OpAccessChain %31 %37 %32
|
||||
%122 = OpAtomicUMin %3 %123 %39 %53 %38
|
||||
%125 = OpAccessChain %54 %37 %38 %38
|
||||
%124 = OpAtomicSMin %4 %125 %39 %53 %39
|
||||
%126 = OpAtomicUMin %3 %19 %9 %58 %38
|
||||
%128 = OpAccessChain %59 %21 %38
|
||||
%127 = OpAtomicSMin %4 %128 %9 %58 %39
|
||||
%130 = OpAccessChain %20 %23 %32
|
||||
%129 = OpAtomicUMin %3 %130 %9 %58 %38
|
||||
%132 = OpAccessChain %59 %23 %38 %38
|
||||
%131 = OpAtomicSMin %4 %132 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%133 = OpAtomicAnd %3 %33 %39 %53 %38
|
||||
%135 = OpAccessChain %54 %35 %38
|
||||
%134 = OpAtomicAnd %4 %135 %39 %53 %39
|
||||
%137 = OpAccessChain %31 %37 %32
|
||||
%136 = OpAtomicAnd %3 %137 %39 %53 %38
|
||||
%139 = OpAccessChain %54 %37 %38 %38
|
||||
%138 = OpAtomicAnd %4 %139 %39 %53 %39
|
||||
%140 = OpAtomicAnd %3 %19 %9 %58 %38
|
||||
%142 = OpAccessChain %59 %21 %38
|
||||
%141 = OpAtomicAnd %4 %142 %9 %58 %39
|
||||
%144 = OpAccessChain %20 %23 %32
|
||||
%143 = OpAtomicAnd %3 %144 %9 %58 %38
|
||||
%146 = OpAccessChain %59 %23 %38 %38
|
||||
%145 = OpAtomicAnd %4 %146 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%147 = OpAtomicOr %3 %33 %39 %53 %38
|
||||
%149 = OpAccessChain %54 %35 %38
|
||||
%148 = OpAtomicOr %4 %149 %39 %53 %39
|
||||
%151 = OpAccessChain %31 %37 %32
|
||||
%150 = OpAtomicOr %3 %151 %39 %53 %38
|
||||
%153 = OpAccessChain %54 %37 %38 %38
|
||||
%152 = OpAtomicOr %4 %153 %39 %53 %39
|
||||
%154 = OpAtomicOr %3 %19 %9 %58 %38
|
||||
%156 = OpAccessChain %59 %21 %38
|
||||
%155 = OpAtomicOr %4 %156 %9 %58 %39
|
||||
%158 = OpAccessChain %20 %23 %32
|
||||
%157 = OpAtomicOr %3 %158 %9 %58 %38
|
||||
%160 = OpAccessChain %59 %23 %38 %38
|
||||
%159 = OpAtomicOr %4 %160 %9 %58 %39
|
||||
OpControlBarrier %6 %6 %51
|
||||
%161 = OpAtomicXor %3 %33 %39 %53 %38
|
||||
%163 = OpAccessChain %54 %35 %38
|
||||
%162 = OpAtomicXor %4 %163 %39 %53 %39
|
||||
%165 = OpAccessChain %31 %37 %32
|
||||
%164 = OpAtomicXor %3 %165 %39 %53 %38
|
||||
%167 = OpAccessChain %54 %37 %38 %38
|
||||
%166 = OpAtomicXor %4 %167 %39 %53 %39
|
||||
%168 = OpAtomicXor %3 %19 %9 %58 %38
|
||||
%170 = OpAccessChain %59 %21 %38
|
||||
%169 = OpAtomicXor %4 %170 %9 %58 %39
|
||||
%172 = OpAccessChain %20 %23 %32
|
||||
%171 = OpAtomicXor %3 %172 %9 %58 %38
|
||||
%174 = OpAccessChain %59 %23 %38 %38
|
||||
%173 = OpAtomicXor %4 %174 %9 %58 %39
|
||||
%175 = OpAtomicExchange %3 %33 %39 %53 %38
|
||||
%177 = OpAccessChain %54 %35 %38
|
||||
%176 = OpAtomicExchange %4 %177 %39 %53 %39
|
||||
%179 = OpAccessChain %31 %37 %32
|
||||
%178 = OpAtomicExchange %3 %179 %39 %53 %38
|
||||
%181 = OpAccessChain %54 %37 %38 %38
|
||||
%180 = OpAtomicExchange %4 %181 %39 %53 %39
|
||||
%182 = OpAtomicExchange %3 %19 %9 %58 %38
|
||||
%184 = OpAccessChain %59 %21 %38
|
||||
%183 = OpAtomicExchange %4 %184 %9 %58 %39
|
||||
%186 = OpAccessChain %20 %23 %32
|
||||
%185 = OpAtomicExchange %3 %186 %9 %58 %38
|
||||
%188 = OpAccessChain %59 %23 %38 %38
|
||||
%187 = OpAtomicExchange %4 %188 %9 %58 %39
|
||||
OpStore %18 %40
|
||||
OpStore %20 %41
|
||||
OpStore %22 %42
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
OpControlBarrier %6 %6 %50
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
OpAtomicStore %32 %38 %52 %37
|
||||
%54 = OpAccessChain %53 %34 %37
|
||||
OpAtomicStore %54 %38 %52 %38
|
||||
%55 = OpAccessChain %30 %36 %31
|
||||
OpAtomicStore %55 %38 %52 %37
|
||||
%56 = OpAccessChain %53 %36 %37 %37
|
||||
OpAtomicStore %56 %38 %52 %38
|
||||
OpAtomicStore %18 %57 %58 %37
|
||||
%60 = OpAccessChain %59 %20 %37
|
||||
OpAtomicStore %60 %57 %58 %38
|
||||
%61 = OpAccessChain %19 %22 %31
|
||||
OpAtomicStore %61 %57 %58 %37
|
||||
%62 = OpAccessChain %59 %22 %37 %37
|
||||
OpAtomicStore %62 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%63 = OpAtomicLoad %3 %32 %38 %52
|
||||
%64 = OpAccessChain %53 %34 %37
|
||||
%65 = OpAtomicLoad %4 %64 %38 %52
|
||||
%66 = OpAccessChain %30 %36 %31
|
||||
%67 = OpAtomicLoad %3 %66 %38 %52
|
||||
%68 = OpAccessChain %53 %36 %37 %37
|
||||
%69 = OpAtomicLoad %4 %68 %38 %52
|
||||
%70 = OpAtomicLoad %3 %18 %57 %58
|
||||
%71 = OpAccessChain %59 %20 %37
|
||||
%72 = OpAtomicLoad %4 %71 %57 %58
|
||||
%73 = OpAccessChain %19 %22 %31
|
||||
%74 = OpAtomicLoad %3 %73 %57 %58
|
||||
%75 = OpAccessChain %59 %22 %37 %37
|
||||
%76 = OpAtomicLoad %4 %75 %57 %58
|
||||
OpControlBarrier %6 %6 %50
|
||||
%77 = OpAtomicIAdd %3 %32 %38 %52 %37
|
||||
%79 = OpAccessChain %53 %34 %37
|
||||
%78 = OpAtomicIAdd %4 %79 %38 %52 %38
|
||||
%81 = OpAccessChain %30 %36 %31
|
||||
%80 = OpAtomicIAdd %3 %81 %38 %52 %37
|
||||
%83 = OpAccessChain %53 %36 %37 %37
|
||||
%82 = OpAtomicIAdd %4 %83 %38 %52 %38
|
||||
%84 = OpAtomicIAdd %3 %18 %57 %58 %37
|
||||
%86 = OpAccessChain %59 %20 %37
|
||||
%85 = OpAtomicIAdd %4 %86 %57 %58 %38
|
||||
%88 = OpAccessChain %19 %22 %31
|
||||
%87 = OpAtomicIAdd %3 %88 %57 %58 %37
|
||||
%90 = OpAccessChain %59 %22 %37 %37
|
||||
%89 = OpAtomicIAdd %4 %90 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%91 = OpAtomicISub %3 %32 %38 %52 %37
|
||||
%93 = OpAccessChain %53 %34 %37
|
||||
%92 = OpAtomicISub %4 %93 %38 %52 %38
|
||||
%95 = OpAccessChain %30 %36 %31
|
||||
%94 = OpAtomicISub %3 %95 %38 %52 %37
|
||||
%97 = OpAccessChain %53 %36 %37 %37
|
||||
%96 = OpAtomicISub %4 %97 %38 %52 %38
|
||||
%98 = OpAtomicISub %3 %18 %57 %58 %37
|
||||
%100 = OpAccessChain %59 %20 %37
|
||||
%99 = OpAtomicISub %4 %100 %57 %58 %38
|
||||
%102 = OpAccessChain %19 %22 %31
|
||||
%101 = OpAtomicISub %3 %102 %57 %58 %37
|
||||
%104 = OpAccessChain %59 %22 %37 %37
|
||||
%103 = OpAtomicISub %4 %104 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%105 = OpAtomicUMax %3 %32 %38 %52 %37
|
||||
%107 = OpAccessChain %53 %34 %37
|
||||
%106 = OpAtomicSMax %4 %107 %38 %52 %38
|
||||
%109 = OpAccessChain %30 %36 %31
|
||||
%108 = OpAtomicUMax %3 %109 %38 %52 %37
|
||||
%111 = OpAccessChain %53 %36 %37 %37
|
||||
%110 = OpAtomicSMax %4 %111 %38 %52 %38
|
||||
%112 = OpAtomicUMax %3 %18 %57 %58 %37
|
||||
%114 = OpAccessChain %59 %20 %37
|
||||
%113 = OpAtomicSMax %4 %114 %57 %58 %38
|
||||
%116 = OpAccessChain %19 %22 %31
|
||||
%115 = OpAtomicUMax %3 %116 %57 %58 %37
|
||||
%118 = OpAccessChain %59 %22 %37 %37
|
||||
%117 = OpAtomicSMax %4 %118 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%119 = OpAtomicUMin %3 %32 %38 %52 %37
|
||||
%121 = OpAccessChain %53 %34 %37
|
||||
%120 = OpAtomicSMin %4 %121 %38 %52 %38
|
||||
%123 = OpAccessChain %30 %36 %31
|
||||
%122 = OpAtomicUMin %3 %123 %38 %52 %37
|
||||
%125 = OpAccessChain %53 %36 %37 %37
|
||||
%124 = OpAtomicSMin %4 %125 %38 %52 %38
|
||||
%126 = OpAtomicUMin %3 %18 %57 %58 %37
|
||||
%128 = OpAccessChain %59 %20 %37
|
||||
%127 = OpAtomicSMin %4 %128 %57 %58 %38
|
||||
%130 = OpAccessChain %19 %22 %31
|
||||
%129 = OpAtomicUMin %3 %130 %57 %58 %37
|
||||
%132 = OpAccessChain %59 %22 %37 %37
|
||||
%131 = OpAtomicSMin %4 %132 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%133 = OpAtomicAnd %3 %32 %38 %52 %37
|
||||
%135 = OpAccessChain %53 %34 %37
|
||||
%134 = OpAtomicAnd %4 %135 %38 %52 %38
|
||||
%137 = OpAccessChain %30 %36 %31
|
||||
%136 = OpAtomicAnd %3 %137 %38 %52 %37
|
||||
%139 = OpAccessChain %53 %36 %37 %37
|
||||
%138 = OpAtomicAnd %4 %139 %38 %52 %38
|
||||
%140 = OpAtomicAnd %3 %18 %57 %58 %37
|
||||
%142 = OpAccessChain %59 %20 %37
|
||||
%141 = OpAtomicAnd %4 %142 %57 %58 %38
|
||||
%144 = OpAccessChain %19 %22 %31
|
||||
%143 = OpAtomicAnd %3 %144 %57 %58 %37
|
||||
%146 = OpAccessChain %59 %22 %37 %37
|
||||
%145 = OpAtomicAnd %4 %146 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%147 = OpAtomicOr %3 %32 %38 %52 %37
|
||||
%149 = OpAccessChain %53 %34 %37
|
||||
%148 = OpAtomicOr %4 %149 %38 %52 %38
|
||||
%151 = OpAccessChain %30 %36 %31
|
||||
%150 = OpAtomicOr %3 %151 %38 %52 %37
|
||||
%153 = OpAccessChain %53 %36 %37 %37
|
||||
%152 = OpAtomicOr %4 %153 %38 %52 %38
|
||||
%154 = OpAtomicOr %3 %18 %57 %58 %37
|
||||
%156 = OpAccessChain %59 %20 %37
|
||||
%155 = OpAtomicOr %4 %156 %57 %58 %38
|
||||
%158 = OpAccessChain %19 %22 %31
|
||||
%157 = OpAtomicOr %3 %158 %57 %58 %37
|
||||
%160 = OpAccessChain %59 %22 %37 %37
|
||||
%159 = OpAtomicOr %4 %160 %57 %58 %38
|
||||
OpControlBarrier %6 %6 %50
|
||||
%161 = OpAtomicXor %3 %32 %38 %52 %37
|
||||
%163 = OpAccessChain %53 %34 %37
|
||||
%162 = OpAtomicXor %4 %163 %38 %52 %38
|
||||
%165 = OpAccessChain %30 %36 %31
|
||||
%164 = OpAtomicXor %3 %165 %38 %52 %37
|
||||
%167 = OpAccessChain %53 %36 %37 %37
|
||||
%166 = OpAtomicXor %4 %167 %38 %52 %38
|
||||
%168 = OpAtomicXor %3 %18 %57 %58 %37
|
||||
%170 = OpAccessChain %59 %20 %37
|
||||
%169 = OpAtomicXor %4 %170 %57 %58 %38
|
||||
%172 = OpAccessChain %19 %22 %31
|
||||
%171 = OpAtomicXor %3 %172 %57 %58 %37
|
||||
%174 = OpAccessChain %59 %22 %37 %37
|
||||
%173 = OpAtomicXor %4 %174 %57 %58 %38
|
||||
%175 = OpAtomicExchange %3 %32 %38 %52 %37
|
||||
%177 = OpAccessChain %53 %34 %37
|
||||
%176 = OpAtomicExchange %4 %177 %38 %52 %38
|
||||
%179 = OpAccessChain %30 %36 %31
|
||||
%178 = OpAtomicExchange %3 %179 %38 %52 %37
|
||||
%181 = OpAccessChain %53 %36 %37 %37
|
||||
%180 = OpAtomicExchange %4 %181 %38 %52 %38
|
||||
%182 = OpAtomicExchange %3 %18 %57 %58 %37
|
||||
%184 = OpAccessChain %59 %20 %37
|
||||
%183 = OpAtomicExchange %4 %184 %57 %58 %38
|
||||
%186 = OpAccessChain %19 %22 %31
|
||||
%185 = OpAtomicExchange %3 %186 %57 %58 %37
|
||||
%188 = OpAccessChain %59 %22 %37 %37
|
||||
%187 = OpAtomicExchange %4 %188 %57 %58 %38
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,30 +1,30 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 63
|
||||
; Bound: 61
|
||||
OpCapability Shader
|
||||
OpCapability ShaderNonUniform
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
OpExtension "SPV_EXT_descriptor_indexing"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %28 "main" %23 %26
|
||||
OpExecutionMode %28 OriginUpperLeft
|
||||
OpEntryPoint Fragment %26 "main" %21 %24
|
||||
OpExecutionMode %26 OriginUpperLeft
|
||||
OpMemberDecorate %4 0 Offset 0
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %8 0 Offset 0
|
||||
OpDecorate %11 NonWritable
|
||||
OpDecorate %11 DescriptorSet 0
|
||||
OpDecorate %11 Binding 0
|
||||
OpDecorate %9 NonWritable
|
||||
OpDecorate %9 DescriptorSet 0
|
||||
OpDecorate %9 Binding 0
|
||||
OpDecorate %5 Block
|
||||
OpDecorate %15 DescriptorSet 0
|
||||
OpDecorate %15 Binding 10
|
||||
OpDecorate %16 Block
|
||||
OpMemberDecorate %16 0 Offset 0
|
||||
OpDecorate %23 Location 0
|
||||
OpDecorate %23 Flat
|
||||
OpDecorate %26 Location 0
|
||||
OpDecorate %55 NonUniform
|
||||
OpDecorate %13 DescriptorSet 0
|
||||
OpDecorate %13 Binding 10
|
||||
OpDecorate %14 Block
|
||||
OpMemberDecorate %14 0 Offset 0
|
||||
OpDecorate %21 Location 0
|
||||
OpDecorate %21 Flat
|
||||
OpDecorate %24 Location 0
|
||||
OpDecorate %53 NonUniform
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeInt 32 0
|
||||
%4 = OpTypeStruct %3
|
||||
@@ -32,71 +32,69 @@ OpDecorate %55 NonUniform
|
||||
%7 = OpConstant %3 1
|
||||
%6 = OpTypeArray %5 %7
|
||||
%8 = OpTypeStruct %3
|
||||
%10 = OpTypeInt 32 1
|
||||
%9 = OpConstant %10 1
|
||||
%14 = OpConstant %3 10
|
||||
%13 = OpTypeArray %5 %14
|
||||
%12 = OpTypePointer StorageBuffer %13
|
||||
%11 = OpVariable %12 StorageBuffer
|
||||
%16 = OpTypeStruct %4
|
||||
%17 = OpTypePointer Uniform %16
|
||||
%15 = OpVariable %17 Uniform
|
||||
%19 = OpTypePointer Function %3
|
||||
%20 = OpConstantNull %3
|
||||
%24 = OpTypePointer Input %3
|
||||
%23 = OpVariable %24 Input
|
||||
%27 = OpTypePointer Output %3
|
||||
%26 = OpVariable %27 Output
|
||||
%29 = OpTypeFunction %2
|
||||
%30 = OpTypePointer Uniform %4
|
||||
%31 = OpConstant %3 0
|
||||
%33 = OpTypePointer StorageBuffer %6
|
||||
%35 = OpTypePointer Uniform %3
|
||||
%39 = OpTypePointer StorageBuffer %5
|
||||
%40 = OpTypePointer StorageBuffer %3
|
||||
%46 = OpTypeBool
|
||||
%28 = OpFunction %2 None %29
|
||||
%21 = OpLabel
|
||||
%18 = OpVariable %19 Function %20
|
||||
%25 = OpLoad %3 %23
|
||||
%22 = OpCompositeConstruct %8 %25
|
||||
%32 = OpAccessChain %30 %15 %31
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
%36 = OpAccessChain %35 %32 %31
|
||||
%37 = OpLoad %3 %36
|
||||
%38 = OpCompositeExtract %3 %22 0
|
||||
OpStore %18 %31
|
||||
%41 = OpAccessChain %40 %11 %31 %31
|
||||
%42 = OpLoad %3 %41
|
||||
%43 = OpLoad %3 %18
|
||||
%44 = OpIAdd %3 %43 %42
|
||||
OpStore %18 %44
|
||||
%45 = OpULessThan %46 %37 %7
|
||||
OpSelectionMerge %48 None
|
||||
OpBranchConditional %45 %49 %48
|
||||
%49 = OpLabel
|
||||
%47 = OpAccessChain %40 %11 %37 %31
|
||||
%50 = OpLoad %3 %47
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
%51 = OpPhi %3 %20 %34 %50 %49
|
||||
%52 = OpLoad %3 %18
|
||||
%53 = OpIAdd %3 %52 %51
|
||||
OpStore %18 %53
|
||||
%54 = OpULessThan %46 %38 %7
|
||||
OpSelectionMerge %56 None
|
||||
OpBranchConditional %54 %57 %56
|
||||
%57 = OpLabel
|
||||
%55 = OpAccessChain %40 %11 %38 %31
|
||||
%58 = OpLoad %3 %55
|
||||
OpBranch %56
|
||||
%56 = OpLabel
|
||||
%59 = OpPhi %3 %20 %48 %58 %57
|
||||
%60 = OpLoad %3 %18
|
||||
%61 = OpIAdd %3 %60 %59
|
||||
OpStore %18 %61
|
||||
%62 = OpLoad %3 %18
|
||||
OpStore %26 %62
|
||||
%12 = OpConstant %3 10
|
||||
%11 = OpTypeArray %5 %12
|
||||
%10 = OpTypePointer StorageBuffer %11
|
||||
%9 = OpVariable %10 StorageBuffer
|
||||
%14 = OpTypeStruct %4
|
||||
%15 = OpTypePointer Uniform %14
|
||||
%13 = OpVariable %15 Uniform
|
||||
%17 = OpTypePointer Function %3
|
||||
%18 = OpConstantNull %3
|
||||
%22 = OpTypePointer Input %3
|
||||
%21 = OpVariable %22 Input
|
||||
%25 = OpTypePointer Output %3
|
||||
%24 = OpVariable %25 Output
|
||||
%27 = OpTypeFunction %2
|
||||
%28 = OpTypePointer Uniform %4
|
||||
%29 = OpConstant %3 0
|
||||
%31 = OpTypePointer StorageBuffer %6
|
||||
%33 = OpTypePointer Uniform %3
|
||||
%37 = OpTypePointer StorageBuffer %5
|
||||
%38 = OpTypePointer StorageBuffer %3
|
||||
%44 = OpTypeBool
|
||||
%26 = OpFunction %2 None %27
|
||||
%19 = OpLabel
|
||||
%16 = OpVariable %17 Function %18
|
||||
%23 = OpLoad %3 %21
|
||||
%20 = OpCompositeConstruct %8 %23
|
||||
%30 = OpAccessChain %28 %13 %29
|
||||
OpBranch %32
|
||||
%32 = OpLabel
|
||||
%34 = OpAccessChain %33 %30 %29
|
||||
%35 = OpLoad %3 %34
|
||||
%36 = OpCompositeExtract %3 %20 0
|
||||
OpStore %16 %29
|
||||
%39 = OpAccessChain %38 %9 %29 %29
|
||||
%40 = OpLoad %3 %39
|
||||
%41 = OpLoad %3 %16
|
||||
%42 = OpIAdd %3 %41 %40
|
||||
OpStore %16 %42
|
||||
%43 = OpULessThan %44 %35 %7
|
||||
OpSelectionMerge %46 None
|
||||
OpBranchConditional %43 %47 %46
|
||||
%47 = OpLabel
|
||||
%45 = OpAccessChain %38 %9 %35 %29
|
||||
%48 = OpLoad %3 %45
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
%49 = OpPhi %3 %18 %32 %48 %47
|
||||
%50 = OpLoad %3 %16
|
||||
%51 = OpIAdd %3 %50 %49
|
||||
OpStore %16 %51
|
||||
%52 = OpULessThan %44 %36 %7
|
||||
OpSelectionMerge %54 None
|
||||
OpBranchConditional %52 %55 %54
|
||||
%55 = OpLabel
|
||||
%53 = OpAccessChain %38 %9 %36 %29
|
||||
%56 = OpLoad %3 %53
|
||||
OpBranch %54
|
||||
%54 = OpLabel
|
||||
%57 = OpPhi %3 %18 %46 %56 %55
|
||||
%58 = OpLoad %3 %16
|
||||
%59 = OpIAdd %3 %58 %57
|
||||
OpStore %16 %59
|
||||
%60 = OpLoad %3 %16
|
||||
OpStore %24 %60
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 164
|
||||
; Bound: 163
|
||||
OpCapability Shader
|
||||
OpCapability Linkage
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
@@ -16,8 +16,8 @@ OpMemberDecorate %10 2 ColMajor
|
||||
OpMemberDecorate %10 2 MatrixStride 16
|
||||
OpMemberDecorate %10 3 Offset 112
|
||||
OpDecorate %10 Block
|
||||
OpDecorate %13 DescriptorSet 0
|
||||
OpDecorate %13 Binding 0
|
||||
OpDecorate %12 DescriptorSet 0
|
||||
OpDecorate %12 Binding 0
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeFloat 32
|
||||
%6 = OpTypeInt 32 0
|
||||
@@ -28,209 +28,208 @@ OpDecorate %13 Binding 0
|
||||
%9 = OpTypeRuntimeArray %3
|
||||
%10 = OpTypeStruct %4 %7 %8 %9
|
||||
%11 = OpTypeInt 32 1
|
||||
%12 = OpConstant %11 10
|
||||
%14 = OpTypePointer StorageBuffer %10
|
||||
%13 = OpVariable %14 StorageBuffer
|
||||
%18 = OpTypeFunction %3 %11
|
||||
%20 = OpTypePointer StorageBuffer %4
|
||||
%21 = OpTypePointer StorageBuffer %3
|
||||
%22 = OpConstant %6 9
|
||||
%24 = OpConstant %6 0
|
||||
%31 = OpTypePointer StorageBuffer %9
|
||||
%33 = OpConstant %6 1
|
||||
%36 = OpConstant %6 3
|
||||
%43 = OpTypePointer StorageBuffer %7
|
||||
%44 = OpTypePointer StorageBuffer %3
|
||||
%52 = OpTypeFunction %3 %7 %11
|
||||
%59 = OpTypeFunction %7 %11
|
||||
%61 = OpTypePointer StorageBuffer %8
|
||||
%62 = OpTypePointer StorageBuffer %7
|
||||
%63 = OpConstant %6 2
|
||||
%71 = OpTypeFunction %3 %11 %11
|
||||
%80 = OpConstant %3 100.0
|
||||
%92 = OpTypeFunction %3
|
||||
%106 = OpTypeFunction %2 %11 %3
|
||||
%130 = OpTypeFunction %2 %11 %7
|
||||
%139 = OpTypeFunction %2 %11 %11 %3
|
||||
%159 = OpTypeFunction %2 %3
|
||||
%17 = OpFunction %3 None %18
|
||||
%16 = OpFunctionParameter %11
|
||||
%15 = OpLabel
|
||||
OpBranch %19
|
||||
%19 = OpLabel
|
||||
%23 = OpExtInst %6 %1 UMin %16 %22
|
||||
%25 = OpAccessChain %21 %13 %24 %23
|
||||
%26 = OpLoad %3 %25
|
||||
OpReturnValue %26
|
||||
%13 = OpTypePointer StorageBuffer %10
|
||||
%12 = OpVariable %13 StorageBuffer
|
||||
%17 = OpTypeFunction %3 %11
|
||||
%19 = OpTypePointer StorageBuffer %4
|
||||
%20 = OpTypePointer StorageBuffer %3
|
||||
%21 = OpConstant %6 9
|
||||
%23 = OpConstant %6 0
|
||||
%30 = OpTypePointer StorageBuffer %9
|
||||
%32 = OpConstant %6 1
|
||||
%35 = OpConstant %6 3
|
||||
%42 = OpTypePointer StorageBuffer %7
|
||||
%43 = OpTypePointer StorageBuffer %3
|
||||
%51 = OpTypeFunction %3 %7 %11
|
||||
%58 = OpTypeFunction %7 %11
|
||||
%60 = OpTypePointer StorageBuffer %8
|
||||
%61 = OpTypePointer StorageBuffer %7
|
||||
%62 = OpConstant %6 2
|
||||
%70 = OpTypeFunction %3 %11 %11
|
||||
%79 = OpConstant %3 100.0
|
||||
%91 = OpTypeFunction %3
|
||||
%105 = OpTypeFunction %2 %11 %3
|
||||
%129 = OpTypeFunction %2 %11 %7
|
||||
%138 = OpTypeFunction %2 %11 %11 %3
|
||||
%158 = OpTypeFunction %2 %3
|
||||
%16 = OpFunction %3 None %17
|
||||
%15 = OpFunctionParameter %11
|
||||
%14 = OpLabel
|
||||
OpBranch %18
|
||||
%18 = OpLabel
|
||||
%22 = OpExtInst %6 %1 UMin %15 %21
|
||||
%24 = OpAccessChain %20 %12 %23 %22
|
||||
%25 = OpLoad %3 %24
|
||||
OpReturnValue %25
|
||||
OpFunctionEnd
|
||||
%29 = OpFunction %3 None %18
|
||||
%28 = OpFunctionParameter %11
|
||||
%27 = OpLabel
|
||||
OpBranch %30
|
||||
%30 = OpLabel
|
||||
%32 = OpArrayLength %6 %13 3
|
||||
%34 = OpISub %6 %32 %33
|
||||
%35 = OpExtInst %6 %1 UMin %28 %34
|
||||
%37 = OpAccessChain %21 %13 %36 %35
|
||||
%38 = OpLoad %3 %37
|
||||
OpReturnValue %38
|
||||
%28 = OpFunction %3 None %17
|
||||
%27 = OpFunctionParameter %11
|
||||
%26 = OpLabel
|
||||
OpBranch %29
|
||||
%29 = OpLabel
|
||||
%31 = OpArrayLength %6 %12 3
|
||||
%33 = OpISub %6 %31 %32
|
||||
%34 = OpExtInst %6 %1 UMin %27 %33
|
||||
%36 = OpAccessChain %20 %12 %35 %34
|
||||
%37 = OpLoad %3 %36
|
||||
OpReturnValue %37
|
||||
OpFunctionEnd
|
||||
%41 = OpFunction %3 None %18
|
||||
%40 = OpFunctionParameter %11
|
||||
%39 = OpLabel
|
||||
OpBranch %42
|
||||
%42 = OpLabel
|
||||
%45 = OpExtInst %6 %1 UMin %40 %36
|
||||
%46 = OpAccessChain %44 %13 %33 %45
|
||||
%47 = OpLoad %3 %46
|
||||
OpReturnValue %47
|
||||
%40 = OpFunction %3 None %17
|
||||
%39 = OpFunctionParameter %11
|
||||
%38 = OpLabel
|
||||
OpBranch %41
|
||||
%41 = OpLabel
|
||||
%44 = OpExtInst %6 %1 UMin %39 %35
|
||||
%45 = OpAccessChain %43 %12 %32 %44
|
||||
%46 = OpLoad %3 %45
|
||||
OpReturnValue %46
|
||||
OpFunctionEnd
|
||||
%51 = OpFunction %3 None %52
|
||||
%49 = OpFunctionParameter %7
|
||||
%50 = OpFunctionParameter %11
|
||||
%48 = OpLabel
|
||||
OpBranch %53
|
||||
%53 = OpLabel
|
||||
%54 = OpExtInst %6 %1 UMin %50 %36
|
||||
%55 = OpVectorExtractDynamic %3 %49 %54
|
||||
OpReturnValue %55
|
||||
%50 = OpFunction %3 None %51
|
||||
%48 = OpFunctionParameter %7
|
||||
%49 = OpFunctionParameter %11
|
||||
%47 = OpLabel
|
||||
OpBranch %52
|
||||
%52 = OpLabel
|
||||
%53 = OpExtInst %6 %1 UMin %49 %35
|
||||
%54 = OpVectorExtractDynamic %3 %48 %53
|
||||
OpReturnValue %54
|
||||
OpFunctionEnd
|
||||
%58 = OpFunction %7 None %59
|
||||
%57 = OpFunctionParameter %11
|
||||
%56 = OpLabel
|
||||
OpBranch %60
|
||||
%60 = OpLabel
|
||||
%64 = OpExtInst %6 %1 UMin %57 %63
|
||||
%65 = OpAccessChain %62 %13 %63 %64
|
||||
%66 = OpLoad %7 %65
|
||||
OpReturnValue %66
|
||||
%57 = OpFunction %7 None %58
|
||||
%56 = OpFunctionParameter %11
|
||||
%55 = OpLabel
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
%63 = OpExtInst %6 %1 UMin %56 %62
|
||||
%64 = OpAccessChain %61 %12 %62 %63
|
||||
%65 = OpLoad %7 %64
|
||||
OpReturnValue %65
|
||||
OpFunctionEnd
|
||||
%70 = OpFunction %3 None %71
|
||||
%69 = OpFunction %3 None %70
|
||||
%67 = OpFunctionParameter %11
|
||||
%68 = OpFunctionParameter %11
|
||||
%69 = OpFunctionParameter %11
|
||||
%67 = OpLabel
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
%73 = OpExtInst %6 %1 UMin %69 %36
|
||||
%74 = OpExtInst %6 %1 UMin %68 %63
|
||||
%75 = OpAccessChain %44 %13 %63 %74 %73
|
||||
%76 = OpLoad %3 %75
|
||||
OpReturnValue %76
|
||||
%66 = OpLabel
|
||||
OpBranch %71
|
||||
%71 = OpLabel
|
||||
%72 = OpExtInst %6 %1 UMin %68 %35
|
||||
%73 = OpExtInst %6 %1 UMin %67 %62
|
||||
%74 = OpAccessChain %43 %12 %62 %73 %72
|
||||
%75 = OpLoad %3 %74
|
||||
OpReturnValue %75
|
||||
OpFunctionEnd
|
||||
%79 = OpFunction %3 None %18
|
||||
%78 = OpFunctionParameter %11
|
||||
%77 = OpLabel
|
||||
OpBranch %81
|
||||
%81 = OpLabel
|
||||
%82 = OpConvertSToF %3 %78
|
||||
%83 = OpFDiv %3 %82 %80
|
||||
%84 = OpExtInst %3 %1 Sin %83
|
||||
%85 = OpFMul %3 %84 %80
|
||||
%86 = OpConvertFToS %11 %85
|
||||
%87 = OpExtInst %6 %1 UMin %86 %22
|
||||
%88 = OpAccessChain %21 %13 %24 %87
|
||||
%89 = OpLoad %3 %88
|
||||
OpReturnValue %89
|
||||
%78 = OpFunction %3 None %17
|
||||
%77 = OpFunctionParameter %11
|
||||
%76 = OpLabel
|
||||
OpBranch %80
|
||||
%80 = OpLabel
|
||||
%81 = OpConvertSToF %3 %77
|
||||
%82 = OpFDiv %3 %81 %79
|
||||
%83 = OpExtInst %3 %1 Sin %82
|
||||
%84 = OpFMul %3 %83 %79
|
||||
%85 = OpConvertFToS %11 %84
|
||||
%86 = OpExtInst %6 %1 UMin %85 %21
|
||||
%87 = OpAccessChain %20 %12 %23 %86
|
||||
%88 = OpLoad %3 %87
|
||||
OpReturnValue %88
|
||||
OpFunctionEnd
|
||||
%91 = OpFunction %3 None %92
|
||||
%90 = OpLabel
|
||||
OpBranch %93
|
||||
%93 = OpLabel
|
||||
%94 = OpAccessChain %21 %13 %24 %22
|
||||
%95 = OpLoad %3 %94
|
||||
%96 = OpAccessChain %44 %13 %33 %36
|
||||
%97 = OpLoad %3 %96
|
||||
%98 = OpFAdd %3 %95 %97
|
||||
%99 = OpAccessChain %44 %13 %63 %63 %36
|
||||
%100 = OpLoad %3 %99
|
||||
%101 = OpFAdd %3 %98 %100
|
||||
OpReturnValue %101
|
||||
%90 = OpFunction %3 None %91
|
||||
%89 = OpLabel
|
||||
OpBranch %92
|
||||
%92 = OpLabel
|
||||
%93 = OpAccessChain %20 %12 %23 %21
|
||||
%94 = OpLoad %3 %93
|
||||
%95 = OpAccessChain %43 %12 %32 %35
|
||||
%96 = OpLoad %3 %95
|
||||
%97 = OpFAdd %3 %94 %96
|
||||
%98 = OpAccessChain %43 %12 %62 %62 %35
|
||||
%99 = OpLoad %3 %98
|
||||
%100 = OpFAdd %3 %97 %99
|
||||
OpReturnValue %100
|
||||
OpFunctionEnd
|
||||
%105 = OpFunction %2 None %106
|
||||
%103 = OpFunctionParameter %11
|
||||
%104 = OpFunctionParameter %3
|
||||
%102 = OpLabel
|
||||
OpBranch %107
|
||||
%107 = OpLabel
|
||||
%108 = OpExtInst %6 %1 UMin %103 %22
|
||||
%109 = OpAccessChain %21 %13 %24 %108
|
||||
OpStore %109 %104
|
||||
%104 = OpFunction %2 None %105
|
||||
%102 = OpFunctionParameter %11
|
||||
%103 = OpFunctionParameter %3
|
||||
%101 = OpLabel
|
||||
OpBranch %106
|
||||
%106 = OpLabel
|
||||
%107 = OpExtInst %6 %1 UMin %102 %21
|
||||
%108 = OpAccessChain %20 %12 %23 %107
|
||||
OpStore %108 %103
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%113 = OpFunction %2 None %106
|
||||
%111 = OpFunctionParameter %11
|
||||
%112 = OpFunctionParameter %3
|
||||
%110 = OpLabel
|
||||
OpBranch %114
|
||||
%114 = OpLabel
|
||||
%115 = OpArrayLength %6 %13 3
|
||||
%116 = OpISub %6 %115 %33
|
||||
%117 = OpExtInst %6 %1 UMin %111 %116
|
||||
%118 = OpAccessChain %21 %13 %36 %117
|
||||
OpStore %118 %112
|
||||
%112 = OpFunction %2 None %105
|
||||
%110 = OpFunctionParameter %11
|
||||
%111 = OpFunctionParameter %3
|
||||
%109 = OpLabel
|
||||
OpBranch %113
|
||||
%113 = OpLabel
|
||||
%114 = OpArrayLength %6 %12 3
|
||||
%115 = OpISub %6 %114 %32
|
||||
%116 = OpExtInst %6 %1 UMin %110 %115
|
||||
%117 = OpAccessChain %20 %12 %35 %116
|
||||
OpStore %117 %111
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%122 = OpFunction %2 None %106
|
||||
%120 = OpFunctionParameter %11
|
||||
%121 = OpFunctionParameter %3
|
||||
%119 = OpLabel
|
||||
OpBranch %123
|
||||
%123 = OpLabel
|
||||
%124 = OpExtInst %6 %1 UMin %120 %36
|
||||
%125 = OpAccessChain %44 %13 %33 %124
|
||||
OpStore %125 %121
|
||||
%121 = OpFunction %2 None %105
|
||||
%119 = OpFunctionParameter %11
|
||||
%120 = OpFunctionParameter %3
|
||||
%118 = OpLabel
|
||||
OpBranch %122
|
||||
%122 = OpLabel
|
||||
%123 = OpExtInst %6 %1 UMin %119 %35
|
||||
%124 = OpAccessChain %43 %12 %32 %123
|
||||
OpStore %124 %120
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%129 = OpFunction %2 None %130
|
||||
%127 = OpFunctionParameter %11
|
||||
%128 = OpFunctionParameter %7
|
||||
%126 = OpLabel
|
||||
OpBranch %131
|
||||
%131 = OpLabel
|
||||
%132 = OpExtInst %6 %1 UMin %127 %63
|
||||
%133 = OpAccessChain %62 %13 %63 %132
|
||||
OpStore %133 %128
|
||||
%128 = OpFunction %2 None %129
|
||||
%126 = OpFunctionParameter %11
|
||||
%127 = OpFunctionParameter %7
|
||||
%125 = OpLabel
|
||||
OpBranch %130
|
||||
%130 = OpLabel
|
||||
%131 = OpExtInst %6 %1 UMin %126 %62
|
||||
%132 = OpAccessChain %61 %12 %62 %131
|
||||
OpStore %132 %127
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%138 = OpFunction %2 None %139
|
||||
%137 = OpFunction %2 None %138
|
||||
%134 = OpFunctionParameter %11
|
||||
%135 = OpFunctionParameter %11
|
||||
%136 = OpFunctionParameter %11
|
||||
%137 = OpFunctionParameter %3
|
||||
%134 = OpLabel
|
||||
OpBranch %140
|
||||
%140 = OpLabel
|
||||
%141 = OpExtInst %6 %1 UMin %136 %36
|
||||
%142 = OpExtInst %6 %1 UMin %135 %63
|
||||
%143 = OpAccessChain %44 %13 %63 %142 %141
|
||||
OpStore %143 %137
|
||||
%136 = OpFunctionParameter %3
|
||||
%133 = OpLabel
|
||||
OpBranch %139
|
||||
%139 = OpLabel
|
||||
%140 = OpExtInst %6 %1 UMin %135 %35
|
||||
%141 = OpExtInst %6 %1 UMin %134 %62
|
||||
%142 = OpAccessChain %43 %12 %62 %141 %140
|
||||
OpStore %142 %136
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%147 = OpFunction %2 None %106
|
||||
%145 = OpFunctionParameter %11
|
||||
%146 = OpFunctionParameter %3
|
||||
%144 = OpLabel
|
||||
OpBranch %148
|
||||
%148 = OpLabel
|
||||
%149 = OpConvertSToF %3 %145
|
||||
%150 = OpFDiv %3 %149 %80
|
||||
%151 = OpExtInst %3 %1 Sin %150
|
||||
%152 = OpFMul %3 %151 %80
|
||||
%153 = OpConvertFToS %11 %152
|
||||
%154 = OpExtInst %6 %1 UMin %153 %22
|
||||
%155 = OpAccessChain %21 %13 %24 %154
|
||||
OpStore %155 %146
|
||||
%146 = OpFunction %2 None %105
|
||||
%144 = OpFunctionParameter %11
|
||||
%145 = OpFunctionParameter %3
|
||||
%143 = OpLabel
|
||||
OpBranch %147
|
||||
%147 = OpLabel
|
||||
%148 = OpConvertSToF %3 %144
|
||||
%149 = OpFDiv %3 %148 %79
|
||||
%150 = OpExtInst %3 %1 Sin %149
|
||||
%151 = OpFMul %3 %150 %79
|
||||
%152 = OpConvertFToS %11 %151
|
||||
%153 = OpExtInst %6 %1 UMin %152 %21
|
||||
%154 = OpAccessChain %20 %12 %23 %153
|
||||
OpStore %154 %145
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%158 = OpFunction %2 None %159
|
||||
%157 = OpFunctionParameter %3
|
||||
%156 = OpLabel
|
||||
OpBranch %160
|
||||
%160 = OpLabel
|
||||
%161 = OpAccessChain %21 %13 %24 %22
|
||||
OpStore %161 %157
|
||||
%162 = OpAccessChain %44 %13 %33 %36
|
||||
OpStore %162 %157
|
||||
%163 = OpAccessChain %44 %13 %63 %63 %36
|
||||
OpStore %163 %157
|
||||
%157 = OpFunction %2 None %158
|
||||
%156 = OpFunctionParameter %3
|
||||
%155 = OpLabel
|
||||
OpBranch %159
|
||||
%159 = OpLabel
|
||||
%160 = OpAccessChain %20 %12 %23 %21
|
||||
OpStore %160 %156
|
||||
%161 = OpAccessChain %43 %12 %32 %35
|
||||
OpStore %161 %156
|
||||
%162 = OpAccessChain %43 %12 %62 %62 %35
|
||||
OpStore %162 %156
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 201
|
||||
; Bound: 200
|
||||
OpCapability Shader
|
||||
OpCapability Linkage
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
@@ -16,8 +16,8 @@ OpMemberDecorate %10 2 ColMajor
|
||||
OpMemberDecorate %10 2 MatrixStride 16
|
||||
OpMemberDecorate %10 3 Offset 112
|
||||
OpDecorate %10 Block
|
||||
OpDecorate %13 DescriptorSet 0
|
||||
OpDecorate %13 Binding 0
|
||||
OpDecorate %12 DescriptorSet 0
|
||||
OpDecorate %12 Binding 0
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeFloat 32
|
||||
%6 = OpTypeInt 32 0
|
||||
@@ -28,285 +28,284 @@ OpDecorate %13 Binding 0
|
||||
%9 = OpTypeRuntimeArray %3
|
||||
%10 = OpTypeStruct %4 %7 %8 %9
|
||||
%11 = OpTypeInt 32 1
|
||||
%12 = OpConstant %11 10
|
||||
%14 = OpTypePointer StorageBuffer %10
|
||||
%13 = OpVariable %14 StorageBuffer
|
||||
%18 = OpTypeFunction %3 %11
|
||||
%20 = OpTypePointer StorageBuffer %4
|
||||
%21 = OpTypePointer StorageBuffer %3
|
||||
%23 = OpTypeBool
|
||||
%24 = OpConstant %6 0
|
||||
%26 = OpConstantNull %3
|
||||
%35 = OpTypePointer StorageBuffer %9
|
||||
%38 = OpConstant %6 3
|
||||
%48 = OpTypePointer StorageBuffer %7
|
||||
%49 = OpTypePointer StorageBuffer %3
|
||||
%50 = OpConstant %6 4
|
||||
%52 = OpConstant %6 1
|
||||
%62 = OpTypeFunction %3 %7 %11
|
||||
%72 = OpTypeFunction %7 %11
|
||||
%74 = OpTypePointer StorageBuffer %8
|
||||
%75 = OpTypePointer StorageBuffer %7
|
||||
%77 = OpConstant %6 2
|
||||
%79 = OpConstantNull %7
|
||||
%88 = OpTypeFunction %3 %11 %11
|
||||
%101 = OpConstant %3 100.0
|
||||
%116 = OpTypeFunction %3
|
||||
%118 = OpConstant %6 9
|
||||
%131 = OpTypeFunction %2 %11 %3
|
||||
%160 = OpTypeFunction %2 %11 %7
|
||||
%171 = OpTypeFunction %2 %11 %11 %3
|
||||
%196 = OpTypeFunction %2 %3
|
||||
%17 = OpFunction %3 None %18
|
||||
%16 = OpFunctionParameter %11
|
||||
%15 = OpLabel
|
||||
OpBranch %19
|
||||
%19 = OpLabel
|
||||
%22 = OpULessThan %23 %16 %5
|
||||
OpSelectionMerge %27 None
|
||||
OpBranchConditional %22 %28 %27
|
||||
%28 = OpLabel
|
||||
%25 = OpAccessChain %21 %13 %24 %16
|
||||
%29 = OpLoad %3 %25
|
||||
OpBranch %27
|
||||
%13 = OpTypePointer StorageBuffer %10
|
||||
%12 = OpVariable %13 StorageBuffer
|
||||
%17 = OpTypeFunction %3 %11
|
||||
%19 = OpTypePointer StorageBuffer %4
|
||||
%20 = OpTypePointer StorageBuffer %3
|
||||
%22 = OpTypeBool
|
||||
%23 = OpConstant %6 0
|
||||
%25 = OpConstantNull %3
|
||||
%34 = OpTypePointer StorageBuffer %9
|
||||
%37 = OpConstant %6 3
|
||||
%47 = OpTypePointer StorageBuffer %7
|
||||
%48 = OpTypePointer StorageBuffer %3
|
||||
%49 = OpConstant %6 4
|
||||
%51 = OpConstant %6 1
|
||||
%61 = OpTypeFunction %3 %7 %11
|
||||
%71 = OpTypeFunction %7 %11
|
||||
%73 = OpTypePointer StorageBuffer %8
|
||||
%74 = OpTypePointer StorageBuffer %7
|
||||
%76 = OpConstant %6 2
|
||||
%78 = OpConstantNull %7
|
||||
%87 = OpTypeFunction %3 %11 %11
|
||||
%100 = OpConstant %3 100.0
|
||||
%115 = OpTypeFunction %3
|
||||
%117 = OpConstant %6 9
|
||||
%130 = OpTypeFunction %2 %11 %3
|
||||
%159 = OpTypeFunction %2 %11 %7
|
||||
%170 = OpTypeFunction %2 %11 %11 %3
|
||||
%195 = OpTypeFunction %2 %3
|
||||
%16 = OpFunction %3 None %17
|
||||
%15 = OpFunctionParameter %11
|
||||
%14 = OpLabel
|
||||
OpBranch %18
|
||||
%18 = OpLabel
|
||||
%21 = OpULessThan %22 %15 %5
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %21 %27 %26
|
||||
%27 = OpLabel
|
||||
%30 = OpPhi %3 %26 %19 %29 %28
|
||||
OpReturnValue %30
|
||||
%24 = OpAccessChain %20 %12 %23 %15
|
||||
%28 = OpLoad %3 %24
|
||||
OpBranch %26
|
||||
%26 = OpLabel
|
||||
%29 = OpPhi %3 %25 %18 %28 %27
|
||||
OpReturnValue %29
|
||||
OpFunctionEnd
|
||||
%33 = OpFunction %3 None %18
|
||||
%32 = OpFunctionParameter %11
|
||||
%31 = OpLabel
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
%36 = OpArrayLength %6 %13 3
|
||||
%37 = OpULessThan %23 %32 %36
|
||||
OpSelectionMerge %40 None
|
||||
OpBranchConditional %37 %41 %40
|
||||
%41 = OpLabel
|
||||
%39 = OpAccessChain %21 %13 %38 %32
|
||||
%42 = OpLoad %3 %39
|
||||
OpBranch %40
|
||||
%32 = OpFunction %3 None %17
|
||||
%31 = OpFunctionParameter %11
|
||||
%30 = OpLabel
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
%35 = OpArrayLength %6 %12 3
|
||||
%36 = OpULessThan %22 %31 %35
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %36 %40 %39
|
||||
%40 = OpLabel
|
||||
%43 = OpPhi %3 %26 %34 %42 %41
|
||||
OpReturnValue %43
|
||||
%38 = OpAccessChain %20 %12 %37 %31
|
||||
%41 = OpLoad %3 %38
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%42 = OpPhi %3 %25 %33 %41 %40
|
||||
OpReturnValue %42
|
||||
OpFunctionEnd
|
||||
%46 = OpFunction %3 None %18
|
||||
%45 = OpFunctionParameter %11
|
||||
%44 = OpLabel
|
||||
OpBranch %47
|
||||
%47 = OpLabel
|
||||
%51 = OpULessThan %23 %45 %50
|
||||
OpSelectionMerge %54 None
|
||||
OpBranchConditional %51 %55 %54
|
||||
%55 = OpLabel
|
||||
%53 = OpAccessChain %49 %13 %52 %45
|
||||
%56 = OpLoad %3 %53
|
||||
OpBranch %54
|
||||
%45 = OpFunction %3 None %17
|
||||
%44 = OpFunctionParameter %11
|
||||
%43 = OpLabel
|
||||
OpBranch %46
|
||||
%46 = OpLabel
|
||||
%50 = OpULessThan %22 %44 %49
|
||||
OpSelectionMerge %53 None
|
||||
OpBranchConditional %50 %54 %53
|
||||
%54 = OpLabel
|
||||
%57 = OpPhi %3 %26 %47 %56 %55
|
||||
OpReturnValue %57
|
||||
%52 = OpAccessChain %48 %12 %51 %44
|
||||
%55 = OpLoad %3 %52
|
||||
OpBranch %53
|
||||
%53 = OpLabel
|
||||
%56 = OpPhi %3 %25 %46 %55 %54
|
||||
OpReturnValue %56
|
||||
OpFunctionEnd
|
||||
%61 = OpFunction %3 None %62
|
||||
%59 = OpFunctionParameter %7
|
||||
%60 = OpFunctionParameter %11
|
||||
%58 = OpLabel
|
||||
OpBranch %63
|
||||
%63 = OpLabel
|
||||
%64 = OpULessThan %23 %60 %50
|
||||
OpSelectionMerge %65 None
|
||||
OpBranchConditional %64 %66 %65
|
||||
%66 = OpLabel
|
||||
%67 = OpVectorExtractDynamic %3 %59 %60
|
||||
OpBranch %65
|
||||
%60 = OpFunction %3 None %61
|
||||
%58 = OpFunctionParameter %7
|
||||
%59 = OpFunctionParameter %11
|
||||
%57 = OpLabel
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
%63 = OpULessThan %22 %59 %49
|
||||
OpSelectionMerge %64 None
|
||||
OpBranchConditional %63 %65 %64
|
||||
%65 = OpLabel
|
||||
%68 = OpPhi %3 %26 %63 %67 %66
|
||||
OpReturnValue %68
|
||||
%66 = OpVectorExtractDynamic %3 %58 %59
|
||||
OpBranch %64
|
||||
%64 = OpLabel
|
||||
%67 = OpPhi %3 %25 %62 %66 %65
|
||||
OpReturnValue %67
|
||||
OpFunctionEnd
|
||||
%71 = OpFunction %7 None %72
|
||||
%70 = OpFunctionParameter %11
|
||||
%69 = OpLabel
|
||||
OpBranch %73
|
||||
%73 = OpLabel
|
||||
%76 = OpULessThan %23 %70 %38
|
||||
OpSelectionMerge %80 None
|
||||
OpBranchConditional %76 %81 %80
|
||||
%81 = OpLabel
|
||||
%78 = OpAccessChain %75 %13 %77 %70
|
||||
%82 = OpLoad %7 %78
|
||||
OpBranch %80
|
||||
%70 = OpFunction %7 None %71
|
||||
%69 = OpFunctionParameter %11
|
||||
%68 = OpLabel
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
%75 = OpULessThan %22 %69 %37
|
||||
OpSelectionMerge %79 None
|
||||
OpBranchConditional %75 %80 %79
|
||||
%80 = OpLabel
|
||||
%83 = OpPhi %7 %79 %73 %82 %81
|
||||
OpReturnValue %83
|
||||
%77 = OpAccessChain %74 %12 %76 %69
|
||||
%81 = OpLoad %7 %77
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
%82 = OpPhi %7 %78 %72 %81 %80
|
||||
OpReturnValue %82
|
||||
OpFunctionEnd
|
||||
%87 = OpFunction %3 None %88
|
||||
%86 = OpFunction %3 None %87
|
||||
%84 = OpFunctionParameter %11
|
||||
%85 = OpFunctionParameter %11
|
||||
%86 = OpFunctionParameter %11
|
||||
%84 = OpLabel
|
||||
OpBranch %89
|
||||
%89 = OpLabel
|
||||
%90 = OpULessThan %23 %86 %50
|
||||
%91 = OpULessThan %23 %85 %38
|
||||
%92 = OpLogicalAnd %23 %90 %91
|
||||
OpSelectionMerge %94 None
|
||||
OpBranchConditional %92 %95 %94
|
||||
%95 = OpLabel
|
||||
%93 = OpAccessChain %49 %13 %77 %85 %86
|
||||
%96 = OpLoad %3 %93
|
||||
OpBranch %94
|
||||
%83 = OpLabel
|
||||
OpBranch %88
|
||||
%88 = OpLabel
|
||||
%89 = OpULessThan %22 %85 %49
|
||||
%90 = OpULessThan %22 %84 %37
|
||||
%91 = OpLogicalAnd %22 %89 %90
|
||||
OpSelectionMerge %93 None
|
||||
OpBranchConditional %91 %94 %93
|
||||
%94 = OpLabel
|
||||
%97 = OpPhi %3 %26 %89 %96 %95
|
||||
OpReturnValue %97
|
||||
%92 = OpAccessChain %48 %12 %76 %84 %85
|
||||
%95 = OpLoad %3 %92
|
||||
OpBranch %93
|
||||
%93 = OpLabel
|
||||
%96 = OpPhi %3 %25 %88 %95 %94
|
||||
OpReturnValue %96
|
||||
OpFunctionEnd
|
||||
%100 = OpFunction %3 None %18
|
||||
%99 = OpFunctionParameter %11
|
||||
%98 = OpLabel
|
||||
OpBranch %102
|
||||
%102 = OpLabel
|
||||
%103 = OpConvertSToF %3 %99
|
||||
%104 = OpFDiv %3 %103 %101
|
||||
%105 = OpExtInst %3 %1 Sin %104
|
||||
%106 = OpFMul %3 %105 %101
|
||||
%107 = OpConvertFToS %11 %106
|
||||
%108 = OpULessThan %23 %107 %5
|
||||
OpSelectionMerge %110 None
|
||||
OpBranchConditional %108 %111 %110
|
||||
%111 = OpLabel
|
||||
%109 = OpAccessChain %21 %13 %24 %107
|
||||
%112 = OpLoad %3 %109
|
||||
OpBranch %110
|
||||
%99 = OpFunction %3 None %17
|
||||
%98 = OpFunctionParameter %11
|
||||
%97 = OpLabel
|
||||
OpBranch %101
|
||||
%101 = OpLabel
|
||||
%102 = OpConvertSToF %3 %98
|
||||
%103 = OpFDiv %3 %102 %100
|
||||
%104 = OpExtInst %3 %1 Sin %103
|
||||
%105 = OpFMul %3 %104 %100
|
||||
%106 = OpConvertFToS %11 %105
|
||||
%107 = OpULessThan %22 %106 %5
|
||||
OpSelectionMerge %109 None
|
||||
OpBranchConditional %107 %110 %109
|
||||
%110 = OpLabel
|
||||
%113 = OpPhi %3 %26 %102 %112 %111
|
||||
OpReturnValue %113
|
||||
%108 = OpAccessChain %20 %12 %23 %106
|
||||
%111 = OpLoad %3 %108
|
||||
OpBranch %109
|
||||
%109 = OpLabel
|
||||
%112 = OpPhi %3 %25 %101 %111 %110
|
||||
OpReturnValue %112
|
||||
OpFunctionEnd
|
||||
%115 = OpFunction %3 None %116
|
||||
%114 = OpLabel
|
||||
OpBranch %117
|
||||
%117 = OpLabel
|
||||
%119 = OpAccessChain %21 %13 %24 %118
|
||||
%120 = OpLoad %3 %119
|
||||
%121 = OpAccessChain %49 %13 %52 %38
|
||||
%122 = OpLoad %3 %121
|
||||
%123 = OpFAdd %3 %120 %122
|
||||
%124 = OpAccessChain %49 %13 %77 %77 %38
|
||||
%125 = OpLoad %3 %124
|
||||
%126 = OpFAdd %3 %123 %125
|
||||
OpReturnValue %126
|
||||
%114 = OpFunction %3 None %115
|
||||
%113 = OpLabel
|
||||
OpBranch %116
|
||||
%116 = OpLabel
|
||||
%118 = OpAccessChain %20 %12 %23 %117
|
||||
%119 = OpLoad %3 %118
|
||||
%120 = OpAccessChain %48 %12 %51 %37
|
||||
%121 = OpLoad %3 %120
|
||||
%122 = OpFAdd %3 %119 %121
|
||||
%123 = OpAccessChain %48 %12 %76 %76 %37
|
||||
%124 = OpLoad %3 %123
|
||||
%125 = OpFAdd %3 %122 %124
|
||||
OpReturnValue %125
|
||||
OpFunctionEnd
|
||||
%130 = OpFunction %2 None %131
|
||||
%128 = OpFunctionParameter %11
|
||||
%129 = OpFunctionParameter %3
|
||||
%127 = OpLabel
|
||||
OpBranch %132
|
||||
%132 = OpLabel
|
||||
%133 = OpULessThan %23 %128 %5
|
||||
OpSelectionMerge %135 None
|
||||
OpBranchConditional %133 %136 %135
|
||||
%136 = OpLabel
|
||||
%134 = OpAccessChain %21 %13 %24 %128
|
||||
OpStore %134 %129
|
||||
OpBranch %135
|
||||
%129 = OpFunction %2 None %130
|
||||
%127 = OpFunctionParameter %11
|
||||
%128 = OpFunctionParameter %3
|
||||
%126 = OpLabel
|
||||
OpBranch %131
|
||||
%131 = OpLabel
|
||||
%132 = OpULessThan %22 %127 %5
|
||||
OpSelectionMerge %134 None
|
||||
OpBranchConditional %132 %135 %134
|
||||
%135 = OpLabel
|
||||
%133 = OpAccessChain %20 %12 %23 %127
|
||||
OpStore %133 %128
|
||||
OpBranch %134
|
||||
%134 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%140 = OpFunction %2 None %131
|
||||
%138 = OpFunctionParameter %11
|
||||
%139 = OpFunctionParameter %3
|
||||
%137 = OpLabel
|
||||
OpBranch %141
|
||||
%141 = OpLabel
|
||||
%142 = OpArrayLength %6 %13 3
|
||||
%143 = OpULessThan %23 %138 %142
|
||||
OpSelectionMerge %145 None
|
||||
OpBranchConditional %143 %146 %145
|
||||
%146 = OpLabel
|
||||
%144 = OpAccessChain %21 %13 %38 %138
|
||||
OpStore %144 %139
|
||||
OpBranch %145
|
||||
%139 = OpFunction %2 None %130
|
||||
%137 = OpFunctionParameter %11
|
||||
%138 = OpFunctionParameter %3
|
||||
%136 = OpLabel
|
||||
OpBranch %140
|
||||
%140 = OpLabel
|
||||
%141 = OpArrayLength %6 %12 3
|
||||
%142 = OpULessThan %22 %137 %141
|
||||
OpSelectionMerge %144 None
|
||||
OpBranchConditional %142 %145 %144
|
||||
%145 = OpLabel
|
||||
%143 = OpAccessChain %20 %12 %37 %137
|
||||
OpStore %143 %138
|
||||
OpBranch %144
|
||||
%144 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%150 = OpFunction %2 None %131
|
||||
%148 = OpFunctionParameter %11
|
||||
%149 = OpFunctionParameter %3
|
||||
%147 = OpLabel
|
||||
OpBranch %151
|
||||
%151 = OpLabel
|
||||
%152 = OpULessThan %23 %148 %50
|
||||
OpSelectionMerge %154 None
|
||||
OpBranchConditional %152 %155 %154
|
||||
%155 = OpLabel
|
||||
%153 = OpAccessChain %49 %13 %52 %148
|
||||
OpStore %153 %149
|
||||
OpBranch %154
|
||||
%149 = OpFunction %2 None %130
|
||||
%147 = OpFunctionParameter %11
|
||||
%148 = OpFunctionParameter %3
|
||||
%146 = OpLabel
|
||||
OpBranch %150
|
||||
%150 = OpLabel
|
||||
%151 = OpULessThan %22 %147 %49
|
||||
OpSelectionMerge %153 None
|
||||
OpBranchConditional %151 %154 %153
|
||||
%154 = OpLabel
|
||||
%152 = OpAccessChain %48 %12 %51 %147
|
||||
OpStore %152 %148
|
||||
OpBranch %153
|
||||
%153 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%159 = OpFunction %2 None %160
|
||||
%157 = OpFunctionParameter %11
|
||||
%158 = OpFunctionParameter %7
|
||||
%156 = OpLabel
|
||||
OpBranch %161
|
||||
%161 = OpLabel
|
||||
%162 = OpULessThan %23 %157 %38
|
||||
OpSelectionMerge %164 None
|
||||
OpBranchConditional %162 %165 %164
|
||||
%165 = OpLabel
|
||||
%163 = OpAccessChain %75 %13 %77 %157
|
||||
OpStore %163 %158
|
||||
OpBranch %164
|
||||
%158 = OpFunction %2 None %159
|
||||
%156 = OpFunctionParameter %11
|
||||
%157 = OpFunctionParameter %7
|
||||
%155 = OpLabel
|
||||
OpBranch %160
|
||||
%160 = OpLabel
|
||||
%161 = OpULessThan %22 %156 %37
|
||||
OpSelectionMerge %163 None
|
||||
OpBranchConditional %161 %164 %163
|
||||
%164 = OpLabel
|
||||
%162 = OpAccessChain %74 %12 %76 %156
|
||||
OpStore %162 %157
|
||||
OpBranch %163
|
||||
%163 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%170 = OpFunction %2 None %171
|
||||
%169 = OpFunction %2 None %170
|
||||
%166 = OpFunctionParameter %11
|
||||
%167 = OpFunctionParameter %11
|
||||
%168 = OpFunctionParameter %11
|
||||
%169 = OpFunctionParameter %3
|
||||
%166 = OpLabel
|
||||
OpBranch %172
|
||||
%172 = OpLabel
|
||||
%173 = OpULessThan %23 %168 %50
|
||||
%174 = OpULessThan %23 %167 %38
|
||||
%175 = OpLogicalAnd %23 %173 %174
|
||||
OpSelectionMerge %177 None
|
||||
OpBranchConditional %175 %178 %177
|
||||
%178 = OpLabel
|
||||
%176 = OpAccessChain %49 %13 %77 %167 %168
|
||||
OpStore %176 %169
|
||||
OpBranch %177
|
||||
%168 = OpFunctionParameter %3
|
||||
%165 = OpLabel
|
||||
OpBranch %171
|
||||
%171 = OpLabel
|
||||
%172 = OpULessThan %22 %167 %49
|
||||
%173 = OpULessThan %22 %166 %37
|
||||
%174 = OpLogicalAnd %22 %172 %173
|
||||
OpSelectionMerge %176 None
|
||||
OpBranchConditional %174 %177 %176
|
||||
%177 = OpLabel
|
||||
%175 = OpAccessChain %48 %12 %76 %166 %167
|
||||
OpStore %175 %168
|
||||
OpBranch %176
|
||||
%176 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%182 = OpFunction %2 None %131
|
||||
%180 = OpFunctionParameter %11
|
||||
%181 = OpFunctionParameter %3
|
||||
%179 = OpLabel
|
||||
OpBranch %183
|
||||
%183 = OpLabel
|
||||
%184 = OpConvertSToF %3 %180
|
||||
%185 = OpFDiv %3 %184 %101
|
||||
%186 = OpExtInst %3 %1 Sin %185
|
||||
%187 = OpFMul %3 %186 %101
|
||||
%188 = OpConvertFToS %11 %187
|
||||
%189 = OpULessThan %23 %188 %5
|
||||
OpSelectionMerge %191 None
|
||||
OpBranchConditional %189 %192 %191
|
||||
%192 = OpLabel
|
||||
%190 = OpAccessChain %21 %13 %24 %188
|
||||
OpStore %190 %181
|
||||
OpBranch %191
|
||||
%181 = OpFunction %2 None %130
|
||||
%179 = OpFunctionParameter %11
|
||||
%180 = OpFunctionParameter %3
|
||||
%178 = OpLabel
|
||||
OpBranch %182
|
||||
%182 = OpLabel
|
||||
%183 = OpConvertSToF %3 %179
|
||||
%184 = OpFDiv %3 %183 %100
|
||||
%185 = OpExtInst %3 %1 Sin %184
|
||||
%186 = OpFMul %3 %185 %100
|
||||
%187 = OpConvertFToS %11 %186
|
||||
%188 = OpULessThan %22 %187 %5
|
||||
OpSelectionMerge %190 None
|
||||
OpBranchConditional %188 %191 %190
|
||||
%191 = OpLabel
|
||||
%189 = OpAccessChain %20 %12 %23 %187
|
||||
OpStore %189 %180
|
||||
OpBranch %190
|
||||
%190 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%195 = OpFunction %2 None %196
|
||||
%194 = OpFunctionParameter %3
|
||||
%193 = OpLabel
|
||||
OpBranch %197
|
||||
%197 = OpLabel
|
||||
%198 = OpAccessChain %21 %13 %24 %118
|
||||
OpStore %198 %194
|
||||
%199 = OpAccessChain %49 %13 %52 %38
|
||||
OpStore %199 %194
|
||||
%200 = OpAccessChain %49 %13 %77 %77 %38
|
||||
OpStore %200 %194
|
||||
%194 = OpFunction %2 None %195
|
||||
%193 = OpFunctionParameter %3
|
||||
%192 = OpLabel
|
||||
OpBranch %196
|
||||
%196 = OpLabel
|
||||
%197 = OpAccessChain %20 %12 %23 %117
|
||||
OpStore %197 %193
|
||||
%198 = OpAccessChain %48 %12 %51 %37
|
||||
OpStore %198 %193
|
||||
%199 = OpAccessChain %48 %12 %76 %76 %37
|
||||
OpStore %199 %193
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -39,31 +39,31 @@ OpDecorate %17 ArrayStride 4
|
||||
%26 = OpConstantComposite %9 %21 %22
|
||||
%27 = OpConstantComposite %9 %23 %25
|
||||
%28 = OpConstantComposite %8 %26 %27
|
||||
%29 = OpConstant %5 1
|
||||
%30 = OpConstantComposite %10 %28
|
||||
%31 = OpConstantNull %13
|
||||
%32 = OpConstantNull %5
|
||||
%33 = OpConstantNull %12
|
||||
%34 = OpConstantNull %4
|
||||
%35 = OpConstantNull %14
|
||||
%36 = OpConstantNull %8
|
||||
%37 = OpConstant %5 3
|
||||
%38 = OpConstantNull %15
|
||||
%39 = OpConstantNull %6
|
||||
%40 = OpConstant %5 0
|
||||
%41 = OpConstant %5 2
|
||||
%42 = OpConstantComposite %17 %40 %29 %41 %37
|
||||
%29 = OpConstantComposite %10 %28
|
||||
%30 = OpConstantNull %13
|
||||
%31 = OpConstantNull %5
|
||||
%32 = OpConstantNull %12
|
||||
%33 = OpConstantNull %4
|
||||
%34 = OpConstantNull %14
|
||||
%35 = OpConstantNull %8
|
||||
%36 = OpConstantNull %15
|
||||
%37 = OpConstantNull %6
|
||||
%38 = OpConstant %5 0
|
||||
%39 = OpConstant %5 1
|
||||
%40 = OpConstant %5 2
|
||||
%41 = OpConstant %5 3
|
||||
%42 = OpConstantComposite %17 %38 %39 %40 %41
|
||||
%44 = OpTypePointer Function %6
|
||||
%47 = OpTypeFunction %2
|
||||
%48 = OpConstant %12 0
|
||||
%49 = OpConstantNull %20
|
||||
%46 = OpFunction %2 None %47
|
||||
%45 = OpLabel
|
||||
%43 = OpVariable %44 Function %39
|
||||
%43 = OpVariable %44 Function %37
|
||||
OpBranch %50
|
||||
%50 = OpLabel
|
||||
%51 = OpCompositeConstruct %3 %22 %22 %22 %22
|
||||
%52 = OpCompositeConstruct %6 %51 %29
|
||||
%52 = OpCompositeConstruct %6 %51 %39
|
||||
OpStore %43 %52
|
||||
%53 = OpCompositeConstruct %9 %22 %21
|
||||
%54 = OpCompositeConstruct %9 %21 %22
|
||||
@@ -77,7 +77,7 @@ OpStore %43 %52
|
||||
%62 = OpCompositeConstruct %9 %21 %21
|
||||
%63 = OpCompositeConstruct %9 %21 %21
|
||||
%64 = OpCompositeConstruct %8 %62 %63
|
||||
%65 = OpCompositeConstruct %17 %40 %29 %41 %37
|
||||
%65 = OpCompositeConstruct %17 %38 %39 %40 %41
|
||||
%71 = OpCopyObject %20 %49
|
||||
%73 = OpCopyObject %20 %49
|
||||
OpReturn
|
||||
|
||||
@@ -7,18 +7,18 @@ OpCapability Float64
|
||||
OpCapability Geometry
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %24 "main" %16 %19 %22
|
||||
OpExecutionMode %24 OriginUpperLeft
|
||||
OpEntryPoint Fragment %23 "main" %15 %18 %21
|
||||
OpExecutionMode %23 OriginUpperLeft
|
||||
OpMemberDecorate %6 0 Offset 0
|
||||
OpMemberDecorate %6 1 Offset 16
|
||||
OpMemberDecorate %9 0 Offset 0
|
||||
OpMemberDecorate %9 1 Offset 16
|
||||
OpDecorate %12 Block
|
||||
OpMemberDecorate %12 0 Offset 0
|
||||
OpDecorate %16 Location 0
|
||||
OpDecorate %19 BuiltIn PrimitiveId
|
||||
OpDecorate %19 Flat
|
||||
OpDecorate %22 Location 0
|
||||
OpDecorate %11 Block
|
||||
OpMemberDecorate %11 0 Offset 0
|
||||
OpDecorate %15 Location 0
|
||||
OpDecorate %18 BuiltIn PrimitiveId
|
||||
OpDecorate %18 Flat
|
||||
OpDecorate %21 Location 0
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeInt 32 0
|
||||
%5 = OpTypeFloat 64
|
||||
@@ -27,50 +27,50 @@ OpDecorate %22 Location 0
|
||||
%8 = OpTypeFloat 32
|
||||
%7 = OpTypeVector %8 4
|
||||
%9 = OpTypeStruct %7 %3
|
||||
%10 = OpTypeVector %8 3
|
||||
%12 = OpTypeStruct %6
|
||||
%13 = OpTypePointer PushConstant %12
|
||||
%11 = OpVariable %13 PushConstant
|
||||
%17 = OpTypePointer Input %7
|
||||
%16 = OpVariable %17 Input
|
||||
%20 = OpTypePointer Input %3
|
||||
%19 = OpVariable %20 Input
|
||||
%23 = OpTypePointer Output %7
|
||||
%22 = OpVariable %23 Output
|
||||
%25 = OpTypeFunction %2
|
||||
%26 = OpTypePointer PushConstant %6
|
||||
%27 = OpConstant %3 0
|
||||
%29 = OpConstant %8 1.0
|
||||
%32 = OpTypePointer PushConstant %3
|
||||
%35 = OpTypeBool
|
||||
%24 = OpFunction %2 None %25
|
||||
%14 = OpLabel
|
||||
%18 = OpLoad %7 %16
|
||||
%21 = OpLoad %3 %19
|
||||
%15 = OpCompositeConstruct %9 %18 %21
|
||||
%28 = OpAccessChain %26 %11 %27
|
||||
OpBranch %30
|
||||
%30 = OpLabel
|
||||
%31 = OpCompositeExtract %3 %15 1
|
||||
%33 = OpAccessChain %32 %28 %27
|
||||
%34 = OpLoad %3 %33
|
||||
%36 = OpIEqual %35 %31 %34
|
||||
OpSelectionMerge %37 None
|
||||
OpBranchConditional %36 %38 %39
|
||||
%38 = OpLabel
|
||||
%40 = OpCompositeExtract %7 %15 0
|
||||
OpStore %22 %40
|
||||
%11 = OpTypeStruct %6
|
||||
%12 = OpTypePointer PushConstant %11
|
||||
%10 = OpVariable %12 PushConstant
|
||||
%16 = OpTypePointer Input %7
|
||||
%15 = OpVariable %16 Input
|
||||
%19 = OpTypePointer Input %3
|
||||
%18 = OpVariable %19 Input
|
||||
%22 = OpTypePointer Output %7
|
||||
%21 = OpVariable %22 Output
|
||||
%24 = OpTypeFunction %2
|
||||
%25 = OpTypePointer PushConstant %6
|
||||
%26 = OpConstant %3 0
|
||||
%28 = OpConstant %8 1.0
|
||||
%31 = OpTypePointer PushConstant %3
|
||||
%34 = OpTypeBool
|
||||
%40 = OpTypeVector %8 3
|
||||
%23 = OpFunction %2 None %24
|
||||
%13 = OpLabel
|
||||
%17 = OpLoad %7 %15
|
||||
%20 = OpLoad %3 %18
|
||||
%14 = OpCompositeConstruct %9 %17 %20
|
||||
%27 = OpAccessChain %25 %10 %26
|
||||
OpBranch %29
|
||||
%29 = OpLabel
|
||||
%30 = OpCompositeExtract %3 %14 1
|
||||
%32 = OpAccessChain %31 %27 %26
|
||||
%33 = OpLoad %3 %32
|
||||
%35 = OpIEqual %34 %30 %33
|
||||
OpSelectionMerge %36 None
|
||||
OpBranchConditional %35 %37 %38
|
||||
%37 = OpLabel
|
||||
%39 = OpCompositeExtract %7 %14 0
|
||||
OpStore %21 %39
|
||||
OpReturn
|
||||
%39 = OpLabel
|
||||
%41 = OpCompositeConstruct %10 %29 %29 %29
|
||||
%42 = OpCompositeExtract %7 %15 0
|
||||
%43 = OpVectorShuffle %10 %42 %42 0 1 2
|
||||
%44 = OpFSub %10 %41 %43
|
||||
%45 = OpCompositeExtract %7 %15 0
|
||||
%38 = OpLabel
|
||||
%41 = OpCompositeConstruct %40 %28 %28 %28
|
||||
%42 = OpCompositeExtract %7 %14 0
|
||||
%43 = OpVectorShuffle %40 %42 %42 0 1 2
|
||||
%44 = OpFSub %40 %41 %43
|
||||
%45 = OpCompositeExtract %7 %14 0
|
||||
%46 = OpCompositeExtract %8 %45 3
|
||||
%47 = OpCompositeConstruct %7 %44 %46
|
||||
OpStore %22 %47
|
||||
OpStore %21 %47
|
||||
OpReturn
|
||||
%37 = OpLabel
|
||||
%36 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -11,65 +11,65 @@ OpExecutionMode %73 LocalSize 1 1 1
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 2
|
||||
%5 = OpTypeInt 32 1
|
||||
%6 = OpTypeVector %5 2
|
||||
%8 = OpTypeInt 32 0
|
||||
%7 = OpTypeVector %8 3
|
||||
%9 = OpTypeVector %5 4
|
||||
%12 = OpTypeFunction %3
|
||||
%13 = OpConstant %4 2.0
|
||||
%14 = OpConstant %4 0.5
|
||||
%22 = OpTypeFunction %5
|
||||
%23 = OpConstant %5 1
|
||||
%24 = OpConstant %8 1
|
||||
%25 = OpConstant %5 4
|
||||
%26 = OpConstant %5 2
|
||||
%31 = OpConstantNull %5
|
||||
%42 = OpConstantNull %8
|
||||
%8 = OpTypeFunction %3
|
||||
%9 = OpConstant %4 2.0
|
||||
%10 = OpConstant %4 0.5
|
||||
%18 = OpTypeFunction %5
|
||||
%19 = OpConstant %5 1
|
||||
%20 = OpTypeInt 32 0
|
||||
%21 = OpConstant %20 1
|
||||
%22 = OpConstant %5 4
|
||||
%23 = OpConstant %5 2
|
||||
%25 = OpTypeVector %5 2
|
||||
%29 = OpConstantNull %5
|
||||
%37 = OpTypeVector %20 3
|
||||
%41 = OpConstantNull %20
|
||||
%53 = OpTypeVector %5 4
|
||||
%74 = OpTypeFunction %2
|
||||
%11 = OpFunction %3 None %12
|
||||
%10 = OpLabel
|
||||
OpBranch %15
|
||||
%15 = OpLabel
|
||||
%16 = OpCompositeConstruct %3 %13 %13
|
||||
%17 = OpCompositeConstruct %3 %14 %14
|
||||
%18 = OpCompositeConstruct %3 %14 %14
|
||||
%19 = OpExtInst %3 %1 Fma %16 %17 %18
|
||||
OpReturnValue %19
|
||||
%7 = OpFunction %3 None %8
|
||||
%6 = OpLabel
|
||||
OpBranch %11
|
||||
%11 = OpLabel
|
||||
%12 = OpCompositeConstruct %3 %9 %9
|
||||
%13 = OpCompositeConstruct %3 %10 %10
|
||||
%14 = OpCompositeConstruct %3 %10 %10
|
||||
%15 = OpExtInst %3 %1 Fma %12 %13 %14
|
||||
OpReturnValue %15
|
||||
OpFunctionEnd
|
||||
%21 = OpFunction %5 None %22
|
||||
%20 = OpLabel
|
||||
OpBranch %27
|
||||
%27 = OpLabel
|
||||
%28 = OpCompositeConstruct %6 %23 %23
|
||||
%29 = OpCompositeConstruct %6 %23 %23
|
||||
%32 = OpCompositeExtract %5 %28 0
|
||||
%33 = OpCompositeExtract %5 %29 0
|
||||
%34 = OpIMul %5 %32 %33
|
||||
%35 = OpIAdd %5 %31 %34
|
||||
%36 = OpCompositeExtract %5 %28 1
|
||||
%37 = OpCompositeExtract %5 %29 1
|
||||
%38 = OpIMul %5 %36 %37
|
||||
%30 = OpIAdd %5 %35 %38
|
||||
%39 = OpCompositeConstruct %7 %24 %24 %24
|
||||
%40 = OpCompositeConstruct %7 %24 %24 %24
|
||||
%43 = OpCompositeExtract %8 %39 0
|
||||
%44 = OpCompositeExtract %8 %40 0
|
||||
%45 = OpIMul %8 %43 %44
|
||||
%46 = OpIAdd %8 %42 %45
|
||||
%47 = OpCompositeExtract %8 %39 1
|
||||
%48 = OpCompositeExtract %8 %40 1
|
||||
%49 = OpIMul %8 %47 %48
|
||||
%50 = OpIAdd %8 %46 %49
|
||||
%51 = OpCompositeExtract %8 %39 2
|
||||
%52 = OpCompositeExtract %8 %40 2
|
||||
%53 = OpIMul %8 %51 %52
|
||||
%41 = OpIAdd %8 %50 %53
|
||||
%54 = OpCompositeConstruct %9 %25 %25 %25 %25
|
||||
%55 = OpCompositeConstruct %9 %26 %26 %26 %26
|
||||
%17 = OpFunction %5 None %18
|
||||
%16 = OpLabel
|
||||
OpBranch %24
|
||||
%24 = OpLabel
|
||||
%26 = OpCompositeConstruct %25 %19 %19
|
||||
%27 = OpCompositeConstruct %25 %19 %19
|
||||
%30 = OpCompositeExtract %5 %26 0
|
||||
%31 = OpCompositeExtract %5 %27 0
|
||||
%32 = OpIMul %5 %30 %31
|
||||
%33 = OpIAdd %5 %29 %32
|
||||
%34 = OpCompositeExtract %5 %26 1
|
||||
%35 = OpCompositeExtract %5 %27 1
|
||||
%36 = OpIMul %5 %34 %35
|
||||
%28 = OpIAdd %5 %33 %36
|
||||
%38 = OpCompositeConstruct %37 %21 %21 %21
|
||||
%39 = OpCompositeConstruct %37 %21 %21 %21
|
||||
%42 = OpCompositeExtract %20 %38 0
|
||||
%43 = OpCompositeExtract %20 %39 0
|
||||
%44 = OpIMul %20 %42 %43
|
||||
%45 = OpIAdd %20 %41 %44
|
||||
%46 = OpCompositeExtract %20 %38 1
|
||||
%47 = OpCompositeExtract %20 %39 1
|
||||
%48 = OpIMul %20 %46 %47
|
||||
%49 = OpIAdd %20 %45 %48
|
||||
%50 = OpCompositeExtract %20 %38 2
|
||||
%51 = OpCompositeExtract %20 %39 2
|
||||
%52 = OpIMul %20 %50 %51
|
||||
%40 = OpIAdd %20 %49 %52
|
||||
%54 = OpCompositeConstruct %53 %22 %22 %22 %22
|
||||
%55 = OpCompositeConstruct %53 %23 %23 %23 %23
|
||||
%57 = OpCompositeExtract %5 %54 0
|
||||
%58 = OpCompositeExtract %5 %55 0
|
||||
%59 = OpIMul %5 %57 %58
|
||||
%60 = OpIAdd %5 %31 %59
|
||||
%60 = OpIAdd %5 %29 %59
|
||||
%61 = OpCompositeExtract %5 %54 1
|
||||
%62 = OpCompositeExtract %5 %55 1
|
||||
%63 = OpIMul %5 %61 %62
|
||||
@@ -88,7 +88,7 @@ OpFunctionEnd
|
||||
%72 = OpLabel
|
||||
OpBranch %75
|
||||
%75 = OpLabel
|
||||
%76 = OpFunctionCall %3 %11
|
||||
%77 = OpFunctionCall %5 %21
|
||||
%76 = OpFunctionCall %3 %7
|
||||
%77 = OpFunctionCall %5 %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,13 +1,13 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 178
|
||||
; Bound: 177
|
||||
OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %102 "main" %121
|
||||
OpExecutionMode %102 LocalSize 1 1 1
|
||||
OpEntryPoint GLCompute %100 "main" %119
|
||||
OpExecutionMode %100 LocalSize 1 1 1
|
||||
OpDecorate %5 ArrayStride 4
|
||||
OpMemberDecorate %9 0 Offset 0
|
||||
OpMemberDecorate %9 1 Offset 12
|
||||
@@ -17,38 +17,38 @@ OpDecorate %17 ArrayStride 32
|
||||
OpDecorate %19 ArrayStride 64
|
||||
OpDecorate %21 ArrayStride 32
|
||||
OpDecorate %22 ArrayStride 64
|
||||
OpDecorate %32 DescriptorSet 0
|
||||
OpDecorate %32 Binding 1
|
||||
OpDecorate %33 Block
|
||||
OpMemberDecorate %33 0 Offset 0
|
||||
OpDecorate %35 NonWritable
|
||||
OpDecorate %35 DescriptorSet 0
|
||||
OpDecorate %35 Binding 2
|
||||
OpDecorate %36 Block
|
||||
OpMemberDecorate %36 0 Offset 0
|
||||
OpDecorate %38 DescriptorSet 0
|
||||
OpDecorate %38 Binding 3
|
||||
OpDecorate %39 Block
|
||||
OpMemberDecorate %39 0 Offset 0
|
||||
OpDecorate %41 DescriptorSet 0
|
||||
OpDecorate %41 Binding 4
|
||||
OpDecorate %42 Block
|
||||
OpMemberDecorate %42 0 Offset 0
|
||||
OpDecorate %44 DescriptorSet 0
|
||||
OpDecorate %44 Binding 5
|
||||
OpDecorate %45 Block
|
||||
OpMemberDecorate %45 0 Offset 0
|
||||
OpMemberDecorate %45 0 ColMajor
|
||||
OpMemberDecorate %45 0 MatrixStride 8
|
||||
OpDecorate %47 DescriptorSet 0
|
||||
OpDecorate %47 Binding 6
|
||||
OpDecorate %48 Block
|
||||
OpMemberDecorate %48 0 Offset 0
|
||||
OpDecorate %50 DescriptorSet 0
|
||||
OpDecorate %50 Binding 7
|
||||
OpDecorate %51 Block
|
||||
OpMemberDecorate %51 0 Offset 0
|
||||
OpDecorate %121 BuiltIn LocalInvocationId
|
||||
OpDecorate %30 DescriptorSet 0
|
||||
OpDecorate %30 Binding 1
|
||||
OpDecorate %31 Block
|
||||
OpMemberDecorate %31 0 Offset 0
|
||||
OpDecorate %33 NonWritable
|
||||
OpDecorate %33 DescriptorSet 0
|
||||
OpDecorate %33 Binding 2
|
||||
OpDecorate %34 Block
|
||||
OpMemberDecorate %34 0 Offset 0
|
||||
OpDecorate %36 DescriptorSet 0
|
||||
OpDecorate %36 Binding 3
|
||||
OpDecorate %37 Block
|
||||
OpMemberDecorate %37 0 Offset 0
|
||||
OpDecorate %39 DescriptorSet 0
|
||||
OpDecorate %39 Binding 4
|
||||
OpDecorate %40 Block
|
||||
OpMemberDecorate %40 0 Offset 0
|
||||
OpDecorate %42 DescriptorSet 0
|
||||
OpDecorate %42 Binding 5
|
||||
OpDecorate %43 Block
|
||||
OpMemberDecorate %43 0 Offset 0
|
||||
OpMemberDecorate %43 0 ColMajor
|
||||
OpMemberDecorate %43 0 MatrixStride 8
|
||||
OpDecorate %45 DescriptorSet 0
|
||||
OpDecorate %45 Binding 6
|
||||
OpDecorate %46 Block
|
||||
OpMemberDecorate %46 0 Offset 0
|
||||
OpDecorate %48 DescriptorSet 0
|
||||
OpDecorate %48 Binding 7
|
||||
OpDecorate %49 Block
|
||||
OpMemberDecorate %49 0 Offset 0
|
||||
OpDecorate %119 BuiltIn LocalInvocationId
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeBool
|
||||
%4 = OpTypeFloat 32
|
||||
@@ -73,187 +73,186 @@ OpDecorate %121 BuiltIn LocalInvocationId
|
||||
%23 = OpTypeInt 32 1
|
||||
%24 = OpTypeMatrix %8 3
|
||||
%25 = OpConstantTrue %3
|
||||
%26 = OpConstant %23 20
|
||||
%27 = OpConstant %23 2
|
||||
%29 = OpTypePointer Workgroup %5
|
||||
%27 = OpTypePointer Workgroup %5
|
||||
%26 = OpVariable %27 Workgroup
|
||||
%29 = OpTypePointer Workgroup %7
|
||||
%28 = OpVariable %29 Workgroup
|
||||
%31 = OpTypePointer Workgroup %7
|
||||
%30 = OpVariable %31 Workgroup
|
||||
%33 = OpTypeStruct %9
|
||||
%34 = OpTypePointer StorageBuffer %33
|
||||
%32 = OpVariable %34 StorageBuffer
|
||||
%36 = OpTypeStruct %11
|
||||
%37 = OpTypePointer StorageBuffer %36
|
||||
%35 = OpVariable %37 StorageBuffer
|
||||
%39 = OpTypeStruct %13
|
||||
%40 = OpTypePointer Uniform %39
|
||||
%38 = OpVariable %40 Uniform
|
||||
%42 = OpTypeStruct %8
|
||||
%43 = OpTypePointer Uniform %42
|
||||
%41 = OpVariable %43 Uniform
|
||||
%45 = OpTypeStruct %15
|
||||
%46 = OpTypePointer Uniform %45
|
||||
%44 = OpVariable %46 Uniform
|
||||
%48 = OpTypeStruct %19
|
||||
%49 = OpTypePointer Uniform %48
|
||||
%47 = OpVariable %49 Uniform
|
||||
%51 = OpTypeStruct %22
|
||||
%52 = OpTypePointer Uniform %51
|
||||
%50 = OpVariable %52 Uniform
|
||||
%56 = OpTypeFunction %2 %8
|
||||
%59 = OpTypePointer Function %23
|
||||
%60 = OpConstantNull %23
|
||||
%63 = OpTypeFunction %2
|
||||
%64 = OpTypePointer StorageBuffer %9
|
||||
%65 = OpConstant %7 0
|
||||
%67 = OpConstant %4 1.0
|
||||
%68 = OpConstant %23 1
|
||||
%69 = OpConstant %4 2.0
|
||||
%70 = OpConstant %4 3.0
|
||||
%71 = OpConstantNull %24
|
||||
%73 = OpTypePointer StorageBuffer %8
|
||||
%76 = OpTypePointer StorageBuffer %4
|
||||
%96 = OpTypePointer Function %4
|
||||
%97 = OpConstantNull %4
|
||||
%99 = OpTypePointer Function %3
|
||||
%100 = OpConstantNull %3
|
||||
%104 = OpTypePointer StorageBuffer %11
|
||||
%106 = OpTypePointer Uniform %13
|
||||
%108 = OpTypePointer Uniform %8
|
||||
%110 = OpTypePointer Uniform %15
|
||||
%112 = OpTypePointer Uniform %19
|
||||
%114 = OpTypePointer Uniform %22
|
||||
%116 = OpConstant %4 4.0
|
||||
%118 = OpConstantNull %5
|
||||
%119 = OpConstantNull %7
|
||||
%120 = OpTypeVector %7 3
|
||||
%122 = OpTypePointer Input %120
|
||||
%121 = OpVariable %122 Input
|
||||
%124 = OpConstantNull %120
|
||||
%125 = OpTypeVector %3 3
|
||||
%130 = OpConstant %7 264
|
||||
%133 = OpTypePointer Workgroup %4
|
||||
%134 = OpTypePointer Uniform %21
|
||||
%135 = OpTypePointer Uniform %20
|
||||
%138 = OpTypePointer Uniform %17
|
||||
%139 = OpTypePointer Uniform %16
|
||||
%140 = OpTypePointer Uniform %12
|
||||
%145 = OpConstant %7 7
|
||||
%151 = OpConstant %7 6
|
||||
%153 = OpTypePointer StorageBuffer %10
|
||||
%154 = OpConstant %7 1
|
||||
%157 = OpConstant %7 5
|
||||
%159 = OpTypePointer Uniform %12
|
||||
%160 = OpTypePointer Uniform %4
|
||||
%161 = OpConstant %7 3
|
||||
%164 = OpConstant %7 4
|
||||
%166 = OpTypePointer StorageBuffer %4
|
||||
%177 = OpConstant %7 256
|
||||
%55 = OpFunction %2 None %56
|
||||
%54 = OpFunctionParameter %8
|
||||
%53 = OpLabel
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%31 = OpTypeStruct %9
|
||||
%32 = OpTypePointer StorageBuffer %31
|
||||
%30 = OpVariable %32 StorageBuffer
|
||||
%34 = OpTypeStruct %11
|
||||
%35 = OpTypePointer StorageBuffer %34
|
||||
%33 = OpVariable %35 StorageBuffer
|
||||
%37 = OpTypeStruct %13
|
||||
%38 = OpTypePointer Uniform %37
|
||||
%36 = OpVariable %38 Uniform
|
||||
%40 = OpTypeStruct %8
|
||||
%41 = OpTypePointer Uniform %40
|
||||
%39 = OpVariable %41 Uniform
|
||||
%43 = OpTypeStruct %15
|
||||
%44 = OpTypePointer Uniform %43
|
||||
%42 = OpVariable %44 Uniform
|
||||
%46 = OpTypeStruct %19
|
||||
%47 = OpTypePointer Uniform %46
|
||||
%45 = OpVariable %47 Uniform
|
||||
%49 = OpTypeStruct %22
|
||||
%50 = OpTypePointer Uniform %49
|
||||
%48 = OpVariable %50 Uniform
|
||||
%54 = OpTypeFunction %2 %8
|
||||
%57 = OpTypePointer Function %23
|
||||
%58 = OpConstantNull %23
|
||||
%61 = OpTypeFunction %2
|
||||
%62 = OpTypePointer StorageBuffer %9
|
||||
%63 = OpConstant %7 0
|
||||
%65 = OpConstant %4 1.0
|
||||
%66 = OpConstant %23 1
|
||||
%67 = OpConstant %4 2.0
|
||||
%68 = OpConstant %4 3.0
|
||||
%69 = OpConstantNull %24
|
||||
%71 = OpTypePointer StorageBuffer %8
|
||||
%74 = OpTypePointer StorageBuffer %4
|
||||
%94 = OpTypePointer Function %4
|
||||
%95 = OpConstantNull %4
|
||||
%97 = OpTypePointer Function %3
|
||||
%98 = OpConstantNull %3
|
||||
%102 = OpTypePointer StorageBuffer %11
|
||||
%104 = OpTypePointer Uniform %13
|
||||
%106 = OpTypePointer Uniform %8
|
||||
%108 = OpTypePointer Uniform %15
|
||||
%110 = OpTypePointer Uniform %19
|
||||
%112 = OpTypePointer Uniform %22
|
||||
%114 = OpConstant %4 4.0
|
||||
%116 = OpConstantNull %5
|
||||
%117 = OpConstantNull %7
|
||||
%118 = OpTypeVector %7 3
|
||||
%120 = OpTypePointer Input %118
|
||||
%119 = OpVariable %120 Input
|
||||
%122 = OpConstantNull %118
|
||||
%123 = OpTypeVector %3 3
|
||||
%128 = OpConstant %7 264
|
||||
%131 = OpTypePointer Workgroup %4
|
||||
%132 = OpTypePointer Uniform %21
|
||||
%133 = OpTypePointer Uniform %20
|
||||
%136 = OpTypePointer Uniform %17
|
||||
%137 = OpTypePointer Uniform %16
|
||||
%138 = OpTypePointer Uniform %12
|
||||
%143 = OpConstant %7 7
|
||||
%149 = OpConstant %7 6
|
||||
%151 = OpTypePointer StorageBuffer %10
|
||||
%152 = OpConstant %7 1
|
||||
%155 = OpConstant %7 5
|
||||
%157 = OpTypePointer Uniform %12
|
||||
%158 = OpTypePointer Uniform %4
|
||||
%159 = OpConstant %7 3
|
||||
%162 = OpConstant %7 4
|
||||
%164 = OpTypePointer StorageBuffer %4
|
||||
%175 = OpConstant %23 2
|
||||
%176 = OpConstant %7 256
|
||||
%53 = OpFunction %2 None %54
|
||||
%52 = OpFunctionParameter %8
|
||||
%51 = OpLabel
|
||||
OpBranch %55
|
||||
%55 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%62 = OpFunction %2 None %63
|
||||
%61 = OpLabel
|
||||
%58 = OpVariable %59 Function %60
|
||||
%66 = OpAccessChain %64 %32 %65
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
%74 = OpCompositeConstruct %8 %67 %67 %67
|
||||
%75 = OpAccessChain %73 %66 %65
|
||||
OpStore %75 %74
|
||||
OpStore %58 %68
|
||||
%77 = OpAccessChain %76 %66 %65 %65
|
||||
OpStore %77 %67
|
||||
%78 = OpAccessChain %76 %66 %65 %65
|
||||
OpStore %78 %69
|
||||
%79 = OpLoad %23 %58
|
||||
%80 = OpAccessChain %76 %66 %65 %79
|
||||
OpStore %80 %70
|
||||
%81 = OpLoad %9 %66
|
||||
%82 = OpCompositeExtract %8 %81 0
|
||||
%83 = OpCompositeExtract %8 %81 0
|
||||
%84 = OpVectorShuffle %10 %83 %83 2 0
|
||||
%85 = OpCompositeExtract %8 %81 0
|
||||
%86 = OpFunctionCall %2 %55 %85
|
||||
%87 = OpCompositeExtract %8 %81 0
|
||||
%88 = OpVectorTimesMatrix %8 %87 %71
|
||||
%89 = OpCompositeExtract %8 %81 0
|
||||
%90 = OpMatrixTimesVector %8 %71 %89
|
||||
%91 = OpCompositeExtract %8 %81 0
|
||||
%92 = OpVectorTimesScalar %8 %91 %69
|
||||
%93 = OpCompositeExtract %8 %81 0
|
||||
%94 = OpVectorTimesScalar %8 %93 %69
|
||||
%60 = OpFunction %2 None %61
|
||||
%59 = OpLabel
|
||||
%56 = OpVariable %57 Function %58
|
||||
%64 = OpAccessChain %62 %30 %63
|
||||
OpBranch %70
|
||||
%70 = OpLabel
|
||||
%72 = OpCompositeConstruct %8 %65 %65 %65
|
||||
%73 = OpAccessChain %71 %64 %63
|
||||
OpStore %73 %72
|
||||
OpStore %56 %66
|
||||
%75 = OpAccessChain %74 %64 %63 %63
|
||||
OpStore %75 %65
|
||||
%76 = OpAccessChain %74 %64 %63 %63
|
||||
OpStore %76 %67
|
||||
%77 = OpLoad %23 %56
|
||||
%78 = OpAccessChain %74 %64 %63 %77
|
||||
OpStore %78 %68
|
||||
%79 = OpLoad %9 %64
|
||||
%80 = OpCompositeExtract %8 %79 0
|
||||
%81 = OpCompositeExtract %8 %79 0
|
||||
%82 = OpVectorShuffle %10 %81 %81 2 0
|
||||
%83 = OpCompositeExtract %8 %79 0
|
||||
%84 = OpFunctionCall %2 %53 %83
|
||||
%85 = OpCompositeExtract %8 %79 0
|
||||
%86 = OpVectorTimesMatrix %8 %85 %69
|
||||
%87 = OpCompositeExtract %8 %79 0
|
||||
%88 = OpMatrixTimesVector %8 %69 %87
|
||||
%89 = OpCompositeExtract %8 %79 0
|
||||
%90 = OpVectorTimesScalar %8 %89 %67
|
||||
%91 = OpCompositeExtract %8 %79 0
|
||||
%92 = OpVectorTimesScalar %8 %91 %67
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%102 = OpFunction %2 None %63
|
||||
%101 = OpLabel
|
||||
%95 = OpVariable %96 Function %97
|
||||
%98 = OpVariable %99 Function %100
|
||||
%103 = OpAccessChain %64 %32 %65
|
||||
%105 = OpAccessChain %104 %35 %65
|
||||
%107 = OpAccessChain %106 %38 %65
|
||||
%109 = OpAccessChain %108 %41 %65
|
||||
%111 = OpAccessChain %110 %44 %65
|
||||
%113 = OpAccessChain %112 %47 %65
|
||||
%115 = OpAccessChain %114 %50 %65
|
||||
OpBranch %117
|
||||
%117 = OpLabel
|
||||
%123 = OpLoad %120 %121
|
||||
%126 = OpIEqual %125 %123 %124
|
||||
%127 = OpAll %3 %126
|
||||
OpSelectionMerge %128 None
|
||||
OpBranchConditional %127 %129 %128
|
||||
%100 = OpFunction %2 None %61
|
||||
%99 = OpLabel
|
||||
%93 = OpVariable %94 Function %95
|
||||
%96 = OpVariable %97 Function %98
|
||||
%101 = OpAccessChain %62 %30 %63
|
||||
%103 = OpAccessChain %102 %33 %63
|
||||
%105 = OpAccessChain %104 %36 %63
|
||||
%107 = OpAccessChain %106 %39 %63
|
||||
%109 = OpAccessChain %108 %42 %63
|
||||
%111 = OpAccessChain %110 %45 %63
|
||||
%113 = OpAccessChain %112 %48 %63
|
||||
OpBranch %115
|
||||
%115 = OpLabel
|
||||
%121 = OpLoad %118 %119
|
||||
%124 = OpIEqual %123 %121 %122
|
||||
%125 = OpAll %3 %124
|
||||
OpSelectionMerge %126 None
|
||||
OpBranchConditional %125 %127 %126
|
||||
%127 = OpLabel
|
||||
OpStore %26 %116
|
||||
OpStore %28 %117
|
||||
OpBranch %126
|
||||
%126 = OpLabel
|
||||
OpControlBarrier %18 %18 %128
|
||||
OpBranch %129
|
||||
%129 = OpLabel
|
||||
OpStore %28 %118
|
||||
OpStore %30 %119
|
||||
OpBranch %128
|
||||
%128 = OpLabel
|
||||
OpControlBarrier %18 %18 %130
|
||||
OpBranch %131
|
||||
%131 = OpLabel
|
||||
%132 = OpFunctionCall %2 %62
|
||||
%136 = OpAccessChain %135 %115 %65 %65
|
||||
%137 = OpLoad %20 %136
|
||||
%141 = OpAccessChain %140 %113 %65 %65 %65
|
||||
%142 = OpLoad %12 %141
|
||||
%143 = OpMatrixTimesVector %10 %137 %142
|
||||
%144 = OpCompositeExtract %4 %143 0
|
||||
%146 = OpAccessChain %133 %28 %145
|
||||
OpStore %146 %144
|
||||
%147 = OpLoad %15 %111
|
||||
%148 = OpLoad %8 %109
|
||||
%149 = OpMatrixTimesVector %10 %147 %148
|
||||
%150 = OpCompositeExtract %4 %149 0
|
||||
%152 = OpAccessChain %133 %28 %151
|
||||
OpStore %152 %150
|
||||
%155 = OpAccessChain %76 %105 %154 %154
|
||||
%156 = OpLoad %4 %155
|
||||
%158 = OpAccessChain %133 %28 %157
|
||||
OpStore %158 %156
|
||||
%162 = OpAccessChain %160 %107 %65 %161
|
||||
%163 = OpLoad %4 %162
|
||||
%165 = OpAccessChain %133 %28 %164
|
||||
OpStore %165 %163
|
||||
%167 = OpAccessChain %166 %103 %154
|
||||
%168 = OpLoad %4 %167
|
||||
%169 = OpAccessChain %133 %28 %161
|
||||
OpStore %169 %168
|
||||
%170 = OpAccessChain %76 %103 %65 %65
|
||||
%171 = OpLoad %4 %170
|
||||
%172 = OpAccessChain %133 %28 %18
|
||||
OpStore %172 %171
|
||||
%173 = OpAccessChain %166 %103 %154
|
||||
OpStore %173 %116
|
||||
%174 = OpArrayLength %7 %35 0
|
||||
%175 = OpConvertUToF %4 %174
|
||||
%176 = OpAccessChain %133 %28 %154
|
||||
OpStore %176 %175
|
||||
OpAtomicStore %30 %27 %177 %18
|
||||
OpStore %95 %67
|
||||
OpStore %98 %25
|
||||
%130 = OpFunctionCall %2 %60
|
||||
%134 = OpAccessChain %133 %113 %63 %63
|
||||
%135 = OpLoad %20 %134
|
||||
%139 = OpAccessChain %138 %111 %63 %63 %63
|
||||
%140 = OpLoad %12 %139
|
||||
%141 = OpMatrixTimesVector %10 %135 %140
|
||||
%142 = OpCompositeExtract %4 %141 0
|
||||
%144 = OpAccessChain %131 %26 %143
|
||||
OpStore %144 %142
|
||||
%145 = OpLoad %15 %109
|
||||
%146 = OpLoad %8 %107
|
||||
%147 = OpMatrixTimesVector %10 %145 %146
|
||||
%148 = OpCompositeExtract %4 %147 0
|
||||
%150 = OpAccessChain %131 %26 %149
|
||||
OpStore %150 %148
|
||||
%153 = OpAccessChain %74 %103 %152 %152
|
||||
%154 = OpLoad %4 %153
|
||||
%156 = OpAccessChain %131 %26 %155
|
||||
OpStore %156 %154
|
||||
%160 = OpAccessChain %158 %105 %63 %159
|
||||
%161 = OpLoad %4 %160
|
||||
%163 = OpAccessChain %131 %26 %162
|
||||
OpStore %163 %161
|
||||
%165 = OpAccessChain %164 %101 %152
|
||||
%166 = OpLoad %4 %165
|
||||
%167 = OpAccessChain %131 %26 %159
|
||||
OpStore %167 %166
|
||||
%168 = OpAccessChain %74 %101 %63 %63
|
||||
%169 = OpLoad %4 %168
|
||||
%170 = OpAccessChain %131 %26 %18
|
||||
OpStore %170 %169
|
||||
%171 = OpAccessChain %164 %101 %152
|
||||
OpStore %171 %114
|
||||
%172 = OpArrayLength %7 %33 0
|
||||
%173 = OpConvertUToF %4 %172
|
||||
%174 = OpAccessChain %131 %26 %152
|
||||
OpStore %174 %173
|
||||
OpAtomicStore %28 %175 %176 %18
|
||||
OpStore %93 %65
|
||||
OpStore %96 %25
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +1,12 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: rspirv
|
||||
; Bound: 55
|
||||
; Bound: 53
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %31 "compute" %19 %22 %24 %27 %29
|
||||
OpExecutionMode %31 LocalSize 1 1 1
|
||||
OpEntryPoint GLCompute %29 "compute" %17 %20 %22 %25 %27
|
||||
OpExecutionMode %29 LocalSize 1 1 1
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %5 1 Offset 16
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
@@ -15,11 +15,11 @@ OpMemberDecorate %7 2 Offset 8
|
||||
OpDecorate %9 ArrayStride 4
|
||||
OpMemberDecorate %12 0 Offset 0
|
||||
OpMemberDecorate %13 0 Offset 0
|
||||
OpDecorate %19 BuiltIn GlobalInvocationId
|
||||
OpDecorate %22 BuiltIn LocalInvocationId
|
||||
OpDecorate %24 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %27 BuiltIn WorkgroupId
|
||||
OpDecorate %29 BuiltIn NumWorkgroups
|
||||
OpDecorate %17 BuiltIn GlobalInvocationId
|
||||
OpDecorate %20 BuiltIn LocalInvocationId
|
||||
OpDecorate %22 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %25 BuiltIn WorkgroupId
|
||||
OpDecorate %27 BuiltIn NumWorkgroups
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 4
|
||||
@@ -32,54 +32,52 @@ OpDecorate %29 BuiltIn NumWorkgroups
|
||||
%11 = OpTypeVector %6 3
|
||||
%12 = OpTypeStruct %6
|
||||
%13 = OpTypeStruct %6
|
||||
%15 = OpTypeInt 32 1
|
||||
%14 = OpConstant %15 1
|
||||
%17 = OpTypePointer Workgroup %9
|
||||
%16 = OpVariable %17 Workgroup
|
||||
%20 = OpTypePointer Input %11
|
||||
%19 = OpVariable %20 Input
|
||||
%22 = OpVariable %20 Input
|
||||
%25 = OpTypePointer Input %6
|
||||
%24 = OpVariable %25 Input
|
||||
%27 = OpVariable %20 Input
|
||||
%29 = OpVariable %20 Input
|
||||
%32 = OpTypeFunction %2
|
||||
%34 = OpConstantNull %9
|
||||
%35 = OpConstantNull %11
|
||||
%36 = OpTypeVector %8 3
|
||||
%41 = OpConstant %6 2
|
||||
%42 = OpConstant %6 264
|
||||
%44 = OpTypePointer Workgroup %6
|
||||
%53 = OpConstant %6 0
|
||||
%31 = OpFunction %2 None %32
|
||||
%18 = OpLabel
|
||||
%21 = OpLoad %11 %19
|
||||
%23 = OpLoad %11 %22
|
||||
%26 = OpLoad %6 %24
|
||||
%15 = OpTypePointer Workgroup %9
|
||||
%14 = OpVariable %15 Workgroup
|
||||
%18 = OpTypePointer Input %11
|
||||
%17 = OpVariable %18 Input
|
||||
%20 = OpVariable %18 Input
|
||||
%23 = OpTypePointer Input %6
|
||||
%22 = OpVariable %23 Input
|
||||
%25 = OpVariable %18 Input
|
||||
%27 = OpVariable %18 Input
|
||||
%30 = OpTypeFunction %2
|
||||
%32 = OpConstantNull %9
|
||||
%33 = OpConstantNull %11
|
||||
%34 = OpTypeVector %8 3
|
||||
%39 = OpConstant %6 2
|
||||
%40 = OpConstant %6 264
|
||||
%42 = OpTypePointer Workgroup %6
|
||||
%51 = OpConstant %6 0
|
||||
%29 = OpFunction %2 None %30
|
||||
%16 = OpLabel
|
||||
%19 = OpLoad %11 %17
|
||||
%21 = OpLoad %11 %20
|
||||
%24 = OpLoad %6 %22
|
||||
%26 = OpLoad %11 %25
|
||||
%28 = OpLoad %11 %27
|
||||
%30 = OpLoad %11 %29
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
%37 = OpIEqual %36 %23 %35
|
||||
%38 = OpAll %8 %37
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %38 %40 %39
|
||||
%40 = OpLabel
|
||||
OpStore %16 %34
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
OpControlBarrier %41 %41 %42
|
||||
OpBranch %43
|
||||
%43 = OpLabel
|
||||
%45 = OpCompositeExtract %6 %21 0
|
||||
%46 = OpCompositeExtract %6 %23 0
|
||||
%47 = OpIAdd %6 %45 %46
|
||||
%48 = OpIAdd %6 %47 %26
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%35 = OpIEqual %34 %21 %33
|
||||
%36 = OpAll %8 %35
|
||||
OpSelectionMerge %37 None
|
||||
OpBranchConditional %36 %38 %37
|
||||
%38 = OpLabel
|
||||
OpStore %14 %32
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
OpControlBarrier %39 %39 %40
|
||||
OpBranch %41
|
||||
%41 = OpLabel
|
||||
%43 = OpCompositeExtract %6 %19 0
|
||||
%44 = OpCompositeExtract %6 %21 0
|
||||
%45 = OpIAdd %6 %43 %44
|
||||
%46 = OpIAdd %6 %45 %24
|
||||
%47 = OpCompositeExtract %6 %26 0
|
||||
%48 = OpIAdd %6 %46 %47
|
||||
%49 = OpCompositeExtract %6 %28 0
|
||||
%50 = OpIAdd %6 %48 %49
|
||||
%51 = OpCompositeExtract %6 %30 0
|
||||
%52 = OpIAdd %6 %50 %51
|
||||
%54 = OpAccessChain %44 %16 %53
|
||||
OpStore %54 %52
|
||||
%52 = OpAccessChain %42 %14 %51
|
||||
OpStore %52 %50
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,14 +1,14 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: rspirv
|
||||
; Bound: 52
|
||||
; Bound: 50
|
||||
OpCapability Shader
|
||||
OpCapability SampleRateShading
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %37 "fragment" %18 %21 %24 %27 %30 %32 %34 %36
|
||||
OpExecutionMode %37 OriginUpperLeft
|
||||
OpExecutionMode %37 DepthReplacing
|
||||
OpEntryPoint Fragment %35 "fragment" %16 %19 %22 %25 %28 %30 %32 %34
|
||||
OpExecutionMode %35 OriginUpperLeft
|
||||
OpExecutionMode %35 DepthReplacing
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %5 1 Offset 16
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
@@ -17,18 +17,18 @@ OpMemberDecorate %7 2 Offset 8
|
||||
OpDecorate %9 ArrayStride 4
|
||||
OpMemberDecorate %12 0 Offset 0
|
||||
OpMemberDecorate %13 0 Offset 0
|
||||
OpDecorate %18 Invariant
|
||||
OpDecorate %18 BuiltIn FragCoord
|
||||
OpDecorate %21 Location 1
|
||||
OpDecorate %24 BuiltIn FrontFacing
|
||||
OpDecorate %24 Flat
|
||||
OpDecorate %27 BuiltIn SampleId
|
||||
OpDecorate %27 Flat
|
||||
OpDecorate %30 BuiltIn SampleMask
|
||||
OpDecorate %30 Flat
|
||||
OpDecorate %32 BuiltIn FragDepth
|
||||
OpDecorate %34 BuiltIn SampleMask
|
||||
OpDecorate %36 Location 0
|
||||
OpDecorate %16 Invariant
|
||||
OpDecorate %16 BuiltIn FragCoord
|
||||
OpDecorate %19 Location 1
|
||||
OpDecorate %22 BuiltIn FrontFacing
|
||||
OpDecorate %22 Flat
|
||||
OpDecorate %25 BuiltIn SampleId
|
||||
OpDecorate %25 Flat
|
||||
OpDecorate %28 BuiltIn SampleMask
|
||||
OpDecorate %28 Flat
|
||||
OpDecorate %30 BuiltIn FragDepth
|
||||
OpDecorate %32 BuiltIn SampleMask
|
||||
OpDecorate %34 Location 0
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 4
|
||||
@@ -41,48 +41,46 @@ OpDecorate %36 Location 0
|
||||
%11 = OpTypeVector %6 3
|
||||
%12 = OpTypeStruct %6
|
||||
%13 = OpTypeStruct %6
|
||||
%15 = OpTypeInt 32 1
|
||||
%14 = OpConstant %15 1
|
||||
%19 = OpTypePointer Input %3
|
||||
%18 = OpVariable %19 Input
|
||||
%22 = OpTypePointer Input %4
|
||||
%21 = OpVariable %22 Input
|
||||
%25 = OpTypePointer Input %8
|
||||
%24 = OpVariable %25 Input
|
||||
%28 = OpTypePointer Input %6
|
||||
%27 = OpVariable %28 Input
|
||||
%30 = OpVariable %28 Input
|
||||
%33 = OpTypePointer Output %4
|
||||
%17 = OpTypePointer Input %3
|
||||
%16 = OpVariable %17 Input
|
||||
%20 = OpTypePointer Input %4
|
||||
%19 = OpVariable %20 Input
|
||||
%23 = OpTypePointer Input %8
|
||||
%22 = OpVariable %23 Input
|
||||
%26 = OpTypePointer Input %6
|
||||
%25 = OpVariable %26 Input
|
||||
%28 = OpVariable %26 Input
|
||||
%31 = OpTypePointer Output %4
|
||||
%30 = OpVariable %31 Output
|
||||
%33 = OpTypePointer Output %6
|
||||
%32 = OpVariable %33 Output
|
||||
%35 = OpTypePointer Output %6
|
||||
%34 = OpVariable %35 Output
|
||||
%36 = OpVariable %33 Output
|
||||
%38 = OpTypeFunction %2
|
||||
%39 = OpConstant %4 0.0
|
||||
%40 = OpConstant %4 1.0
|
||||
%37 = OpFunction %2 None %38
|
||||
%16 = OpLabel
|
||||
%20 = OpLoad %3 %18
|
||||
%23 = OpLoad %4 %21
|
||||
%17 = OpCompositeConstruct %5 %20 %23
|
||||
%26 = OpLoad %8 %24
|
||||
%29 = OpLoad %6 %27
|
||||
%31 = OpLoad %6 %30
|
||||
OpBranch %41
|
||||
%41 = OpLabel
|
||||
%42 = OpShiftLeftLogical %6 %10 %29
|
||||
%43 = OpBitwiseAnd %6 %31 %42
|
||||
%44 = OpSelect %4 %26 %40 %39
|
||||
%45 = OpCompositeExtract %4 %17 1
|
||||
%46 = OpCompositeConstruct %7 %45 %43 %44
|
||||
%47 = OpCompositeExtract %4 %46 0
|
||||
OpStore %32 %47
|
||||
%48 = OpLoad %4 %32
|
||||
%49 = OpExtInst %4 %1 FClamp %48 %39 %40
|
||||
OpStore %32 %49
|
||||
%50 = OpCompositeExtract %6 %46 1
|
||||
OpStore %34 %50
|
||||
%51 = OpCompositeExtract %4 %46 2
|
||||
OpStore %36 %51
|
||||
%34 = OpVariable %31 Output
|
||||
%36 = OpTypeFunction %2
|
||||
%37 = OpConstant %4 0.0
|
||||
%38 = OpConstant %4 1.0
|
||||
%35 = OpFunction %2 None %36
|
||||
%14 = OpLabel
|
||||
%18 = OpLoad %3 %16
|
||||
%21 = OpLoad %4 %19
|
||||
%15 = OpCompositeConstruct %5 %18 %21
|
||||
%24 = OpLoad %8 %22
|
||||
%27 = OpLoad %6 %25
|
||||
%29 = OpLoad %6 %28
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%40 = OpShiftLeftLogical %6 %10 %27
|
||||
%41 = OpBitwiseAnd %6 %29 %40
|
||||
%42 = OpSelect %4 %24 %38 %37
|
||||
%43 = OpCompositeExtract %4 %15 1
|
||||
%44 = OpCompositeConstruct %7 %43 %41 %42
|
||||
%45 = OpCompositeExtract %4 %44 0
|
||||
OpStore %30 %45
|
||||
%46 = OpLoad %4 %30
|
||||
%47 = OpExtInst %4 %1 FClamp %46 %37 %38
|
||||
OpStore %30 %47
|
||||
%48 = OpCompositeExtract %6 %44 1
|
||||
OpStore %32 %48
|
||||
%49 = OpCompositeExtract %4 %44 2
|
||||
OpStore %34 %49
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,11 +1,11 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: rspirv
|
||||
; Bound: 41
|
||||
; Bound: 39
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %31 "vertex" %17 %20 %22 %24 %26 %28
|
||||
OpEntryPoint Vertex %29 "vertex" %15 %18 %20 %22 %24 %26
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %5 1 Offset 16
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
@@ -14,13 +14,13 @@ OpMemberDecorate %7 2 Offset 8
|
||||
OpDecorate %9 ArrayStride 4
|
||||
OpMemberDecorate %12 0 Offset 0
|
||||
OpMemberDecorate %13 0 Offset 0
|
||||
OpDecorate %17 BuiltIn VertexIndex
|
||||
OpDecorate %20 BuiltIn InstanceIndex
|
||||
OpDecorate %22 Location 10
|
||||
OpDecorate %24 Invariant
|
||||
OpDecorate %24 BuiltIn Position
|
||||
OpDecorate %26 Location 1
|
||||
OpDecorate %28 BuiltIn PointSize
|
||||
OpDecorate %15 BuiltIn VertexIndex
|
||||
OpDecorate %18 BuiltIn InstanceIndex
|
||||
OpDecorate %20 Location 10
|
||||
OpDecorate %22 Invariant
|
||||
OpDecorate %22 BuiltIn Position
|
||||
OpDecorate %24 Location 1
|
||||
OpDecorate %26 BuiltIn PointSize
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 4
|
||||
@@ -33,36 +33,34 @@ OpDecorate %28 BuiltIn PointSize
|
||||
%11 = OpTypeVector %6 3
|
||||
%12 = OpTypeStruct %6
|
||||
%13 = OpTypeStruct %6
|
||||
%15 = OpTypeInt 32 1
|
||||
%14 = OpConstant %15 1
|
||||
%18 = OpTypePointer Input %6
|
||||
%17 = OpVariable %18 Input
|
||||
%20 = OpVariable %18 Input
|
||||
%22 = OpVariable %18 Input
|
||||
%25 = OpTypePointer Output %3
|
||||
%16 = OpTypePointer Input %6
|
||||
%15 = OpVariable %16 Input
|
||||
%18 = OpVariable %16 Input
|
||||
%20 = OpVariable %16 Input
|
||||
%23 = OpTypePointer Output %3
|
||||
%22 = OpVariable %23 Output
|
||||
%25 = OpTypePointer Output %4
|
||||
%24 = OpVariable %25 Output
|
||||
%27 = OpTypePointer Output %4
|
||||
%26 = OpVariable %27 Output
|
||||
%29 = OpTypePointer Output %4
|
||||
%28 = OpVariable %29 Output
|
||||
%30 = OpConstant %4 1.0
|
||||
%32 = OpTypeFunction %2
|
||||
%31 = OpFunction %2 None %32
|
||||
%16 = OpLabel
|
||||
%19 = OpLoad %6 %17
|
||||
%28 = OpConstant %4 1.0
|
||||
%30 = OpTypeFunction %2
|
||||
%29 = OpFunction %2 None %30
|
||||
%14 = OpLabel
|
||||
%17 = OpLoad %6 %15
|
||||
%19 = OpLoad %6 %18
|
||||
%21 = OpLoad %6 %20
|
||||
%23 = OpLoad %6 %22
|
||||
OpStore %28 %30
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
%34 = OpIAdd %6 %19 %21
|
||||
%35 = OpIAdd %6 %34 %23
|
||||
%36 = OpCompositeConstruct %3 %30 %30 %30 %30
|
||||
%37 = OpConvertUToF %4 %35
|
||||
%38 = OpCompositeConstruct %5 %36 %37
|
||||
%39 = OpCompositeExtract %3 %38 0
|
||||
OpStore %24 %39
|
||||
%40 = OpCompositeExtract %4 %38 1
|
||||
OpStore %26 %40
|
||||
OpStore %26 %28
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%32 = OpIAdd %6 %17 %19
|
||||
%33 = OpIAdd %6 %32 %21
|
||||
%34 = OpCompositeConstruct %3 %28 %28 %28 %28
|
||||
%35 = OpConvertUToF %4 %33
|
||||
%36 = OpCompositeConstruct %5 %34 %35
|
||||
%37 = OpCompositeExtract %3 %36 0
|
||||
OpStore %22 %37
|
||||
%38 = OpCompositeExtract %4 %36 1
|
||||
OpStore %24 %38
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,11 +1,11 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: rspirv
|
||||
; Bound: 44
|
||||
; Bound: 42
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %32 "vertex_two_structs" %21 %25 %27 %29
|
||||
OpEntryPoint Vertex %30 "vertex_two_structs" %19 %23 %25 %27
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %5 1 Offset 16
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
@@ -14,11 +14,11 @@ OpMemberDecorate %7 2 Offset 8
|
||||
OpDecorate %9 ArrayStride 4
|
||||
OpMemberDecorate %12 0 Offset 0
|
||||
OpMemberDecorate %13 0 Offset 0
|
||||
OpDecorate %21 BuiltIn VertexIndex
|
||||
OpDecorate %25 BuiltIn InstanceIndex
|
||||
OpDecorate %27 Invariant
|
||||
OpDecorate %27 BuiltIn Position
|
||||
OpDecorate %29 BuiltIn PointSize
|
||||
OpDecorate %19 BuiltIn VertexIndex
|
||||
OpDecorate %23 BuiltIn InstanceIndex
|
||||
OpDecorate %25 Invariant
|
||||
OpDecorate %25 BuiltIn Position
|
||||
OpDecorate %27 BuiltIn PointSize
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 4
|
||||
@@ -31,39 +31,37 @@ OpDecorate %29 BuiltIn PointSize
|
||||
%11 = OpTypeVector %6 3
|
||||
%12 = OpTypeStruct %6
|
||||
%13 = OpTypeStruct %6
|
||||
%15 = OpTypeInt 32 1
|
||||
%14 = OpConstant %15 1
|
||||
%17 = OpTypePointer Function %6
|
||||
%18 = OpConstantNull %6
|
||||
%22 = OpTypePointer Input %6
|
||||
%21 = OpVariable %22 Input
|
||||
%25 = OpVariable %22 Input
|
||||
%28 = OpTypePointer Output %3
|
||||
%15 = OpTypePointer Function %6
|
||||
%16 = OpConstantNull %6
|
||||
%20 = OpTypePointer Input %6
|
||||
%19 = OpVariable %20 Input
|
||||
%23 = OpVariable %20 Input
|
||||
%26 = OpTypePointer Output %3
|
||||
%25 = OpVariable %26 Output
|
||||
%28 = OpTypePointer Output %4
|
||||
%27 = OpVariable %28 Output
|
||||
%30 = OpTypePointer Output %4
|
||||
%29 = OpVariable %30 Output
|
||||
%31 = OpConstant %4 1.0
|
||||
%33 = OpTypeFunction %2
|
||||
%34 = OpConstant %6 2
|
||||
%35 = OpConstant %4 0.0
|
||||
%32 = OpFunction %2 None %33
|
||||
%19 = OpLabel
|
||||
%16 = OpVariable %17 Function %18
|
||||
%23 = OpLoad %6 %21
|
||||
%20 = OpCompositeConstruct %12 %23
|
||||
%26 = OpLoad %6 %25
|
||||
%24 = OpCompositeConstruct %13 %26
|
||||
OpStore %29 %31
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
OpStore %16 %34
|
||||
%37 = OpCompositeExtract %6 %20 0
|
||||
%29 = OpConstant %4 1.0
|
||||
%31 = OpTypeFunction %2
|
||||
%32 = OpConstant %6 2
|
||||
%33 = OpConstant %4 0.0
|
||||
%30 = OpFunction %2 None %31
|
||||
%17 = OpLabel
|
||||
%14 = OpVariable %15 Function %16
|
||||
%21 = OpLoad %6 %19
|
||||
%18 = OpCompositeConstruct %12 %21
|
||||
%24 = OpLoad %6 %23
|
||||
%22 = OpCompositeConstruct %13 %24
|
||||
OpStore %27 %29
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
OpStore %14 %32
|
||||
%35 = OpCompositeExtract %6 %18 0
|
||||
%36 = OpConvertUToF %4 %35
|
||||
%37 = OpCompositeExtract %6 %22 0
|
||||
%38 = OpConvertUToF %4 %37
|
||||
%39 = OpCompositeExtract %6 %24 0
|
||||
%39 = OpLoad %6 %14
|
||||
%40 = OpConvertUToF %4 %39
|
||||
%41 = OpLoad %6 %16
|
||||
%42 = OpConvertUToF %4 %41
|
||||
%43 = OpCompositeConstruct %3 %38 %40 %42 %35
|
||||
OpStore %27 %43
|
||||
%41 = OpCompositeConstruct %3 %36 %38 %40 %33
|
||||
OpStore %25 %41
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -16,51 +16,51 @@ OpExecutionMode %511 LocalSize 1 1 1
|
||||
%7 = OpTypeVector %8 4
|
||||
%9 = OpTypeVector %4 2
|
||||
%10 = OpTypeVector %4 3
|
||||
%11 = OpTypeVector %8 3
|
||||
%12 = OpTypeMatrix %10 3
|
||||
%13 = OpTypeMatrix %10 4
|
||||
%14 = OpTypeMatrix %3 3
|
||||
%15 = OpTypeVector %6 3
|
||||
%16 = OpConstant %4 1.0
|
||||
%17 = OpConstantComposite %3 %16 %16 %16 %16
|
||||
%18 = OpConstant %4 0.0
|
||||
%19 = OpConstantComposite %3 %18 %18 %18 %18
|
||||
%20 = OpConstant %4 0.5
|
||||
%21 = OpConstantComposite %3 %20 %20 %20 %20
|
||||
%22 = OpConstant %6 1
|
||||
%23 = OpConstantComposite %5 %22 %22 %22 %22
|
||||
%26 = OpTypeFunction %3
|
||||
%27 = OpConstantTrue %8
|
||||
%28 = OpConstant %6 0
|
||||
%29 = OpConstantFalse %8
|
||||
%30 = OpConstant %4 0.1
|
||||
%55 = OpConstant %4 2.0
|
||||
%56 = OpConstant %4 3.0
|
||||
%57 = OpConstant %4 4.0
|
||||
%58 = OpConstant %6 5
|
||||
%59 = OpConstant %6 2
|
||||
%75 = OpTypePointer Function %9
|
||||
%76 = OpConstantNull %9
|
||||
%79 = OpTypeFunction %9
|
||||
%95 = OpTypeFunction %10 %10
|
||||
%97 = OpConstantComposite %10 %18 %18 %18
|
||||
%99 = OpConstantComposite %10 %16 %16 %16
|
||||
%11 = OpTypeMatrix %10 3
|
||||
%12 = OpTypeMatrix %10 4
|
||||
%13 = OpTypeMatrix %3 3
|
||||
%14 = OpTypeVector %6 3
|
||||
%15 = OpConstant %4 1.0
|
||||
%16 = OpConstantComposite %3 %15 %15 %15 %15
|
||||
%17 = OpConstant %4 0.0
|
||||
%18 = OpConstantComposite %3 %17 %17 %17 %17
|
||||
%19 = OpConstant %4 0.5
|
||||
%20 = OpConstantComposite %3 %19 %19 %19 %19
|
||||
%21 = OpConstant %6 1
|
||||
%22 = OpConstantComposite %5 %21 %21 %21 %21
|
||||
%25 = OpTypeFunction %3
|
||||
%26 = OpConstantTrue %8
|
||||
%27 = OpConstant %6 0
|
||||
%28 = OpConstantFalse %8
|
||||
%29 = OpConstant %4 0.1
|
||||
%54 = OpConstant %4 2.0
|
||||
%55 = OpConstant %4 3.0
|
||||
%56 = OpConstant %4 4.0
|
||||
%57 = OpConstant %6 5
|
||||
%58 = OpConstant %6 2
|
||||
%74 = OpTypePointer Function %9
|
||||
%75 = OpConstantNull %9
|
||||
%78 = OpTypeFunction %9
|
||||
%94 = OpTypeFunction %10 %10
|
||||
%96 = OpTypeVector %8 3
|
||||
%97 = OpConstantComposite %10 %17 %17 %17
|
||||
%99 = OpConstantComposite %10 %15 %15 %15
|
||||
%103 = OpTypeFunction %2
|
||||
%106 = OpTypeVector %8 2
|
||||
%121 = OpConstant %4 -1.0
|
||||
%122 = OpTypeInt 32 0
|
||||
%123 = OpConstant %122 2
|
||||
%124 = OpConstant %122 1
|
||||
%125 = OpConstantNull %12
|
||||
%126 = OpConstantNull %13
|
||||
%127 = OpConstantNull %14
|
||||
%125 = OpConstantNull %11
|
||||
%126 = OpConstantNull %12
|
||||
%127 = OpConstantNull %13
|
||||
%129 = OpTypeVector %6 2
|
||||
%140 = OpTypeVector %122 3
|
||||
%203 = OpTypeVector %122 2
|
||||
%438 = OpTypePointer Function %6
|
||||
%439 = OpConstantNull %6
|
||||
%441 = OpTypePointer Function %15
|
||||
%442 = OpConstantNull %15
|
||||
%441 = OpTypePointer Function %14
|
||||
%442 = OpConstantNull %14
|
||||
%472 = OpTypePointer Function %6
|
||||
%483 = OpConstant %6 -1
|
||||
%484 = OpConstant %6 -2
|
||||
@@ -70,80 +70,80 @@ OpExecutionMode %511 LocalSize 1 1 1
|
||||
%488 = OpConstant %6 6
|
||||
%489 = OpConstant %6 -7
|
||||
%490 = OpConstant %6 -8
|
||||
%25 = OpFunction %3 None %26
|
||||
%24 = OpLabel
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%32 = OpSelect %6 %27 %22 %28
|
||||
%34 = OpCompositeConstruct %7 %27 %27 %27 %27
|
||||
%33 = OpSelect %3 %34 %17 %19
|
||||
%35 = OpCompositeConstruct %7 %29 %29 %29 %29
|
||||
%36 = OpSelect %3 %35 %19 %17
|
||||
%37 = OpExtInst %3 %1 FMix %19 %17 %21
|
||||
%39 = OpCompositeConstruct %3 %30 %30 %30 %30
|
||||
%38 = OpExtInst %3 %1 FMix %19 %17 %39
|
||||
%40 = OpCompositeExtract %6 %23 0
|
||||
%41 = OpBitcast %4 %40
|
||||
%42 = OpBitcast %3 %23
|
||||
%43 = OpConvertFToS %5 %19
|
||||
%44 = OpCompositeConstruct %5 %32 %32 %32 %32
|
||||
%45 = OpIAdd %5 %44 %43
|
||||
%46 = OpConvertSToF %3 %45
|
||||
%47 = OpFAdd %3 %46 %33
|
||||
%24 = OpFunction %3 None %25
|
||||
%23 = OpLabel
|
||||
OpBranch %30
|
||||
%30 = OpLabel
|
||||
%31 = OpSelect %6 %26 %21 %27
|
||||
%33 = OpCompositeConstruct %7 %26 %26 %26 %26
|
||||
%32 = OpSelect %3 %33 %16 %18
|
||||
%34 = OpCompositeConstruct %7 %28 %28 %28 %28
|
||||
%35 = OpSelect %3 %34 %18 %16
|
||||
%36 = OpExtInst %3 %1 FMix %18 %16 %20
|
||||
%38 = OpCompositeConstruct %3 %29 %29 %29 %29
|
||||
%37 = OpExtInst %3 %1 FMix %18 %16 %38
|
||||
%39 = OpCompositeExtract %6 %22 0
|
||||
%40 = OpBitcast %4 %39
|
||||
%41 = OpBitcast %3 %22
|
||||
%42 = OpConvertFToS %5 %18
|
||||
%43 = OpCompositeConstruct %5 %31 %31 %31 %31
|
||||
%44 = OpIAdd %5 %43 %42
|
||||
%45 = OpConvertSToF %3 %44
|
||||
%46 = OpFAdd %3 %45 %32
|
||||
%47 = OpFAdd %3 %46 %36
|
||||
%48 = OpFAdd %3 %47 %37
|
||||
%49 = OpFAdd %3 %48 %38
|
||||
%50 = OpCompositeConstruct %3 %41 %41 %41 %41
|
||||
%51 = OpFAdd %3 %49 %50
|
||||
%52 = OpFAdd %3 %51 %42
|
||||
OpReturnValue %52
|
||||
%49 = OpCompositeConstruct %3 %40 %40 %40 %40
|
||||
%50 = OpFAdd %3 %48 %49
|
||||
%51 = OpFAdd %3 %50 %41
|
||||
OpReturnValue %51
|
||||
OpFunctionEnd
|
||||
%54 = OpFunction %3 None %26
|
||||
%53 = OpLabel
|
||||
OpBranch %60
|
||||
%60 = OpLabel
|
||||
%61 = OpCompositeConstruct %9 %55 %55
|
||||
%62 = OpCompositeConstruct %9 %16 %16
|
||||
%63 = OpFAdd %9 %62 %61
|
||||
%64 = OpCompositeConstruct %9 %56 %56
|
||||
%65 = OpFSub %9 %63 %64
|
||||
%66 = OpCompositeConstruct %9 %57 %57
|
||||
%67 = OpFDiv %9 %65 %66
|
||||
%53 = OpFunction %3 None %25
|
||||
%52 = OpLabel
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
%60 = OpCompositeConstruct %9 %54 %54
|
||||
%61 = OpCompositeConstruct %9 %15 %15
|
||||
%62 = OpFAdd %9 %61 %60
|
||||
%63 = OpCompositeConstruct %9 %55 %55
|
||||
%64 = OpFSub %9 %62 %63
|
||||
%65 = OpCompositeConstruct %9 %56 %56
|
||||
%66 = OpFDiv %9 %64 %65
|
||||
%67 = OpCompositeConstruct %5 %57 %57 %57 %57
|
||||
%68 = OpCompositeConstruct %5 %58 %58 %58 %58
|
||||
%69 = OpCompositeConstruct %5 %59 %59 %59 %59
|
||||
%70 = OpSRem %5 %68 %69
|
||||
%71 = OpVectorShuffle %3 %67 %67 0 1 0 1
|
||||
%72 = OpConvertSToF %3 %70
|
||||
%73 = OpFAdd %3 %71 %72
|
||||
OpReturnValue %73
|
||||
%69 = OpSRem %5 %67 %68
|
||||
%70 = OpVectorShuffle %3 %66 %66 0 1 0 1
|
||||
%71 = OpConvertSToF %3 %69
|
||||
%72 = OpFAdd %3 %70 %71
|
||||
OpReturnValue %72
|
||||
OpFunctionEnd
|
||||
%78 = OpFunction %9 None %79
|
||||
%77 = OpLabel
|
||||
%74 = OpVariable %75 Function %76
|
||||
OpBranch %80
|
||||
%80 = OpLabel
|
||||
%81 = OpCompositeConstruct %9 %55 %55
|
||||
OpStore %74 %81
|
||||
%82 = OpLoad %9 %74
|
||||
%83 = OpCompositeConstruct %9 %16 %16
|
||||
%84 = OpFAdd %9 %82 %83
|
||||
OpStore %74 %84
|
||||
%85 = OpLoad %9 %74
|
||||
%86 = OpCompositeConstruct %9 %56 %56
|
||||
%87 = OpFSub %9 %85 %86
|
||||
OpStore %74 %87
|
||||
%88 = OpLoad %9 %74
|
||||
%89 = OpCompositeConstruct %9 %57 %57
|
||||
%90 = OpFDiv %9 %88 %89
|
||||
OpStore %74 %90
|
||||
%91 = OpLoad %9 %74
|
||||
OpReturnValue %91
|
||||
%77 = OpFunction %9 None %78
|
||||
%76 = OpLabel
|
||||
%73 = OpVariable %74 Function %75
|
||||
OpBranch %79
|
||||
%79 = OpLabel
|
||||
%80 = OpCompositeConstruct %9 %54 %54
|
||||
OpStore %73 %80
|
||||
%81 = OpLoad %9 %73
|
||||
%82 = OpCompositeConstruct %9 %15 %15
|
||||
%83 = OpFAdd %9 %81 %82
|
||||
OpStore %73 %83
|
||||
%84 = OpLoad %9 %73
|
||||
%85 = OpCompositeConstruct %9 %55 %55
|
||||
%86 = OpFSub %9 %84 %85
|
||||
OpStore %73 %86
|
||||
%87 = OpLoad %9 %73
|
||||
%88 = OpCompositeConstruct %9 %56 %56
|
||||
%89 = OpFDiv %9 %87 %88
|
||||
OpStore %73 %89
|
||||
%90 = OpLoad %9 %73
|
||||
OpReturnValue %90
|
||||
OpFunctionEnd
|
||||
%94 = OpFunction %10 None %95
|
||||
%93 = OpFunctionParameter %10
|
||||
%92 = OpLabel
|
||||
OpBranch %96
|
||||
%96 = OpLabel
|
||||
%98 = OpFUnordNotEqual %11 %93 %97
|
||||
%93 = OpFunction %10 None %94
|
||||
%92 = OpFunctionParameter %10
|
||||
%91 = OpLabel
|
||||
OpBranch %95
|
||||
%95 = OpLabel
|
||||
%98 = OpFUnordNotEqual %96 %92 %97
|
||||
%100 = OpSelect %10 %98 %99 %97
|
||||
OpReturnValue %100
|
||||
OpFunctionEnd
|
||||
@@ -151,18 +151,18 @@ OpFunctionEnd
|
||||
%101 = OpLabel
|
||||
OpBranch %104
|
||||
%104 = OpLabel
|
||||
%105 = OpLogicalNot %8 %27
|
||||
%107 = OpCompositeConstruct %106 %27 %27
|
||||
%105 = OpLogicalNot %8 %26
|
||||
%107 = OpCompositeConstruct %106 %26 %26
|
||||
%108 = OpLogicalNot %106 %107
|
||||
%109 = OpLogicalOr %8 %27 %29
|
||||
%110 = OpLogicalAnd %8 %27 %29
|
||||
%111 = OpLogicalOr %8 %27 %29
|
||||
%112 = OpCompositeConstruct %11 %27 %27 %27
|
||||
%113 = OpCompositeConstruct %11 %29 %29 %29
|
||||
%114 = OpLogicalOr %11 %112 %113
|
||||
%115 = OpLogicalAnd %8 %27 %29
|
||||
%116 = OpCompositeConstruct %7 %27 %27 %27 %27
|
||||
%117 = OpCompositeConstruct %7 %29 %29 %29 %29
|
||||
%109 = OpLogicalOr %8 %26 %28
|
||||
%110 = OpLogicalAnd %8 %26 %28
|
||||
%111 = OpLogicalOr %8 %26 %28
|
||||
%112 = OpCompositeConstruct %96 %26 %26 %26
|
||||
%113 = OpCompositeConstruct %96 %28 %28 %28
|
||||
%114 = OpLogicalOr %96 %112 %113
|
||||
%115 = OpLogicalAnd %8 %26 %28
|
||||
%116 = OpCompositeConstruct %7 %26 %26 %26 %26
|
||||
%117 = OpCompositeConstruct %7 %28 %28 %28 %28
|
||||
%118 = OpLogicalAnd %7 %116 %117
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -170,77 +170,77 @@ OpFunctionEnd
|
||||
%119 = OpLabel
|
||||
OpBranch %128
|
||||
%128 = OpLabel
|
||||
%130 = OpCompositeConstruct %129 %22 %22
|
||||
%130 = OpCompositeConstruct %129 %21 %21
|
||||
%131 = OpSNegate %129 %130
|
||||
%132 = OpCompositeConstruct %9 %16 %16
|
||||
%132 = OpCompositeConstruct %9 %15 %15
|
||||
%133 = OpFNegate %9 %132
|
||||
%134 = OpIAdd %6 %59 %22
|
||||
%134 = OpIAdd %6 %58 %21
|
||||
%135 = OpIAdd %122 %123 %124
|
||||
%136 = OpFAdd %4 %55 %16
|
||||
%137 = OpCompositeConstruct %129 %59 %59
|
||||
%138 = OpCompositeConstruct %129 %22 %22
|
||||
%136 = OpFAdd %4 %54 %15
|
||||
%137 = OpCompositeConstruct %129 %58 %58
|
||||
%138 = OpCompositeConstruct %129 %21 %21
|
||||
%139 = OpIAdd %129 %137 %138
|
||||
%141 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%142 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%143 = OpIAdd %140 %141 %142
|
||||
%144 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%145 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%144 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%145 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%146 = OpFAdd %3 %144 %145
|
||||
%147 = OpISub %6 %59 %22
|
||||
%147 = OpISub %6 %58 %21
|
||||
%148 = OpISub %122 %123 %124
|
||||
%149 = OpFSub %4 %55 %16
|
||||
%150 = OpCompositeConstruct %129 %59 %59
|
||||
%151 = OpCompositeConstruct %129 %22 %22
|
||||
%149 = OpFSub %4 %54 %15
|
||||
%150 = OpCompositeConstruct %129 %58 %58
|
||||
%151 = OpCompositeConstruct %129 %21 %21
|
||||
%152 = OpISub %129 %150 %151
|
||||
%153 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%154 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%155 = OpISub %140 %153 %154
|
||||
%156 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%157 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%156 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%157 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%158 = OpFSub %3 %156 %157
|
||||
%159 = OpIMul %6 %59 %22
|
||||
%159 = OpIMul %6 %58 %21
|
||||
%160 = OpIMul %122 %123 %124
|
||||
%161 = OpFMul %4 %55 %16
|
||||
%162 = OpCompositeConstruct %129 %59 %59
|
||||
%163 = OpCompositeConstruct %129 %22 %22
|
||||
%161 = OpFMul %4 %54 %15
|
||||
%162 = OpCompositeConstruct %129 %58 %58
|
||||
%163 = OpCompositeConstruct %129 %21 %21
|
||||
%164 = OpIMul %129 %162 %163
|
||||
%165 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%166 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%167 = OpIMul %140 %165 %166
|
||||
%168 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%169 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%168 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%169 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%170 = OpFMul %3 %168 %169
|
||||
%171 = OpSDiv %6 %59 %22
|
||||
%171 = OpSDiv %6 %58 %21
|
||||
%172 = OpUDiv %122 %123 %124
|
||||
%173 = OpFDiv %4 %55 %16
|
||||
%174 = OpCompositeConstruct %129 %59 %59
|
||||
%175 = OpCompositeConstruct %129 %22 %22
|
||||
%173 = OpFDiv %4 %54 %15
|
||||
%174 = OpCompositeConstruct %129 %58 %58
|
||||
%175 = OpCompositeConstruct %129 %21 %21
|
||||
%176 = OpSDiv %129 %174 %175
|
||||
%177 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%178 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%179 = OpUDiv %140 %177 %178
|
||||
%180 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%181 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%180 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%181 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%182 = OpFDiv %3 %180 %181
|
||||
%183 = OpSRem %6 %59 %22
|
||||
%183 = OpSRem %6 %58 %21
|
||||
%184 = OpUMod %122 %123 %124
|
||||
%185 = OpFRem %4 %55 %16
|
||||
%186 = OpCompositeConstruct %129 %59 %59
|
||||
%187 = OpCompositeConstruct %129 %22 %22
|
||||
%185 = OpFRem %4 %54 %15
|
||||
%186 = OpCompositeConstruct %129 %58 %58
|
||||
%187 = OpCompositeConstruct %129 %21 %21
|
||||
%188 = OpSRem %129 %186 %187
|
||||
%189 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%190 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%191 = OpUMod %140 %189 %190
|
||||
%192 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%193 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%192 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%193 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%194 = OpFRem %3 %192 %193
|
||||
OpBranch %195
|
||||
%195 = OpLabel
|
||||
%197 = OpCompositeConstruct %129 %59 %59
|
||||
%198 = OpCompositeConstruct %129 %22 %22
|
||||
%197 = OpCompositeConstruct %129 %58 %58
|
||||
%198 = OpCompositeConstruct %129 %21 %21
|
||||
%199 = OpIAdd %129 %197 %198
|
||||
%200 = OpCompositeConstruct %129 %22 %22
|
||||
%201 = OpCompositeConstruct %129 %59 %59
|
||||
%200 = OpCompositeConstruct %129 %21 %21
|
||||
%201 = OpCompositeConstruct %129 %58 %58
|
||||
%202 = OpIAdd %129 %201 %200
|
||||
%204 = OpCompositeConstruct %203 %123 %123
|
||||
%205 = OpCompositeConstruct %203 %124 %124
|
||||
@@ -248,17 +248,17 @@ OpBranch %195
|
||||
%207 = OpCompositeConstruct %203 %124 %124
|
||||
%208 = OpCompositeConstruct %203 %123 %123
|
||||
%209 = OpIAdd %203 %208 %207
|
||||
%210 = OpCompositeConstruct %9 %55 %55
|
||||
%211 = OpCompositeConstruct %9 %16 %16
|
||||
%210 = OpCompositeConstruct %9 %54 %54
|
||||
%211 = OpCompositeConstruct %9 %15 %15
|
||||
%212 = OpFAdd %9 %210 %211
|
||||
%213 = OpCompositeConstruct %9 %16 %16
|
||||
%214 = OpCompositeConstruct %9 %55 %55
|
||||
%213 = OpCompositeConstruct %9 %15 %15
|
||||
%214 = OpCompositeConstruct %9 %54 %54
|
||||
%215 = OpFAdd %9 %214 %213
|
||||
%216 = OpCompositeConstruct %129 %59 %59
|
||||
%217 = OpCompositeConstruct %129 %22 %22
|
||||
%216 = OpCompositeConstruct %129 %58 %58
|
||||
%217 = OpCompositeConstruct %129 %21 %21
|
||||
%218 = OpISub %129 %216 %217
|
||||
%219 = OpCompositeConstruct %129 %22 %22
|
||||
%220 = OpCompositeConstruct %129 %59 %59
|
||||
%219 = OpCompositeConstruct %129 %21 %21
|
||||
%220 = OpCompositeConstruct %129 %58 %58
|
||||
%221 = OpISub %129 %220 %219
|
||||
%222 = OpCompositeConstruct %203 %123 %123
|
||||
%223 = OpCompositeConstruct %203 %124 %124
|
||||
@@ -266,17 +266,17 @@ OpBranch %195
|
||||
%225 = OpCompositeConstruct %203 %124 %124
|
||||
%226 = OpCompositeConstruct %203 %123 %123
|
||||
%227 = OpISub %203 %226 %225
|
||||
%228 = OpCompositeConstruct %9 %55 %55
|
||||
%229 = OpCompositeConstruct %9 %16 %16
|
||||
%228 = OpCompositeConstruct %9 %54 %54
|
||||
%229 = OpCompositeConstruct %9 %15 %15
|
||||
%230 = OpFSub %9 %228 %229
|
||||
%231 = OpCompositeConstruct %9 %16 %16
|
||||
%232 = OpCompositeConstruct %9 %55 %55
|
||||
%231 = OpCompositeConstruct %9 %15 %15
|
||||
%232 = OpCompositeConstruct %9 %54 %54
|
||||
%233 = OpFSub %9 %232 %231
|
||||
%234 = OpCompositeConstruct %129 %59 %59
|
||||
%236 = OpCompositeConstruct %129 %22 %22
|
||||
%234 = OpCompositeConstruct %129 %58 %58
|
||||
%236 = OpCompositeConstruct %129 %21 %21
|
||||
%235 = OpIMul %129 %234 %236
|
||||
%237 = OpCompositeConstruct %129 %22 %22
|
||||
%239 = OpCompositeConstruct %129 %59 %59
|
||||
%237 = OpCompositeConstruct %129 %21 %21
|
||||
%239 = OpCompositeConstruct %129 %58 %58
|
||||
%238 = OpIMul %129 %237 %239
|
||||
%240 = OpCompositeConstruct %203 %123 %123
|
||||
%242 = OpCompositeConstruct %203 %124 %124
|
||||
@@ -284,15 +284,15 @@ OpBranch %195
|
||||
%243 = OpCompositeConstruct %203 %124 %124
|
||||
%245 = OpCompositeConstruct %203 %123 %123
|
||||
%244 = OpIMul %203 %243 %245
|
||||
%246 = OpCompositeConstruct %9 %55 %55
|
||||
%247 = OpVectorTimesScalar %9 %246 %16
|
||||
%248 = OpCompositeConstruct %9 %16 %16
|
||||
%249 = OpVectorTimesScalar %9 %248 %55
|
||||
%250 = OpCompositeConstruct %129 %59 %59
|
||||
%251 = OpCompositeConstruct %129 %22 %22
|
||||
%246 = OpCompositeConstruct %9 %54 %54
|
||||
%247 = OpVectorTimesScalar %9 %246 %15
|
||||
%248 = OpCompositeConstruct %9 %15 %15
|
||||
%249 = OpVectorTimesScalar %9 %248 %54
|
||||
%250 = OpCompositeConstruct %129 %58 %58
|
||||
%251 = OpCompositeConstruct %129 %21 %21
|
||||
%252 = OpSDiv %129 %250 %251
|
||||
%253 = OpCompositeConstruct %129 %22 %22
|
||||
%254 = OpCompositeConstruct %129 %59 %59
|
||||
%253 = OpCompositeConstruct %129 %21 %21
|
||||
%254 = OpCompositeConstruct %129 %58 %58
|
||||
%255 = OpSDiv %129 %254 %253
|
||||
%256 = OpCompositeConstruct %203 %123 %123
|
||||
%257 = OpCompositeConstruct %203 %124 %124
|
||||
@@ -300,17 +300,17 @@ OpBranch %195
|
||||
%259 = OpCompositeConstruct %203 %124 %124
|
||||
%260 = OpCompositeConstruct %203 %123 %123
|
||||
%261 = OpUDiv %203 %260 %259
|
||||
%262 = OpCompositeConstruct %9 %55 %55
|
||||
%263 = OpCompositeConstruct %9 %16 %16
|
||||
%262 = OpCompositeConstruct %9 %54 %54
|
||||
%263 = OpCompositeConstruct %9 %15 %15
|
||||
%264 = OpFDiv %9 %262 %263
|
||||
%265 = OpCompositeConstruct %9 %16 %16
|
||||
%266 = OpCompositeConstruct %9 %55 %55
|
||||
%265 = OpCompositeConstruct %9 %15 %15
|
||||
%266 = OpCompositeConstruct %9 %54 %54
|
||||
%267 = OpFDiv %9 %266 %265
|
||||
%268 = OpCompositeConstruct %129 %59 %59
|
||||
%269 = OpCompositeConstruct %129 %22 %22
|
||||
%268 = OpCompositeConstruct %129 %58 %58
|
||||
%269 = OpCompositeConstruct %129 %21 %21
|
||||
%270 = OpSRem %129 %268 %269
|
||||
%271 = OpCompositeConstruct %129 %22 %22
|
||||
%272 = OpCompositeConstruct %129 %59 %59
|
||||
%271 = OpCompositeConstruct %129 %21 %21
|
||||
%272 = OpCompositeConstruct %129 %58 %58
|
||||
%273 = OpSRem %129 %272 %271
|
||||
%274 = OpCompositeConstruct %203 %123 %123
|
||||
%275 = OpCompositeConstruct %203 %124 %124
|
||||
@@ -318,11 +318,11 @@ OpBranch %195
|
||||
%277 = OpCompositeConstruct %203 %124 %124
|
||||
%278 = OpCompositeConstruct %203 %123 %123
|
||||
%279 = OpUMod %203 %278 %277
|
||||
%280 = OpCompositeConstruct %9 %55 %55
|
||||
%281 = OpCompositeConstruct %9 %16 %16
|
||||
%280 = OpCompositeConstruct %9 %54 %54
|
||||
%281 = OpCompositeConstruct %9 %15 %15
|
||||
%282 = OpFRem %9 %280 %281
|
||||
%283 = OpCompositeConstruct %9 %16 %16
|
||||
%284 = OpCompositeConstruct %9 %55 %55
|
||||
%283 = OpCompositeConstruct %9 %15 %15
|
||||
%284 = OpCompositeConstruct %9 %54 %54
|
||||
%285 = OpFRem %9 %284 %283
|
||||
OpBranch %196
|
||||
%196 = OpLabel
|
||||
@@ -335,7 +335,7 @@ OpBranch %196
|
||||
%293 = OpCompositeExtract %10 %125 2
|
||||
%294 = OpCompositeExtract %10 %125 2
|
||||
%295 = OpFAdd %10 %293 %294
|
||||
%286 = OpCompositeConstruct %12 %289 %292 %295
|
||||
%286 = OpCompositeConstruct %11 %289 %292 %295
|
||||
%297 = OpCompositeExtract %10 %125 0
|
||||
%298 = OpCompositeExtract %10 %125 0
|
||||
%299 = OpFSub %10 %297 %298
|
||||
@@ -345,61 +345,61 @@ OpBranch %196
|
||||
%303 = OpCompositeExtract %10 %125 2
|
||||
%304 = OpCompositeExtract %10 %125 2
|
||||
%305 = OpFSub %10 %303 %304
|
||||
%296 = OpCompositeConstruct %12 %299 %302 %305
|
||||
%306 = OpMatrixTimesScalar %12 %125 %16
|
||||
%307 = OpMatrixTimesScalar %12 %125 %55
|
||||
%308 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%296 = OpCompositeConstruct %11 %299 %302 %305
|
||||
%306 = OpMatrixTimesScalar %11 %125 %15
|
||||
%307 = OpMatrixTimesScalar %11 %125 %54
|
||||
%308 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%309 = OpMatrixTimesVector %10 %126 %308
|
||||
%310 = OpCompositeConstruct %10 %55 %55 %55
|
||||
%310 = OpCompositeConstruct %10 %54 %54 %54
|
||||
%311 = OpVectorTimesMatrix %3 %310 %126
|
||||
%312 = OpMatrixTimesMatrix %12 %126 %127
|
||||
%312 = OpMatrixTimesMatrix %11 %126 %127
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%314 = OpFunction %2 None %103
|
||||
%313 = OpLabel
|
||||
OpBranch %315
|
||||
%315 = OpLabel
|
||||
%316 = OpNot %6 %22
|
||||
%316 = OpNot %6 %21
|
||||
%317 = OpNot %122 %124
|
||||
%318 = OpCompositeConstruct %129 %22 %22
|
||||
%318 = OpCompositeConstruct %129 %21 %21
|
||||
%319 = OpNot %129 %318
|
||||
%320 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%321 = OpNot %140 %320
|
||||
%322 = OpBitwiseOr %6 %59 %22
|
||||
%322 = OpBitwiseOr %6 %58 %21
|
||||
%323 = OpBitwiseOr %122 %123 %124
|
||||
%324 = OpCompositeConstruct %129 %59 %59
|
||||
%325 = OpCompositeConstruct %129 %22 %22
|
||||
%324 = OpCompositeConstruct %129 %58 %58
|
||||
%325 = OpCompositeConstruct %129 %21 %21
|
||||
%326 = OpBitwiseOr %129 %324 %325
|
||||
%327 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%328 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%329 = OpBitwiseOr %140 %327 %328
|
||||
%330 = OpBitwiseAnd %6 %59 %22
|
||||
%330 = OpBitwiseAnd %6 %58 %21
|
||||
%331 = OpBitwiseAnd %122 %123 %124
|
||||
%332 = OpCompositeConstruct %129 %59 %59
|
||||
%333 = OpCompositeConstruct %129 %22 %22
|
||||
%332 = OpCompositeConstruct %129 %58 %58
|
||||
%333 = OpCompositeConstruct %129 %21 %21
|
||||
%334 = OpBitwiseAnd %129 %332 %333
|
||||
%335 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%336 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%337 = OpBitwiseAnd %140 %335 %336
|
||||
%338 = OpBitwiseXor %6 %59 %22
|
||||
%338 = OpBitwiseXor %6 %58 %21
|
||||
%339 = OpBitwiseXor %122 %123 %124
|
||||
%340 = OpCompositeConstruct %129 %59 %59
|
||||
%341 = OpCompositeConstruct %129 %22 %22
|
||||
%340 = OpCompositeConstruct %129 %58 %58
|
||||
%341 = OpCompositeConstruct %129 %21 %21
|
||||
%342 = OpBitwiseXor %129 %340 %341
|
||||
%343 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%344 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%345 = OpBitwiseXor %140 %343 %344
|
||||
%346 = OpShiftLeftLogical %6 %59 %124
|
||||
%346 = OpShiftLeftLogical %6 %58 %124
|
||||
%347 = OpShiftLeftLogical %122 %123 %124
|
||||
%348 = OpCompositeConstruct %129 %59 %59
|
||||
%348 = OpCompositeConstruct %129 %58 %58
|
||||
%349 = OpCompositeConstruct %203 %124 %124
|
||||
%350 = OpShiftLeftLogical %129 %348 %349
|
||||
%351 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%352 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%353 = OpShiftLeftLogical %140 %351 %352
|
||||
%354 = OpShiftRightArithmetic %6 %59 %124
|
||||
%354 = OpShiftRightArithmetic %6 %58 %124
|
||||
%355 = OpShiftRightLogical %122 %123 %124
|
||||
%356 = OpCompositeConstruct %129 %59 %59
|
||||
%356 = OpCompositeConstruct %129 %58 %58
|
||||
%357 = OpCompositeConstruct %203 %124 %124
|
||||
%358 = OpShiftRightArithmetic %129 %356 %357
|
||||
%359 = OpCompositeConstruct %140 %123 %123 %123
|
||||
@@ -411,77 +411,77 @@ OpFunctionEnd
|
||||
%362 = OpLabel
|
||||
OpBranch %364
|
||||
%364 = OpLabel
|
||||
%365 = OpIEqual %8 %59 %22
|
||||
%365 = OpIEqual %8 %58 %21
|
||||
%366 = OpIEqual %8 %123 %124
|
||||
%367 = OpFOrdEqual %8 %55 %16
|
||||
%368 = OpCompositeConstruct %129 %59 %59
|
||||
%369 = OpCompositeConstruct %129 %22 %22
|
||||
%367 = OpFOrdEqual %8 %54 %15
|
||||
%368 = OpCompositeConstruct %129 %58 %58
|
||||
%369 = OpCompositeConstruct %129 %21 %21
|
||||
%370 = OpIEqual %106 %368 %369
|
||||
%371 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%372 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%373 = OpIEqual %11 %371 %372
|
||||
%374 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%375 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%373 = OpIEqual %96 %371 %372
|
||||
%374 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%375 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%376 = OpFOrdEqual %7 %374 %375
|
||||
%377 = OpINotEqual %8 %59 %22
|
||||
%377 = OpINotEqual %8 %58 %21
|
||||
%378 = OpINotEqual %8 %123 %124
|
||||
%379 = OpFOrdNotEqual %8 %55 %16
|
||||
%380 = OpCompositeConstruct %129 %59 %59
|
||||
%381 = OpCompositeConstruct %129 %22 %22
|
||||
%379 = OpFOrdNotEqual %8 %54 %15
|
||||
%380 = OpCompositeConstruct %129 %58 %58
|
||||
%381 = OpCompositeConstruct %129 %21 %21
|
||||
%382 = OpINotEqual %106 %380 %381
|
||||
%383 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%384 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%385 = OpINotEqual %11 %383 %384
|
||||
%386 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%387 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%385 = OpINotEqual %96 %383 %384
|
||||
%386 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%387 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%388 = OpFOrdNotEqual %7 %386 %387
|
||||
%389 = OpSLessThan %8 %59 %22
|
||||
%389 = OpSLessThan %8 %58 %21
|
||||
%390 = OpULessThan %8 %123 %124
|
||||
%391 = OpFOrdLessThan %8 %55 %16
|
||||
%392 = OpCompositeConstruct %129 %59 %59
|
||||
%393 = OpCompositeConstruct %129 %22 %22
|
||||
%391 = OpFOrdLessThan %8 %54 %15
|
||||
%392 = OpCompositeConstruct %129 %58 %58
|
||||
%393 = OpCompositeConstruct %129 %21 %21
|
||||
%394 = OpSLessThan %106 %392 %393
|
||||
%395 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%396 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%397 = OpULessThan %11 %395 %396
|
||||
%398 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%399 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%397 = OpULessThan %96 %395 %396
|
||||
%398 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%399 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%400 = OpFOrdLessThan %7 %398 %399
|
||||
%401 = OpSLessThanEqual %8 %59 %22
|
||||
%401 = OpSLessThanEqual %8 %58 %21
|
||||
%402 = OpULessThanEqual %8 %123 %124
|
||||
%403 = OpFOrdLessThanEqual %8 %55 %16
|
||||
%404 = OpCompositeConstruct %129 %59 %59
|
||||
%405 = OpCompositeConstruct %129 %22 %22
|
||||
%403 = OpFOrdLessThanEqual %8 %54 %15
|
||||
%404 = OpCompositeConstruct %129 %58 %58
|
||||
%405 = OpCompositeConstruct %129 %21 %21
|
||||
%406 = OpSLessThanEqual %106 %404 %405
|
||||
%407 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%408 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%409 = OpULessThanEqual %11 %407 %408
|
||||
%410 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%411 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%409 = OpULessThanEqual %96 %407 %408
|
||||
%410 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%411 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%412 = OpFOrdLessThanEqual %7 %410 %411
|
||||
%413 = OpSGreaterThan %8 %59 %22
|
||||
%413 = OpSGreaterThan %8 %58 %21
|
||||
%414 = OpUGreaterThan %8 %123 %124
|
||||
%415 = OpFOrdGreaterThan %8 %55 %16
|
||||
%416 = OpCompositeConstruct %129 %59 %59
|
||||
%417 = OpCompositeConstruct %129 %22 %22
|
||||
%415 = OpFOrdGreaterThan %8 %54 %15
|
||||
%416 = OpCompositeConstruct %129 %58 %58
|
||||
%417 = OpCompositeConstruct %129 %21 %21
|
||||
%418 = OpSGreaterThan %106 %416 %417
|
||||
%419 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%420 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%421 = OpUGreaterThan %11 %419 %420
|
||||
%422 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%423 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%421 = OpUGreaterThan %96 %419 %420
|
||||
%422 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%423 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%424 = OpFOrdGreaterThan %7 %422 %423
|
||||
%425 = OpSGreaterThanEqual %8 %59 %22
|
||||
%425 = OpSGreaterThanEqual %8 %58 %21
|
||||
%426 = OpUGreaterThanEqual %8 %123 %124
|
||||
%427 = OpFOrdGreaterThanEqual %8 %55 %16
|
||||
%428 = OpCompositeConstruct %129 %59 %59
|
||||
%429 = OpCompositeConstruct %129 %22 %22
|
||||
%427 = OpFOrdGreaterThanEqual %8 %54 %15
|
||||
%428 = OpCompositeConstruct %129 %58 %58
|
||||
%429 = OpCompositeConstruct %129 %21 %21
|
||||
%430 = OpSGreaterThanEqual %106 %428 %429
|
||||
%431 = OpCompositeConstruct %140 %123 %123 %123
|
||||
%432 = OpCompositeConstruct %140 %124 %124 %124
|
||||
%433 = OpUGreaterThanEqual %11 %431 %432
|
||||
%434 = OpCompositeConstruct %3 %55 %55 %55 %55
|
||||
%435 = OpCompositeConstruct %3 %16 %16 %16 %16
|
||||
%433 = OpUGreaterThanEqual %96 %431 %432
|
||||
%434 = OpCompositeConstruct %3 %54 %54 %54 %54
|
||||
%435 = OpCompositeConstruct %3 %15 %15 %15 %15
|
||||
%436 = OpFOrdGreaterThanEqual %7 %434 %435
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -491,12 +491,12 @@ OpFunctionEnd
|
||||
%440 = OpVariable %441 Function %442
|
||||
OpBranch %445
|
||||
%445 = OpLabel
|
||||
OpStore %437 %22
|
||||
OpStore %437 %21
|
||||
%446 = OpLoad %6 %437
|
||||
%447 = OpIAdd %6 %446 %22
|
||||
%447 = OpIAdd %6 %446 %21
|
||||
OpStore %437 %447
|
||||
%448 = OpLoad %6 %437
|
||||
%449 = OpISub %6 %448 %22
|
||||
%449 = OpISub %6 %448 %21
|
||||
OpStore %437 %449
|
||||
%450 = OpLoad %6 %437
|
||||
%451 = OpLoad %6 %437
|
||||
@@ -507,16 +507,16 @@ OpStore %437 %452
|
||||
%455 = OpSDiv %6 %454 %453
|
||||
OpStore %437 %455
|
||||
%456 = OpLoad %6 %437
|
||||
%457 = OpSRem %6 %456 %22
|
||||
%457 = OpSRem %6 %456 %21
|
||||
OpStore %437 %457
|
||||
%458 = OpLoad %6 %437
|
||||
%459 = OpBitwiseAnd %6 %458 %28
|
||||
%459 = OpBitwiseAnd %6 %458 %27
|
||||
OpStore %437 %459
|
||||
%460 = OpLoad %6 %437
|
||||
%461 = OpBitwiseOr %6 %460 %28
|
||||
%461 = OpBitwiseOr %6 %460 %27
|
||||
OpStore %437 %461
|
||||
%462 = OpLoad %6 %437
|
||||
%463 = OpBitwiseXor %6 %462 %28
|
||||
%463 = OpBitwiseXor %6 %462 %27
|
||||
OpStore %437 %463
|
||||
%464 = OpLoad %6 %437
|
||||
%465 = OpShiftLeftLogical %6 %464 %123
|
||||
@@ -525,20 +525,20 @@ OpStore %437 %465
|
||||
%467 = OpShiftRightArithmetic %6 %466 %124
|
||||
OpStore %437 %467
|
||||
%468 = OpLoad %6 %437
|
||||
%469 = OpIAdd %6 %468 %22
|
||||
%469 = OpIAdd %6 %468 %21
|
||||
OpStore %437 %469
|
||||
%470 = OpLoad %6 %437
|
||||
%471 = OpISub %6 %470 %22
|
||||
%471 = OpISub %6 %470 %21
|
||||
OpStore %437 %471
|
||||
OpStore %440 %442
|
||||
%473 = OpAccessChain %472 %440 %124
|
||||
%474 = OpLoad %6 %473
|
||||
%475 = OpIAdd %6 %474 %22
|
||||
%475 = OpIAdd %6 %474 %21
|
||||
%476 = OpAccessChain %472 %440 %124
|
||||
OpStore %476 %475
|
||||
%477 = OpAccessChain %472 %440 %124
|
||||
%478 = OpLoad %6 %477
|
||||
%479 = OpISub %6 %478 %22
|
||||
%479 = OpISub %6 %478 %21
|
||||
%480 = OpAccessChain %472 %440 %124
|
||||
OpStore %480 %479
|
||||
OpReturn
|
||||
@@ -571,10 +571,10 @@ OpFunctionEnd
|
||||
%510 = OpLabel
|
||||
OpBranch %512
|
||||
%512 = OpLabel
|
||||
%513 = OpFunctionCall %3 %25
|
||||
%514 = OpFunctionCall %3 %54
|
||||
%515 = OpVectorShuffle %10 %17 %17 0 1 2
|
||||
%516 = OpFunctionCall %10 %94 %515
|
||||
%513 = OpFunctionCall %3 %24
|
||||
%514 = OpFunctionCall %3 %53
|
||||
%515 = OpVectorShuffle %10 %16 %16 0 1 2
|
||||
%516 = OpFunctionCall %10 %93 %515
|
||||
%517 = OpFunctionCall %2 %102
|
||||
%518 = OpFunctionCall %2 %120
|
||||
%519 = OpFunctionCall %2 %314
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 51
|
||||
; Bound: 49
|
||||
OpCapability Shader
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %28 "vertex" %26
|
||||
OpEntryPoint Vertex %26 "vertex" %24
|
||||
OpMemberName %5 0 "a"
|
||||
OpName %5 "S"
|
||||
OpMemberName %6 0 "a"
|
||||
@@ -17,10 +17,10 @@ OpName %10 "Test2"
|
||||
OpMemberName %12 0 "a"
|
||||
OpMemberName %12 1 "b"
|
||||
OpName %12 "Test3"
|
||||
OpName %16 "input1"
|
||||
OpName %19 "input2"
|
||||
OpName %22 "input3"
|
||||
OpName %28 "vertex"
|
||||
OpName %14 "input1"
|
||||
OpName %17 "input2"
|
||||
OpName %20 "input3"
|
||||
OpName %26 "vertex"
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %6 0 Offset 0
|
||||
OpMemberDecorate %6 1 Offset 16
|
||||
@@ -31,19 +31,19 @@ OpMemberDecorate %12 0 Offset 0
|
||||
OpMemberDecorate %12 0 ColMajor
|
||||
OpMemberDecorate %12 0 MatrixStride 16
|
||||
OpMemberDecorate %12 1 Offset 64
|
||||
OpDecorate %16 DescriptorSet 0
|
||||
OpDecorate %16 Binding 0
|
||||
OpDecorate %17 Block
|
||||
OpMemberDecorate %17 0 Offset 0
|
||||
OpDecorate %19 DescriptorSet 0
|
||||
OpDecorate %19 Binding 1
|
||||
OpDecorate %20 Block
|
||||
OpMemberDecorate %20 0 Offset 0
|
||||
OpDecorate %22 DescriptorSet 0
|
||||
OpDecorate %22 Binding 2
|
||||
OpDecorate %23 Block
|
||||
OpMemberDecorate %23 0 Offset 0
|
||||
OpDecorate %26 BuiltIn Position
|
||||
OpDecorate %14 DescriptorSet 0
|
||||
OpDecorate %14 Binding 0
|
||||
OpDecorate %15 Block
|
||||
OpMemberDecorate %15 0 Offset 0
|
||||
OpDecorate %17 DescriptorSet 0
|
||||
OpDecorate %17 Binding 1
|
||||
OpDecorate %18 Block
|
||||
OpMemberDecorate %18 0 Offset 0
|
||||
OpDecorate %20 DescriptorSet 0
|
||||
OpDecorate %20 Binding 2
|
||||
OpDecorate %21 Block
|
||||
OpMemberDecorate %21 0 Offset 0
|
||||
OpDecorate %24 BuiltIn Position
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 3
|
||||
@@ -56,44 +56,42 @@ OpDecorate %26 BuiltIn Position
|
||||
%11 = OpTypeMatrix %3 4
|
||||
%12 = OpTypeStruct %11 %4
|
||||
%13 = OpTypeVector %4 4
|
||||
%15 = OpTypeInt 32 1
|
||||
%14 = OpConstant %15 2
|
||||
%17 = OpTypeStruct %6
|
||||
%18 = OpTypePointer Uniform %17
|
||||
%16 = OpVariable %18 Uniform
|
||||
%20 = OpTypeStruct %10
|
||||
%21 = OpTypePointer Uniform %20
|
||||
%19 = OpVariable %21 Uniform
|
||||
%23 = OpTypeStruct %12
|
||||
%24 = OpTypePointer Uniform %23
|
||||
%22 = OpVariable %24 Uniform
|
||||
%27 = OpTypePointer Output %13
|
||||
%26 = OpVariable %27 Output
|
||||
%29 = OpTypeFunction %2
|
||||
%30 = OpTypePointer Uniform %6
|
||||
%31 = OpConstant %9 0
|
||||
%33 = OpTypePointer Uniform %10
|
||||
%35 = OpTypePointer Uniform %12
|
||||
%37 = OpConstant %4 1.0
|
||||
%40 = OpTypePointer Uniform %4
|
||||
%41 = OpConstant %9 1
|
||||
%28 = OpFunction %2 None %29
|
||||
%25 = OpLabel
|
||||
%32 = OpAccessChain %30 %16 %31
|
||||
%34 = OpAccessChain %33 %19 %31
|
||||
%36 = OpAccessChain %35 %22 %31
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%39 = OpCompositeConstruct %13 %37 %37 %37 %37
|
||||
%42 = OpAccessChain %40 %32 %41
|
||||
%43 = OpLoad %4 %42
|
||||
%44 = OpVectorTimesScalar %13 %39 %43
|
||||
%45 = OpAccessChain %40 %34 %41
|
||||
%46 = OpLoad %4 %45
|
||||
%47 = OpVectorTimesScalar %13 %44 %46
|
||||
%48 = OpAccessChain %40 %36 %41
|
||||
%49 = OpLoad %4 %48
|
||||
%50 = OpVectorTimesScalar %13 %47 %49
|
||||
OpStore %26 %50
|
||||
%15 = OpTypeStruct %6
|
||||
%16 = OpTypePointer Uniform %15
|
||||
%14 = OpVariable %16 Uniform
|
||||
%18 = OpTypeStruct %10
|
||||
%19 = OpTypePointer Uniform %18
|
||||
%17 = OpVariable %19 Uniform
|
||||
%21 = OpTypeStruct %12
|
||||
%22 = OpTypePointer Uniform %21
|
||||
%20 = OpVariable %22 Uniform
|
||||
%25 = OpTypePointer Output %13
|
||||
%24 = OpVariable %25 Output
|
||||
%27 = OpTypeFunction %2
|
||||
%28 = OpTypePointer Uniform %6
|
||||
%29 = OpConstant %9 0
|
||||
%31 = OpTypePointer Uniform %10
|
||||
%33 = OpTypePointer Uniform %12
|
||||
%35 = OpConstant %4 1.0
|
||||
%38 = OpTypePointer Uniform %4
|
||||
%39 = OpConstant %9 1
|
||||
%26 = OpFunction %2 None %27
|
||||
%23 = OpLabel
|
||||
%30 = OpAccessChain %28 %14 %29
|
||||
%32 = OpAccessChain %31 %17 %29
|
||||
%34 = OpAccessChain %33 %20 %29
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
%37 = OpCompositeConstruct %13 %35 %35 %35 %35
|
||||
%40 = OpAccessChain %38 %30 %39
|
||||
%41 = OpLoad %4 %40
|
||||
%42 = OpVectorTimesScalar %13 %37 %41
|
||||
%43 = OpAccessChain %38 %32 %39
|
||||
%44 = OpLoad %4 %43
|
||||
%45 = OpVectorTimesScalar %13 %42 %44
|
||||
%46 = OpAccessChain %38 %34 %39
|
||||
%47 = OpLoad %4 %46
|
||||
%48 = OpVectorTimesScalar %13 %45 %47
|
||||
OpStore %24 %48
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -9,69 +9,69 @@ OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpMemberName %7 0 "arr"
|
||||
OpName %7 "DynamicArray"
|
||||
OpName %10 "dynamic_array"
|
||||
OpName %11 "v"
|
||||
OpName %15 "f"
|
||||
OpName %23 "i"
|
||||
OpName %24 "v"
|
||||
OpName %25 "index_unsized"
|
||||
OpName %8 "dynamic_array"
|
||||
OpName %10 "v"
|
||||
OpName %14 "f"
|
||||
OpName %22 "i"
|
||||
OpName %23 "v"
|
||||
OpName %24 "index_unsized"
|
||||
OpName %34 "i"
|
||||
OpName %35 "v"
|
||||
OpName %36 "index_dynamic_array"
|
||||
OpDecorate %6 ArrayStride 4
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
OpDecorate %7 Block
|
||||
OpDecorate %10 DescriptorSet 0
|
||||
OpDecorate %10 Binding 0
|
||||
OpDecorate %8 DescriptorSet 0
|
||||
OpDecorate %8 Binding 0
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeInt 32 1
|
||||
%3 = OpTypeVector %4 2
|
||||
%5 = OpTypeInt 32 0
|
||||
%6 = OpTypeRuntimeArray %5
|
||||
%7 = OpTypeStruct %6
|
||||
%8 = OpTypePointer StorageBuffer %7
|
||||
%9 = OpTypePointer StorageBuffer %6
|
||||
%10 = OpVariable %8 StorageBuffer
|
||||
%12 = OpTypePointer Function %3
|
||||
%13 = OpConstantNull %3
|
||||
%16 = OpTypeFunction %2
|
||||
%17 = OpConstant %4 10
|
||||
%19 = OpTypePointer Function %4
|
||||
%20 = OpConstant %5 0
|
||||
%26 = OpTypeFunction %2 %4 %5
|
||||
%9 = OpTypePointer StorageBuffer %7
|
||||
%8 = OpVariable %9 StorageBuffer
|
||||
%11 = OpTypePointer Function %3
|
||||
%12 = OpConstantNull %3
|
||||
%15 = OpTypeFunction %2
|
||||
%16 = OpConstant %4 10
|
||||
%18 = OpTypePointer Function %4
|
||||
%19 = OpConstant %5 0
|
||||
%25 = OpTypeFunction %2 %4 %5
|
||||
%27 = OpTypePointer StorageBuffer %6
|
||||
%28 = OpTypePointer StorageBuffer %5
|
||||
%15 = OpFunction %2 None %16
|
||||
%14 = OpLabel
|
||||
%11 = OpVariable %12 Function %13
|
||||
OpBranch %18
|
||||
%18 = OpLabel
|
||||
%21 = OpAccessChain %19 %11 %20
|
||||
OpStore %21 %17
|
||||
%14 = OpFunction %2 None %15
|
||||
%13 = OpLabel
|
||||
%10 = OpVariable %11 Function %12
|
||||
OpBranch %17
|
||||
%17 = OpLabel
|
||||
%20 = OpAccessChain %18 %10 %19
|
||||
OpStore %20 %16
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%25 = OpFunction %2 None %26
|
||||
%23 = OpFunctionParameter %4
|
||||
%24 = OpFunctionParameter %5
|
||||
%22 = OpLabel
|
||||
OpBranch %27
|
||||
%27 = OpLabel
|
||||
%29 = OpAccessChain %28 %10 %20 %23
|
||||
%24 = OpFunction %2 None %25
|
||||
%22 = OpFunctionParameter %4
|
||||
%23 = OpFunctionParameter %5
|
||||
%21 = OpLabel
|
||||
OpBranch %26
|
||||
%26 = OpLabel
|
||||
%29 = OpAccessChain %28 %8 %19 %22
|
||||
%30 = OpLoad %5 %29
|
||||
%31 = OpIAdd %5 %30 %24
|
||||
%32 = OpAccessChain %28 %10 %20 %23
|
||||
%31 = OpIAdd %5 %30 %23
|
||||
%32 = OpAccessChain %28 %8 %19 %22
|
||||
OpStore %32 %31
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%36 = OpFunction %2 None %26
|
||||
%36 = OpFunction %2 None %25
|
||||
%34 = OpFunctionParameter %4
|
||||
%35 = OpFunctionParameter %5
|
||||
%33 = OpLabel
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
%38 = OpAccessChain %28 %10 %20 %34
|
||||
%38 = OpAccessChain %28 %8 %19 %34
|
||||
%39 = OpLoad %5 %38
|
||||
%40 = OpIAdd %5 %39 %35
|
||||
%41 = OpAccessChain %28 %10 %20 %34
|
||||
%41 = OpAccessChain %28 %8 %19 %34
|
||||
OpStore %41 %40
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 106
|
||||
; Bound: 101
|
||||
OpCapability Shader
|
||||
OpCapability ImageQuery
|
||||
OpCapability Linkage
|
||||
@@ -12,16 +12,16 @@ OpMemberName %8 0 "a"
|
||||
OpName %8 "InStorage"
|
||||
OpMemberName %11 0 "a"
|
||||
OpName %11 "InUniform"
|
||||
OpName %26 "in_storage"
|
||||
OpName %29 "in_uniform"
|
||||
OpName %32 "image_2d_array"
|
||||
OpName %34 "in_workgroup"
|
||||
OpName %36 "in_private"
|
||||
OpName %39 "in_function"
|
||||
OpName %43 "c"
|
||||
OpName %44 "i"
|
||||
OpName %45 "l"
|
||||
OpName %46 "mock_function"
|
||||
OpName %21 "in_storage"
|
||||
OpName %24 "in_uniform"
|
||||
OpName %27 "image_2d_array"
|
||||
OpName %29 "in_workgroup"
|
||||
OpName %31 "in_private"
|
||||
OpName %34 "in_function"
|
||||
OpName %38 "c"
|
||||
OpName %39 "i"
|
||||
OpName %40 "l"
|
||||
OpName %41 "mock_function"
|
||||
OpDecorate %5 ArrayStride 16
|
||||
OpMemberDecorate %8 0 Offset 0
|
||||
OpDecorate %9 ArrayStride 16
|
||||
@@ -29,17 +29,17 @@ OpMemberDecorate %11 0 Offset 0
|
||||
OpDecorate %13 ArrayStride 4
|
||||
OpDecorate %15 ArrayStride 4
|
||||
OpDecorate %19 ArrayStride 16
|
||||
OpDecorate %26 NonWritable
|
||||
OpDecorate %26 DescriptorSet 0
|
||||
OpDecorate %26 Binding 0
|
||||
OpDecorate %27 Block
|
||||
OpMemberDecorate %27 0 Offset 0
|
||||
OpDecorate %29 DescriptorSet 0
|
||||
OpDecorate %29 Binding 1
|
||||
OpDecorate %30 Block
|
||||
OpMemberDecorate %30 0 Offset 0
|
||||
OpDecorate %32 DescriptorSet 0
|
||||
OpDecorate %32 Binding 2
|
||||
OpDecorate %21 NonWritable
|
||||
OpDecorate %21 DescriptorSet 0
|
||||
OpDecorate %21 Binding 0
|
||||
OpDecorate %22 Block
|
||||
OpMemberDecorate %22 0 Offset 0
|
||||
OpDecorate %24 DescriptorSet 0
|
||||
OpDecorate %24 Binding 1
|
||||
OpDecorate %25 Block
|
||||
OpMemberDecorate %25 0 Offset 0
|
||||
OpDecorate %27 DescriptorSet 0
|
||||
OpDecorate %27 Binding 2
|
||||
%2 = OpTypeVoid
|
||||
%4 = OpTypeFloat 32
|
||||
%3 = OpTypeVector %4 4
|
||||
@@ -59,96 +59,91 @@ OpDecorate %32 Binding 2
|
||||
%17 = OpTypeVector %18 2
|
||||
%20 = OpConstant %7 2
|
||||
%19 = OpTypeArray %3 %20
|
||||
%21 = OpConstant %18 10
|
||||
%22 = OpConstant %18 20
|
||||
%23 = OpConstant %18 30
|
||||
%24 = OpConstant %18 40
|
||||
%25 = OpConstant %18 2
|
||||
%27 = OpTypeStruct %8
|
||||
%28 = OpTypePointer StorageBuffer %27
|
||||
%26 = OpVariable %28 StorageBuffer
|
||||
%30 = OpTypeStruct %11
|
||||
%31 = OpTypePointer Uniform %30
|
||||
%29 = OpVariable %31 Uniform
|
||||
%33 = OpTypePointer UniformConstant %12
|
||||
%32 = OpVariable %33 UniformConstant
|
||||
%35 = OpTypePointer Workgroup %13
|
||||
%34 = OpVariable %35 Workgroup
|
||||
%37 = OpTypePointer Private %15
|
||||
%38 = OpConstantNull %15
|
||||
%36 = OpVariable %37 Private %38
|
||||
%40 = OpTypePointer Function %19
|
||||
%41 = OpConstantNull %19
|
||||
%47 = OpTypeFunction %3 %17 %18 %18
|
||||
%48 = OpTypePointer StorageBuffer %8
|
||||
%49 = OpConstant %7 0
|
||||
%51 = OpTypePointer Uniform %11
|
||||
%54 = OpConstant %4 0.707
|
||||
%55 = OpConstant %4 0.0
|
||||
%56 = OpConstant %4 1.0
|
||||
%61 = OpTypePointer StorageBuffer %5
|
||||
%62 = OpTypePointer StorageBuffer %3
|
||||
%65 = OpTypePointer Uniform %9
|
||||
%66 = OpTypePointer Uniform %3
|
||||
%70 = OpTypeVector %18 3
|
||||
%72 = OpTypeBool
|
||||
%73 = OpConstantNull %3
|
||||
%79 = OpTypeVector %72 3
|
||||
%86 = OpTypePointer Workgroup %4
|
||||
%87 = OpConstant %7 29
|
||||
%93 = OpTypePointer Private %4
|
||||
%94 = OpConstant %7 39
|
||||
%100 = OpTypePointer Function %3
|
||||
%101 = OpConstant %7 1
|
||||
%46 = OpFunction %3 None %47
|
||||
%43 = OpFunctionParameter %17
|
||||
%44 = OpFunctionParameter %18
|
||||
%45 = OpFunctionParameter %18
|
||||
%42 = OpLabel
|
||||
%39 = OpVariable %40 Function %41
|
||||
%50 = OpAccessChain %48 %26 %49
|
||||
%52 = OpAccessChain %51 %29 %49
|
||||
%53 = OpLoad %12 %32
|
||||
OpBranch %57
|
||||
%57 = OpLabel
|
||||
%58 = OpCompositeConstruct %3 %54 %55 %55 %56
|
||||
%59 = OpCompositeConstruct %3 %55 %54 %55 %56
|
||||
%60 = OpCompositeConstruct %19 %58 %59
|
||||
OpStore %39 %60
|
||||
%63 = OpAccessChain %62 %50 %49 %44
|
||||
%64 = OpLoad %3 %63
|
||||
%67 = OpAccessChain %66 %52 %49 %44
|
||||
%68 = OpLoad %3 %67
|
||||
%69 = OpFAdd %3 %64 %68
|
||||
%71 = OpCompositeConstruct %70 %43 %44
|
||||
%74 = OpImageQueryLevels %18 %53
|
||||
%75 = OpULessThan %72 %45 %74
|
||||
OpSelectionMerge %76 None
|
||||
OpBranchConditional %75 %77 %76
|
||||
%22 = OpTypeStruct %8
|
||||
%23 = OpTypePointer StorageBuffer %22
|
||||
%21 = OpVariable %23 StorageBuffer
|
||||
%25 = OpTypeStruct %11
|
||||
%26 = OpTypePointer Uniform %25
|
||||
%24 = OpVariable %26 Uniform
|
||||
%28 = OpTypePointer UniformConstant %12
|
||||
%27 = OpVariable %28 UniformConstant
|
||||
%30 = OpTypePointer Workgroup %13
|
||||
%29 = OpVariable %30 Workgroup
|
||||
%32 = OpTypePointer Private %15
|
||||
%33 = OpConstantNull %15
|
||||
%31 = OpVariable %32 Private %33
|
||||
%35 = OpTypePointer Function %19
|
||||
%36 = OpConstantNull %19
|
||||
%42 = OpTypeFunction %3 %17 %18 %18
|
||||
%43 = OpTypePointer StorageBuffer %8
|
||||
%44 = OpConstant %7 0
|
||||
%46 = OpTypePointer Uniform %11
|
||||
%49 = OpConstant %4 0.707
|
||||
%50 = OpConstant %4 0.0
|
||||
%51 = OpConstant %4 1.0
|
||||
%56 = OpTypePointer StorageBuffer %5
|
||||
%57 = OpTypePointer StorageBuffer %3
|
||||
%60 = OpTypePointer Uniform %9
|
||||
%61 = OpTypePointer Uniform %3
|
||||
%65 = OpTypeVector %18 3
|
||||
%67 = OpTypeBool
|
||||
%68 = OpConstantNull %3
|
||||
%74 = OpTypeVector %67 3
|
||||
%81 = OpTypePointer Workgroup %4
|
||||
%82 = OpConstant %7 29
|
||||
%88 = OpTypePointer Private %4
|
||||
%89 = OpConstant %7 39
|
||||
%95 = OpTypePointer Function %3
|
||||
%96 = OpConstant %7 1
|
||||
%41 = OpFunction %3 None %42
|
||||
%38 = OpFunctionParameter %17
|
||||
%39 = OpFunctionParameter %18
|
||||
%40 = OpFunctionParameter %18
|
||||
%37 = OpLabel
|
||||
%34 = OpVariable %35 Function %36
|
||||
%45 = OpAccessChain %43 %21 %44
|
||||
%47 = OpAccessChain %46 %24 %44
|
||||
%48 = OpLoad %12 %27
|
||||
OpBranch %52
|
||||
%52 = OpLabel
|
||||
%53 = OpCompositeConstruct %3 %49 %50 %50 %51
|
||||
%54 = OpCompositeConstruct %3 %50 %49 %50 %51
|
||||
%55 = OpCompositeConstruct %19 %53 %54
|
||||
OpStore %34 %55
|
||||
%58 = OpAccessChain %57 %45 %44 %39
|
||||
%59 = OpLoad %3 %58
|
||||
%62 = OpAccessChain %61 %47 %44 %39
|
||||
%63 = OpLoad %3 %62
|
||||
%64 = OpFAdd %3 %59 %63
|
||||
%66 = OpCompositeConstruct %65 %38 %39
|
||||
%69 = OpImageQueryLevels %18 %48
|
||||
%70 = OpULessThan %67 %40 %69
|
||||
OpSelectionMerge %71 None
|
||||
OpBranchConditional %70 %72 %71
|
||||
%72 = OpLabel
|
||||
%73 = OpImageQuerySizeLod %65 %48 %40
|
||||
%75 = OpULessThan %74 %66 %73
|
||||
%76 = OpAll %67 %75
|
||||
OpBranchConditional %76 %77 %71
|
||||
%77 = OpLabel
|
||||
%78 = OpImageQuerySizeLod %70 %53 %45
|
||||
%80 = OpULessThan %79 %71 %78
|
||||
%81 = OpAll %72 %80
|
||||
OpBranchConditional %81 %82 %76
|
||||
%82 = OpLabel
|
||||
%83 = OpImageFetch %3 %53 %71 Lod %45
|
||||
OpBranch %76
|
||||
%76 = OpLabel
|
||||
%84 = OpPhi %3 %73 %57 %73 %77 %83 %82
|
||||
%85 = OpFAdd %3 %69 %84
|
||||
%88 = OpExtInst %7 %1 UMin %44 %87
|
||||
%89 = OpAccessChain %86 %34 %88
|
||||
%90 = OpLoad %4 %89
|
||||
%91 = OpCompositeConstruct %3 %90 %90 %90 %90
|
||||
%92 = OpFAdd %3 %85 %91
|
||||
%95 = OpExtInst %7 %1 UMin %44 %94
|
||||
%96 = OpAccessChain %93 %36 %95
|
||||
%97 = OpLoad %4 %96
|
||||
%98 = OpCompositeConstruct %3 %97 %97 %97 %97
|
||||
%99 = OpFAdd %3 %92 %98
|
||||
%102 = OpExtInst %7 %1 UMin %44 %101
|
||||
%103 = OpAccessChain %100 %39 %102
|
||||
%104 = OpLoad %3 %103
|
||||
%105 = OpFAdd %3 %99 %104
|
||||
OpReturnValue %105
|
||||
%78 = OpImageFetch %3 %48 %66 Lod %40
|
||||
OpBranch %71
|
||||
%71 = OpLabel
|
||||
%79 = OpPhi %3 %68 %52 %68 %72 %78 %77
|
||||
%80 = OpFAdd %3 %64 %79
|
||||
%83 = OpExtInst %7 %1 UMin %39 %82
|
||||
%84 = OpAccessChain %81 %29 %83
|
||||
%85 = OpLoad %4 %84
|
||||
%86 = OpCompositeConstruct %3 %85 %85 %85 %85
|
||||
%87 = OpFAdd %3 %80 %86
|
||||
%90 = OpExtInst %7 %1 UMin %39 %89
|
||||
%91 = OpAccessChain %88 %31 %90
|
||||
%92 = OpLoad %4 %91
|
||||
%93 = OpCompositeConstruct %3 %92 %92 %92 %92
|
||||
%94 = OpFAdd %3 %87 %93
|
||||
%97 = OpExtInst %7 %1 UMin %39 %96
|
||||
%98 = OpAccessChain %95 %34 %97
|
||||
%99 = OpLoad %3 %98
|
||||
%100 = OpFAdd %3 %94 %99
|
||||
OpReturnValue %100
|
||||
OpFunctionEnd
|
||||
@@ -1,24 +1,9 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 10
|
||||
; Bound: 3
|
||||
OpCapability Shader
|
||||
OpCapability Linkage
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpMemberDecorate %5 0 Offset 0
|
||||
OpMemberDecorate %5 1 Offset 16
|
||||
OpDecorate %6 ArrayStride 32
|
||||
OpMemberDecorate %7 0 Offset 0
|
||||
OpDecorate %7 Block
|
||||
OpDecorate %8 ArrayStride 4
|
||||
OpMemberDecorate %9 0 Offset 0
|
||||
OpDecorate %9 Block
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeFloat 32
|
||||
%4 = OpTypeVector %3 4
|
||||
%5 = OpTypeStruct %3 %4
|
||||
%6 = OpTypeRuntimeArray %5
|
||||
%7 = OpTypeStruct %6
|
||||
%8 = OpTypeRuntimeArray %3
|
||||
%9 = OpTypeStruct %8
|
||||
%2 = OpTypeVoid
|
||||
@@ -1,16 +1,16 @@
|
||||
; SPIR-V
|
||||
; Version: 1.2
|
||||
; Generator: rspirv
|
||||
; Bound: 268
|
||||
; Bound: 267
|
||||
OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %88 "vs_main" %78 %81 %83 %85 %87
|
||||
OpEntryPoint Fragment %148 "fs_main" %139 %142 %145 %147
|
||||
OpEntryPoint Fragment %215 "fs_main_without_storage" %208 %210 %212 %214
|
||||
OpExecutionMode %148 OriginUpperLeft
|
||||
OpExecutionMode %215 OriginUpperLeft
|
||||
OpEntryPoint Vertex %87 "vs_main" %77 %80 %82 %84 %86
|
||||
OpEntryPoint Fragment %147 "fs_main" %138 %141 %144 %146
|
||||
OpEntryPoint Fragment %214 "fs_main_without_storage" %207 %209 %211 %213
|
||||
OpExecutionMode %147 OriginUpperLeft
|
||||
OpExecutionMode %214 OriginUpperLeft
|
||||
OpMemberName %8 0 "view_proj"
|
||||
OpMemberName %8 1 "num_lights"
|
||||
OpName %8 "Globals"
|
||||
@@ -25,36 +25,36 @@ OpMemberName %15 0 "proj"
|
||||
OpMemberName %15 1 "pos"
|
||||
OpMemberName %15 2 "color"
|
||||
OpName %15 "Light"
|
||||
OpName %24 "c_ambient"
|
||||
OpName %23 "c_ambient"
|
||||
OpName %18 "c_max_lights"
|
||||
OpName %25 "u_globals"
|
||||
OpName %28 "u_entity"
|
||||
OpName %31 "s_lights"
|
||||
OpName %34 "u_lights"
|
||||
OpName %37 "t_shadow"
|
||||
OpName %39 "sampler_shadow"
|
||||
OpName %42 "light_id"
|
||||
OpName %43 "homogeneous_coords"
|
||||
OpName %44 "fetch_shadow"
|
||||
OpName %74 "out"
|
||||
OpName %78 "position"
|
||||
OpName %81 "normal"
|
||||
OpName %83 "proj_position"
|
||||
OpName %85 "world_normal"
|
||||
OpName %87 "world_position"
|
||||
OpName %88 "vs_main"
|
||||
OpName %132 "color"
|
||||
OpName %134 "i"
|
||||
OpName %139 "proj_position"
|
||||
OpName %142 "world_normal"
|
||||
OpName %145 "world_position"
|
||||
OpName %148 "fs_main"
|
||||
OpName %204 "color"
|
||||
OpName %205 "i"
|
||||
OpName %208 "proj_position"
|
||||
OpName %210 "world_normal"
|
||||
OpName %212 "world_position"
|
||||
OpName %215 "fs_main_without_storage"
|
||||
OpName %24 "u_globals"
|
||||
OpName %27 "u_entity"
|
||||
OpName %30 "s_lights"
|
||||
OpName %33 "u_lights"
|
||||
OpName %36 "t_shadow"
|
||||
OpName %38 "sampler_shadow"
|
||||
OpName %41 "light_id"
|
||||
OpName %42 "homogeneous_coords"
|
||||
OpName %43 "fetch_shadow"
|
||||
OpName %73 "out"
|
||||
OpName %77 "position"
|
||||
OpName %80 "normal"
|
||||
OpName %82 "proj_position"
|
||||
OpName %84 "world_normal"
|
||||
OpName %86 "world_position"
|
||||
OpName %87 "vs_main"
|
||||
OpName %131 "color"
|
||||
OpName %133 "i"
|
||||
OpName %138 "proj_position"
|
||||
OpName %141 "world_normal"
|
||||
OpName %144 "world_position"
|
||||
OpName %147 "fs_main"
|
||||
OpName %203 "color"
|
||||
OpName %204 "i"
|
||||
OpName %207 "proj_position"
|
||||
OpName %209 "world_normal"
|
||||
OpName %211 "world_position"
|
||||
OpName %214 "fs_main_without_storage"
|
||||
OpMemberDecorate %8 0 Offset 0
|
||||
OpMemberDecorate %8 0 ColMajor
|
||||
OpMemberDecorate %8 0 MatrixStride 16
|
||||
@@ -73,40 +73,40 @@ OpMemberDecorate %15 1 Offset 64
|
||||
OpMemberDecorate %15 2 Offset 80
|
||||
OpDecorate %16 ArrayStride 96
|
||||
OpDecorate %17 ArrayStride 96
|
||||
OpDecorate %25 DescriptorSet 0
|
||||
OpDecorate %25 Binding 0
|
||||
OpDecorate %26 Block
|
||||
OpMemberDecorate %26 0 Offset 0
|
||||
OpDecorate %28 DescriptorSet 1
|
||||
OpDecorate %28 Binding 0
|
||||
OpDecorate %29 Block
|
||||
OpMemberDecorate %29 0 Offset 0
|
||||
OpDecorate %31 NonWritable
|
||||
OpDecorate %31 DescriptorSet 0
|
||||
OpDecorate %31 Binding 1
|
||||
OpDecorate %32 Block
|
||||
OpMemberDecorate %32 0 Offset 0
|
||||
OpDecorate %34 DescriptorSet 0
|
||||
OpDecorate %34 Binding 1
|
||||
OpDecorate %35 Block
|
||||
OpMemberDecorate %35 0 Offset 0
|
||||
OpDecorate %37 DescriptorSet 0
|
||||
OpDecorate %37 Binding 2
|
||||
OpDecorate %39 DescriptorSet 0
|
||||
OpDecorate %39 Binding 3
|
||||
OpDecorate %78 Location 0
|
||||
OpDecorate %81 Location 1
|
||||
OpDecorate %83 BuiltIn Position
|
||||
OpDecorate %85 Location 0
|
||||
OpDecorate %87 Location 1
|
||||
OpDecorate %139 BuiltIn FragCoord
|
||||
OpDecorate %142 Location 0
|
||||
OpDecorate %145 Location 1
|
||||
OpDecorate %147 Location 0
|
||||
OpDecorate %208 BuiltIn FragCoord
|
||||
OpDecorate %210 Location 0
|
||||
OpDecorate %212 Location 1
|
||||
OpDecorate %214 Location 0
|
||||
OpDecorate %24 DescriptorSet 0
|
||||
OpDecorate %24 Binding 0
|
||||
OpDecorate %25 Block
|
||||
OpMemberDecorate %25 0 Offset 0
|
||||
OpDecorate %27 DescriptorSet 1
|
||||
OpDecorate %27 Binding 0
|
||||
OpDecorate %28 Block
|
||||
OpMemberDecorate %28 0 Offset 0
|
||||
OpDecorate %30 NonWritable
|
||||
OpDecorate %30 DescriptorSet 0
|
||||
OpDecorate %30 Binding 1
|
||||
OpDecorate %31 Block
|
||||
OpMemberDecorate %31 0 Offset 0
|
||||
OpDecorate %33 DescriptorSet 0
|
||||
OpDecorate %33 Binding 1
|
||||
OpDecorate %34 Block
|
||||
OpMemberDecorate %34 0 Offset 0
|
||||
OpDecorate %36 DescriptorSet 0
|
||||
OpDecorate %36 Binding 2
|
||||
OpDecorate %38 DescriptorSet 0
|
||||
OpDecorate %38 Binding 3
|
||||
OpDecorate %77 Location 0
|
||||
OpDecorate %80 Location 1
|
||||
OpDecorate %82 BuiltIn Position
|
||||
OpDecorate %84 Location 0
|
||||
OpDecorate %86 Location 1
|
||||
OpDecorate %138 BuiltIn FragCoord
|
||||
OpDecorate %141 Location 0
|
||||
OpDecorate %144 Location 1
|
||||
OpDecorate %146 Location 0
|
||||
OpDecorate %207 BuiltIn FragCoord
|
||||
OpDecorate %209 Location 0
|
||||
OpDecorate %211 Location 1
|
||||
OpDecorate %213 Location 0
|
||||
%2 = OpTypeVoid
|
||||
%5 = OpTypeFloat 32
|
||||
%4 = OpTypeVector %5 4
|
||||
@@ -127,301 +127,300 @@ OpDecorate %214 Location 0
|
||||
%19 = OpTypeImage %5 2D 1 1 0 1 Unknown
|
||||
%20 = OpTypeSampler
|
||||
%21 = OpTypeVector %5 2
|
||||
%22 = OpConstant %13 10
|
||||
%23 = OpConstant %5 0.05
|
||||
%24 = OpConstantComposite %10 %23 %23 %23
|
||||
%26 = OpTypeStruct %8
|
||||
%27 = OpTypePointer Uniform %26
|
||||
%25 = OpVariable %27 Uniform
|
||||
%29 = OpTypeStruct %9
|
||||
%30 = OpTypePointer Uniform %29
|
||||
%28 = OpVariable %30 Uniform
|
||||
%32 = OpTypeStruct %16
|
||||
%33 = OpTypePointer StorageBuffer %32
|
||||
%31 = OpVariable %33 StorageBuffer
|
||||
%35 = OpTypeStruct %17
|
||||
%36 = OpTypePointer Uniform %35
|
||||
%34 = OpVariable %36 Uniform
|
||||
%38 = OpTypePointer UniformConstant %19
|
||||
%37 = OpVariable %38 UniformConstant
|
||||
%40 = OpTypePointer UniformConstant %20
|
||||
%39 = OpVariable %40 UniformConstant
|
||||
%45 = OpTypeFunction %5 %7 %4
|
||||
%48 = OpConstant %5 0.0
|
||||
%49 = OpConstant %5 1.0
|
||||
%50 = OpConstant %5 0.5
|
||||
%51 = OpConstant %5 -0.5
|
||||
%54 = OpTypeBool
|
||||
%69 = OpTypeSampledImage %19
|
||||
%75 = OpTypePointer Function %11
|
||||
%76 = OpConstantNull %11
|
||||
%79 = OpTypePointer Input %12
|
||||
%78 = OpVariable %79 Input
|
||||
%81 = OpVariable %79 Input
|
||||
%84 = OpTypePointer Output %4
|
||||
%83 = OpVariable %84 Output
|
||||
%86 = OpTypePointer Output %10
|
||||
%85 = OpVariable %86 Output
|
||||
%87 = OpVariable %84 Output
|
||||
%89 = OpTypeFunction %2
|
||||
%90 = OpTypePointer Uniform %8
|
||||
%91 = OpConstant %7 0
|
||||
%93 = OpTypePointer Uniform %9
|
||||
%96 = OpTypePointer Uniform %3
|
||||
%103 = OpTypePointer Function %10
|
||||
%111 = OpTypeVector %13 3
|
||||
%115 = OpConstant %7 1
|
||||
%117 = OpTypePointer Function %4
|
||||
%118 = OpConstant %7 2
|
||||
%126 = OpTypePointer Output %5
|
||||
%133 = OpConstantNull %10
|
||||
%135 = OpTypePointer Function %7
|
||||
%136 = OpConstantNull %7
|
||||
%140 = OpTypePointer Input %4
|
||||
%139 = OpVariable %140 Input
|
||||
%143 = OpTypePointer Input %10
|
||||
%142 = OpVariable %143 Input
|
||||
%145 = OpVariable %140 Input
|
||||
%147 = OpVariable %84 Output
|
||||
%151 = OpTypePointer StorageBuffer %16
|
||||
%163 = OpTypePointer Uniform %6
|
||||
%164 = OpTypePointer Uniform %7
|
||||
%174 = OpTypePointer StorageBuffer %15
|
||||
%200 = OpTypePointer Uniform %4
|
||||
%208 = OpVariable %140 Input
|
||||
%210 = OpVariable %143 Input
|
||||
%212 = OpVariable %140 Input
|
||||
%214 = OpVariable %84 Output
|
||||
%218 = OpTypePointer Uniform %17
|
||||
%239 = OpTypePointer Uniform %15
|
||||
%44 = OpFunction %5 None %45
|
||||
%42 = OpFunctionParameter %7
|
||||
%43 = OpFunctionParameter %4
|
||||
%41 = OpLabel
|
||||
%46 = OpLoad %19 %37
|
||||
%47 = OpLoad %20 %39
|
||||
OpBranch %52
|
||||
%52 = OpLabel
|
||||
%53 = OpCompositeExtract %5 %43 3
|
||||
%55 = OpFOrdLessThanEqual %54 %53 %48
|
||||
OpSelectionMerge %56 None
|
||||
OpBranchConditional %55 %57 %56
|
||||
%57 = OpLabel
|
||||
OpReturnValue %49
|
||||
%22 = OpConstant %5 0.05
|
||||
%23 = OpConstantComposite %10 %22 %22 %22
|
||||
%25 = OpTypeStruct %8
|
||||
%26 = OpTypePointer Uniform %25
|
||||
%24 = OpVariable %26 Uniform
|
||||
%28 = OpTypeStruct %9
|
||||
%29 = OpTypePointer Uniform %28
|
||||
%27 = OpVariable %29 Uniform
|
||||
%31 = OpTypeStruct %16
|
||||
%32 = OpTypePointer StorageBuffer %31
|
||||
%30 = OpVariable %32 StorageBuffer
|
||||
%34 = OpTypeStruct %17
|
||||
%35 = OpTypePointer Uniform %34
|
||||
%33 = OpVariable %35 Uniform
|
||||
%37 = OpTypePointer UniformConstant %19
|
||||
%36 = OpVariable %37 UniformConstant
|
||||
%39 = OpTypePointer UniformConstant %20
|
||||
%38 = OpVariable %39 UniformConstant
|
||||
%44 = OpTypeFunction %5 %7 %4
|
||||
%47 = OpConstant %5 0.0
|
||||
%48 = OpConstant %5 1.0
|
||||
%49 = OpConstant %5 0.5
|
||||
%50 = OpConstant %5 -0.5
|
||||
%53 = OpTypeBool
|
||||
%68 = OpTypeSampledImage %19
|
||||
%74 = OpTypePointer Function %11
|
||||
%75 = OpConstantNull %11
|
||||
%78 = OpTypePointer Input %12
|
||||
%77 = OpVariable %78 Input
|
||||
%80 = OpVariable %78 Input
|
||||
%83 = OpTypePointer Output %4
|
||||
%82 = OpVariable %83 Output
|
||||
%85 = OpTypePointer Output %10
|
||||
%84 = OpVariable %85 Output
|
||||
%86 = OpVariable %83 Output
|
||||
%88 = OpTypeFunction %2
|
||||
%89 = OpTypePointer Uniform %8
|
||||
%90 = OpConstant %7 0
|
||||
%92 = OpTypePointer Uniform %9
|
||||
%95 = OpTypePointer Uniform %3
|
||||
%102 = OpTypePointer Function %10
|
||||
%110 = OpTypeVector %13 3
|
||||
%114 = OpConstant %7 1
|
||||
%116 = OpTypePointer Function %4
|
||||
%117 = OpConstant %7 2
|
||||
%125 = OpTypePointer Output %5
|
||||
%132 = OpConstantNull %10
|
||||
%134 = OpTypePointer Function %7
|
||||
%135 = OpConstantNull %7
|
||||
%139 = OpTypePointer Input %4
|
||||
%138 = OpVariable %139 Input
|
||||
%142 = OpTypePointer Input %10
|
||||
%141 = OpVariable %142 Input
|
||||
%144 = OpVariable %139 Input
|
||||
%146 = OpVariable %83 Output
|
||||
%150 = OpTypePointer StorageBuffer %16
|
||||
%162 = OpTypePointer Uniform %6
|
||||
%163 = OpTypePointer Uniform %7
|
||||
%173 = OpTypePointer StorageBuffer %15
|
||||
%199 = OpTypePointer Uniform %4
|
||||
%207 = OpVariable %139 Input
|
||||
%209 = OpVariable %142 Input
|
||||
%211 = OpVariable %139 Input
|
||||
%213 = OpVariable %83 Output
|
||||
%217 = OpTypePointer Uniform %17
|
||||
%238 = OpTypePointer Uniform %15
|
||||
%43 = OpFunction %5 None %44
|
||||
%41 = OpFunctionParameter %7
|
||||
%42 = OpFunctionParameter %4
|
||||
%40 = OpLabel
|
||||
%45 = OpLoad %19 %36
|
||||
%46 = OpLoad %20 %38
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
%52 = OpCompositeExtract %5 %42 3
|
||||
%54 = OpFOrdLessThanEqual %53 %52 %47
|
||||
OpSelectionMerge %55 None
|
||||
OpBranchConditional %54 %56 %55
|
||||
%56 = OpLabel
|
||||
%58 = OpCompositeConstruct %21 %50 %51
|
||||
%59 = OpCompositeExtract %5 %43 3
|
||||
%60 = OpFDiv %5 %49 %59
|
||||
%61 = OpVectorShuffle %21 %43 %43 0 1
|
||||
%62 = OpFMul %21 %61 %58
|
||||
%63 = OpVectorTimesScalar %21 %62 %60
|
||||
%64 = OpCompositeConstruct %21 %50 %50
|
||||
%65 = OpFAdd %21 %63 %64
|
||||
%66 = OpBitcast %13 %42
|
||||
%67 = OpCompositeExtract %5 %43 2
|
||||
%68 = OpFMul %5 %67 %60
|
||||
%70 = OpConvertSToF %5 %66
|
||||
%71 = OpCompositeConstruct %10 %65 %70
|
||||
%72 = OpSampledImage %69 %46 %47
|
||||
%73 = OpImageSampleDrefExplicitLod %5 %72 %71 %68 Lod %48
|
||||
OpReturnValue %73
|
||||
OpReturnValue %48
|
||||
%55 = OpLabel
|
||||
%57 = OpCompositeConstruct %21 %49 %50
|
||||
%58 = OpCompositeExtract %5 %42 3
|
||||
%59 = OpFDiv %5 %48 %58
|
||||
%60 = OpVectorShuffle %21 %42 %42 0 1
|
||||
%61 = OpFMul %21 %60 %57
|
||||
%62 = OpVectorTimesScalar %21 %61 %59
|
||||
%63 = OpCompositeConstruct %21 %49 %49
|
||||
%64 = OpFAdd %21 %62 %63
|
||||
%65 = OpBitcast %13 %41
|
||||
%66 = OpCompositeExtract %5 %42 2
|
||||
%67 = OpFMul %5 %66 %59
|
||||
%69 = OpConvertSToF %5 %65
|
||||
%70 = OpCompositeConstruct %10 %64 %69
|
||||
%71 = OpSampledImage %68 %45 %46
|
||||
%72 = OpImageSampleDrefExplicitLod %5 %71 %70 %67 Lod %47
|
||||
OpReturnValue %72
|
||||
OpFunctionEnd
|
||||
%88 = OpFunction %2 None %89
|
||||
%77 = OpLabel
|
||||
%74 = OpVariable %75 Function %76
|
||||
%80 = OpLoad %12 %78
|
||||
%82 = OpLoad %12 %81
|
||||
%92 = OpAccessChain %90 %25 %91
|
||||
%94 = OpAccessChain %93 %28 %91
|
||||
OpBranch %95
|
||||
%95 = OpLabel
|
||||
%97 = OpAccessChain %96 %94 %91
|
||||
%98 = OpLoad %3 %97
|
||||
%99 = OpAccessChain %96 %94 %91
|
||||
%100 = OpLoad %3 %99
|
||||
%101 = OpConvertSToF %4 %80
|
||||
%102 = OpMatrixTimesVector %4 %100 %101
|
||||
%104 = OpCompositeExtract %4 %98 0
|
||||
%105 = OpVectorShuffle %10 %104 %104 0 1 2
|
||||
%106 = OpCompositeExtract %4 %98 1
|
||||
%107 = OpVectorShuffle %10 %106 %106 0 1 2
|
||||
%108 = OpCompositeExtract %4 %98 2
|
||||
%109 = OpVectorShuffle %10 %108 %108 0 1 2
|
||||
%110 = OpCompositeConstruct %14 %105 %107 %109
|
||||
%112 = OpVectorShuffle %111 %82 %82 0 1 2
|
||||
%113 = OpConvertSToF %10 %112
|
||||
%114 = OpMatrixTimesVector %10 %110 %113
|
||||
%116 = OpAccessChain %103 %74 %115
|
||||
OpStore %116 %114
|
||||
%119 = OpAccessChain %117 %74 %118
|
||||
OpStore %119 %102
|
||||
%120 = OpAccessChain %96 %92 %91
|
||||
%121 = OpLoad %3 %120
|
||||
%122 = OpMatrixTimesVector %4 %121 %102
|
||||
%123 = OpAccessChain %117 %74 %91
|
||||
OpStore %123 %122
|
||||
%124 = OpLoad %11 %74
|
||||
%125 = OpCompositeExtract %4 %124 0
|
||||
OpStore %83 %125
|
||||
%127 = OpAccessChain %126 %83 %115
|
||||
%128 = OpLoad %5 %127
|
||||
%129 = OpFNegate %5 %128
|
||||
OpStore %127 %129
|
||||
%130 = OpCompositeExtract %10 %124 1
|
||||
OpStore %85 %130
|
||||
%131 = OpCompositeExtract %4 %124 2
|
||||
OpStore %87 %131
|
||||
%87 = OpFunction %2 None %88
|
||||
%76 = OpLabel
|
||||
%73 = OpVariable %74 Function %75
|
||||
%79 = OpLoad %12 %77
|
||||
%81 = OpLoad %12 %80
|
||||
%91 = OpAccessChain %89 %24 %90
|
||||
%93 = OpAccessChain %92 %27 %90
|
||||
OpBranch %94
|
||||
%94 = OpLabel
|
||||
%96 = OpAccessChain %95 %93 %90
|
||||
%97 = OpLoad %3 %96
|
||||
%98 = OpAccessChain %95 %93 %90
|
||||
%99 = OpLoad %3 %98
|
||||
%100 = OpConvertSToF %4 %79
|
||||
%101 = OpMatrixTimesVector %4 %99 %100
|
||||
%103 = OpCompositeExtract %4 %97 0
|
||||
%104 = OpVectorShuffle %10 %103 %103 0 1 2
|
||||
%105 = OpCompositeExtract %4 %97 1
|
||||
%106 = OpVectorShuffle %10 %105 %105 0 1 2
|
||||
%107 = OpCompositeExtract %4 %97 2
|
||||
%108 = OpVectorShuffle %10 %107 %107 0 1 2
|
||||
%109 = OpCompositeConstruct %14 %104 %106 %108
|
||||
%111 = OpVectorShuffle %110 %81 %81 0 1 2
|
||||
%112 = OpConvertSToF %10 %111
|
||||
%113 = OpMatrixTimesVector %10 %109 %112
|
||||
%115 = OpAccessChain %102 %73 %114
|
||||
OpStore %115 %113
|
||||
%118 = OpAccessChain %116 %73 %117
|
||||
OpStore %118 %101
|
||||
%119 = OpAccessChain %95 %91 %90
|
||||
%120 = OpLoad %3 %119
|
||||
%121 = OpMatrixTimesVector %4 %120 %101
|
||||
%122 = OpAccessChain %116 %73 %90
|
||||
OpStore %122 %121
|
||||
%123 = OpLoad %11 %73
|
||||
%124 = OpCompositeExtract %4 %123 0
|
||||
OpStore %82 %124
|
||||
%126 = OpAccessChain %125 %82 %114
|
||||
%127 = OpLoad %5 %126
|
||||
%128 = OpFNegate %5 %127
|
||||
OpStore %126 %128
|
||||
%129 = OpCompositeExtract %10 %123 1
|
||||
OpStore %84 %129
|
||||
%130 = OpCompositeExtract %4 %123 2
|
||||
OpStore %86 %130
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%148 = OpFunction %2 None %89
|
||||
%137 = OpLabel
|
||||
%132 = OpVariable %103 Function %133
|
||||
%134 = OpVariable %135 Function %136
|
||||
%141 = OpLoad %4 %139
|
||||
%144 = OpLoad %10 %142
|
||||
%146 = OpLoad %4 %145
|
||||
%138 = OpCompositeConstruct %11 %141 %144 %146
|
||||
%149 = OpAccessChain %90 %25 %91
|
||||
%150 = OpAccessChain %93 %28 %91
|
||||
%152 = OpAccessChain %151 %31 %91
|
||||
%153 = OpLoad %19 %37
|
||||
%154 = OpLoad %20 %39
|
||||
OpBranch %155
|
||||
%155 = OpLabel
|
||||
%156 = OpCompositeExtract %10 %138 1
|
||||
%157 = OpExtInst %10 %1 Normalize %156
|
||||
OpStore %132 %24
|
||||
OpStore %134 %91
|
||||
OpBranch %158
|
||||
%158 = OpLabel
|
||||
OpLoopMerge %159 %161 None
|
||||
OpBranch %160
|
||||
%160 = OpLabel
|
||||
%162 = OpLoad %7 %134
|
||||
%165 = OpAccessChain %164 %149 %115 %91
|
||||
%166 = OpLoad %7 %165
|
||||
%167 = OpExtInst %7 %1 UMin %166 %18
|
||||
%168 = OpULessThan %54 %162 %167
|
||||
OpSelectionMerge %169 None
|
||||
OpBranchConditional %168 %169 %170
|
||||
%170 = OpLabel
|
||||
%147 = OpFunction %2 None %88
|
||||
%136 = OpLabel
|
||||
%131 = OpVariable %102 Function %132
|
||||
%133 = OpVariable %134 Function %135
|
||||
%140 = OpLoad %4 %138
|
||||
%143 = OpLoad %10 %141
|
||||
%145 = OpLoad %4 %144
|
||||
%137 = OpCompositeConstruct %11 %140 %143 %145
|
||||
%148 = OpAccessChain %89 %24 %90
|
||||
%149 = OpAccessChain %92 %27 %90
|
||||
%151 = OpAccessChain %150 %30 %90
|
||||
%152 = OpLoad %19 %36
|
||||
%153 = OpLoad %20 %38
|
||||
OpBranch %154
|
||||
%154 = OpLabel
|
||||
%155 = OpCompositeExtract %10 %137 1
|
||||
%156 = OpExtInst %10 %1 Normalize %155
|
||||
OpStore %131 %23
|
||||
OpStore %133 %90
|
||||
OpBranch %157
|
||||
%157 = OpLabel
|
||||
OpLoopMerge %158 %160 None
|
||||
OpBranch %159
|
||||
%159 = OpLabel
|
||||
%161 = OpLoad %7 %133
|
||||
%164 = OpAccessChain %163 %148 %114 %90
|
||||
%165 = OpLoad %7 %164
|
||||
%166 = OpExtInst %7 %1 UMin %165 %18
|
||||
%167 = OpULessThan %53 %161 %166
|
||||
OpSelectionMerge %168 None
|
||||
OpBranchConditional %167 %168 %169
|
||||
%169 = OpLabel
|
||||
OpBranch %158
|
||||
%168 = OpLabel
|
||||
OpBranch %170
|
||||
%170 = OpLabel
|
||||
%172 = OpLoad %7 %133
|
||||
%174 = OpAccessChain %173 %151 %172
|
||||
%175 = OpLoad %15 %174
|
||||
%176 = OpLoad %7 %133
|
||||
%177 = OpCompositeExtract %3 %175 0
|
||||
%178 = OpCompositeExtract %4 %137 2
|
||||
%179 = OpMatrixTimesVector %4 %177 %178
|
||||
%180 = OpFunctionCall %5 %43 %176 %179
|
||||
%181 = OpCompositeExtract %4 %175 1
|
||||
%182 = OpVectorShuffle %10 %181 %181 0 1 2
|
||||
%183 = OpCompositeExtract %4 %137 2
|
||||
%184 = OpVectorShuffle %10 %183 %183 0 1 2
|
||||
%185 = OpFSub %10 %182 %184
|
||||
%186 = OpExtInst %10 %1 Normalize %185
|
||||
%187 = OpDot %5 %156 %186
|
||||
%188 = OpExtInst %5 %1 FMax %47 %187
|
||||
%189 = OpFMul %5 %180 %188
|
||||
%190 = OpCompositeExtract %4 %175 2
|
||||
%191 = OpVectorShuffle %10 %190 %190 0 1 2
|
||||
%192 = OpVectorTimesScalar %10 %191 %189
|
||||
%193 = OpLoad %10 %131
|
||||
%194 = OpFAdd %10 %193 %192
|
||||
OpStore %131 %194
|
||||
OpBranch %171
|
||||
%171 = OpLabel
|
||||
%173 = OpLoad %7 %134
|
||||
%175 = OpAccessChain %174 %152 %173
|
||||
%176 = OpLoad %15 %175
|
||||
%177 = OpLoad %7 %134
|
||||
%178 = OpCompositeExtract %3 %176 0
|
||||
%179 = OpCompositeExtract %4 %138 2
|
||||
%180 = OpMatrixTimesVector %4 %178 %179
|
||||
%181 = OpFunctionCall %5 %44 %177 %180
|
||||
%182 = OpCompositeExtract %4 %176 1
|
||||
%183 = OpVectorShuffle %10 %182 %182 0 1 2
|
||||
%184 = OpCompositeExtract %4 %138 2
|
||||
%185 = OpVectorShuffle %10 %184 %184 0 1 2
|
||||
%186 = OpFSub %10 %183 %185
|
||||
%187 = OpExtInst %10 %1 Normalize %186
|
||||
%188 = OpDot %5 %157 %187
|
||||
%189 = OpExtInst %5 %1 FMax %48 %188
|
||||
%190 = OpFMul %5 %181 %189
|
||||
%191 = OpCompositeExtract %4 %176 2
|
||||
%192 = OpVectorShuffle %10 %191 %191 0 1 2
|
||||
%193 = OpVectorTimesScalar %10 %192 %190
|
||||
%194 = OpLoad %10 %132
|
||||
%195 = OpFAdd %10 %194 %193
|
||||
OpStore %132 %195
|
||||
OpBranch %172
|
||||
%172 = OpLabel
|
||||
OpBranch %161
|
||||
%161 = OpLabel
|
||||
%196 = OpLoad %7 %134
|
||||
%197 = OpIAdd %7 %196 %115
|
||||
OpStore %134 %197
|
||||
OpBranch %158
|
||||
%159 = OpLabel
|
||||
%198 = OpLoad %10 %132
|
||||
%199 = OpCompositeConstruct %4 %198 %49
|
||||
%201 = OpAccessChain %200 %150 %115
|
||||
%202 = OpLoad %4 %201
|
||||
%203 = OpFMul %4 %199 %202
|
||||
OpStore %147 %203
|
||||
OpBranch %160
|
||||
%160 = OpLabel
|
||||
%195 = OpLoad %7 %133
|
||||
%196 = OpIAdd %7 %195 %114
|
||||
OpStore %133 %196
|
||||
OpBranch %157
|
||||
%158 = OpLabel
|
||||
%197 = OpLoad %10 %131
|
||||
%198 = OpCompositeConstruct %4 %197 %48
|
||||
%200 = OpAccessChain %199 %149 %114
|
||||
%201 = OpLoad %4 %200
|
||||
%202 = OpFMul %4 %198 %201
|
||||
OpStore %146 %202
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%215 = OpFunction %2 None %89
|
||||
%206 = OpLabel
|
||||
%204 = OpVariable %103 Function %133
|
||||
%205 = OpVariable %135 Function %136
|
||||
%209 = OpLoad %4 %208
|
||||
%211 = OpLoad %10 %210
|
||||
%213 = OpLoad %4 %212
|
||||
%207 = OpCompositeConstruct %11 %209 %211 %213
|
||||
%216 = OpAccessChain %90 %25 %91
|
||||
%217 = OpAccessChain %93 %28 %91
|
||||
%219 = OpAccessChain %218 %34 %91
|
||||
%220 = OpLoad %19 %37
|
||||
%221 = OpLoad %20 %39
|
||||
OpBranch %222
|
||||
%222 = OpLabel
|
||||
%223 = OpCompositeExtract %10 %207 1
|
||||
%224 = OpExtInst %10 %1 Normalize %223
|
||||
OpStore %204 %24
|
||||
OpStore %205 %91
|
||||
OpBranch %225
|
||||
%225 = OpLabel
|
||||
OpLoopMerge %226 %228 None
|
||||
OpBranch %227
|
||||
%227 = OpLabel
|
||||
%229 = OpLoad %7 %205
|
||||
%230 = OpAccessChain %164 %216 %115 %91
|
||||
%231 = OpLoad %7 %230
|
||||
%232 = OpExtInst %7 %1 UMin %231 %18
|
||||
%233 = OpULessThan %54 %229 %232
|
||||
OpSelectionMerge %234 None
|
||||
OpBranchConditional %233 %234 %235
|
||||
%235 = OpLabel
|
||||
%214 = OpFunction %2 None %88
|
||||
%205 = OpLabel
|
||||
%203 = OpVariable %102 Function %132
|
||||
%204 = OpVariable %134 Function %135
|
||||
%208 = OpLoad %4 %207
|
||||
%210 = OpLoad %10 %209
|
||||
%212 = OpLoad %4 %211
|
||||
%206 = OpCompositeConstruct %11 %208 %210 %212
|
||||
%215 = OpAccessChain %89 %24 %90
|
||||
%216 = OpAccessChain %92 %27 %90
|
||||
%218 = OpAccessChain %217 %33 %90
|
||||
%219 = OpLoad %19 %36
|
||||
%220 = OpLoad %20 %38
|
||||
OpBranch %221
|
||||
%221 = OpLabel
|
||||
%222 = OpCompositeExtract %10 %206 1
|
||||
%223 = OpExtInst %10 %1 Normalize %222
|
||||
OpStore %203 %23
|
||||
OpStore %204 %90
|
||||
OpBranch %224
|
||||
%224 = OpLabel
|
||||
OpLoopMerge %225 %227 None
|
||||
OpBranch %226
|
||||
%226 = OpLabel
|
||||
%228 = OpLoad %7 %204
|
||||
%229 = OpAccessChain %163 %215 %114 %90
|
||||
%230 = OpLoad %7 %229
|
||||
%231 = OpExtInst %7 %1 UMin %230 %18
|
||||
%232 = OpULessThan %53 %228 %231
|
||||
OpSelectionMerge %233 None
|
||||
OpBranchConditional %232 %233 %234
|
||||
%234 = OpLabel
|
||||
OpBranch %225
|
||||
%233 = OpLabel
|
||||
OpBranch %235
|
||||
%235 = OpLabel
|
||||
%237 = OpLoad %7 %204
|
||||
%239 = OpAccessChain %238 %218 %237
|
||||
%240 = OpLoad %15 %239
|
||||
%241 = OpLoad %7 %204
|
||||
%242 = OpCompositeExtract %3 %240 0
|
||||
%243 = OpCompositeExtract %4 %206 2
|
||||
%244 = OpMatrixTimesVector %4 %242 %243
|
||||
%245 = OpFunctionCall %5 %43 %241 %244
|
||||
%246 = OpCompositeExtract %4 %240 1
|
||||
%247 = OpVectorShuffle %10 %246 %246 0 1 2
|
||||
%248 = OpCompositeExtract %4 %206 2
|
||||
%249 = OpVectorShuffle %10 %248 %248 0 1 2
|
||||
%250 = OpFSub %10 %247 %249
|
||||
%251 = OpExtInst %10 %1 Normalize %250
|
||||
%252 = OpDot %5 %223 %251
|
||||
%253 = OpExtInst %5 %1 FMax %47 %252
|
||||
%254 = OpFMul %5 %245 %253
|
||||
%255 = OpCompositeExtract %4 %240 2
|
||||
%256 = OpVectorShuffle %10 %255 %255 0 1 2
|
||||
%257 = OpVectorTimesScalar %10 %256 %254
|
||||
%258 = OpLoad %10 %203
|
||||
%259 = OpFAdd %10 %258 %257
|
||||
OpStore %203 %259
|
||||
OpBranch %236
|
||||
%236 = OpLabel
|
||||
%238 = OpLoad %7 %205
|
||||
%240 = OpAccessChain %239 %219 %238
|
||||
%241 = OpLoad %15 %240
|
||||
%242 = OpLoad %7 %205
|
||||
%243 = OpCompositeExtract %3 %241 0
|
||||
%244 = OpCompositeExtract %4 %207 2
|
||||
%245 = OpMatrixTimesVector %4 %243 %244
|
||||
%246 = OpFunctionCall %5 %44 %242 %245
|
||||
%247 = OpCompositeExtract %4 %241 1
|
||||
%248 = OpVectorShuffle %10 %247 %247 0 1 2
|
||||
%249 = OpCompositeExtract %4 %207 2
|
||||
%250 = OpVectorShuffle %10 %249 %249 0 1 2
|
||||
%251 = OpFSub %10 %248 %250
|
||||
%252 = OpExtInst %10 %1 Normalize %251
|
||||
%253 = OpDot %5 %224 %252
|
||||
%254 = OpExtInst %5 %1 FMax %48 %253
|
||||
%255 = OpFMul %5 %246 %254
|
||||
%256 = OpCompositeExtract %4 %241 2
|
||||
%257 = OpVectorShuffle %10 %256 %256 0 1 2
|
||||
%258 = OpVectorTimesScalar %10 %257 %255
|
||||
%259 = OpLoad %10 %204
|
||||
%260 = OpFAdd %10 %259 %258
|
||||
OpStore %204 %260
|
||||
OpBranch %237
|
||||
%237 = OpLabel
|
||||
OpBranch %228
|
||||
%228 = OpLabel
|
||||
%261 = OpLoad %7 %205
|
||||
%262 = OpIAdd %7 %261 %115
|
||||
OpStore %205 %262
|
||||
OpBranch %225
|
||||
%226 = OpLabel
|
||||
%263 = OpLoad %10 %204
|
||||
%264 = OpCompositeConstruct %4 %263 %49
|
||||
%265 = OpAccessChain %200 %217 %115
|
||||
%266 = OpLoad %4 %265
|
||||
%267 = OpFMul %4 %264 %266
|
||||
OpStore %214 %267
|
||||
OpBranch %227
|
||||
%227 = OpLabel
|
||||
%260 = OpLoad %7 %204
|
||||
%261 = OpIAdd %7 %260 %114
|
||||
OpStore %204 %261
|
||||
OpBranch %224
|
||||
%225 = OpLabel
|
||||
%262 = OpLoad %10 %203
|
||||
%263 = OpCompositeConstruct %4 %262 %48
|
||||
%264 = OpAccessChain %199 %216 %114
|
||||
%265 = OpLoad %4 %264
|
||||
%266 = OpFMul %4 %263 %265
|
||||
OpStore %213 %266
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -1,31 +1,31 @@
|
||||
; SPIR-V
|
||||
; Version: 1.1
|
||||
; Generator: rspirv
|
||||
; Bound: 43
|
||||
; Bound: 41
|
||||
OpCapability Shader
|
||||
OpExtension "SPV_KHR_storage_buffer_storage_class"
|
||||
%1 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %19 "main" %27
|
||||
OpExecutionMode %19 LocalSize 1 1 1
|
||||
OpEntryPoint GLCompute %17 "main" %25
|
||||
OpExecutionMode %17 LocalSize 1 1 1
|
||||
OpMemberName %10 0 "arr"
|
||||
OpMemberName %10 1 "atom"
|
||||
OpMemberName %10 2 "atom_arr"
|
||||
OpName %10 "WStruct"
|
||||
OpName %13 "w_mem"
|
||||
OpName %15 "output"
|
||||
OpName %19 "main"
|
||||
OpName %11 "w_mem"
|
||||
OpName %13 "output"
|
||||
OpName %17 "main"
|
||||
OpDecorate %4 ArrayStride 4
|
||||
OpDecorate %7 ArrayStride 4
|
||||
OpDecorate %9 ArrayStride 32
|
||||
OpMemberDecorate %10 0 Offset 0
|
||||
OpMemberDecorate %10 1 Offset 2048
|
||||
OpMemberDecorate %10 2 Offset 2052
|
||||
OpDecorate %15 DescriptorSet 0
|
||||
OpDecorate %15 Binding 0
|
||||
OpDecorate %16 Block
|
||||
OpMemberDecorate %16 0 Offset 0
|
||||
OpDecorate %27 BuiltIn LocalInvocationId
|
||||
OpDecorate %13 DescriptorSet 0
|
||||
OpDecorate %13 Binding 0
|
||||
OpDecorate %14 Block
|
||||
OpMemberDecorate %14 0 Offset 0
|
||||
OpDecorate %25 BuiltIn LocalInvocationId
|
||||
%2 = OpTypeVoid
|
||||
%3 = OpTypeInt 32 0
|
||||
%5 = OpConstant %3 512
|
||||
@@ -35,45 +35,43 @@ OpDecorate %27 BuiltIn LocalInvocationId
|
||||
%7 = OpTypeArray %6 %8
|
||||
%9 = OpTypeArray %7 %8
|
||||
%10 = OpTypeStruct %4 %6 %9
|
||||
%11 = OpConstant %6 512
|
||||
%12 = OpConstant %6 8
|
||||
%14 = OpTypePointer Workgroup %10
|
||||
%13 = OpVariable %14 Workgroup
|
||||
%16 = OpTypeStruct %4
|
||||
%17 = OpTypePointer StorageBuffer %16
|
||||
%15 = OpVariable %17 StorageBuffer
|
||||
%20 = OpTypeFunction %2
|
||||
%21 = OpTypePointer StorageBuffer %4
|
||||
%22 = OpConstant %3 0
|
||||
%25 = OpConstantNull %10
|
||||
%26 = OpTypeVector %3 3
|
||||
%28 = OpTypePointer Input %26
|
||||
%27 = OpVariable %28 Input
|
||||
%30 = OpConstantNull %26
|
||||
%32 = OpTypeBool
|
||||
%31 = OpTypeVector %32 3
|
||||
%37 = OpConstant %3 2
|
||||
%38 = OpConstant %3 264
|
||||
%40 = OpTypePointer Workgroup %4
|
||||
%19 = OpFunction %2 None %20
|
||||
%18 = OpLabel
|
||||
%23 = OpAccessChain %21 %15 %22
|
||||
OpBranch %24
|
||||
%24 = OpLabel
|
||||
%29 = OpLoad %26 %27
|
||||
%33 = OpIEqual %31 %29 %30
|
||||
%34 = OpAll %32 %33
|
||||
OpSelectionMerge %35 None
|
||||
OpBranchConditional %34 %36 %35
|
||||
%36 = OpLabel
|
||||
OpStore %13 %25
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
OpControlBarrier %37 %37 %38
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%41 = OpAccessChain %40 %13 %22
|
||||
%42 = OpLoad %4 %41
|
||||
OpStore %23 %42
|
||||
%12 = OpTypePointer Workgroup %10
|
||||
%11 = OpVariable %12 Workgroup
|
||||
%14 = OpTypeStruct %4
|
||||
%15 = OpTypePointer StorageBuffer %14
|
||||
%13 = OpVariable %15 StorageBuffer
|
||||
%18 = OpTypeFunction %2
|
||||
%19 = OpTypePointer StorageBuffer %4
|
||||
%20 = OpConstant %3 0
|
||||
%23 = OpConstantNull %10
|
||||
%24 = OpTypeVector %3 3
|
||||
%26 = OpTypePointer Input %24
|
||||
%25 = OpVariable %26 Input
|
||||
%28 = OpConstantNull %24
|
||||
%30 = OpTypeBool
|
||||
%29 = OpTypeVector %30 3
|
||||
%35 = OpConstant %3 2
|
||||
%36 = OpConstant %3 264
|
||||
%38 = OpTypePointer Workgroup %4
|
||||
%17 = OpFunction %2 None %18
|
||||
%16 = OpLabel
|
||||
%21 = OpAccessChain %19 %13 %20
|
||||
OpBranch %22
|
||||
%22 = OpLabel
|
||||
%27 = OpLoad %24 %25
|
||||
%31 = OpIEqual %29 %27 %28
|
||||
%32 = OpAll %30 %31
|
||||
OpSelectionMerge %33 None
|
||||
OpBranchConditional %32 %34 %33
|
||||
%34 = OpLabel
|
||||
OpStore %11 %23
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
OpControlBarrier %35 %35 %36
|
||||
OpBranch %37
|
||||
%37 = OpLabel
|
||||
%39 = OpAccessChain %38 %11 %20
|
||||
%40 = OpLoad %4 %39
|
||||
OpStore %21 %40
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
@@ -45,31 +45,31 @@ fn test_matrix_within_struct_accesses() {
|
||||
idx = (_e3 - 1);
|
||||
let l0_ = baz.m;
|
||||
let l1_ = baz.m[0];
|
||||
let _e15 = idx;
|
||||
let l2_ = baz.m[_e15];
|
||||
let _e14 = idx;
|
||||
let l2_ = baz.m[_e14];
|
||||
let l3_ = baz.m[0][1];
|
||||
let _e29 = idx;
|
||||
let l4_ = baz.m[0][_e29];
|
||||
let _e34 = idx;
|
||||
let l5_ = baz.m[_e34][1];
|
||||
let _e41 = idx;
|
||||
let _e43 = idx;
|
||||
let l6_ = baz.m[_e41][_e43];
|
||||
let _e25 = idx;
|
||||
let l4_ = baz.m[0][_e25];
|
||||
let _e30 = idx;
|
||||
let l5_ = baz.m[_e30][1];
|
||||
let _e36 = idx;
|
||||
let _e38 = idx;
|
||||
let l6_ = baz.m[_e36][_e38];
|
||||
t = Baz(mat3x2<f32>(vec2(1.0), vec2(2.0), vec2(3.0)));
|
||||
let _e56 = idx;
|
||||
idx = (_e56 + 1);
|
||||
let _e51 = idx;
|
||||
idx = (_e51 + 1);
|
||||
t.m = mat3x2<f32>(vec2(6.0), vec2(5.0), vec2(4.0));
|
||||
t.m[0] = vec2(9.0);
|
||||
let _e72 = idx;
|
||||
t.m[_e72] = vec2(90.0);
|
||||
let _e66 = idx;
|
||||
t.m[_e66] = vec2(90.0);
|
||||
t.m[0][1] = 10.0;
|
||||
let _e76 = idx;
|
||||
t.m[0][_e76] = 20.0;
|
||||
let _e80 = idx;
|
||||
t.m[_e80][1] = 30.0;
|
||||
let _e85 = idx;
|
||||
t.m[0][_e85] = 20.0;
|
||||
let _e89 = idx;
|
||||
t.m[_e89][1] = 30.0;
|
||||
let _e95 = idx;
|
||||
let _e97 = idx;
|
||||
t.m[_e95][_e97] = 40.0;
|
||||
let _e87 = idx;
|
||||
t.m[_e85][_e87] = 40.0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -83,32 +83,32 @@ fn test_matrix_within_array_within_struct_accesses() {
|
||||
let l0_1 = nested_mat_cx2_.am;
|
||||
let l1_1 = nested_mat_cx2_.am[0];
|
||||
let l2_1 = nested_mat_cx2_.am[0][0];
|
||||
let _e24 = idx_1;
|
||||
let l3_1 = nested_mat_cx2_.am[0][_e24];
|
||||
let _e20 = idx_1;
|
||||
let l3_1 = nested_mat_cx2_.am[0][_e20];
|
||||
let l4_1 = nested_mat_cx2_.am[0][0][1];
|
||||
let _e42 = idx_1;
|
||||
let l5_1 = nested_mat_cx2_.am[0][0][_e42];
|
||||
let _e49 = idx_1;
|
||||
let l6_1 = nested_mat_cx2_.am[0][_e49][1];
|
||||
let _e58 = idx_1;
|
||||
let _e60 = idx_1;
|
||||
let l7_ = nested_mat_cx2_.am[0][_e58][_e60];
|
||||
let _e33 = idx_1;
|
||||
let l5_1 = nested_mat_cx2_.am[0][0][_e33];
|
||||
let _e39 = idx_1;
|
||||
let l6_1 = nested_mat_cx2_.am[0][_e39][1];
|
||||
let _e46 = idx_1;
|
||||
let _e48 = idx_1;
|
||||
let l7_ = nested_mat_cx2_.am[0][_e46][_e48];
|
||||
t_1 = MatCx2InArray(array<mat4x2<f32>, 2>());
|
||||
let _e67 = idx_1;
|
||||
idx_1 = (_e67 + 1);
|
||||
let _e55 = idx_1;
|
||||
idx_1 = (_e55 + 1);
|
||||
t_1.am = array<mat4x2<f32>, 2>();
|
||||
t_1.am[0] = mat4x2<f32>(vec2(8.0), vec2(7.0), vec2(6.0), vec2(5.0));
|
||||
t_1.am[0][0] = vec2(9.0);
|
||||
let _e93 = idx_1;
|
||||
t_1.am[0][_e93] = vec2(90.0);
|
||||
let _e77 = idx_1;
|
||||
t_1.am[0][_e77] = vec2(90.0);
|
||||
t_1.am[0][0][1] = 10.0;
|
||||
let _e110 = idx_1;
|
||||
t_1.am[0][0][_e110] = 20.0;
|
||||
let _e116 = idx_1;
|
||||
t_1.am[0][_e116][1] = 30.0;
|
||||
let _e124 = idx_1;
|
||||
let _e126 = idx_1;
|
||||
t_1.am[0][_e124][_e126] = 40.0;
|
||||
let _e89 = idx_1;
|
||||
t_1.am[0][0][_e89] = 20.0;
|
||||
let _e94 = idx_1;
|
||||
t_1.am[0][_e94][1] = 30.0;
|
||||
let _e100 = idx_1;
|
||||
let _e102 = idx_1;
|
||||
t_1.am[0][_e100][_e102] = 40.0;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -147,11 +147,11 @@ fn foo_vert(@builtin(vertex_index) vi: u32) -> @builtin(position) vec4<f32> {
|
||||
let a_1 = bar.data[(arrayLength((&bar.data)) - 2u)].value;
|
||||
let c = qux;
|
||||
let data_pointer = (&bar.data[0].value);
|
||||
let _e34 = read_from_private((&foo));
|
||||
let _e33 = read_from_private((&foo));
|
||||
c2_ = array<i32, 5>(a_1, i32(b), 3, 4, 5);
|
||||
c2_[(vi + 1u)] = 42;
|
||||
let value = c2_[vi];
|
||||
let _e48 = test_arr_as_arg(array<array<f32, 10>, 5>());
|
||||
let _e47 = test_arr_as_arg(array<array<f32, 10>, 5>());
|
||||
return vec4<f32>((_matrix * vec4<f32>(vec4(value))), 2.0);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,75 +33,75 @@ fn cs_main(@builtin(local_invocation_id) id: vec3<u32>) {
|
||||
let l6_ = atomicLoad((&workgroup_struct.atomic_scalar));
|
||||
let l7_ = atomicLoad((&workgroup_struct.atomic_arr[1]));
|
||||
workgroupBarrier();
|
||||
let _e59 = atomicAdd((&storage_atomic_scalar), 1u);
|
||||
let _e64 = atomicAdd((&storage_atomic_arr[1]), 1);
|
||||
let _e68 = atomicAdd((&storage_struct.atomic_scalar), 1u);
|
||||
let _e74 = atomicAdd((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e77 = atomicAdd((&workgroup_atomic_scalar), 1u);
|
||||
let _e82 = atomicAdd((&workgroup_atomic_arr[1]), 1);
|
||||
let _e86 = atomicAdd((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e92 = atomicAdd((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e51 = atomicAdd((&storage_atomic_scalar), 1u);
|
||||
let _e55 = atomicAdd((&storage_atomic_arr[1]), 1);
|
||||
let _e59 = atomicAdd((&storage_struct.atomic_scalar), 1u);
|
||||
let _e64 = atomicAdd((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e67 = atomicAdd((&workgroup_atomic_scalar), 1u);
|
||||
let _e71 = atomicAdd((&workgroup_atomic_arr[1]), 1);
|
||||
let _e75 = atomicAdd((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e80 = atomicAdd((&workgroup_struct.atomic_arr[1]), 1);
|
||||
workgroupBarrier();
|
||||
let _e95 = atomicSub((&storage_atomic_scalar), 1u);
|
||||
let _e100 = atomicSub((&storage_atomic_arr[1]), 1);
|
||||
let _e104 = atomicSub((&storage_struct.atomic_scalar), 1u);
|
||||
let _e110 = atomicSub((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e113 = atomicSub((&workgroup_atomic_scalar), 1u);
|
||||
let _e118 = atomicSub((&workgroup_atomic_arr[1]), 1);
|
||||
let _e122 = atomicSub((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e128 = atomicSub((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e83 = atomicSub((&storage_atomic_scalar), 1u);
|
||||
let _e87 = atomicSub((&storage_atomic_arr[1]), 1);
|
||||
let _e91 = atomicSub((&storage_struct.atomic_scalar), 1u);
|
||||
let _e96 = atomicSub((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e99 = atomicSub((&workgroup_atomic_scalar), 1u);
|
||||
let _e103 = atomicSub((&workgroup_atomic_arr[1]), 1);
|
||||
let _e107 = atomicSub((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e112 = atomicSub((&workgroup_struct.atomic_arr[1]), 1);
|
||||
workgroupBarrier();
|
||||
let _e131 = atomicMax((&storage_atomic_scalar), 1u);
|
||||
let _e136 = atomicMax((&storage_atomic_arr[1]), 1);
|
||||
let _e140 = atomicMax((&storage_struct.atomic_scalar), 1u);
|
||||
let _e146 = atomicMax((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e149 = atomicMax((&workgroup_atomic_scalar), 1u);
|
||||
let _e154 = atomicMax((&workgroup_atomic_arr[1]), 1);
|
||||
let _e158 = atomicMax((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e164 = atomicMax((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e115 = atomicMax((&storage_atomic_scalar), 1u);
|
||||
let _e119 = atomicMax((&storage_atomic_arr[1]), 1);
|
||||
let _e123 = atomicMax((&storage_struct.atomic_scalar), 1u);
|
||||
let _e128 = atomicMax((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e131 = atomicMax((&workgroup_atomic_scalar), 1u);
|
||||
let _e135 = atomicMax((&workgroup_atomic_arr[1]), 1);
|
||||
let _e139 = atomicMax((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e144 = atomicMax((&workgroup_struct.atomic_arr[1]), 1);
|
||||
workgroupBarrier();
|
||||
let _e167 = atomicMin((&storage_atomic_scalar), 1u);
|
||||
let _e172 = atomicMin((&storage_atomic_arr[1]), 1);
|
||||
let _e176 = atomicMin((&storage_struct.atomic_scalar), 1u);
|
||||
let _e182 = atomicMin((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e185 = atomicMin((&workgroup_atomic_scalar), 1u);
|
||||
let _e190 = atomicMin((&workgroup_atomic_arr[1]), 1);
|
||||
let _e194 = atomicMin((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e200 = atomicMin((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e147 = atomicMin((&storage_atomic_scalar), 1u);
|
||||
let _e151 = atomicMin((&storage_atomic_arr[1]), 1);
|
||||
let _e155 = atomicMin((&storage_struct.atomic_scalar), 1u);
|
||||
let _e160 = atomicMin((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e163 = atomicMin((&workgroup_atomic_scalar), 1u);
|
||||
let _e167 = atomicMin((&workgroup_atomic_arr[1]), 1);
|
||||
let _e171 = atomicMin((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e176 = atomicMin((&workgroup_struct.atomic_arr[1]), 1);
|
||||
workgroupBarrier();
|
||||
let _e203 = atomicAnd((&storage_atomic_scalar), 1u);
|
||||
let _e208 = atomicAnd((&storage_atomic_arr[1]), 1);
|
||||
let _e212 = atomicAnd((&storage_struct.atomic_scalar), 1u);
|
||||
let _e218 = atomicAnd((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e221 = atomicAnd((&workgroup_atomic_scalar), 1u);
|
||||
let _e226 = atomicAnd((&workgroup_atomic_arr[1]), 1);
|
||||
let _e230 = atomicAnd((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e236 = atomicAnd((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e179 = atomicAnd((&storage_atomic_scalar), 1u);
|
||||
let _e183 = atomicAnd((&storage_atomic_arr[1]), 1);
|
||||
let _e187 = atomicAnd((&storage_struct.atomic_scalar), 1u);
|
||||
let _e192 = atomicAnd((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e195 = atomicAnd((&workgroup_atomic_scalar), 1u);
|
||||
let _e199 = atomicAnd((&workgroup_atomic_arr[1]), 1);
|
||||
let _e203 = atomicAnd((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e208 = atomicAnd((&workgroup_struct.atomic_arr[1]), 1);
|
||||
workgroupBarrier();
|
||||
let _e239 = atomicOr((&storage_atomic_scalar), 1u);
|
||||
let _e244 = atomicOr((&storage_atomic_arr[1]), 1);
|
||||
let _e248 = atomicOr((&storage_struct.atomic_scalar), 1u);
|
||||
let _e254 = atomicOr((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e257 = atomicOr((&workgroup_atomic_scalar), 1u);
|
||||
let _e262 = atomicOr((&workgroup_atomic_arr[1]), 1);
|
||||
let _e266 = atomicOr((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e272 = atomicOr((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e211 = atomicOr((&storage_atomic_scalar), 1u);
|
||||
let _e215 = atomicOr((&storage_atomic_arr[1]), 1);
|
||||
let _e219 = atomicOr((&storage_struct.atomic_scalar), 1u);
|
||||
let _e224 = atomicOr((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e227 = atomicOr((&workgroup_atomic_scalar), 1u);
|
||||
let _e231 = atomicOr((&workgroup_atomic_arr[1]), 1);
|
||||
let _e235 = atomicOr((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e240 = atomicOr((&workgroup_struct.atomic_arr[1]), 1);
|
||||
workgroupBarrier();
|
||||
let _e275 = atomicXor((&storage_atomic_scalar), 1u);
|
||||
let _e280 = atomicXor((&storage_atomic_arr[1]), 1);
|
||||
let _e284 = atomicXor((&storage_struct.atomic_scalar), 1u);
|
||||
let _e290 = atomicXor((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e293 = atomicXor((&workgroup_atomic_scalar), 1u);
|
||||
let _e298 = atomicXor((&workgroup_atomic_arr[1]), 1);
|
||||
let _e302 = atomicXor((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e308 = atomicXor((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e311 = atomicExchange((&storage_atomic_scalar), 1u);
|
||||
let _e316 = atomicExchange((&storage_atomic_arr[1]), 1);
|
||||
let _e320 = atomicExchange((&storage_struct.atomic_scalar), 1u);
|
||||
let _e326 = atomicExchange((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e329 = atomicExchange((&workgroup_atomic_scalar), 1u);
|
||||
let _e334 = atomicExchange((&workgroup_atomic_arr[1]), 1);
|
||||
let _e338 = atomicExchange((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e344 = atomicExchange((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e243 = atomicXor((&storage_atomic_scalar), 1u);
|
||||
let _e247 = atomicXor((&storage_atomic_arr[1]), 1);
|
||||
let _e251 = atomicXor((&storage_struct.atomic_scalar), 1u);
|
||||
let _e256 = atomicXor((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e259 = atomicXor((&workgroup_atomic_scalar), 1u);
|
||||
let _e263 = atomicXor((&workgroup_atomic_arr[1]), 1);
|
||||
let _e267 = atomicXor((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e272 = atomicXor((&workgroup_struct.atomic_arr[1]), 1);
|
||||
let _e275 = atomicExchange((&storage_atomic_scalar), 1u);
|
||||
let _e279 = atomicExchange((&storage_atomic_arr[1]), 1);
|
||||
let _e283 = atomicExchange((&storage_struct.atomic_scalar), 1u);
|
||||
let _e288 = atomicExchange((&storage_struct.atomic_arr[1]), 1);
|
||||
let _e291 = atomicExchange((&workgroup_atomic_scalar), 1u);
|
||||
let _e295 = atomicExchange((&workgroup_atomic_arr[1]), 1);
|
||||
let _e299 = atomicExchange((&workgroup_struct.atomic_scalar), 1u);
|
||||
let _e304 = atomicExchange((&workgroup_struct.atomic_arr[1]), 1);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ var global_1: binding_array<sampler>;
|
||||
var<private> global_2: vec4<f32>;
|
||||
|
||||
fn function() {
|
||||
let _e9 = textureSampleLevel(global[1], global_1[1], vec2<f32>(0.5, 0.5), 0.0);
|
||||
global_2 = _e9;
|
||||
let _e8 = textureSampleLevel(global[1], global_1[1], vec2<f32>(0.5, 0.5), 0.0);
|
||||
global_2 = _e8;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ var global_1: binding_array<sampler, 256>;
|
||||
var<private> global_2: vec4<f32>;
|
||||
|
||||
fn function() {
|
||||
let _e10 = textureSampleLevel(global[1], global_1[1], vec2<f32>(0.5, 0.5), 0.0);
|
||||
global_2 = _e10;
|
||||
let _e8 = textureSampleLevel(global[1], global_1[1], vec2<f32>(0.5, 0.5), 0.0);
|
||||
global_2 = _e8;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,133 +40,133 @@ fn main(fragment_in: FragmentIn) -> @location(0) vec4<f32> {
|
||||
v4_ = vec4(0.0);
|
||||
let uv = vec2(0.0);
|
||||
let pix = vec2(0);
|
||||
let _e22 = textureDimensions(texture_array_unbounded[0]);
|
||||
let _e23 = u2_;
|
||||
u2_ = (_e23 + _e22);
|
||||
let _e27 = textureDimensions(texture_array_unbounded[uniform_index]);
|
||||
let _e28 = u2_;
|
||||
u2_ = (_e28 + _e27);
|
||||
let _e32 = textureDimensions(texture_array_unbounded[non_uniform_index]);
|
||||
let _e33 = u2_;
|
||||
u2_ = (_e33 + _e32);
|
||||
let _e42 = textureGather(0, texture_array_bounded[0], samp[0], uv);
|
||||
let _e43 = v4_;
|
||||
v4_ = (_e43 + _e42);
|
||||
let _e50 = textureGather(0, texture_array_bounded[uniform_index], samp[uniform_index], uv);
|
||||
let _e51 = v4_;
|
||||
v4_ = (_e51 + _e50);
|
||||
let _e58 = textureGather(0, texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv);
|
||||
let _e59 = v4_;
|
||||
v4_ = (_e59 + _e58);
|
||||
let _e68 = textureGatherCompare(texture_array_depth[0], samp_comp[0], uv, 0.0);
|
||||
let _e21 = textureDimensions(texture_array_unbounded[0]);
|
||||
let _e22 = u2_;
|
||||
u2_ = (_e22 + _e21);
|
||||
let _e26 = textureDimensions(texture_array_unbounded[uniform_index]);
|
||||
let _e27 = u2_;
|
||||
u2_ = (_e27 + _e26);
|
||||
let _e31 = textureDimensions(texture_array_unbounded[non_uniform_index]);
|
||||
let _e32 = u2_;
|
||||
u2_ = (_e32 + _e31);
|
||||
let _e38 = textureGather(0, texture_array_bounded[0], samp[0], uv);
|
||||
let _e39 = v4_;
|
||||
v4_ = (_e39 + _e38);
|
||||
let _e45 = textureGather(0, texture_array_bounded[uniform_index], samp[uniform_index], uv);
|
||||
let _e46 = v4_;
|
||||
v4_ = (_e46 + _e45);
|
||||
let _e52 = textureGather(0, texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv);
|
||||
let _e53 = v4_;
|
||||
v4_ = (_e53 + _e52);
|
||||
let _e60 = textureGatherCompare(texture_array_depth[0], samp_comp[0], uv, 0.0);
|
||||
let _e61 = v4_;
|
||||
v4_ = (_e61 + _e60);
|
||||
let _e68 = textureGatherCompare(texture_array_depth[uniform_index], samp_comp[uniform_index], uv, 0.0);
|
||||
let _e69 = v4_;
|
||||
v4_ = (_e69 + _e68);
|
||||
let _e76 = textureGatherCompare(texture_array_depth[uniform_index], samp_comp[uniform_index], uv, 0.0);
|
||||
let _e76 = textureGatherCompare(texture_array_depth[non_uniform_index], samp_comp[non_uniform_index], uv, 0.0);
|
||||
let _e77 = v4_;
|
||||
v4_ = (_e77 + _e76);
|
||||
let _e84 = textureGatherCompare(texture_array_depth[non_uniform_index], samp_comp[non_uniform_index], uv, 0.0);
|
||||
let _e85 = v4_;
|
||||
v4_ = (_e85 + _e84);
|
||||
let _e91 = textureLoad(texture_array_unbounded[0], pix, 0);
|
||||
let _e92 = v4_;
|
||||
v4_ = (_e92 + _e91);
|
||||
let _e97 = textureLoad(texture_array_unbounded[uniform_index], pix, 0);
|
||||
let _e98 = v4_;
|
||||
v4_ = (_e98 + _e97);
|
||||
let _e103 = textureLoad(texture_array_unbounded[non_uniform_index], pix, 0);
|
||||
let _e104 = v4_;
|
||||
v4_ = (_e104 + _e103);
|
||||
let _e109 = textureNumLayers(texture_array_2darray[0]);
|
||||
let _e82 = textureLoad(texture_array_unbounded[0], pix, 0);
|
||||
let _e83 = v4_;
|
||||
v4_ = (_e83 + _e82);
|
||||
let _e88 = textureLoad(texture_array_unbounded[uniform_index], pix, 0);
|
||||
let _e89 = v4_;
|
||||
v4_ = (_e89 + _e88);
|
||||
let _e94 = textureLoad(texture_array_unbounded[non_uniform_index], pix, 0);
|
||||
let _e95 = v4_;
|
||||
v4_ = (_e95 + _e94);
|
||||
let _e99 = textureNumLayers(texture_array_2darray[0]);
|
||||
let _e100 = u1_;
|
||||
u1_ = (_e100 + _e99);
|
||||
let _e104 = textureNumLayers(texture_array_2darray[uniform_index]);
|
||||
let _e105 = u1_;
|
||||
u1_ = (_e105 + _e104);
|
||||
let _e109 = textureNumLayers(texture_array_2darray[non_uniform_index]);
|
||||
let _e110 = u1_;
|
||||
u1_ = (_e110 + _e109);
|
||||
let _e114 = textureNumLayers(texture_array_2darray[uniform_index]);
|
||||
let _e114 = textureNumLevels(texture_array_bounded[0]);
|
||||
let _e115 = u1_;
|
||||
u1_ = (_e115 + _e114);
|
||||
let _e119 = textureNumLayers(texture_array_2darray[non_uniform_index]);
|
||||
let _e119 = textureNumLevels(texture_array_bounded[uniform_index]);
|
||||
let _e120 = u1_;
|
||||
u1_ = (_e120 + _e119);
|
||||
let _e125 = textureNumLevels(texture_array_bounded[0]);
|
||||
let _e126 = u1_;
|
||||
u1_ = (_e126 + _e125);
|
||||
let _e130 = textureNumLevels(texture_array_bounded[uniform_index]);
|
||||
let _e131 = u1_;
|
||||
u1_ = (_e131 + _e130);
|
||||
let _e135 = textureNumLevels(texture_array_bounded[non_uniform_index]);
|
||||
let _e136 = u1_;
|
||||
u1_ = (_e136 + _e135);
|
||||
let _e141 = textureNumSamples(texture_array_multisampled[0]);
|
||||
let _e142 = u1_;
|
||||
u1_ = (_e142 + _e141);
|
||||
let _e146 = textureNumSamples(texture_array_multisampled[uniform_index]);
|
||||
let _e147 = u1_;
|
||||
u1_ = (_e147 + _e146);
|
||||
let _e151 = textureNumSamples(texture_array_multisampled[non_uniform_index]);
|
||||
let _e152 = u1_;
|
||||
u1_ = (_e152 + _e151);
|
||||
let _e160 = textureSample(texture_array_bounded[0], samp[0], uv);
|
||||
let _e124 = textureNumLevels(texture_array_bounded[non_uniform_index]);
|
||||
let _e125 = u1_;
|
||||
u1_ = (_e125 + _e124);
|
||||
let _e129 = textureNumSamples(texture_array_multisampled[0]);
|
||||
let _e130 = u1_;
|
||||
u1_ = (_e130 + _e129);
|
||||
let _e134 = textureNumSamples(texture_array_multisampled[uniform_index]);
|
||||
let _e135 = u1_;
|
||||
u1_ = (_e135 + _e134);
|
||||
let _e139 = textureNumSamples(texture_array_multisampled[non_uniform_index]);
|
||||
let _e140 = u1_;
|
||||
u1_ = (_e140 + _e139);
|
||||
let _e146 = textureSample(texture_array_bounded[0], samp[0], uv);
|
||||
let _e147 = v4_;
|
||||
v4_ = (_e147 + _e146);
|
||||
let _e153 = textureSample(texture_array_bounded[uniform_index], samp[uniform_index], uv);
|
||||
let _e154 = v4_;
|
||||
v4_ = (_e154 + _e153);
|
||||
let _e160 = textureSample(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv);
|
||||
let _e161 = v4_;
|
||||
v4_ = (_e161 + _e160);
|
||||
let _e167 = textureSample(texture_array_bounded[uniform_index], samp[uniform_index], uv);
|
||||
let _e168 = v4_;
|
||||
v4_ = (_e168 + _e167);
|
||||
let _e174 = textureSample(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv);
|
||||
let _e175 = v4_;
|
||||
v4_ = (_e175 + _e174);
|
||||
let _e184 = textureSampleBias(texture_array_bounded[0], samp[0], uv, 0.0);
|
||||
let _e168 = textureSampleBias(texture_array_bounded[0], samp[0], uv, 0.0);
|
||||
let _e169 = v4_;
|
||||
v4_ = (_e169 + _e168);
|
||||
let _e176 = textureSampleBias(texture_array_bounded[uniform_index], samp[uniform_index], uv, 0.0);
|
||||
let _e177 = v4_;
|
||||
v4_ = (_e177 + _e176);
|
||||
let _e184 = textureSampleBias(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv, 0.0);
|
||||
let _e185 = v4_;
|
||||
v4_ = (_e185 + _e184);
|
||||
let _e192 = textureSampleBias(texture_array_bounded[uniform_index], samp[uniform_index], uv, 0.0);
|
||||
let _e193 = v4_;
|
||||
v4_ = (_e193 + _e192);
|
||||
let _e200 = textureSampleBias(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv, 0.0);
|
||||
let _e201 = v4_;
|
||||
v4_ = (_e201 + _e200);
|
||||
let _e210 = textureSampleCompare(texture_array_depth[0], samp_comp[0], uv, 0.0);
|
||||
let _e211 = v1_;
|
||||
v1_ = (_e211 + _e210);
|
||||
let _e218 = textureSampleCompare(texture_array_depth[uniform_index], samp_comp[uniform_index], uv, 0.0);
|
||||
let _e219 = v1_;
|
||||
v1_ = (_e219 + _e218);
|
||||
let _e226 = textureSampleCompare(texture_array_depth[non_uniform_index], samp_comp[non_uniform_index], uv, 0.0);
|
||||
let _e227 = v1_;
|
||||
v1_ = (_e227 + _e226);
|
||||
let _e236 = textureSampleCompareLevel(texture_array_depth[0], samp_comp[0], uv, 0.0);
|
||||
let _e237 = v1_;
|
||||
v1_ = (_e237 + _e236);
|
||||
let _e244 = textureSampleCompareLevel(texture_array_depth[uniform_index], samp_comp[uniform_index], uv, 0.0);
|
||||
let _e245 = v1_;
|
||||
v1_ = (_e245 + _e244);
|
||||
let _e252 = textureSampleCompareLevel(texture_array_depth[non_uniform_index], samp_comp[non_uniform_index], uv, 0.0);
|
||||
let _e253 = v1_;
|
||||
v1_ = (_e253 + _e252);
|
||||
let _e261 = textureSampleGrad(texture_array_bounded[0], samp[0], uv, uv, uv);
|
||||
let _e192 = textureSampleCompare(texture_array_depth[0], samp_comp[0], uv, 0.0);
|
||||
let _e193 = v1_;
|
||||
v1_ = (_e193 + _e192);
|
||||
let _e200 = textureSampleCompare(texture_array_depth[uniform_index], samp_comp[uniform_index], uv, 0.0);
|
||||
let _e201 = v1_;
|
||||
v1_ = (_e201 + _e200);
|
||||
let _e208 = textureSampleCompare(texture_array_depth[non_uniform_index], samp_comp[non_uniform_index], uv, 0.0);
|
||||
let _e209 = v1_;
|
||||
v1_ = (_e209 + _e208);
|
||||
let _e216 = textureSampleCompareLevel(texture_array_depth[0], samp_comp[0], uv, 0.0);
|
||||
let _e217 = v1_;
|
||||
v1_ = (_e217 + _e216);
|
||||
let _e224 = textureSampleCompareLevel(texture_array_depth[uniform_index], samp_comp[uniform_index], uv, 0.0);
|
||||
let _e225 = v1_;
|
||||
v1_ = (_e225 + _e224);
|
||||
let _e232 = textureSampleCompareLevel(texture_array_depth[non_uniform_index], samp_comp[non_uniform_index], uv, 0.0);
|
||||
let _e233 = v1_;
|
||||
v1_ = (_e233 + _e232);
|
||||
let _e239 = textureSampleGrad(texture_array_bounded[0], samp[0], uv, uv, uv);
|
||||
let _e240 = v4_;
|
||||
v4_ = (_e240 + _e239);
|
||||
let _e246 = textureSampleGrad(texture_array_bounded[uniform_index], samp[uniform_index], uv, uv, uv);
|
||||
let _e247 = v4_;
|
||||
v4_ = (_e247 + _e246);
|
||||
let _e253 = textureSampleGrad(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv, uv, uv);
|
||||
let _e254 = v4_;
|
||||
v4_ = (_e254 + _e253);
|
||||
let _e261 = textureSampleLevel(texture_array_bounded[0], samp[0], uv, 0.0);
|
||||
let _e262 = v4_;
|
||||
v4_ = (_e262 + _e261);
|
||||
let _e268 = textureSampleGrad(texture_array_bounded[uniform_index], samp[uniform_index], uv, uv, uv);
|
||||
let _e269 = v4_;
|
||||
v4_ = (_e269 + _e268);
|
||||
let _e275 = textureSampleGrad(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv, uv, uv);
|
||||
let _e276 = v4_;
|
||||
v4_ = (_e276 + _e275);
|
||||
let _e285 = textureSampleLevel(texture_array_bounded[0], samp[0], uv, 0.0);
|
||||
let _e286 = v4_;
|
||||
v4_ = (_e286 + _e285);
|
||||
let _e293 = textureSampleLevel(texture_array_bounded[uniform_index], samp[uniform_index], uv, 0.0);
|
||||
let _e269 = textureSampleLevel(texture_array_bounded[uniform_index], samp[uniform_index], uv, 0.0);
|
||||
let _e270 = v4_;
|
||||
v4_ = (_e270 + _e269);
|
||||
let _e277 = textureSampleLevel(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv, 0.0);
|
||||
let _e278 = v4_;
|
||||
v4_ = (_e278 + _e277);
|
||||
let _e282 = v4_;
|
||||
textureStore(texture_array_storage[0], pix, _e282);
|
||||
let _e285 = v4_;
|
||||
textureStore(texture_array_storage[uniform_index], pix, _e285);
|
||||
let _e288 = v4_;
|
||||
textureStore(texture_array_storage[non_uniform_index], pix, _e288);
|
||||
let _e289 = u2_;
|
||||
let _e290 = u1_;
|
||||
let v2_ = vec2<f32>((_e289 + vec2(_e290)));
|
||||
let _e294 = v4_;
|
||||
v4_ = (_e294 + _e293);
|
||||
let _e301 = textureSampleLevel(texture_array_bounded[non_uniform_index], samp[non_uniform_index], uv, 0.0);
|
||||
let _e302 = v4_;
|
||||
v4_ = (_e302 + _e301);
|
||||
let _e307 = v4_;
|
||||
textureStore(texture_array_storage[0], pix, _e307);
|
||||
let _e310 = v4_;
|
||||
textureStore(texture_array_storage[uniform_index], pix, _e310);
|
||||
let _e313 = v4_;
|
||||
textureStore(texture_array_storage[non_uniform_index], pix, _e313);
|
||||
let _e314 = u2_;
|
||||
let _e315 = u1_;
|
||||
let v2_ = vec2<f32>((_e314 + vec2(_e315)));
|
||||
let _e319 = v4_;
|
||||
let _e326 = v1_;
|
||||
return ((_e319 + vec4<f32>(v2_.x, v2_.y, v2_.x, v2_.y)) + vec4(_e326));
|
||||
let _e301 = v1_;
|
||||
return ((_e294 + vec4<f32>(v2_.x, v2_.y, v2_.x, v2_.y)) + vec4(_e301));
|
||||
}
|
||||
|
||||
@@ -22,15 +22,15 @@ fn main(fragment_in: FragmentIn) -> @location(0) @interpolate(flat) u32 {
|
||||
let uniform_index = uni.index;
|
||||
let non_uniform_index = fragment_in.index;
|
||||
u1_ = 0u;
|
||||
let _e11 = storage_array[0].x;
|
||||
let _e12 = u1_;
|
||||
u1_ = (_e12 + _e11);
|
||||
let _e17 = storage_array[uniform_index].x;
|
||||
let _e18 = u1_;
|
||||
u1_ = (_e18 + _e17);
|
||||
let _e23 = storage_array[non_uniform_index].x;
|
||||
let _e24 = u1_;
|
||||
u1_ = (_e24 + _e23);
|
||||
let _e26 = u1_;
|
||||
return _e26;
|
||||
let _e10 = storage_array[0].x;
|
||||
let _e11 = u1_;
|
||||
u1_ = (_e11 + _e10);
|
||||
let _e16 = storage_array[uniform_index].x;
|
||||
let _e17 = u1_;
|
||||
u1_ = (_e17 + _e16);
|
||||
let _e22 = storage_array[non_uniform_index].x;
|
||||
let _e23 = u1_;
|
||||
u1_ = (_e23 + _e22);
|
||||
let _e25 = u1_;
|
||||
return _e25;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ fn fb1_(cond: ptr<function, bool>) {
|
||||
loop {
|
||||
continue;
|
||||
continuing {
|
||||
let _e2 = (*cond);
|
||||
break if !(_e2);
|
||||
let _e1 = (*cond);
|
||||
break if !(_e1);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -6,8 +6,8 @@ struct type_1 {
|
||||
var<storage, read_write> unnamed: type_1;
|
||||
|
||||
fn function() {
|
||||
let _e4 = unnamed.member;
|
||||
unnamed.member = (_e4 + 1);
|
||||
let _e3 = unnamed.member;
|
||||
unnamed.member = (_e3 + 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ fn test_msl_packed_vec3_() {
|
||||
idx = 1;
|
||||
alignment.v3_.x = 1.0;
|
||||
alignment.v3_.x = 2.0;
|
||||
let _e17 = idx;
|
||||
alignment.v3_[_e17] = 3.0;
|
||||
let _e16 = idx;
|
||||
alignment.v3_[_e16] = 3.0;
|
||||
let data = alignment;
|
||||
let l0_ = data.v3_;
|
||||
let l1_ = data.v3_.zx;
|
||||
@@ -51,20 +51,20 @@ fn main() {
|
||||
var at: bool;
|
||||
|
||||
test_msl_packed_vec3_();
|
||||
let _e8 = global_nested_arrays_of_matrices_4x2_[0][0];
|
||||
let _e16 = global_nested_arrays_of_matrices_2x4_[0][0][0];
|
||||
wg[7] = (_e8 * _e16).x;
|
||||
let _e23 = global_mat;
|
||||
let _e25 = global_vec;
|
||||
wg[6] = (_e23 * _e25).x;
|
||||
let _e35 = dummy[1].y;
|
||||
wg[5] = _e35;
|
||||
let _e43 = float_vecs[0].w;
|
||||
wg[4] = _e43;
|
||||
let _e49 = alignment.v1_;
|
||||
wg[3] = _e49;
|
||||
let _e56 = alignment.v3_.x;
|
||||
wg[2] = _e56;
|
||||
let _e5 = global_nested_arrays_of_matrices_4x2_[0][0];
|
||||
let _e10 = global_nested_arrays_of_matrices_2x4_[0][0][0];
|
||||
wg[7] = (_e5 * _e10).x;
|
||||
let _e16 = global_mat;
|
||||
let _e18 = global_vec;
|
||||
wg[6] = (_e16 * _e18).x;
|
||||
let _e26 = dummy[1].y;
|
||||
wg[5] = _e26;
|
||||
let _e32 = float_vecs[0].w;
|
||||
wg[4] = _e32;
|
||||
let _e37 = alignment.v1_;
|
||||
wg[3] = _e37;
|
||||
let _e43 = alignment.v3_.x;
|
||||
wg[2] = _e43;
|
||||
alignment.v1_ = 4.0;
|
||||
wg[1] = f32(arrayLength((&dummy)));
|
||||
atomicStore((&at_1), 2u);
|
||||
|
||||
@@ -223,10 +223,10 @@ fn assignment() {
|
||||
let _e36 = a_1;
|
||||
a_1 = (_e36 - 1);
|
||||
vec0_ = vec3<i32>();
|
||||
let _e43 = vec0_.y;
|
||||
vec0_.y = (_e43 + 1);
|
||||
let _e48 = vec0_.y;
|
||||
vec0_.y = (_e48 - 1);
|
||||
let _e42 = vec0_.y;
|
||||
vec0_.y = (_e42 + 1);
|
||||
let _e46 = vec0_.y;
|
||||
vec0_.y = (_e46 - 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ var<private> perVertexStruct: gl_PerVertex = gl_PerVertex(vec4<f32>(0.0, 0.0, 0.
|
||||
var<private> a_pos_1: vec2<f32>;
|
||||
|
||||
fn main_1() {
|
||||
let _e8 = a_uv_1;
|
||||
v_uv = _e8;
|
||||
let _e9 = a_pos_1;
|
||||
perVertexStruct.gl_Position = vec4<f32>(_e9.x, _e9.y, 0.0, 1.0);
|
||||
let _e6 = a_uv_1;
|
||||
v_uv = _e6;
|
||||
let _e7 = a_pos_1;
|
||||
perVertexStruct.gl_Position = vec4<f32>(_e7.x, _e7.y, 0.0, 1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,12 @@ struct Parameters {
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn check_targets(module: &naga::Module, name: &str, targets: Targets, source_code: Option<&str>) {
|
||||
fn check_targets(
|
||||
module: &mut naga::Module,
|
||||
name: &str,
|
||||
targets: Targets,
|
||||
source_code: Option<&str>,
|
||||
) {
|
||||
let root = env!("CARGO_MANIFEST_DIR");
|
||||
let filepath = format!("{root}/{BASE_DIR_IN}/{name}.param.ron");
|
||||
let params = match fs::read_to_string(&filepath) {
|
||||
@@ -120,6 +125,26 @@ fn check_targets(module: &naga::Module, name: &str, targets: Targets, source_cod
|
||||
.validate(module)
|
||||
.expect(&format!("Naga module validation failed on test '{name}'"));
|
||||
|
||||
#[cfg(feature = "compact")]
|
||||
let info = {
|
||||
naga::compact::compact(module);
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
{
|
||||
if targets.contains(Targets::IR) {
|
||||
let config = ron::ser::PrettyConfig::default().new_line("\n".to_string());
|
||||
let string = ron::ser::to_string_pretty(module, config).unwrap();
|
||||
fs::write(dest.join(format!("ir/{name}.compact.ron")), string).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
naga::valid::Validator::new(naga::valid::ValidationFlags::all(), capabilities)
|
||||
.validate(module)
|
||||
.expect(&format!(
|
||||
"Post-compaction module validation failed on test '{name}'"
|
||||
))
|
||||
};
|
||||
|
||||
#[cfg(feature = "serialize")]
|
||||
{
|
||||
if targets.contains(Targets::ANALYSIS) {
|
||||
@@ -284,6 +309,7 @@ fn write_output_spv_inner(
|
||||
) {
|
||||
use naga::back::spv;
|
||||
use rspirv::binary::Disassemble;
|
||||
println!("Writing SPIR-V {}", path);
|
||||
let spv = spv::write_vec(module, info, options, pipeline_options).unwrap();
|
||||
let dis = rspirv::dr::load_words(spv)
|
||||
.expect("Produced invalid SPIR-V")
|
||||
@@ -624,7 +650,7 @@ fn convert_wgsl() {
|
||||
let file = fs::read_to_string(format!("{root}/{BASE_DIR_IN}/{name}.wgsl"))
|
||||
.expect("Couldn't find wgsl file");
|
||||
match naga::front::wgsl::parse_str(&file) {
|
||||
Ok(module) => check_targets(&module, name, targets, None),
|
||||
Ok(mut module) => check_targets(&mut module, name, targets, None),
|
||||
Err(e) => panic!("{}", e.emit_to_string(&file)),
|
||||
}
|
||||
}
|
||||
@@ -641,7 +667,7 @@ fn convert_wgsl() {
|
||||
let file = fs::read_to_string(format!("{root}/{BASE_DIR_IN}/{name}.wgsl"))
|
||||
.expect("Couldn't find wgsl file");
|
||||
match naga::front::wgsl::parse_str(&file) {
|
||||
Ok(module) => check_targets(&module, name, targets, Some(&file)),
|
||||
Ok(mut module) => check_targets(&mut module, name, targets, Some(&file)),
|
||||
Err(e) => panic!("{}", e.emit_to_string(&file)),
|
||||
}
|
||||
}
|
||||
@@ -655,7 +681,7 @@ fn convert_spv(name: &str, adjust_coordinate_space: bool, targets: Targets) {
|
||||
let root = env!("CARGO_MANIFEST_DIR");
|
||||
|
||||
println!("Processing '{name}'");
|
||||
let module = naga::front::spv::parse_u8_slice(
|
||||
let mut module = naga::front::spv::parse_u8_slice(
|
||||
&fs::read(format!("{root}/{BASE_DIR_IN}/spv/{name}.spv")).expect("Couldn't find spv file"),
|
||||
&naga::front::spv::Options {
|
||||
adjust_coordinate_space,
|
||||
@@ -664,7 +690,7 @@ fn convert_spv(name: &str, adjust_coordinate_space: bool, targets: Targets) {
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
check_targets(&module, name, targets, None);
|
||||
check_targets(&mut module, name, targets, None);
|
||||
naga::valid::Validator::new(
|
||||
naga::valid::ValidationFlags::all(),
|
||||
naga::valid::Capabilities::default(),
|
||||
@@ -709,7 +735,7 @@ fn convert_glsl_variations_check() {
|
||||
let file = fs::read_to_string(format!("{root}/{BASE_DIR_IN}/variations.glsl"))
|
||||
.expect("Couldn't find glsl file");
|
||||
let mut parser = naga::front::glsl::Frontend::default();
|
||||
let module = parser
|
||||
let mut module = parser
|
||||
.parse(
|
||||
&naga::front::glsl::Options {
|
||||
stage: naga::ShaderStage::Fragment,
|
||||
@@ -718,7 +744,7 @@ fn convert_glsl_variations_check() {
|
||||
&file,
|
||||
)
|
||||
.unwrap();
|
||||
check_targets(&module, "variations-glsl", Targets::GLSL, None);
|
||||
check_targets(&mut module, "variations-glsl", Targets::GLSL, None);
|
||||
}
|
||||
|
||||
#[cfg(feature = "glsl-in")]
|
||||
|
||||
Reference in New Issue
Block a user