GLSL: fix arrayLength().

Bug: tint:1222
Change-Id: I6f9576908a41f3b37036ef7afe10cb74a99cd63f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79440
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
Stephen White 2022-02-05 00:20:54 +00:00 committed by Tint LUCI CQ
parent deec53332f
commit 6d770093bd
22 changed files with 56 additions and 388 deletions

View File

@ -20,7 +20,6 @@
#include "src/transform/add_empty_entry_point.h" #include "src/transform/add_empty_entry_point.h"
#include "src/transform/add_spirv_block_attribute.h" #include "src/transform/add_spirv_block_attribute.h"
#include "src/transform/binding_remapper.h" #include "src/transform/binding_remapper.h"
#include "src/transform/calculate_array_length.h"
#include "src/transform/canonicalize_entry_point_io.h" #include "src/transform/canonicalize_entry_point_io.h"
#include "src/transform/combine_samplers.h" #include "src/transform/combine_samplers.h"
#include "src/transform/decompose_memory_access.h" #include "src/transform/decompose_memory_access.h"
@ -86,7 +85,6 @@ Output Glsl::Run(const Program* in, const DataMap& inputs) const {
BindingRemapper::AccessControls ac; BindingRemapper::AccessControls ac;
data.Add<BindingRemapper::Remappings>(bp, ac, /* mayCollide */ true); data.Add<BindingRemapper::Remappings>(bp, ac, /* mayCollide */ true);
} }
manager.Add<CalculateArrayLength>();
manager.Add<ExternalTextureTransform>(); manager.Add<ExternalTextureTransform>();
data.Add<PromoteSideEffectsToDecl::Config>( data.Add<PromoteSideEffectsToDecl::Config>(

View File

@ -44,7 +44,6 @@
#include "src/sem/type_constructor.h" #include "src/sem/type_constructor.h"
#include "src/sem/type_conversion.h" #include "src/sem/type_conversion.h"
#include "src/sem/variable.h" #include "src/sem/variable.h"
#include "src/transform/calculate_array_length.h"
#include "src/transform/glsl.h" #include "src/transform/glsl.h"
#include "src/utils/defer.h" #include "src/utils/defer.h"
#include "src/utils/map.h" #include "src/utils/map.h"
@ -467,8 +466,8 @@ bool GeneratorImpl::EmitCall(std::ostream& out,
auto* call = builder_.Sem().Get(expr); auto* call = builder_.Sem().Get(expr);
auto* target = call->Target(); auto* target = call->Target();
if (auto* func = target->As<sem::Function>()) { if (target->Is<sem::Function>()) {
return EmitFunctionCall(out, call, func); return EmitFunctionCall(out, call);
} }
if (auto* builtin = target->As<sem::Builtin>()) { if (auto* builtin = target->As<sem::Builtin>()) {
return EmitBuiltinCall(out, call, builtin); return EmitBuiltinCall(out, call, builtin);
@ -484,9 +483,7 @@ bool GeneratorImpl::EmitCall(std::ostream& out,
return false; return false;
} }
bool GeneratorImpl::EmitFunctionCall(std::ostream& out, bool GeneratorImpl::EmitFunctionCall(std::ostream& out, const sem::Call* call) {
const sem::Call* call,
const sem::Function* func) {
const auto& args = call->Arguments(); const auto& args = call->Arguments();
auto* decl = call->Declaration(); auto* decl = call->Declaration();
auto* ident = decl->target.name; auto* ident = decl->target.name;
@ -494,21 +491,6 @@ bool GeneratorImpl::EmitFunctionCall(std::ostream& out,
auto name = builder_.Symbols().NameFor(ident->symbol); auto name = builder_.Symbols().NameFor(ident->symbol);
auto caller_sym = ident->symbol; auto caller_sym = ident->symbol;
if (ast::HasAttribute<transform::CalculateArrayLength::BufferSizeIntrinsic>(
func->Declaration()->attributes)) {
// Special function generated by the CalculateArrayLength transform for
// calling X.GetDimensions(Y)
if (!EmitExpression(out, args[0]->Declaration())) {
return false;
}
out << ".GetDimensions(";
if (!EmitExpression(out, args[1]->Declaration())) {
return false;
}
out << ")";
return true;
}
out << name << "("; out << name << "(";
bool first = true; bool first = true;
@ -555,6 +537,9 @@ bool GeneratorImpl::EmitBuiltinCall(std::ostream& out,
if (builtin->Type() == sem::BuiltinType::kRadians) { if (builtin->Type() == sem::BuiltinType::kRadians) {
return EmitRadiansCall(out, expr, builtin); return EmitRadiansCall(out, expr, builtin);
} }
if (builtin->Type() == sem::BuiltinType::kArrayLength) {
return EmitArrayLength(out, expr);
}
if (builtin->IsDataPacking()) { if (builtin->IsDataPacking()) {
return EmitDataPackingCall(out, expr, builtin); return EmitDataPackingCall(out, expr, builtin);
} }
@ -754,6 +739,16 @@ bool GeneratorImpl::EmitWorkgroupAtomicCall(std::ostream& out,
return false; return false;
} }
bool GeneratorImpl::EmitArrayLength(std::ostream& out,
const ast::CallExpression* expr) {
out << "uint(";
if (!EmitExpression(out, expr->args[0])) {
return false;
}
out << ".length())";
return true;
}
bool GeneratorImpl::EmitSelectCall(std::ostream& out, bool GeneratorImpl::EmitSelectCall(std::ostream& out,
const ast::CallExpression* expr) { const ast::CallExpression* expr) {
auto* expr_false = expr->args[0]; auto* expr_false = expr->args[0];

View File

@ -111,11 +111,8 @@ class GeneratorImpl : public TextGenerator {
/// Handles generating a function call expression /// Handles generating a function call expression
/// @param out the output of the expression stream /// @param out the output of the expression stream
/// @param call the call expression /// @param call the call expression
/// @param function the function being called
/// @returns true if the expression is emitted /// @returns true if the expression is emitted
bool EmitFunctionCall(std::ostream& out, bool EmitFunctionCall(std::ostream& out, const sem::Call* call);
const sem::Call* call,
const sem::Function* function);
/// Handles generating a builtin call expression /// Handles generating a builtin call expression
/// @param out the output of the expression stream /// @param out the output of the expression stream
/// @param call the call expression /// @param call the call expression
@ -162,6 +159,11 @@ class GeneratorImpl : public TextGenerator {
bool EmitWorkgroupAtomicCall(std::ostream& out, bool EmitWorkgroupAtomicCall(std::ostream& out,
const ast::CallExpression* expr, const ast::CallExpression* expr,
const sem::Builtin* builtin); const sem::Builtin* builtin);
/// Handles generating an array.length() call
/// @param out the output of the expression stream
/// @param expr the call expression
/// @returns true if the array length expression is emitted
bool EmitArrayLength(std::ostream& out, const ast::CallExpression* expr);
/// Handles generating a call to a texture function (`textureSample`, /// Handles generating a call to a texture function (`textureSample`,
/// `textureSampleGrad`, etc) /// `textureSampleGrad`, etc)
/// @param out the output of the expression stream /// @param out the output of the expression stream

View File

@ -55,10 +55,7 @@ layout(binding = 1, std430) buffer my_struct_1 {
float a[]; float a[];
} b; } b;
void a_func() { void a_func() {
uint tint_symbol_1 = 0u; uint len = uint(b.a.length());
b.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint len = tint_symbol_2;
} }
void main() { void main() {
@ -104,10 +101,7 @@ layout(binding = 1, std430) buffer my_struct_1 {
float a[]; float a[];
} b; } b;
void a_func() { void a_func() {
uint tint_symbol_1 = 0u; uint len = uint(b.a.length());
b.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 4u) / 4u);
uint len = tint_symbol_2;
} }
void main() { void main() {
@ -154,10 +148,7 @@ layout(binding = 1, std430) buffer my_struct_1 {
float a[]; float a[];
} b; } b;
void a_func() { void a_func() {
uint tint_symbol_1 = 0u; uint len = uint(b.a.length());
b.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint len = tint_symbol_2;
} }
void main() { void main() {

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -11,10 +9,7 @@ layout(binding = 0, std430) buffer arr_block_1 {
S inner[]; S inner[];
} arr; } arr;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint len = uint(arr.inner.length());
arr.inner.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = (tint_symbol_2 / 4u);
uint len = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -22,10 +17,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:13: '.' : cannot apply to an array: GetDimensions
ERROR: 0:13: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer S_1 {
int a[]; int a[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.a.length());
G.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer G_block_1 {
int inner[]; int inner[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.inner.length());
G.inner.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = (tint_symbol_2 / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: '.' : cannot apply to an array: GetDimensions
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,11 +5,8 @@ layout(binding = 0, std430) buffer S_1 {
int a[]; int a[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.a.length());
G.GetDimensions(tint_symbol_2); uint l2 = uint(G.a.length());
uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
uint l1 = tint_symbol_3;
uint l2 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -19,10 +14,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer S_1 {
int a[]; int a[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.a.length());
G.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer G_block_1 {
int inner[]; int inner[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.inner.length());
G.inner.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = (tint_symbol_2 / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: '.' : cannot apply to an array: GetDimensions
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer S_1 {
int a[]; int a[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.a.length());
G.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer S_1 {
int a[]; int a[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.a.length());
G.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = ((tint_symbol_2 - 0u) / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer G_block_1 {
int inner[]; int inner[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.inner.length());
G.inner.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = (tint_symbol_2 / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: '.' : cannot apply to an array: GetDimensions
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer G_block_1 {
int inner[]; int inner[];
} G; } G;
void tint_symbol() { void tint_symbol() {
uint tint_symbol_2 = 0u; uint l1 = uint(G.inner.length());
G.inner.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = (tint_symbol_2 / 4u);
uint l1 = tint_symbol_3;
} }
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
@ -18,10 +13,3 @@ void main() {
tint_symbol(); tint_symbol();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: '.' : cannot apply to an array: GetDimensions
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
int arg_0[]; int arg_0[];
} sb_ro; } sb_ro;
void arrayLength_1588cd() { void arrayLength_1588cd() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,13 +20,6 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,10 +27,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
int arg_0[]; int arg_0[];
} sb_ro; } sb_ro;
void arrayLength_1588cd() { void arrayLength_1588cd() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void fragment_main() { void fragment_main() {
@ -53,13 +38,6 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -67,10 +45,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
int arg_0[]; int arg_0[];
} sb_ro; } sb_ro;
void arrayLength_1588cd() { void arrayLength_1588cd() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void compute_main() { void compute_main() {
@ -82,10 +57,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
int arg_0[]; int arg_0[];
} sb_rw; } sb_rw;
void arrayLength_61b1c7() { void arrayLength_61b1c7() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,13 +20,6 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,10 +27,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
int arg_0[]; int arg_0[];
} sb_rw; } sb_rw;
void arrayLength_61b1c7() { void arrayLength_61b1c7() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void fragment_main() { void fragment_main() {
@ -53,13 +38,6 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -67,10 +45,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
int arg_0[]; int arg_0[];
} sb_rw; } sb_rw;
void arrayLength_61b1c7() { void arrayLength_61b1c7() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void compute_main() { void compute_main() {
@ -82,10 +57,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
float arg_0[]; float arg_0[];
} sb_ro; } sb_ro;
void arrayLength_a0f5ca() { void arrayLength_a0f5ca() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,13 +20,6 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,10 +27,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
float arg_0[]; float arg_0[];
} sb_ro; } sb_ro;
void arrayLength_a0f5ca() { void arrayLength_a0f5ca() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void fragment_main() { void fragment_main() {
@ -53,13 +38,6 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -67,10 +45,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
float arg_0[]; float arg_0[];
} sb_ro; } sb_ro;
void arrayLength_a0f5ca() { void arrayLength_a0f5ca() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void compute_main() { void compute_main() {
@ -82,10 +57,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
float arg_0[]; float arg_0[];
} sb_rw; } sb_rw;
void arrayLength_cdd123() { void arrayLength_cdd123() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,13 +20,6 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,10 +27,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
float arg_0[]; float arg_0[];
} sb_rw; } sb_rw;
void arrayLength_cdd123() { void arrayLength_cdd123() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void fragment_main() { void fragment_main() {
@ -53,13 +38,6 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -67,10 +45,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
float arg_0[]; float arg_0[];
} sb_rw; } sb_rw;
void arrayLength_cdd123() { void arrayLength_cdd123() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void compute_main() { void compute_main() {
@ -82,10 +57,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
uint arg_0[]; uint arg_0[];
} sb_ro; } sb_ro;
void arrayLength_cfca0a() { void arrayLength_cfca0a() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,13 +20,6 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,10 +27,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
uint arg_0[]; uint arg_0[];
} sb_ro; } sb_ro;
void arrayLength_cfca0a() { void arrayLength_cfca0a() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void fragment_main() { void fragment_main() {
@ -53,13 +38,6 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -67,10 +45,7 @@ layout(binding = 1, std430) buffer SB_RO_1 {
uint arg_0[]; uint arg_0[];
} sb_ro; } sb_ro;
void arrayLength_cfca0a() { void arrayLength_cfca0a() {
uint tint_symbol_1 = 0u; uint res = uint(sb_ro.arg_0.length());
sb_ro.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void compute_main() { void compute_main() {
@ -82,10 +57,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -7,10 +5,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
uint arg_0[]; uint arg_0[];
} sb_rw; } sb_rw;
void arrayLength_eb510f() { void arrayLength_eb510f() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
vec4 vertex_main() { vec4 vertex_main() {
@ -25,13 +20,6 @@ void main() {
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w); gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -39,10 +27,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
uint arg_0[]; uint arg_0[];
} sb_rw; } sb_rw;
void arrayLength_eb510f() { void arrayLength_eb510f() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void fragment_main() { void fragment_main() {
@ -53,13 +38,6 @@ void main() {
fragment_main(); fragment_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float; precision mediump float;
@ -67,10 +45,7 @@ layout(binding = 0, std430) buffer SB_RW_1 {
uint arg_0[]; uint arg_0[];
} sb_rw; } sb_rw;
void arrayLength_eb510f() { void arrayLength_eb510f() {
uint tint_symbol_1 = 0u; uint res = uint(sb_rw.arg_0.length());
sb_rw.GetDimensions(tint_symbol_1);
uint tint_symbol_2 = ((tint_symbol_1 - 0u) / 4u);
uint res = tint_symbol_2;
} }
void compute_main() { void compute_main() {
@ -82,10 +57,3 @@ void main() {
compute_main(); compute_main();
return; return;
} }
Error parsing GLSL shader:
ERROR: 0:9: 'GetDimensions' : no such field in structure
ERROR: 0:9: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -13,10 +13,7 @@ layout(binding = 0, std430) buffer S_1 {
uint rtarr[]; uint rtarr[];
} myvar; } myvar;
void main_1() { void main_1() {
uint tint_symbol_2 = 0u; uint x_1 = uint(myvar.rtarr.length());
myvar.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = ((tint_symbol_2 - 4u) / 4u);
uint x_1 = tint_symbol_3;
return; return;
} }

View File

@ -13,10 +13,7 @@ layout(binding = 0, std430) buffer S_1 {
uint rtarr[]; uint rtarr[];
} myvar; } myvar;
void main_1() { void main_1() {
uint tint_symbol_2 = 0u; uint x_1 = uint(myvar.rtarr.length());
myvar.GetDimensions(tint_symbol_2);
uint tint_symbol_3 = ((tint_symbol_2 - 4u) / 4u);
uint x_1 = tint_symbol_3;
return; return;
} }