mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 19:55:37 +00:00
tint/writer: Clean up EmitConstant() methods
Aside from more SPIR-V using OpConstantNull, this is a no-op change. By refactoring these methods, they're easier to read, and contain less lambda-heavy code. Change-Id: I89c26b2b9f1cd0785d86fb3293f7cfda550bef2e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94331 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
18b966321b
commit
5041480715
@ -2210,85 +2210,76 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
||||
}
|
||||
|
||||
bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
|
||||
auto emit_bool = [&](size_t element_idx) {
|
||||
out << (constant.Element<AInt>(element_idx) ? "true" : "false");
|
||||
return true;
|
||||
};
|
||||
auto emit_f32 = [&](size_t element_idx) {
|
||||
PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
|
||||
return true;
|
||||
};
|
||||
auto emit_i32 = [&](size_t element_idx) {
|
||||
out << constant.Element<AInt>(element_idx).value;
|
||||
return true;
|
||||
};
|
||||
auto emit_u32 = [&](size_t element_idx) {
|
||||
out << constant.Element<AInt>(element_idx).value << "u";
|
||||
return true;
|
||||
};
|
||||
auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
|
||||
if (!EmitType(out, vec_ty, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
|
||||
return false;
|
||||
}
|
||||
return EmitConstantRange(out, constant, constant.Type(), 0, constant.ElementCount());
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
auto emit_els = [&](auto emit_el) {
|
||||
if (constant.AllEqual(start, end)) {
|
||||
return emit_el(start);
|
||||
bool GeneratorImpl::EmitConstantRange(std::ostream& out,
|
||||
const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end) {
|
||||
return Switch(
|
||||
range_ty, //
|
||||
[&](const sem::Bool*) {
|
||||
out << (constant.Element<AInt>(start) ? "true" : "false");
|
||||
return true;
|
||||
},
|
||||
[&](const sem::F32*) {
|
||||
PrintF32(out, static_cast<float>(constant.Element<AFloat>(start)));
|
||||
return true;
|
||||
},
|
||||
[&](const sem::I32*) {
|
||||
out << constant.Element<AInt>(start).value;
|
||||
return true;
|
||||
},
|
||||
[&](const sem::U32*) {
|
||||
out << constant.Element<AInt>(start).value << "u";
|
||||
return true;
|
||||
},
|
||||
[&](const sem::Vector* v) {
|
||||
if (!EmitType(out, v, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
if (constant.AllEqual(start, end)) {
|
||||
if (!EmitConstantRange(out, constant, v->type(), start, start + 1)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
for (size_t i = start; i < end; i++) {
|
||||
if (i > start) {
|
||||
out << ", ";
|
||||
}
|
||||
if (!emit_el(i)) {
|
||||
if (!EmitConstantRange(out, constant, v->type(), i, i + 1u)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
return Switch(
|
||||
vec_ty->type(), //
|
||||
[&](const sem::Bool*) { return emit_els(emit_bool); }, //
|
||||
[&](const sem::F32*) { return emit_els(emit_f32); }, //
|
||||
[&](const sem::I32*) { return emit_els(emit_i32); }, //
|
||||
[&](const sem::U32*) { return emit_els(emit_u32); }, //
|
||||
[&](Default) {
|
||||
diagnostics_.add_error(diag::System::Writer,
|
||||
"unhandled constant vector element type: " +
|
||||
builder_.FriendlyName(vec_ty->type()));
|
||||
return false;
|
||||
});
|
||||
};
|
||||
auto emit_matrix = [&](const sem::Matrix* m) {
|
||||
if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
|
||||
"")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
if (column_idx > 0) {
|
||||
out << ", ";
|
||||
}
|
||||
size_t start = m->rows() * column_idx;
|
||||
size_t end = m->rows() * (column_idx + 1);
|
||||
if (!emit_vector(m->ColumnType(), start, end)) {
|
||||
},
|
||||
[&](const sem::Matrix* m) {
|
||||
if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
|
||||
"")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
return Switch(
|
||||
constant.Type(), //
|
||||
[&](const sem::Bool*) { return emit_bool(0); }, //
|
||||
[&](const sem::F32*) { return emit_f32(0); }, //
|
||||
[&](const sem::I32*) { return emit_i32(0); }, //
|
||||
[&](const sem::U32*) { return emit_u32(0); }, //
|
||||
[&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); }, //
|
||||
[&](const sem::Matrix* m) { return emit_matrix(m); }, //
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
if (column_idx > 0) {
|
||||
out << ", ";
|
||||
}
|
||||
size_t col_start = m->rows() * column_idx;
|
||||
size_t col_end = col_start + m->rows();
|
||||
if (!EmitConstantRange(out, constant, m->ColumnType(), col_start, col_end)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
[&](Default) {
|
||||
diagnostics_.add_error(
|
||||
diag::System::Writer,
|
||||
|
@ -347,6 +347,18 @@ class GeneratorImpl : public TextGenerator {
|
||||
/// @param constant the constant value to emit
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
bool EmitConstant(std::ostream& out, const sem::Constant& constant);
|
||||
/// Handles emitting a sub-range of a constant value
|
||||
/// @param out the output stream
|
||||
/// @param constant the constant value to emit
|
||||
/// @param range_ty the sub-range type
|
||||
/// @param start the element index for the first element
|
||||
/// @param end the element index for one past the last element
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
bool EmitConstantRange(std::ostream& out,
|
||||
const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end);
|
||||
/// Handles a literal
|
||||
/// @param out the output stream
|
||||
/// @param lit the literal to emit
|
||||
|
@ -3144,102 +3144,83 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
||||
}
|
||||
|
||||
bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
|
||||
auto emit_bool = [&](size_t element_idx) {
|
||||
out << (constant.Element<AInt>(element_idx) ? "true" : "false");
|
||||
return true;
|
||||
};
|
||||
auto emit_f32 = [&](size_t element_idx) {
|
||||
PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
|
||||
return true;
|
||||
};
|
||||
auto emit_i32 = [&](size_t element_idx) {
|
||||
out << constant.Element<AInt>(element_idx).value;
|
||||
return true;
|
||||
};
|
||||
auto emit_u32 = [&](size_t element_idx) {
|
||||
out << constant.Element<AInt>(element_idx).value << "u";
|
||||
return true;
|
||||
};
|
||||
auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
|
||||
if (constant.AllEqual(start, end)) {
|
||||
{
|
||||
ScopedParen sp(out);
|
||||
bool ok = Switch(
|
||||
vec_ty->type(), //
|
||||
[&](const sem::Bool*) { return emit_bool(start); }, //
|
||||
[&](const sem::F32*) { return emit_f32(start); }, //
|
||||
[&](const sem::I32*) { return emit_i32(start); }, //
|
||||
[&](const sem::U32*) { return emit_u32(start); } //
|
||||
);
|
||||
if (!ok) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
out << ".";
|
||||
for (size_t i = start; i < end; i++) {
|
||||
out << "x";
|
||||
}
|
||||
return EmitConstantRange(out, constant, constant.Type(), 0, constant.ElementCount());
|
||||
}
|
||||
|
||||
bool GeneratorImpl::EmitConstantRange(std::ostream& out,
|
||||
const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end) {
|
||||
return Switch(
|
||||
range_ty, //
|
||||
[&](const sem::Bool*) {
|
||||
out << (constant.Element<AInt>(start) ? "true" : "false");
|
||||
return true;
|
||||
}
|
||||
},
|
||||
[&](const sem::F32*) {
|
||||
PrintF32(out, static_cast<float>(constant.Element<AFloat>(start)));
|
||||
return true;
|
||||
},
|
||||
[&](const sem::I32*) {
|
||||
out << constant.Element<AInt>(start).value;
|
||||
return true;
|
||||
},
|
||||
[&](const sem::U32*) {
|
||||
out << constant.Element<AInt>(start).value << "u";
|
||||
return true;
|
||||
},
|
||||
[&](const sem::Vector* v) {
|
||||
if (constant.AllEqual(start, end)) {
|
||||
{
|
||||
ScopedParen sp(out);
|
||||
if (!EmitConstantRange(out, constant, v->type(), start, start + 1)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
out << ".";
|
||||
for (size_t i = start; i < end; i++) {
|
||||
out << "x";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!EmitType(out, vec_ty, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
|
||||
return false;
|
||||
}
|
||||
if (!EmitType(out, v, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
ScopedParen sp(out);
|
||||
|
||||
auto emit_els = [&](auto emit_el) {
|
||||
for (size_t i = start; i < end; i++) {
|
||||
if (i > start) {
|
||||
out << ", ";
|
||||
}
|
||||
if (!emit_el(i)) {
|
||||
if (!EmitConstantRange(out, constant, v->type(), i, i + 1u)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
return Switch(
|
||||
vec_ty->type(), //
|
||||
[&](const sem::Bool*) { return emit_els(emit_bool); }, //
|
||||
[&](const sem::F32*) { return emit_els(emit_f32); }, //
|
||||
[&](const sem::I32*) { return emit_els(emit_i32); }, //
|
||||
[&](const sem::U32*) { return emit_els(emit_u32); }, //
|
||||
[&](Default) {
|
||||
diagnostics_.add_error(diag::System::Writer,
|
||||
"unhandled constant vector element type: " +
|
||||
builder_.FriendlyName(vec_ty->type()));
|
||||
return false;
|
||||
});
|
||||
};
|
||||
auto emit_matrix = [&](const sem::Matrix* m) {
|
||||
if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
|
||||
"")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
if (column_idx > 0) {
|
||||
out << ", ";
|
||||
}
|
||||
size_t start = m->rows() * column_idx;
|
||||
size_t end = m->rows() * (column_idx + 1);
|
||||
if (!emit_vector(m->ColumnType(), start, end)) {
|
||||
},
|
||||
[&](const sem::Matrix* m) {
|
||||
if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
|
||||
"")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
return Switch(
|
||||
constant.Type(), //
|
||||
[&](const sem::Bool*) { return emit_bool(0); }, //
|
||||
[&](const sem::F32*) { return emit_f32(0); }, //
|
||||
[&](const sem::I32*) { return emit_i32(0); }, //
|
||||
[&](const sem::U32*) { return emit_u32(0); }, //
|
||||
[&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); }, //
|
||||
[&](const sem::Matrix* m) { return emit_matrix(m); },
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
if (column_idx > 0) {
|
||||
out << ", ";
|
||||
}
|
||||
size_t col_start = m->rows() * column_idx;
|
||||
size_t col_end = col_start + m->rows();
|
||||
if (!EmitConstantRange(out, constant, m->ColumnType(), col_start, col_end)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
[&](Default) {
|
||||
diagnostics_.add_error(
|
||||
diag::System::Writer,
|
||||
|
@ -343,6 +343,18 @@ class GeneratorImpl : public TextGenerator {
|
||||
/// @param constant the constant value to emit
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
bool EmitConstant(std::ostream& out, const sem::Constant& constant);
|
||||
/// Handles emitting a sub-range of a constant value
|
||||
/// @param out the output stream
|
||||
/// @param constant the constant value to emit
|
||||
/// @param range_ty the sub-range type
|
||||
/// @param start the element index for the first element
|
||||
/// @param end the element index for one past the last element
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
bool EmitConstantRange(std::ostream& out,
|
||||
const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end);
|
||||
/// Handles a literal
|
||||
/// @param out the output stream
|
||||
/// @param lit the literal to emit
|
||||
|
@ -1579,83 +1579,75 @@ bool GeneratorImpl::EmitZeroValue(std::ostream& out, const sem::Type* type) {
|
||||
}
|
||||
|
||||
bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
|
||||
auto emit_bool = [&](size_t element_idx) {
|
||||
out << (constant.Element<AInt>(element_idx) ? "true" : "false");
|
||||
return true;
|
||||
};
|
||||
auto emit_f32 = [&](size_t element_idx) {
|
||||
PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
|
||||
return true;
|
||||
};
|
||||
auto emit_i32 = [&](size_t element_idx) {
|
||||
PrintI32(out, static_cast<int32_t>(constant.Element<AInt>(element_idx).value));
|
||||
return true;
|
||||
};
|
||||
auto emit_u32 = [&](size_t element_idx) {
|
||||
out << constant.Element<AInt>(element_idx).value << "u";
|
||||
return true;
|
||||
};
|
||||
auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
|
||||
if (!EmitType(out, vec_ty, "")) {
|
||||
return false;
|
||||
}
|
||||
return EmitConstantRange(out, constant, constant.Type(), 0, constant.ElementCount());
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
auto emit_els = [&](auto emit_el) {
|
||||
if (constant.AllEqual(start, end)) {
|
||||
return emit_el(start);
|
||||
bool GeneratorImpl::EmitConstantRange(std::ostream& out,
|
||||
const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end) {
|
||||
return Switch(
|
||||
range_ty, //
|
||||
[&](const sem::Bool*) {
|
||||
out << (constant.Element<AInt>(start) ? "true" : "false");
|
||||
return true;
|
||||
},
|
||||
[&](const sem::F32*) {
|
||||
PrintF32(out, static_cast<float>(constant.Element<AFloat>(start)));
|
||||
return true;
|
||||
},
|
||||
[&](const sem::I32*) {
|
||||
PrintI32(out, static_cast<int32_t>(constant.Element<AInt>(start).value));
|
||||
return true;
|
||||
},
|
||||
[&](const sem::U32*) {
|
||||
out << constant.Element<AInt>(start).value << "u";
|
||||
return true;
|
||||
},
|
||||
[&](const sem::Vector* v) {
|
||||
if (!EmitType(out, v, "")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
if (constant.AllEqual(start, end)) {
|
||||
if (!EmitConstantRange(out, constant, v->type(), start, start + 1)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
for (size_t i = start; i < end; i++) {
|
||||
if (i > start) {
|
||||
out << ", ";
|
||||
}
|
||||
if (!emit_el(i)) {
|
||||
if (!EmitConstantRange(out, constant, v->type(), i, i + 1u)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
return Switch(
|
||||
vec_ty->type(), //
|
||||
[&](const sem::Bool*) { return emit_els(emit_bool); }, //
|
||||
[&](const sem::F32*) { return emit_els(emit_f32); }, //
|
||||
[&](const sem::I32*) { return emit_els(emit_i32); }, //
|
||||
[&](const sem::U32*) { return emit_els(emit_u32); }, //
|
||||
[&](Default) {
|
||||
diagnostics_.add_error(diag::System::Writer,
|
||||
"unhandled constant vector element type: " +
|
||||
builder_.FriendlyName(vec_ty->type()));
|
||||
return false;
|
||||
});
|
||||
};
|
||||
auto emit_matrix = [&](const sem::Matrix* m) {
|
||||
if (!EmitType(out, constant.Type(), "")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
if (column_idx > 0) {
|
||||
out << ", ";
|
||||
}
|
||||
size_t start = m->rows() * column_idx;
|
||||
size_t end = m->rows() * (column_idx + 1);
|
||||
if (!emit_vector(m->ColumnType(), start, end)) {
|
||||
},
|
||||
[&](const sem::Matrix* m) {
|
||||
if (!EmitType(out, m, "")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
return Switch(
|
||||
constant.Type(), //
|
||||
[&](const sem::Bool*) { return emit_bool(0); }, //
|
||||
[&](const sem::F32*) { return emit_f32(0); }, //
|
||||
[&](const sem::I32*) { return emit_i32(0); }, //
|
||||
[&](const sem::U32*) { return emit_u32(0); }, //
|
||||
[&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); }, //
|
||||
[&](const sem::Matrix* m) { return emit_matrix(m); }, //
|
||||
|
||||
ScopedParen sp(out);
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
if (column_idx > 0) {
|
||||
out << ", ";
|
||||
}
|
||||
size_t col_start = m->rows() * column_idx;
|
||||
size_t col_end = col_start + m->rows();
|
||||
if (!EmitConstantRange(out, constant, m->ColumnType(), col_start, col_end)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
[&](Default) {
|
||||
diagnostics_.add_error(
|
||||
diag::System::Writer,
|
||||
|
@ -257,6 +257,18 @@ class GeneratorImpl : public TextGenerator {
|
||||
/// @param constant the constant value to emit
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
bool EmitConstant(std::ostream& out, const sem::Constant& constant);
|
||||
/// Handles emitting a sub-range of a constant value
|
||||
/// @param out the output stream
|
||||
/// @param constant the constant value to emit
|
||||
/// @param range_ty the sub-range type
|
||||
/// @param start the element index for the first element
|
||||
/// @param end the element index for one past the last element
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
bool EmitConstantRange(std::ostream& out,
|
||||
const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end);
|
||||
/// Handles a literal
|
||||
/// @param out the output of the expression stream
|
||||
/// @param lit the literal to emit
|
||||
|
@ -1675,92 +1675,41 @@ uint32_t Builder::GenerateLiteralIfNeeded(const ast::Variable* var,
|
||||
}
|
||||
|
||||
uint32_t Builder::GenerateConstantIfNeeded(const sem::Constant& constant) {
|
||||
if (constant.AllZero()) {
|
||||
return GenerateConstantNullIfNeeded(constant.Type());
|
||||
return GenerateConstantRangeIfNeeded(constant, constant.Type(), 0, constant.ElementCount());
|
||||
}
|
||||
|
||||
uint32_t Builder::GenerateConstantRangeIfNeeded(const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end) {
|
||||
if (constant.AllZero(start, end)) {
|
||||
return GenerateConstantNullIfNeeded(range_ty);
|
||||
}
|
||||
|
||||
static constexpr size_t kOpsResultIdx = 1; // operand index of the result
|
||||
auto& global_scope = scope_stack_[0];
|
||||
|
||||
auto gen_bool = [&](size_t element_idx) {
|
||||
bool val = constant.Element<AInt>(element_idx);
|
||||
return GenerateConstantIfNeeded(ScalarConstant::Bool(val));
|
||||
};
|
||||
auto gen_f32 = [&](size_t element_idx) {
|
||||
auto val = f32(constant.Element<AFloat>(element_idx));
|
||||
return GenerateConstantIfNeeded(ScalarConstant::F32(val.value));
|
||||
};
|
||||
auto gen_i32 = [&](size_t element_idx) {
|
||||
auto val = i32(constant.Element<AInt>(element_idx));
|
||||
return GenerateConstantIfNeeded(ScalarConstant::I32(val.value));
|
||||
};
|
||||
auto gen_u32 = [&](size_t element_idx) {
|
||||
auto val = u32(constant.Element<AInt>(element_idx));
|
||||
return GenerateConstantIfNeeded(ScalarConstant::U32(val.value));
|
||||
};
|
||||
auto gen_els = [&](std::vector<Operand>& ids, size_t start, size_t end, auto gen_el) {
|
||||
for (size_t i = start; i < end; i++) {
|
||||
auto id = gen_el(i);
|
||||
if (!id) {
|
||||
return false;
|
||||
}
|
||||
ids.emplace_back(id);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
auto gen_vector = [&](const sem::Vector* ty, size_t start, size_t end) -> uint32_t {
|
||||
auto type_id = GenerateTypeIfNeeded(ty);
|
||||
auto composite = [&](const sem::Type* el_ty) -> uint32_t {
|
||||
auto type_id = GenerateTypeIfNeeded(range_ty);
|
||||
if (!type_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static constexpr size_t kOpsResultIdx = 1; // operand index of the result
|
||||
|
||||
std::vector<Operand> ops;
|
||||
ops.reserve(end - start + 2);
|
||||
ops.emplace_back(type_id);
|
||||
ops.push_back(Operand(0u)); // Placeholder for the result ID
|
||||
auto ok = Switch(
|
||||
constant.ElementType(), //
|
||||
[&](const sem::Bool*) { return gen_els(ops, start, end, gen_bool); }, //
|
||||
[&](const sem::F32*) { return gen_els(ops, start, end, gen_f32); }, //
|
||||
[&](const sem::I32*) { return gen_els(ops, start, end, gen_i32); }, //
|
||||
[&](const sem::U32*) { return gen_els(ops, start, end, gen_u32); }, //
|
||||
[&](Default) {
|
||||
error_ = "unhandled constant element type: " + builder_.FriendlyName(ty);
|
||||
return false;
|
||||
});
|
||||
if (!ok) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return utils::GetOrCreate(global_scope.type_ctor_to_id_, OperandListKey{ops},
|
||||
[&]() -> uint32_t {
|
||||
auto result = result_op();
|
||||
ops[kOpsResultIdx] = result;
|
||||
push_type(spv::Op::OpConstantComposite, std::move(ops));
|
||||
return std::get<uint32_t>(result);
|
||||
});
|
||||
};
|
||||
auto gen_matrix = [&](const sem::Matrix* m) -> uint32_t {
|
||||
auto mat_type_id = GenerateTypeIfNeeded(m);
|
||||
if (!mat_type_id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::vector<Operand> ops;
|
||||
ops.reserve(m->columns() + 2);
|
||||
ops.emplace_back(mat_type_id);
|
||||
ops.push_back(Operand(0u)); // Placeholder for the result ID
|
||||
|
||||
for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
|
||||
size_t start = m->rows() * column_idx;
|
||||
size_t end = m->rows() * (column_idx + 1);
|
||||
auto column_id = gen_vector(m->ColumnType(), start, end);
|
||||
if (!column_id) {
|
||||
uint32_t step = 0;
|
||||
sem::Type::DeepestElementOf(el_ty, &step);
|
||||
for (size_t i = start; i < end; i += step) {
|
||||
auto id = GenerateConstantRangeIfNeeded(constant, el_ty, i, i + step);
|
||||
if (!id) {
|
||||
return 0;
|
||||
}
|
||||
ops.emplace_back(column_id);
|
||||
ops.emplace_back(id);
|
||||
}
|
||||
|
||||
auto& global_scope = scope_stack_[0];
|
||||
return utils::GetOrCreate(global_scope.type_ctor_to_id_, OperandListKey{ops},
|
||||
[&]() -> uint32_t {
|
||||
auto result = result_op();
|
||||
@ -1771,13 +1720,26 @@ uint32_t Builder::GenerateConstantIfNeeded(const sem::Constant& constant) {
|
||||
};
|
||||
|
||||
return Switch(
|
||||
constant.Type(), //
|
||||
[&](const sem::Bool*) { return gen_bool(0); }, //
|
||||
[&](const sem::F32*) { return gen_f32(0); }, //
|
||||
[&](const sem::I32*) { return gen_i32(0); }, //
|
||||
[&](const sem::U32*) { return gen_u32(0); }, //
|
||||
[&](const sem::Vector* v) { return gen_vector(v, 0, constant.ElementCount()); }, //
|
||||
[&](const sem::Matrix* m) { return gen_matrix(m); }, //
|
||||
range_ty, //
|
||||
[&](const sem::Bool*) {
|
||||
bool val = constant.Element<AInt>(start);
|
||||
return GenerateConstantIfNeeded(ScalarConstant::Bool(val));
|
||||
},
|
||||
[&](const sem::F32*) {
|
||||
auto val = f32(constant.Element<AFloat>(start));
|
||||
return GenerateConstantIfNeeded(ScalarConstant::F32(val.value));
|
||||
},
|
||||
[&](const sem::I32*) {
|
||||
auto val = i32(constant.Element<AInt>(start));
|
||||
return GenerateConstantIfNeeded(ScalarConstant::I32(val.value));
|
||||
},
|
||||
[&](const sem::U32*) {
|
||||
auto val = u32(constant.Element<AInt>(start));
|
||||
return GenerateConstantIfNeeded(ScalarConstant::U32(val.value));
|
||||
},
|
||||
[&](const sem::Vector* v) { return composite(v->type()); },
|
||||
[&](const sem::Matrix* m) { return composite(m->ColumnType()); },
|
||||
[&](const sem::Array* a) { return composite(a->ElemType()); },
|
||||
[&](Default) {
|
||||
error_ = "unhandled constant type: " + builder_.FriendlyName(constant.Type());
|
||||
return false;
|
||||
|
@ -556,6 +556,17 @@ class Builder {
|
||||
/// @returns the ID on success or 0 on failure
|
||||
uint32_t GenerateConstantIfNeeded(const sem::Constant& constant);
|
||||
|
||||
/// Handles emitting a sub-range of a constant value
|
||||
/// @param constant the constant value to emit
|
||||
/// @param range_ty the sub-range type
|
||||
/// @param start the element index for the first element
|
||||
/// @param end the element index for one past the last element
|
||||
/// @returns true if the constant value was successfully emitted
|
||||
uint32_t GenerateConstantRangeIfNeeded(const sem::Constant& constant,
|
||||
const sem::Type* range_ty,
|
||||
size_t start,
|
||||
size_t end);
|
||||
|
||||
/// Generates a scalar constant if needed
|
||||
/// @param constant the constant to generate.
|
||||
/// @returns the ID on success or 0 on failure
|
||||
|
@ -770,7 +770,7 @@ TEST_F(BuilderTest, IndexAccessor_Of_Vec) {
|
||||
%8 = OpTypeInt 32 0
|
||||
%9 = OpConstant %8 3
|
||||
%5 = OpTypeArray %6 %9
|
||||
%10 = OpConstant %7 0
|
||||
%10 = OpConstantNull %7
|
||||
%11 = OpConstant %7 0.5
|
||||
%12 = OpConstantComposite %6 %10 %11
|
||||
%13 = OpConstant %7 -0.5
|
||||
@ -813,7 +813,7 @@ TEST_F(BuilderTest, IndexAccessor_Of_Array_Of_f32) {
|
||||
%8 = OpTypeInt 32 0
|
||||
%9 = OpConstant %8 3
|
||||
%5 = OpTypeArray %6 %9
|
||||
%10 = OpConstant %7 0
|
||||
%10 = OpConstantNull %7
|
||||
%11 = OpConstant %7 0.5
|
||||
%12 = OpConstantComposite %6 %10 %11
|
||||
%13 = OpConstant %7 -0.5
|
||||
@ -850,7 +850,7 @@ TEST_F(BuilderTest, IndexAccessor_Vec_Literal) {
|
||||
|
||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeFloat 32
|
||||
%1 = OpTypeVector %2 2
|
||||
%3 = OpConstant %2 0
|
||||
%3 = OpConstantNull %2
|
||||
%4 = OpConstant %2 0.5
|
||||
%5 = OpConstantComposite %1 %3 %4
|
||||
%6 = OpTypeInt 32 0
|
||||
@ -882,7 +882,7 @@ TEST_F(BuilderTest, IndexAccessor_Vec_Dynamic) {
|
||||
|
||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeFloat 32
|
||||
%1 = OpTypeVector %2 2
|
||||
%3 = OpConstant %2 0
|
||||
%3 = OpConstantNull %2
|
||||
%4 = OpConstant %2 0.5
|
||||
%5 = OpConstantComposite %1 %3 %4
|
||||
%8 = OpTypeInt 32 1
|
||||
|
@ -287,7 +287,7 @@ TEST_P(BinaryOperatorBoolTest, Vector) {
|
||||
EXPECT_EQ(b.GenerateBinaryExpression(expr), 7u) << b.error();
|
||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeBool
|
||||
%1 = OpTypeVector %2 3
|
||||
%3 = OpConstantFalse %2
|
||||
%3 = OpConstantNull %2
|
||||
%4 = OpConstantTrue %2
|
||||
%5 = OpConstantComposite %1 %3 %4 %3
|
||||
%6 = OpConstantComposite %1 %4 %3 %4
|
||||
|
@ -2683,7 +2683,7 @@ OpCapability SampledCubeArray
|
||||
%26 = OpConstantComposite %14 %23 %24 %25
|
||||
%28 = OpTypeInt 32 1
|
||||
%27 = OpTypeVector %28 3
|
||||
%29 = OpConstant %28 0
|
||||
%29 = OpConstantNull %28
|
||||
%30 = OpConstant %28 1
|
||||
%31 = OpConstant %28 2
|
||||
%32 = OpConstantComposite %27 %29 %30 %31
|
||||
|
@ -439,7 +439,7 @@ TEST_F(SpvBuilderConstructorTest, Type_Vec3_With_Bool_Const) {
|
||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeBool
|
||||
%1 = OpTypeVector %2 3
|
||||
%3 = OpConstantTrue %2
|
||||
%4 = OpConstantFalse %2
|
||||
%4 = OpConstantNull %2
|
||||
%5 = OpConstantComposite %1 %3 %4 %3
|
||||
)");
|
||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), R"()");
|
||||
|
@ -13,10 +13,10 @@ bug/dawn/947.wgsl:55:33 note: reading from user-defined input 'texcoord' may res
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 139
|
||||
; Bound: 138
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%118 = OpExtInstImport "GLSL.std.450"
|
||||
%117 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Vertex %vs_main "vs_main" %VertexIndex_1 %texcoords_1 %position_1 %vertex_point_size
|
||||
OpEntryPoint Fragment %fs_main "fs_main" %texcoord_1 %value
|
||||
@ -99,136 +99,135 @@ bug/dawn/947.wgsl:55:33 note: reading from user-defined input 'texcoord' may res
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3
|
||||
%float_n0_5 = OpConstant %float -0.5
|
||||
%float_0 = OpConstant %float 0
|
||||
%37 = OpConstantComposite %v2float %float_n0_5 %float_0
|
||||
%36 = OpConstantComposite %v2float %float_n0_5 %15
|
||||
%float_1_5 = OpConstant %float 1.5
|
||||
%39 = OpConstantComposite %v2float %float_1_5 %float_0
|
||||
%38 = OpConstantComposite %v2float %float_1_5 %15
|
||||
%float_0_5 = OpConstant %float 0.5
|
||||
%float_2 = OpConstant %float 2
|
||||
%42 = OpConstantComposite %v2float %float_0_5 %float_2
|
||||
%43 = OpConstantComposite %_arr_v2float_uint_3 %37 %39 %42
|
||||
%41 = OpConstantComposite %v2float %float_0_5 %float_2
|
||||
%42 = OpConstantComposite %_arr_v2float_uint_3 %36 %38 %41
|
||||
%_ptr_Function__arr_v2float_uint_3 = OpTypePointer Function %_arr_v2float_uint_3
|
||||
%46 = OpConstantNull %_arr_v2float_uint_3
|
||||
%45 = OpConstantNull %_arr_v2float_uint_3
|
||||
%_ptr_Function_VertexOutputs = OpTypePointer Function %VertexOutputs
|
||||
%49 = OpConstantNull %VertexOutputs
|
||||
%48 = OpConstantNull %VertexOutputs
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%_ptr_Function_v2float = OpTypePointer Function %v2float
|
||||
%float_1 = OpConstant %float 1
|
||||
%58 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%57 = OpConstantComposite %v2float %float_1 %float_1
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%71 = OpConstantNull %bool
|
||||
%70 = OpConstantNull %bool
|
||||
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
|
||||
%float_n1 = OpConstant %float -1
|
||||
%87 = OpConstantComposite %v2float %float_1 %float_n1
|
||||
%89 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%86 = OpConstantComposite %v2float %float_1 %float_n1
|
||||
%88 = OpConstantComposite %v2float %15 %float_1
|
||||
%void = OpTypeVoid
|
||||
%103 = OpTypeFunction %void
|
||||
%113 = OpTypeFunction %v4float %v2float
|
||||
%102 = OpTypeFunction %void
|
||||
%112 = OpTypeFunction %v4float %v2float
|
||||
%v2bool = OpTypeVector %bool 2
|
||||
%131 = OpTypeSampledImage %27
|
||||
%130 = OpTypeSampledImage %27
|
||||
%vs_main_inner = OpFunction %VertexOutputs None %28
|
||||
%VertexIndex = OpFunctionParameter %uint
|
||||
%32 = OpLabel
|
||||
%texcoord = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %46
|
||||
%output = OpVariable %_ptr_Function_VertexOutputs Function %49
|
||||
%flipY = OpVariable %_ptr_Function_bool Function %71
|
||||
OpStore %texcoord %43
|
||||
%52 = OpAccessChain %_ptr_Function_v4float %output %uint_1
|
||||
%54 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
||||
%55 = OpLoad %v2float %54
|
||||
%56 = OpVectorTimesScalar %v2float %55 %float_2
|
||||
%59 = OpFSub %v2float %56 %58
|
||||
%60 = OpCompositeExtract %float %59 0
|
||||
%61 = OpCompositeExtract %float %59 1
|
||||
%62 = OpCompositeConstruct %v4float %60 %61 %15 %float_1
|
||||
OpStore %52 %62
|
||||
%65 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0 %uint_1
|
||||
%66 = OpLoad %float %65
|
||||
%67 = OpFOrdLessThan %bool %66 %15
|
||||
OpStore %flipY %67
|
||||
%72 = OpLoad %bool %flipY
|
||||
OpSelectionMerge %73 None
|
||||
OpBranchConditional %72 %74 %75
|
||||
%74 = OpLabel
|
||||
%76 = OpAccessChain %_ptr_Function_v2float %output %uint_0
|
||||
%77 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
||||
%78 = OpLoad %v2float %77
|
||||
%80 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
|
||||
%81 = OpLoad %v2float %80
|
||||
%82 = OpFMul %v2float %78 %81
|
||||
%83 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
|
||||
%84 = OpLoad %v2float %83
|
||||
%85 = OpFAdd %v2float %82 %84
|
||||
%88 = OpFMul %v2float %85 %87
|
||||
%90 = OpFAdd %v2float %88 %89
|
||||
OpStore %76 %90
|
||||
OpBranch %73
|
||||
%75 = OpLabel
|
||||
%91 = OpAccessChain %_ptr_Function_v2float %output %uint_0
|
||||
%92 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
||||
%93 = OpLoad %v2float %92
|
||||
%94 = OpFMul %v2float %93 %87
|
||||
%95 = OpFAdd %v2float %94 %89
|
||||
%96 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
|
||||
%97 = OpLoad %v2float %96
|
||||
%98 = OpFMul %v2float %95 %97
|
||||
%99 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
|
||||
%100 = OpLoad %v2float %99
|
||||
%101 = OpFAdd %v2float %98 %100
|
||||
OpStore %91 %101
|
||||
OpBranch %73
|
||||
%texcoord = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %45
|
||||
%output = OpVariable %_ptr_Function_VertexOutputs Function %48
|
||||
%flipY = OpVariable %_ptr_Function_bool Function %70
|
||||
OpStore %texcoord %42
|
||||
%51 = OpAccessChain %_ptr_Function_v4float %output %uint_1
|
||||
%53 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
||||
%54 = OpLoad %v2float %53
|
||||
%55 = OpVectorTimesScalar %v2float %54 %float_2
|
||||
%58 = OpFSub %v2float %55 %57
|
||||
%59 = OpCompositeExtract %float %58 0
|
||||
%60 = OpCompositeExtract %float %58 1
|
||||
%61 = OpCompositeConstruct %v4float %59 %60 %15 %float_1
|
||||
OpStore %51 %61
|
||||
%64 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0 %uint_1
|
||||
%65 = OpLoad %float %64
|
||||
%66 = OpFOrdLessThan %bool %65 %15
|
||||
OpStore %flipY %66
|
||||
%71 = OpLoad %bool %flipY
|
||||
OpSelectionMerge %72 None
|
||||
OpBranchConditional %71 %73 %74
|
||||
%73 = OpLabel
|
||||
%102 = OpLoad %VertexOutputs %output
|
||||
OpReturnValue %102
|
||||
%75 = OpAccessChain %_ptr_Function_v2float %output %uint_0
|
||||
%76 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
||||
%77 = OpLoad %v2float %76
|
||||
%79 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
|
||||
%80 = OpLoad %v2float %79
|
||||
%81 = OpFMul %v2float %77 %80
|
||||
%82 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
|
||||
%83 = OpLoad %v2float %82
|
||||
%84 = OpFAdd %v2float %81 %83
|
||||
%87 = OpFMul %v2float %84 %86
|
||||
%89 = OpFAdd %v2float %87 %88
|
||||
OpStore %75 %89
|
||||
OpBranch %72
|
||||
%74 = OpLabel
|
||||
%90 = OpAccessChain %_ptr_Function_v2float %output %uint_0
|
||||
%91 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
|
||||
%92 = OpLoad %v2float %91
|
||||
%93 = OpFMul %v2float %92 %86
|
||||
%94 = OpFAdd %v2float %93 %88
|
||||
%95 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
|
||||
%96 = OpLoad %v2float %95
|
||||
%97 = OpFMul %v2float %94 %96
|
||||
%98 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
|
||||
%99 = OpLoad %v2float %98
|
||||
%100 = OpFAdd %v2float %97 %99
|
||||
OpStore %90 %100
|
||||
OpBranch %72
|
||||
%72 = OpLabel
|
||||
%101 = OpLoad %VertexOutputs %output
|
||||
OpReturnValue %101
|
||||
OpFunctionEnd
|
||||
%vs_main = OpFunction %void None %103
|
||||
%106 = OpLabel
|
||||
%108 = OpLoad %uint %VertexIndex_1
|
||||
%107 = OpFunctionCall %VertexOutputs %vs_main_inner %108
|
||||
%109 = OpCompositeExtract %v2float %107 0
|
||||
OpStore %texcoords_1 %109
|
||||
%110 = OpCompositeExtract %v4float %107 1
|
||||
OpStore %position_1 %110
|
||||
%vs_main = OpFunction %void None %102
|
||||
%105 = OpLabel
|
||||
%107 = OpLoad %uint %VertexIndex_1
|
||||
%106 = OpFunctionCall %VertexOutputs %vs_main_inner %107
|
||||
%108 = OpCompositeExtract %v2float %106 0
|
||||
OpStore %texcoords_1 %108
|
||||
%109 = OpCompositeExtract %v4float %106 1
|
||||
OpStore %position_1 %109
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_discard_func = OpFunction %void None %103
|
||||
%112 = OpLabel
|
||||
%tint_discard_func = OpFunction %void None %102
|
||||
%111 = OpLabel
|
||||
OpKill
|
||||
OpFunctionEnd
|
||||
%fs_main_inner = OpFunction %v4float None %113
|
||||
%fs_main_inner = OpFunction %v4float None %112
|
||||
%texcoord_0 = OpFunctionParameter %v2float
|
||||
%116 = OpLabel
|
||||
%115 = OpLabel
|
||||
%clampedTexcoord = OpVariable %_ptr_Function_v2float Function %8
|
||||
%srcColor = OpVariable %_ptr_Function_v4float Function %12
|
||||
%117 = OpExtInst %v2float %118 NClamp %texcoord_0 %8 %58
|
||||
OpStore %clampedTexcoord %117
|
||||
%122 = OpLoad %v2float %clampedTexcoord
|
||||
%123 = OpFOrdEqual %v2bool %122 %texcoord_0
|
||||
%121 = OpAll %bool %123
|
||||
%120 = OpLogicalNot %bool %121
|
||||
OpSelectionMerge %125 None
|
||||
OpBranchConditional %120 %126 %125
|
||||
%126 = OpLabel
|
||||
%127 = OpFunctionCall %void %tint_discard_func
|
||||
OpReturnValue %12
|
||||
%116 = OpExtInst %v2float %117 NClamp %texcoord_0 %8 %57
|
||||
OpStore %clampedTexcoord %116
|
||||
%121 = OpLoad %v2float %clampedTexcoord
|
||||
%122 = OpFOrdEqual %v2bool %121 %texcoord_0
|
||||
%120 = OpAll %bool %122
|
||||
%119 = OpLogicalNot %bool %120
|
||||
OpSelectionMerge %124 None
|
||||
OpBranchConditional %119 %125 %124
|
||||
%125 = OpLabel
|
||||
%129 = OpLoad %24 %mySampler
|
||||
%130 = OpLoad %27 %myTexture
|
||||
%132 = OpSampledImage %131 %130 %129
|
||||
%128 = OpImageSampleImplicitLod %v4float %132 %texcoord_0
|
||||
OpStore %srcColor %128
|
||||
%134 = OpLoad %v4float %srcColor
|
||||
OpReturnValue %134
|
||||
%126 = OpFunctionCall %void %tint_discard_func
|
||||
OpReturnValue %12
|
||||
%124 = OpLabel
|
||||
%128 = OpLoad %24 %mySampler
|
||||
%129 = OpLoad %27 %myTexture
|
||||
%131 = OpSampledImage %130 %129 %128
|
||||
%127 = OpImageSampleImplicitLod %v4float %131 %texcoord_0
|
||||
OpStore %srcColor %127
|
||||
%133 = OpLoad %v4float %srcColor
|
||||
OpReturnValue %133
|
||||
OpFunctionEnd
|
||||
%fs_main = OpFunction %void None %103
|
||||
%136 = OpLabel
|
||||
%138 = OpLoad %v2float %texcoord_1
|
||||
%137 = OpFunctionCall %v4float %fs_main_inner %138
|
||||
OpStore %value %137
|
||||
%fs_main = OpFunction %void None %102
|
||||
%135 = OpLabel
|
||||
%137 = OpLoad %v2float %texcoord_1
|
||||
%136 = OpFunctionCall %v4float %fs_main_inner %137
|
||||
OpStore %value %136
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -126,8 +126,8 @@
|
||||
%_ptr_Function_FragmentOutput = OpTypePointer Function %FragmentOutput
|
||||
%89 = OpConstantNull %FragmentOutput
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%float_0 = OpConstant %float 0
|
||||
%93 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%92 = OpConstantNull %float
|
||||
%93 = OpConstantComposite %v4float %float_1 %92 %92 %float_1
|
||||
%void = OpTypeVoid
|
||||
%96 = OpTypeFunction %void
|
||||
%getColor = OpFunction %v4float None %30
|
||||
|
@ -13,7 +13,7 @@ bug/tint/1118.wgsl:46:19 note: reading from module-scope private variable 'fClip
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 195
|
||||
; Bound: 194
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%71 = OpExtInstImport "GLSL.std.450"
|
||||
@ -133,13 +133,12 @@ bug/tint/1118.wgsl:46:19 note: reading from module-scope private variable 'fClip
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_ptr_Uniform_float = OpTypePointer Uniform %float
|
||||
%110 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%float_0 = OpConstant %float 0
|
||||
%112 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
|
||||
%111 = OpConstantComposite %v4float %11 %11 %11 %float_1
|
||||
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%main_out = OpTypeStruct %v4float
|
||||
%175 = OpTypeFunction %main_out %float %float
|
||||
%186 = OpConstantNull %main_out
|
||||
%174 = OpTypeFunction %main_out %float %float
|
||||
%185 = OpConstantNull %main_out
|
||||
%main_1 = OpFunction %void None %29
|
||||
%32 = OpLabel
|
||||
%viewDirectionW = OpVariable %_ptr_Function_v3float Function %35
|
||||
@ -222,103 +221,103 @@ bug/tint/1118.wgsl:46:19 note: reading from module-scope private variable 'fClip
|
||||
OpStore %glossiness %11
|
||||
OpStore %diffuseBase %35
|
||||
OpStore %shadow %float_1
|
||||
OpStore %refractionColor %112
|
||||
OpStore %reflectionColor %112
|
||||
%114 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_3
|
||||
%115 = OpLoad %v3float %114
|
||||
OpStore %emissiveColor %115
|
||||
%116 = OpLoad %v3float %diffuseBase
|
||||
%117 = OpLoad %v3float %diffuseColor
|
||||
%118 = OpLoad %v3float %emissiveColor
|
||||
%120 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_1
|
||||
%121 = OpLoad %v3float %120
|
||||
%122 = OpLoad %v4float %baseColor
|
||||
%124 = OpFMul %v3float %116 %117
|
||||
%125 = OpFAdd %v3float %124 %118
|
||||
%126 = OpFAdd %v3float %125 %121
|
||||
%123 = OpExtInst %v3float %71 NClamp %126 %35 %110
|
||||
%127 = OpCompositeExtract %float %122 0
|
||||
%128 = OpCompositeExtract %float %122 1
|
||||
%129 = OpCompositeExtract %float %122 2
|
||||
%130 = OpCompositeConstruct %v3float %127 %128 %129
|
||||
%131 = OpFMul %v3float %123 %130
|
||||
OpStore %finalDiffuse %131
|
||||
OpStore %refractionColor %111
|
||||
OpStore %reflectionColor %111
|
||||
%113 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_3
|
||||
%114 = OpLoad %v3float %113
|
||||
OpStore %emissiveColor %114
|
||||
%115 = OpLoad %v3float %diffuseBase
|
||||
%116 = OpLoad %v3float %diffuseColor
|
||||
%117 = OpLoad %v3float %emissiveColor
|
||||
%119 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_1
|
||||
%120 = OpLoad %v3float %119
|
||||
%121 = OpLoad %v4float %baseColor
|
||||
%123 = OpFMul %v3float %115 %116
|
||||
%124 = OpFAdd %v3float %123 %117
|
||||
%125 = OpFAdd %v3float %124 %120
|
||||
%122 = OpExtInst %v3float %71 NClamp %125 %35 %110
|
||||
%126 = OpCompositeExtract %float %121 0
|
||||
%127 = OpCompositeExtract %float %121 1
|
||||
%128 = OpCompositeExtract %float %121 2
|
||||
%129 = OpCompositeConstruct %v3float %126 %127 %128
|
||||
%130 = OpFMul %v3float %122 %129
|
||||
OpStore %finalDiffuse %130
|
||||
OpStore %finalSpecular %35
|
||||
%132 = OpLoad %v3float %finalDiffuse
|
||||
%133 = OpLoad %v3float %baseAmbientColor
|
||||
%134 = OpLoad %v3float %finalSpecular
|
||||
%135 = OpLoad %v4float %reflectionColor
|
||||
%136 = OpLoad %v4float %refractionColor
|
||||
%137 = OpFMul %v3float %132 %133
|
||||
%138 = OpFAdd %v3float %137 %134
|
||||
%139 = OpCompositeExtract %float %135 0
|
||||
%140 = OpCompositeExtract %float %135 1
|
||||
%141 = OpCompositeExtract %float %135 2
|
||||
%142 = OpCompositeConstruct %v3float %139 %140 %141
|
||||
%143 = OpFAdd %v3float %138 %142
|
||||
%144 = OpCompositeExtract %float %136 0
|
||||
%145 = OpCompositeExtract %float %136 1
|
||||
%146 = OpCompositeExtract %float %136 2
|
||||
%147 = OpCompositeConstruct %v3float %144 %145 %146
|
||||
%148 = OpFAdd %v3float %143 %147
|
||||
%149 = OpLoad %float %alpha
|
||||
%150 = OpCompositeExtract %float %148 0
|
||||
%151 = OpCompositeExtract %float %148 1
|
||||
%152 = OpCompositeExtract %float %148 2
|
||||
%153 = OpCompositeConstruct %v4float %150 %151 %152 %149
|
||||
OpStore %color %153
|
||||
%154 = OpLoad %v4float %color
|
||||
%156 = OpCompositeExtract %float %154 0
|
||||
%157 = OpCompositeExtract %float %154 1
|
||||
%158 = OpCompositeExtract %float %154 2
|
||||
%159 = OpCompositeConstruct %v3float %156 %157 %158
|
||||
%155 = OpExtInst %v3float %71 NMax %159 %35
|
||||
%160 = OpLoad %v4float %color
|
||||
%161 = OpCompositeExtract %float %155 0
|
||||
%162 = OpCompositeExtract %float %155 1
|
||||
%163 = OpCompositeExtract %float %155 2
|
||||
%164 = OpCompositeExtract %float %160 3
|
||||
%165 = OpCompositeConstruct %v4float %161 %162 %163 %164
|
||||
OpStore %color %165
|
||||
%166 = OpAccessChain %_ptr_Uniform_float %x_137 %uint_0
|
||||
%167 = OpLoad %float %166
|
||||
%168 = OpAccessChain %_ptr_Function_float %color %uint_3
|
||||
%169 = OpLoad %float %168
|
||||
%170 = OpAccessChain %_ptr_Function_float %color %uint_3
|
||||
%171 = OpFMul %float %169 %167
|
||||
OpStore %170 %171
|
||||
%172 = OpLoad %v4float %color
|
||||
OpStore %glFragColor %172
|
||||
%131 = OpLoad %v3float %finalDiffuse
|
||||
%132 = OpLoad %v3float %baseAmbientColor
|
||||
%133 = OpLoad %v3float %finalSpecular
|
||||
%134 = OpLoad %v4float %reflectionColor
|
||||
%135 = OpLoad %v4float %refractionColor
|
||||
%136 = OpFMul %v3float %131 %132
|
||||
%137 = OpFAdd %v3float %136 %133
|
||||
%138 = OpCompositeExtract %float %134 0
|
||||
%139 = OpCompositeExtract %float %134 1
|
||||
%140 = OpCompositeExtract %float %134 2
|
||||
%141 = OpCompositeConstruct %v3float %138 %139 %140
|
||||
%142 = OpFAdd %v3float %137 %141
|
||||
%143 = OpCompositeExtract %float %135 0
|
||||
%144 = OpCompositeExtract %float %135 1
|
||||
%145 = OpCompositeExtract %float %135 2
|
||||
%146 = OpCompositeConstruct %v3float %143 %144 %145
|
||||
%147 = OpFAdd %v3float %142 %146
|
||||
%148 = OpLoad %float %alpha
|
||||
%149 = OpCompositeExtract %float %147 0
|
||||
%150 = OpCompositeExtract %float %147 1
|
||||
%151 = OpCompositeExtract %float %147 2
|
||||
%152 = OpCompositeConstruct %v4float %149 %150 %151 %148
|
||||
OpStore %color %152
|
||||
%153 = OpLoad %v4float %color
|
||||
%155 = OpCompositeExtract %float %153 0
|
||||
%156 = OpCompositeExtract %float %153 1
|
||||
%157 = OpCompositeExtract %float %153 2
|
||||
%158 = OpCompositeConstruct %v3float %155 %156 %157
|
||||
%154 = OpExtInst %v3float %71 NMax %158 %35
|
||||
%159 = OpLoad %v4float %color
|
||||
%160 = OpCompositeExtract %float %154 0
|
||||
%161 = OpCompositeExtract %float %154 1
|
||||
%162 = OpCompositeExtract %float %154 2
|
||||
%163 = OpCompositeExtract %float %159 3
|
||||
%164 = OpCompositeConstruct %v4float %160 %161 %162 %163
|
||||
OpStore %color %164
|
||||
%165 = OpAccessChain %_ptr_Uniform_float %x_137 %uint_0
|
||||
%166 = OpLoad %float %165
|
||||
%167 = OpAccessChain %_ptr_Function_float %color %uint_3
|
||||
%168 = OpLoad %float %167
|
||||
%169 = OpAccessChain %_ptr_Function_float %color %uint_3
|
||||
%170 = OpFMul %float %168 %166
|
||||
OpStore %169 %170
|
||||
%171 = OpLoad %v4float %color
|
||||
OpStore %glFragColor %171
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_discard_func = OpFunction %void None %29
|
||||
%174 = OpLabel
|
||||
%173 = OpLabel
|
||||
OpKill
|
||||
OpFunctionEnd
|
||||
%main_inner = OpFunction %main_out None %175
|
||||
%main_inner = OpFunction %main_out None %174
|
||||
%fClipDistance3_param = OpFunctionParameter %float
|
||||
%fClipDistance4_param = OpFunctionParameter %float
|
||||
%180 = OpLabel
|
||||
%179 = OpLabel
|
||||
OpStore %fClipDistance3 %fClipDistance3_param
|
||||
OpStore %fClipDistance4 %fClipDistance4_param
|
||||
%181 = OpFunctionCall %void %main_1
|
||||
%182 = OpLoad %bool %tint_discard
|
||||
OpSelectionMerge %183 None
|
||||
OpBranchConditional %182 %184 %183
|
||||
%184 = OpLabel
|
||||
%185 = OpFunctionCall %void %tint_discard_func
|
||||
OpReturnValue %186
|
||||
%180 = OpFunctionCall %void %main_1
|
||||
%181 = OpLoad %bool %tint_discard
|
||||
OpSelectionMerge %182 None
|
||||
OpBranchConditional %181 %183 %182
|
||||
%183 = OpLabel
|
||||
%187 = OpLoad %v4float %glFragColor
|
||||
%188 = OpCompositeConstruct %main_out %187
|
||||
OpReturnValue %188
|
||||
%184 = OpFunctionCall %void %tint_discard_func
|
||||
OpReturnValue %185
|
||||
%182 = OpLabel
|
||||
%186 = OpLoad %v4float %glFragColor
|
||||
%187 = OpCompositeConstruct %main_out %186
|
||||
OpReturnValue %187
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %29
|
||||
%190 = OpLabel
|
||||
%192 = OpLoad %float %fClipDistance3_param_1
|
||||
%193 = OpLoad %float %fClipDistance4_param_1
|
||||
%191 = OpFunctionCall %main_out %main_inner %192 %193
|
||||
%194 = OpCompositeExtract %v4float %191 0
|
||||
OpStore %glFragColor_1_1 %194
|
||||
%189 = OpLabel
|
||||
%191 = OpLoad %float %fClipDistance3_param_1
|
||||
%192 = OpLoad %float %fClipDistance4_param_1
|
||||
%190 = OpFunctionCall %main_out %main_inner %191 %192
|
||||
%193 = OpCompositeExtract %v4float %190 0
|
||||
OpStore %glFragColor_1_1 %193
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 71
|
||||
; Bound: 70
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -67,47 +67,46 @@
|
||||
%float_0_5 = OpConstant %float 0.5
|
||||
%float_1 = OpConstant %float 1
|
||||
%_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4
|
||||
%float_0 = OpConstant %float 0
|
||||
%49 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
|
||||
%50 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
|
||||
%51 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1
|
||||
%52 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%53 = OpConstantComposite %_arr_v4float_uint_4 %49 %50 %51 %52
|
||||
%48 = OpConstantComposite %v4float %float_1 %13 %13 %float_1
|
||||
%49 = OpConstantComposite %v4float %13 %float_1 %13 %float_1
|
||||
%50 = OpConstantComposite %v4float %13 %13 %float_1 %float_1
|
||||
%51 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
|
||||
%52 = OpConstantComposite %_arr_v4float_uint_4 %48 %49 %50 %51
|
||||
%_ptr_Function__arr_v4float_uint_4 = OpTypePointer Function %_arr_v4float_uint_4
|
||||
%56 = OpConstantNull %_arr_v4float_uint_4
|
||||
%55 = OpConstantNull %_arr_v4float_uint_4
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%void = OpTypeVoid
|
||||
%62 = OpTypeFunction %void
|
||||
%61 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %Output None %14
|
||||
%VertexIndex = OpFunctionParameter %uint
|
||||
%InstanceIndex = OpFunctionParameter %uint
|
||||
%19 = OpLabel
|
||||
%var_for_index = OpVariable %_ptr_Function__arr_v2float_uint_4 Function %34
|
||||
%output = OpVariable %_ptr_Function_Output Function %41
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_v4float_uint_4 Function %56
|
||||
%var_for_index_1 = OpVariable %_ptr_Function__arr_v4float_uint_4 Function %55
|
||||
OpStore %var_for_index %31
|
||||
%37 = OpAccessChain %_ptr_Function_float %var_for_index %InstanceIndex %uint_0
|
||||
%38 = OpLoad %float %37
|
||||
%43 = OpAccessChain %_ptr_Function_v4float %output %uint_0
|
||||
%46 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %38 %float_1
|
||||
OpStore %43 %46
|
||||
OpStore %var_for_index_1 %53
|
||||
%58 = OpAccessChain %_ptr_Function_v4float %output %uint_1
|
||||
%59 = OpAccessChain %_ptr_Function_v4float %var_for_index_1 %InstanceIndex
|
||||
%60 = OpLoad %v4float %59
|
||||
OpStore %58 %60
|
||||
%61 = OpLoad %Output %output
|
||||
OpReturnValue %61
|
||||
OpStore %var_for_index_1 %52
|
||||
%57 = OpAccessChain %_ptr_Function_v4float %output %uint_1
|
||||
%58 = OpAccessChain %_ptr_Function_v4float %var_for_index_1 %InstanceIndex
|
||||
%59 = OpLoad %v4float %58
|
||||
OpStore %57 %59
|
||||
%60 = OpLoad %Output %output
|
||||
OpReturnValue %60
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %62
|
||||
%65 = OpLabel
|
||||
%67 = OpLoad %uint %VertexIndex_1
|
||||
%68 = OpLoad %uint %InstanceIndex_1
|
||||
%66 = OpFunctionCall %Output %main_inner %67 %68
|
||||
%69 = OpCompositeExtract %v4float %66 0
|
||||
OpStore %Position_1 %69
|
||||
%70 = OpCompositeExtract %v4float %66 1
|
||||
OpStore %color_1 %70
|
||||
%main = OpFunction %void None %61
|
||||
%64 = OpLabel
|
||||
%66 = OpLoad %uint %VertexIndex_1
|
||||
%67 = OpLoad %uint %InstanceIndex_1
|
||||
%65 = OpFunctionCall %Output %main_inner %66 %67
|
||||
%68 = OpCompositeExtract %v4float %65 0
|
||||
OpStore %Position_1 %68
|
||||
%69 = OpCompositeExtract %v4float %65 1
|
||||
OpStore %color_1 %69
|
||||
OpStore %vertex_point_size %float_1
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -81,9 +81,9 @@
|
||||
%v2int = OpTypeVector %int 2
|
||||
%int_0 = OpConstant %int 0
|
||||
%v4float = OpTypeVector %float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%44 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%46 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
|
||||
%46 = OpConstantComposite %v4float %44 %float_1 %44 %float_1
|
||||
%true = OpConstantTrue %bool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%50 = OpConstantNull %bool
|
||||
|
@ -13,9 +13,9 @@
|
||||
%bool = OpTypeBool
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%true = OpConstantTrue %bool
|
||||
%false = OpConstantFalse %bool
|
||||
%9 = OpConstantComposite %v3bool %true %true %false
|
||||
%10 = OpConstantComposite %v3bool %true %false %true
|
||||
%8 = OpConstantNull %bool
|
||||
%9 = OpConstantComposite %v3bool %true %true %8
|
||||
%10 = OpConstantComposite %v3bool %true %8 %true
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%11 = OpLogicalAnd %v3bool %9 %10
|
||||
|
@ -13,9 +13,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%float_4 = OpConstant %float 4
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%8 = OpConstantNull %float
|
||||
%float_2 = OpConstant %float 2
|
||||
%10 = OpConstantComposite %v3float %float_0 %float_2 %float_0
|
||||
%10 = OpConstantComposite %v3float %8 %float_2 %8
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%14 = OpConstantNull %v3float
|
||||
%f = OpFunction %void None %1
|
||||
|
@ -13,9 +13,9 @@
|
||||
%int = OpTypeInt 32 1
|
||||
%int_4 = OpConstant %int 4
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_0 = OpConstant %int 0
|
||||
%8 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%10 = OpConstantComposite %v3int %int_0 %int_2 %int_0
|
||||
%10 = OpConstantComposite %v3int %8 %int_2 %8
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%f = OpFunction %void None %1
|
||||
|
@ -13,9 +13,9 @@
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%8 = OpConstantNull %uint
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%10 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
|
||||
%10 = OpConstantComposite %v3uint %8 %uint_2 %8
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%14 = OpConstantNull %v3uint
|
||||
%f = OpFunction %void None %1
|
||||
|
@ -16,9 +16,9 @@
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%float_0 = OpConstant %float 0
|
||||
%11 = OpConstantNull %float
|
||||
%float_5 = OpConstant %float 5
|
||||
%13 = OpConstantComposite %v3float %float_0 %float_5 %float_0
|
||||
%13 = OpConstantComposite %v3float %11 %float_5 %11
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%14 = OpFDiv %v3float %10 %13
|
||||
|
@ -16,9 +16,9 @@
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%int_0 = OpConstant %int 0
|
||||
%11 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%13 = OpConstantComposite %v3int %int_0 %int_5 %int_0
|
||||
%13 = OpConstantComposite %v3int %11 %int_5 %11
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%14 = OpSDiv %v3int %10 %13
|
||||
|
@ -16,9 +16,9 @@
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%11 = OpConstantNull %uint
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%13 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
|
||||
%13 = OpConstantComposite %v3uint %11 %uint_5 %11
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%14 = OpUDiv %v3uint %10 %13
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 24
|
||||
; Bound: 23
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,23 +17,22 @@
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%9 = OpConstantNull %float
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%float_2 = OpConstant %float 2
|
||||
%13 = OpConstantComposite %v3float %float_0 %float_2 %float_0
|
||||
%12 = OpConstantComposite %v3float %9 %float_2 %9
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%16 = OpConstantNull %v3float
|
||||
%15 = OpConstantNull %v3float
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_float Function %9
|
||||
%b = OpVariable %_ptr_Function_v3float Function %16
|
||||
%22 = OpVariable %_ptr_Function_v3float Function %16
|
||||
%b = OpVariable %_ptr_Function_v3float Function %15
|
||||
%21 = OpVariable %_ptr_Function_v3float Function %15
|
||||
OpStore %a %float_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %float %a
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %float %a
|
||||
%17 = OpLoad %v3float %b
|
||||
%18 = OpLoad %v3float %b
|
||||
%19 = OpLoad %v3float %b
|
||||
%20 = OpFAdd %v3float %18 %19
|
||||
%23 = OpCompositeConstruct %v3float %17 %17 %17
|
||||
%21 = OpFDiv %v3float %23 %20
|
||||
%19 = OpFAdd %v3float %17 %18
|
||||
%22 = OpCompositeConstruct %v3float %16 %16 %16
|
||||
%20 = OpFDiv %v3float %22 %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 24
|
||||
; Bound: 23
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,23 +17,22 @@
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%9 = OpConstantNull %int
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
|
||||
%12 = OpConstantComposite %v3int %9 %int_2 %9
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%16 = OpConstantNull %v3int
|
||||
%15 = OpConstantNull %v3int
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %9
|
||||
%b = OpVariable %_ptr_Function_v3int Function %16
|
||||
%22 = OpVariable %_ptr_Function_v3int Function %16
|
||||
%b = OpVariable %_ptr_Function_v3int Function %15
|
||||
%21 = OpVariable %_ptr_Function_v3int Function %15
|
||||
OpStore %a %int_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %int %a
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %int %a
|
||||
%17 = OpLoad %v3int %b
|
||||
%18 = OpLoad %v3int %b
|
||||
%19 = OpLoad %v3int %b
|
||||
%20 = OpIAdd %v3int %18 %19
|
||||
%23 = OpCompositeConstruct %v3int %17 %17 %17
|
||||
%21 = OpSDiv %v3int %23 %20
|
||||
%19 = OpIAdd %v3int %17 %18
|
||||
%22 = OpCompositeConstruct %v3int %16 %16 %16
|
||||
%20 = OpSDiv %v3int %22 %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 24
|
||||
; Bound: 23
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,23 +17,22 @@
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%9 = OpConstantNull %uint
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
|
||||
%12 = OpConstantComposite %v3uint %9 %uint_2 %9
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%16 = OpConstantNull %v3uint
|
||||
%15 = OpConstantNull %v3uint
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_uint Function %9
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%22 = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %15
|
||||
%21 = OpVariable %_ptr_Function_v3uint Function %15
|
||||
OpStore %a %uint_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %uint %a
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %uint %a
|
||||
%17 = OpLoad %v3uint %b
|
||||
%18 = OpLoad %v3uint %b
|
||||
%19 = OpLoad %v3uint %b
|
||||
%20 = OpIAdd %v3uint %18 %19
|
||||
%23 = OpCompositeConstruct %v3uint %17 %17 %17
|
||||
%21 = OpUDiv %v3uint %23 %20
|
||||
%19 = OpIAdd %v3uint %17 %18
|
||||
%22 = OpCompositeConstruct %v3uint %16 %16 %16
|
||||
%20 = OpUDiv %v3uint %22 %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%13 = OpConstantNull %v3float
|
||||
%float_0 = OpConstant %float 0
|
||||
%14 = OpConstantNull %float
|
||||
%float_5 = OpConstant %float 5
|
||||
%16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
|
||||
%16 = OpConstantComposite %v3float %14 %float_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3float Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%13 = OpConstantNull %v3int
|
||||
%int_0 = OpConstant %int 0
|
||||
%14 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
|
||||
%16 = OpConstantComposite %v3int %14 %int_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%13 = OpConstantNull %v3uint
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%14 = OpConstantNull %uint
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
|
||||
%16 = OpConstantComposite %v3uint %14 %uint_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3uint Function %13
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,21 +17,20 @@
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%9 = OpConstantNull %float
|
||||
%v3float = OpTypeVector %float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%float_2 = OpConstant %float 2
|
||||
%13 = OpConstantComposite %v3float %float_0 %float_2 %float_0
|
||||
%12 = OpConstantComposite %v3float %9 %float_2 %9
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%16 = OpConstantNull %v3float
|
||||
%15 = OpConstantNull %v3float
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_float Function %9
|
||||
%b = OpVariable %_ptr_Function_v3float Function %16
|
||||
%20 = OpVariable %_ptr_Function_v3float Function %16
|
||||
%b = OpVariable %_ptr_Function_v3float Function %15
|
||||
%19 = OpVariable %_ptr_Function_v3float Function %15
|
||||
OpStore %a %float_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %float %a
|
||||
%18 = OpLoad %v3float %b
|
||||
%21 = OpCompositeConstruct %v3float %17 %17 %17
|
||||
%19 = OpFDiv %v3float %21 %18
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %float %a
|
||||
%17 = OpLoad %v3float %b
|
||||
%20 = OpCompositeConstruct %v3float %16 %16 %16
|
||||
%18 = OpFDiv %v3float %20 %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,21 +17,20 @@
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%9 = OpConstantNull %int
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
|
||||
%12 = OpConstantComposite %v3int %9 %int_2 %9
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%16 = OpConstantNull %v3int
|
||||
%15 = OpConstantNull %v3int
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %9
|
||||
%b = OpVariable %_ptr_Function_v3int Function %16
|
||||
%20 = OpVariable %_ptr_Function_v3int Function %16
|
||||
%b = OpVariable %_ptr_Function_v3int Function %15
|
||||
%19 = OpVariable %_ptr_Function_v3int Function %15
|
||||
OpStore %a %int_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %int %a
|
||||
%18 = OpLoad %v3int %b
|
||||
%21 = OpCompositeConstruct %v3int %17 %17 %17
|
||||
%19 = OpSDiv %v3int %21 %18
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %int %a
|
||||
%17 = OpLoad %v3int %b
|
||||
%20 = OpCompositeConstruct %v3int %16 %16 %16
|
||||
%18 = OpSDiv %v3int %20 %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,21 +17,20 @@
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%9 = OpConstantNull %uint
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
|
||||
%12 = OpConstantComposite %v3uint %9 %uint_2 %9
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%16 = OpConstantNull %v3uint
|
||||
%15 = OpConstantNull %v3uint
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_uint Function %9
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%20 = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %15
|
||||
%19 = OpVariable %_ptr_Function_v3uint Function %15
|
||||
OpStore %a %uint_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %uint %a
|
||||
%18 = OpLoad %v3uint %b
|
||||
%21 = OpCompositeConstruct %v3uint %17 %17 %17
|
||||
%19 = OpUDiv %v3uint %21 %18
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %uint %a
|
||||
%17 = OpLoad %v3uint %b
|
||||
%20 = OpCompositeConstruct %v3uint %16 %16 %16
|
||||
%18 = OpUDiv %v3uint %20 %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%13 = OpConstantNull %v3float
|
||||
%float_0 = OpConstant %float 0
|
||||
%14 = OpConstantNull %float
|
||||
%float_5 = OpConstant %float 5
|
||||
%16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
|
||||
%16 = OpConstantComposite %v3float %14 %float_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3float Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%13 = OpConstantNull %v3int
|
||||
%int_0 = OpConstant %int 0
|
||||
%14 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
|
||||
%16 = OpConstantComposite %v3int %14 %int_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%13 = OpConstantNull %v3uint
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%14 = OpConstantNull %uint
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
|
||||
%16 = OpConstantComposite %v3uint %14 %uint_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3uint Function %13
|
||||
|
@ -13,9 +13,9 @@
|
||||
%int = OpTypeInt 32 1
|
||||
%int_4 = OpConstant %int 4
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_0 = OpConstant %int 0
|
||||
%8 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%10 = OpConstantComposite %v3int %int_0 %int_2 %int_0
|
||||
%10 = OpConstantComposite %v3int %8 %int_2 %8
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%f = OpFunction %void None %1
|
||||
|
@ -13,9 +13,9 @@
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_4 = OpConstant %uint 4
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%8 = OpConstantNull %uint
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%10 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
|
||||
%10 = OpConstantComposite %v3uint %8 %uint_2 %8
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%14 = OpConstantNull %v3uint
|
||||
%f = OpFunction %void None %1
|
||||
|
@ -16,9 +16,9 @@
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%float_0 = OpConstant %float 0
|
||||
%11 = OpConstantNull %float
|
||||
%float_5 = OpConstant %float 5
|
||||
%13 = OpConstantComposite %v3float %float_0 %float_5 %float_0
|
||||
%13 = OpConstantComposite %v3float %11 %float_5 %11
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%14 = OpFRem %v3float %10 %13
|
||||
|
@ -16,9 +16,9 @@
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%int_0 = OpConstant %int 0
|
||||
%11 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%13 = OpConstantComposite %v3int %int_0 %int_5 %int_0
|
||||
%13 = OpConstantComposite %v3int %11 %int_5 %11
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%14 = OpSMod %v3int %10 %13
|
||||
|
@ -16,9 +16,9 @@
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%11 = OpConstantNull %uint
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%13 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
|
||||
%13 = OpConstantComposite %v3uint %11 %uint_5 %11
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%14 = OpUMod %v3uint %10 %13
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 24
|
||||
; Bound: 23
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,23 +17,22 @@
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%9 = OpConstantNull %int
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
|
||||
%12 = OpConstantComposite %v3int %9 %int_2 %9
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%16 = OpConstantNull %v3int
|
||||
%15 = OpConstantNull %v3int
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %9
|
||||
%b = OpVariable %_ptr_Function_v3int Function %16
|
||||
%22 = OpVariable %_ptr_Function_v3int Function %16
|
||||
%b = OpVariable %_ptr_Function_v3int Function %15
|
||||
%21 = OpVariable %_ptr_Function_v3int Function %15
|
||||
OpStore %a %int_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %int %a
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %int %a
|
||||
%17 = OpLoad %v3int %b
|
||||
%18 = OpLoad %v3int %b
|
||||
%19 = OpLoad %v3int %b
|
||||
%20 = OpIAdd %v3int %18 %19
|
||||
%23 = OpCompositeConstruct %v3int %17 %17 %17
|
||||
%21 = OpSMod %v3int %23 %20
|
||||
%19 = OpIAdd %v3int %17 %18
|
||||
%22 = OpCompositeConstruct %v3int %16 %16 %16
|
||||
%20 = OpSMod %v3int %22 %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 24
|
||||
; Bound: 23
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,23 +17,22 @@
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%9 = OpConstantNull %uint
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
|
||||
%12 = OpConstantComposite %v3uint %9 %uint_2 %9
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%16 = OpConstantNull %v3uint
|
||||
%15 = OpConstantNull %v3uint
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_uint Function %9
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%22 = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %15
|
||||
%21 = OpVariable %_ptr_Function_v3uint Function %15
|
||||
OpStore %a %uint_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %uint %a
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %uint %a
|
||||
%17 = OpLoad %v3uint %b
|
||||
%18 = OpLoad %v3uint %b
|
||||
%19 = OpLoad %v3uint %b
|
||||
%20 = OpIAdd %v3uint %18 %19
|
||||
%23 = OpCompositeConstruct %v3uint %17 %17 %17
|
||||
%21 = OpUMod %v3uint %23 %20
|
||||
%19 = OpIAdd %v3uint %17 %18
|
||||
%22 = OpCompositeConstruct %v3uint %16 %16 %16
|
||||
%20 = OpUMod %v3uint %22 %19
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%13 = OpConstantNull %v3float
|
||||
%float_0 = OpConstant %float 0
|
||||
%14 = OpConstantNull %float
|
||||
%float_5 = OpConstant %float 5
|
||||
%16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
|
||||
%16 = OpConstantComposite %v3float %14 %float_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3float Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%13 = OpConstantNull %v3int
|
||||
%int_0 = OpConstant %int 0
|
||||
%14 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
|
||||
%16 = OpConstantComposite %v3int %14 %int_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%13 = OpConstantNull %v3uint
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%14 = OpConstantNull %uint
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
|
||||
%16 = OpConstantComposite %v3uint %14 %uint_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3uint Function %13
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,21 +17,20 @@
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%9 = OpConstantNull %int
|
||||
%v3int = OpTypeVector %int 3
|
||||
%int_0 = OpConstant %int 0
|
||||
%int_2 = OpConstant %int 2
|
||||
%13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
|
||||
%12 = OpConstantComposite %v3int %9 %int_2 %9
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%16 = OpConstantNull %v3int
|
||||
%15 = OpConstantNull %v3int
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %9
|
||||
%b = OpVariable %_ptr_Function_v3int Function %16
|
||||
%20 = OpVariable %_ptr_Function_v3int Function %16
|
||||
%b = OpVariable %_ptr_Function_v3int Function %15
|
||||
%19 = OpVariable %_ptr_Function_v3int Function %15
|
||||
OpStore %a %int_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %int %a
|
||||
%18 = OpLoad %v3int %b
|
||||
%21 = OpCompositeConstruct %v3int %17 %17 %17
|
||||
%19 = OpSMod %v3int %21 %18
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %int %a
|
||||
%17 = OpLoad %v3int %b
|
||||
%20 = OpCompositeConstruct %v3int %16 %16 %16
|
||||
%18 = OpSMod %v3int %20 %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 22
|
||||
; Bound: 21
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@ -17,21 +17,20 @@
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%9 = OpConstantNull %uint
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
|
||||
%12 = OpConstantComposite %v3uint %9 %uint_2 %9
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%16 = OpConstantNull %v3uint
|
||||
%15 = OpConstantNull %v3uint
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_uint Function %9
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%20 = OpVariable %_ptr_Function_v3uint Function %16
|
||||
%b = OpVariable %_ptr_Function_v3uint Function %15
|
||||
%19 = OpVariable %_ptr_Function_v3uint Function %15
|
||||
OpStore %a %uint_4
|
||||
OpStore %b %13
|
||||
%17 = OpLoad %uint %a
|
||||
%18 = OpLoad %v3uint %b
|
||||
%21 = OpCompositeConstruct %v3uint %17 %17 %17
|
||||
%19 = OpUMod %v3uint %21 %18
|
||||
OpStore %b %12
|
||||
%16 = OpLoad %uint %a
|
||||
%17 = OpLoad %v3uint %b
|
||||
%20 = OpCompositeConstruct %v3uint %16 %16 %16
|
||||
%18 = OpUMod %v3uint %20 %17
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
|
||||
%_ptr_Function_v3float = OpTypePointer Function %v3float
|
||||
%13 = OpConstantNull %v3float
|
||||
%float_0 = OpConstant %float 0
|
||||
%14 = OpConstantNull %float
|
||||
%float_5 = OpConstant %float 5
|
||||
%16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
|
||||
%16 = OpConstantComposite %v3float %14 %float_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3float Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%13 = OpConstantNull %v3int
|
||||
%int_0 = OpConstant %int 0
|
||||
%14 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
|
||||
%16 = OpConstantComposite %v3int %14 %int_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %13
|
||||
|
@ -20,9 +20,9 @@
|
||||
%10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
|
||||
%_ptr_Function_v3uint = OpTypePointer Function %v3uint
|
||||
%13 = OpConstantNull %v3uint
|
||||
%uint_0 = OpConstant %uint 0
|
||||
%14 = OpConstantNull %uint
|
||||
%uint_5 = OpConstant %uint 5
|
||||
%16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
|
||||
%16 = OpConstantComposite %v3uint %14 %uint_5 %14
|
||||
%f = OpFunction %void None %1
|
||||
%4 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3uint Function %13
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat2v2float = OpTypeMatrix %v2float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat2v4float = OpTypeMatrix %v4float 2
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat3v2float = OpTypeMatrix %v2float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat3v2float = OpTypeMatrix %v2float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat3v2float = OpTypeMatrix %v2float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat3v2float = OpTypeMatrix %v2float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat3v2float = OpTypeMatrix %v2float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat3v2float = OpTypeMatrix %v2float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat3v4float = OpTypeMatrix %v4float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat3v4float = OpTypeMatrix %v4float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat3v4float = OpTypeMatrix %v4float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat3v4float = OpTypeMatrix %v4float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat3v4float = OpTypeMatrix %v4float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat3v4float = OpTypeMatrix %v4float 3
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,9 +12,9 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v2float = OpTypeVector %float 2
|
||||
%mat4v2float = OpTypeMatrix %v2float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%6 = OpConstantComposite %v2float %float_0 %float_1
|
||||
%6 = OpConstantComposite %v2float %4 %float_1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%9 = OpConstantComposite %v2float %float_2 %float_3
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat4v3float = OpTypeMatrix %v3float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat4v3float = OpTypeMatrix %v3float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat4v3float = OpTypeMatrix %v3float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat4v3float = OpTypeMatrix %v3float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat4v3float = OpTypeMatrix %v3float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,10 +12,10 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat4v3float = OpTypeMatrix %v3float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
|
||||
%7 = OpConstantComposite %v3float %4 %float_1 %float_2
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
|
@ -12,11 +12,11 @@
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%mat4v4float = OpTypeMatrix %v4float 4
|
||||
%float_0 = OpConstant %float 0
|
||||
%4 = OpConstantNull %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_3 = OpConstant %float 3
|
||||
%8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
|
||||
%8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_5 = OpConstant %float 5
|
||||
%float_6 = OpConstant %float 6
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user