GLSL: implement interpolation qualifiers.
Bug: tint:1399 tint:451 Change-Id: Idf02a98d2c51ab4d93847fc24a9d5a447ce3aaa3 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78222 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
This commit is contained in:
parent
800b8e3175
commit
ca4cfb9d6f
|
@ -1840,33 +1840,30 @@ const char* GeneratorImpl::builtin_to_string(ast::Builtin builtin,
|
|||
}
|
||||
}
|
||||
|
||||
std::string GeneratorImpl::interpolation_to_modifiers(
|
||||
ast::InterpolationType type,
|
||||
ast::InterpolationSampling sampling) const {
|
||||
std::string modifiers;
|
||||
switch (type) {
|
||||
void GeneratorImpl::EmitInterpolationQualifiers(
|
||||
std::ostream& out,
|
||||
const ast::DecorationList& decorations) {
|
||||
for (auto* deco : decorations) {
|
||||
if (auto* interpolate = deco->As<ast::InterpolateDecoration>()) {
|
||||
switch (interpolate->type) {
|
||||
case ast::InterpolationType::kPerspective:
|
||||
modifiers += "linear ";
|
||||
break;
|
||||
case ast::InterpolationType::kLinear:
|
||||
modifiers += "noperspective ";
|
||||
break;
|
||||
case ast::InterpolationType::kFlat:
|
||||
modifiers += "nointerpolation ";
|
||||
out << "flat ";
|
||||
break;
|
||||
}
|
||||
switch (sampling) {
|
||||
switch (interpolate->sampling) {
|
||||
case ast::InterpolationSampling::kCentroid:
|
||||
modifiers += "centroid ";
|
||||
out << "centroid ";
|
||||
break;
|
||||
case ast::InterpolationSampling::kSample:
|
||||
modifiers += "sample ";
|
||||
break;
|
||||
case ast::InterpolationSampling::kCenter:
|
||||
case ast::InterpolationSampling::kNone:
|
||||
break;
|
||||
}
|
||||
return modifiers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool GeneratorImpl::EmitDecorations(std::ostream& out,
|
||||
|
@ -1980,6 +1977,10 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
|||
if (!EmitDecorations(out, decorations)) {
|
||||
return false;
|
||||
}
|
||||
// GLSL does not support interpolation qualifiers on vertex inputs
|
||||
if (func->PipelineStage() != ast::PipelineStage::kVertex) {
|
||||
EmitInterpolationQualifiers(out, decorations);
|
||||
}
|
||||
if (!EmitTypeAndName(
|
||||
out, member->Type(), ast::StorageClass::kInput,
|
||||
ast::Access::kReadWrite,
|
||||
|
@ -2001,6 +2002,10 @@ bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
|
|||
if (!EmitDecorations(out, decorations)) {
|
||||
return false;
|
||||
}
|
||||
// GLSL does not support interpolation qualifiers on fragment outputs
|
||||
if (func->PipelineStage() != ast::PipelineStage::kFragment) {
|
||||
EmitInterpolationQualifiers(out, decorations);
|
||||
}
|
||||
if (!EmitTypeAndName(
|
||||
out, member->Type(), ast::StorageClass::kOutput,
|
||||
ast::Access::kReadWrite,
|
||||
|
@ -2614,28 +2619,11 @@ bool GeneratorImpl::EmitStructMembers(TextBuffer* b, const sem::Struct* str) {
|
|||
|
||||
auto out = line(b);
|
||||
|
||||
std::string pre, post;
|
||||
|
||||
if (auto* decl = mem->Declaration()) {
|
||||
for (auto* deco : decl->decorations) {
|
||||
if (auto* interpolate = deco->As<ast::InterpolateDecoration>()) {
|
||||
auto mod = interpolation_to_modifiers(interpolate->type,
|
||||
interpolate->sampling);
|
||||
if (mod.empty()) {
|
||||
diagnostics_.add_error(diag::System::Writer,
|
||||
"unsupported interpolation");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out << pre;
|
||||
if (!EmitTypeAndName(out, ty, ast::StorageClass::kNone,
|
||||
ast::Access::kReadWrite, name)) {
|
||||
return false;
|
||||
}
|
||||
out << post << ";";
|
||||
out << ";";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -292,6 +292,11 @@ class GeneratorImpl : public TextGenerator {
|
|||
/// @returns true on success
|
||||
bool EmitWorkgroupVariable(const sem::Variable* var);
|
||||
|
||||
/// Handles emitting interpolation qualifiers
|
||||
/// @param out the output of the expression stream
|
||||
/// @param decos the decorations
|
||||
void EmitInterpolationQualifiers(std::ostream& out,
|
||||
const ast::DecorationList& decos);
|
||||
/// Handles emitting decorations
|
||||
/// @param out the output of the expression stream
|
||||
/// @param decos the decorations
|
||||
|
@ -410,14 +415,6 @@ class GeneratorImpl : public TextGenerator {
|
|||
/// @returns the appropriate semantic type or null on error.
|
||||
sem::Type* builtin_type(ast::Builtin builtin);
|
||||
|
||||
/// Converts interpolation attributes to a GLSL modifiers
|
||||
/// @param type the interpolation type
|
||||
/// @param sampling the interpolation sampling
|
||||
/// @returns the string name of the attribute or blank on error
|
||||
std::string interpolation_to_modifiers(
|
||||
ast::InterpolationType type,
|
||||
ast::InterpolationSampling sampling) const;
|
||||
|
||||
private:
|
||||
enum class VarType { kIn, kOut };
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
@ -34,7 +32,7 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
wrapper_result.value = inner_result;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 1) in ivec3 x;
|
||||
layout(location = 1) flat in ivec3 x;
|
||||
layout(location = 2) out int value;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
|
@ -45,10 +43,3 @@ void main() {
|
|||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:35: 'int' : must be qualified as flat in
|
||||
ERROR: 0:35: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
@ -21,8 +19,8 @@ void tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
tint_symbol_inner(tint_symbol_1.loc0, tint_symbol_1.loc1, tint_symbol_1.loc2, tint_symbol_1.loc3);
|
||||
return;
|
||||
}
|
||||
layout(location = 0) in int loc0;
|
||||
layout(location = 1) in uint loc1;
|
||||
layout(location = 0) flat in int loc0;
|
||||
layout(location = 1) flat in uint loc1;
|
||||
layout(location = 2) in float loc2;
|
||||
layout(location = 3) in vec4 loc3;
|
||||
void main() {
|
||||
|
@ -35,10 +33,3 @@ void main() {
|
|||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:22: 'int' : must be qualified as flat in
|
||||
ERROR: 0:22: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
@ -28,8 +26,8 @@ void tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
tint_symbol_inner(tint_symbol_3);
|
||||
return;
|
||||
}
|
||||
layout(location = 0) in int loc0;
|
||||
layout(location = 1) in uint loc1;
|
||||
layout(location = 0) flat in int loc0;
|
||||
layout(location = 1) flat in uint loc1;
|
||||
layout(location = 2) in float loc2;
|
||||
layout(location = 3) in vec4 loc3;
|
||||
void main() {
|
||||
|
@ -42,10 +40,3 @@ void main() {
|
|||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:29: 'int' : must be qualified as flat in
|
||||
ERROR: 0:29: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -39,8 +39,8 @@ void tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
tint_symbol_inner(tint_symbol_3, tint_symbol_1.front_facing, tint_symbol_1.loc1, tint_symbol_1.sample_index, tint_symbol_4, tint_symbol_1.loc2);
|
||||
return;
|
||||
}
|
||||
layout(location = 0) in int loc0;
|
||||
layout(location = 1) in uint loc1;
|
||||
layout(location = 0) flat in int loc0;
|
||||
layout(location = 1) flat in uint loc1;
|
||||
layout(location = 2) in float loc2;
|
||||
layout(location = 3) in vec4 loc3;
|
||||
void main() {
|
||||
|
@ -58,8 +58,8 @@ void main() {
|
|||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:40: 'int' : must be qualified as flat in
|
||||
ERROR: 0:40: '' : compilation terminated
|
||||
ERROR: 0:52: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
|
||||
ERROR: 0:52: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,12 @@ void tint_symbol(tint_symbol_3 tint_symbol_2) {
|
|||
return;
|
||||
}
|
||||
layout(location = 0) in float none;
|
||||
layout(location = 1) in float tint_symbol_1;
|
||||
layout(location = 1) flat in float tint_symbol_1;
|
||||
layout(location = 2) in float perspective_center;
|
||||
layout(location = 3) in float perspective_centroid;
|
||||
layout(location = 3) centroid in float perspective_centroid;
|
||||
layout(location = 4) in float perspective_sample;
|
||||
layout(location = 5) in float linear_center;
|
||||
layout(location = 6) in float linear_centroid;
|
||||
layout(location = 6) centroid in float linear_centroid;
|
||||
layout(location = 7) in float linear_sample;
|
||||
void main() {
|
||||
tint_symbol_3 inputs;
|
||||
|
|
|
@ -31,12 +31,12 @@ void tint_symbol_1(tint_symbol_4 tint_symbol_3) {
|
|||
return;
|
||||
}
|
||||
layout(location = 0) in float none;
|
||||
layout(location = 1) in float tint_symbol;
|
||||
layout(location = 1) flat in float tint_symbol;
|
||||
layout(location = 2) in float perspective_center;
|
||||
layout(location = 3) in float perspective_centroid;
|
||||
layout(location = 3) centroid in float perspective_centroid;
|
||||
layout(location = 4) in float perspective_sample;
|
||||
layout(location = 5) in float linear_center;
|
||||
layout(location = 6) in float linear_centroid;
|
||||
layout(location = 6) centroid in float linear_centroid;
|
||||
layout(location = 7) in float linear_sample;
|
||||
void main() {
|
||||
tint_symbol_4 inputs;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
|
@ -44,10 +42,10 @@ tint_symbol vert_main() {
|
|||
wrapper_result.pos = inner_result.pos;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) out int i;
|
||||
layout(location = 1) out uint u;
|
||||
layout(location = 2) out ivec4 vi;
|
||||
layout(location = 3) out uvec4 vu;
|
||||
layout(location = 0) flat out int i;
|
||||
layout(location = 1) flat out uint u;
|
||||
layout(location = 2) flat out ivec4 vi;
|
||||
layout(location = 3) flat out uvec4 vu;
|
||||
void main() {
|
||||
tint_symbol outputs;
|
||||
outputs = vert_main();
|
||||
|
@ -99,10 +97,10 @@ tint_symbol_3 frag_main(tint_symbol_2 tint_symbol_1) {
|
|||
wrapper_result_1.value = inner_result_1;
|
||||
return wrapper_result_1;
|
||||
}
|
||||
layout(location = 0) in int i;
|
||||
layout(location = 1) in uint u;
|
||||
layout(location = 2) in ivec4 vi;
|
||||
layout(location = 3) in uvec4 vu;
|
||||
layout(location = 0) flat in int i;
|
||||
layout(location = 1) flat in uint u;
|
||||
layout(location = 2) flat in ivec4 vi;
|
||||
layout(location = 3) flat in uvec4 vu;
|
||||
layout(location = 0) out int value;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
|
@ -117,10 +115,3 @@ void main() {
|
|||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:40: 'int' : must be qualified as flat in
|
||||
ERROR: 0:40: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -44,12 +44,12 @@ tint_symbol_2 tint_symbol_1() {
|
|||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) out float none;
|
||||
layout(location = 1) out float tint_symbol;
|
||||
layout(location = 1) flat out float tint_symbol;
|
||||
layout(location = 2) out float perspective_center;
|
||||
layout(location = 3) out float perspective_centroid;
|
||||
layout(location = 3) centroid out float perspective_centroid;
|
||||
layout(location = 4) out float perspective_sample;
|
||||
layout(location = 5) out float linear_center;
|
||||
layout(location = 6) out float linear_centroid;
|
||||
layout(location = 6) centroid out float linear_centroid;
|
||||
layout(location = 7) out float linear_sample;
|
||||
void main() {
|
||||
tint_symbol_2 outputs;
|
||||
|
|
|
@ -32,7 +32,7 @@ tint_symbol vert_main1() {
|
|||
wrapper_result.loc0 = inner_result.loc0;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) out int loc0;
|
||||
layout(location = 0) flat out int loc0;
|
||||
void main() {
|
||||
tint_symbol outputs;
|
||||
outputs = vert_main1();
|
||||
|
@ -75,7 +75,7 @@ tint_symbol_1 vert_main2() {
|
|||
wrapper_result_1.loc0 = inner_result_1.loc0;
|
||||
return wrapper_result_1;
|
||||
}
|
||||
layout(location = 0) out int loc0;
|
||||
layout(location = 0) flat out int loc0;
|
||||
void main() {
|
||||
tint_symbol_1 outputs;
|
||||
outputs = vert_main2();
|
||||
|
|
|
@ -34,7 +34,7 @@ void frag_main(tint_symbol_3 tint_symbol_2) {
|
|||
return;
|
||||
}
|
||||
layout(location = 0) in float f;
|
||||
layout(location = 1) in uint u;
|
||||
layout(location = 1) flat in uint u;
|
||||
void main() {
|
||||
tint_symbol_3 inputs;
|
||||
inputs.f = f;
|
||||
|
|
|
@ -31,8 +31,8 @@ tint_symbol_1 tint_symbol() {
|
|||
wrapper_result.position = inner_result.position;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) out int loc0;
|
||||
layout(location = 1) out uint loc1;
|
||||
layout(location = 0) flat out int loc0;
|
||||
layout(location = 1) flat out uint loc1;
|
||||
layout(location = 2) out float loc2;
|
||||
layout(location = 3) out vec4 loc3;
|
||||
void main() {
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
uint x_1 = 0u;
|
||||
uint x_2 = 0u;
|
||||
uint x_3 = 0u;
|
||||
uint x_4 = 0u;
|
||||
|
||||
void main_1() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
uint x_2_1;
|
||||
uint x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
uint x_1_param;
|
||||
uint x_3_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
uint x_2_1;
|
||||
uint x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(uint x_1_param, uint x_3_param) {
|
||||
x_1 = x_1_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_2, x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_1_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0u, 0u);
|
||||
wrapper_result.x_2_1 = inner_result.x_2_1;
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in uint x_1_param;
|
||||
layout(location = 30) in uint x_3_param;
|
||||
layout(location = 0) out uint x_2_1;
|
||||
layout(location = 6) out uint x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_1_param = x_1_param;
|
||||
inputs.x_3_param = x_3_param;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_2_1 = outputs.x_2_1;
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:41: 'uint' : must be qualified as flat in
|
||||
ERROR: 0:41: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
layout(r32i) uniform highp writeonly iimage2D x_5_1;
|
||||
|
||||
void main_1() {
|
||||
x_4 = 1;
|
||||
vec4 x_23 = x_2;
|
||||
int x_27 = int(x_23.x);
|
||||
int x_28 = int(x_23.y);
|
||||
if (((((x_27 & 1) + (x_28 & 1)) + x_3) == int(x_23.z))) {
|
||||
}
|
||||
imageStore(x_5_1, ivec2(x_27, x_28), ivec4(x_27, 0, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:45: 'int' : must be qualified as flat in
|
||||
ERROR: 0:45: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
layout(r32i) uniform highp writeonly iimage2D x_5_1;
|
||||
|
||||
void main_1() {
|
||||
x_4 = 1;
|
||||
vec4 x_23 = x_2;
|
||||
int x_27 = int(x_23.x);
|
||||
int x_28 = int(x_23.y);
|
||||
if (((((x_27 & 1) + (x_28 & 1)) + x_3) == int(x_23.z))) {
|
||||
}
|
||||
imageStore(x_5_1, ivec2(x_27, x_28), ivec4(x_27, 0, 0, 0));
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:45: 'int' : must be qualified as flat in
|
||||
ERROR: 0:45: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
|
||||
void main_1() {
|
||||
vec4 x_16 = x_2;
|
||||
if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_3) == int(x_16.z))) {
|
||||
}
|
||||
x_4 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:41: 'int' : must be qualified as flat in
|
||||
ERROR: 0:41: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
|
||||
void main_1() {
|
||||
vec4 x_16 = x_2;
|
||||
if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_3) == int(x_16.z))) {
|
||||
}
|
||||
x_4 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:41: 'int' : must be qualified as flat in
|
||||
ERROR: 0:41: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
|
||||
void main_1() {
|
||||
vec4 x_16 = x_2;
|
||||
int x_26 = x_3;
|
||||
x_4 = 1;
|
||||
if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_26) == int(x_16.z))) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:42: 'int' : must be qualified as flat in
|
||||
ERROR: 0:42: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
|
||||
void main_1() {
|
||||
vec4 x_16 = x_2;
|
||||
int x_26 = x_3;
|
||||
x_4 = 1;
|
||||
if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_26) == int(x_16.z))) {
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:42: 'int' : must be qualified as flat in
|
||||
ERROR: 0:42: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) flat in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
|
|
|
@ -54,7 +54,7 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) flat in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
|
|
|
@ -51,7 +51,7 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) flat in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
|
|
|
@ -55,7 +55,7 @@ tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
|||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) flat in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
|
||||
void main_1() {
|
||||
int x_33_phi = 0;
|
||||
vec4 x_18 = x_2;
|
||||
int x_28 = x_3;
|
||||
x_33_phi = 0;
|
||||
if (((((int(x_18.x) & 1) + (int(x_18.y) & 1)) + x_28) == int(x_18.z))) {
|
||||
while (true) {
|
||||
int x_34 = 0;
|
||||
int x_33 = x_33_phi;
|
||||
if ((uint(x_33) < uint(10))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_34 = (x_33 + 1);
|
||||
x_33_phi = x_34;
|
||||
}
|
||||
}
|
||||
}
|
||||
x_4 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:56: 'int' : must be qualified as flat in
|
||||
ERROR: 0:56: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
SKIP: FAILED
|
||||
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
vec4 x_2 = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
int x_3 = 0;
|
||||
int x_4 = 0;
|
||||
|
||||
void main_1() {
|
||||
int x_33_phi = 0;
|
||||
vec4 x_18 = x_2;
|
||||
int x_28 = x_3;
|
||||
x_33_phi = 0;
|
||||
if (((((int(x_18.x) & 1) + (int(x_18.y) & 1)) + x_28) == int(x_18.z))) {
|
||||
while (true) {
|
||||
int x_34 = 0;
|
||||
int x_33 = x_33_phi;
|
||||
if ((uint(x_33) < uint(10))) {
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
{
|
||||
x_34 = (x_33 + 1);
|
||||
x_33_phi = x_34;
|
||||
}
|
||||
}
|
||||
}
|
||||
x_4 = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
struct main_out {
|
||||
int x_4_1;
|
||||
};
|
||||
struct tint_symbol_2 {
|
||||
int x_3_param;
|
||||
vec4 x_2_param;
|
||||
};
|
||||
struct tint_symbol_3 {
|
||||
int x_4_1;
|
||||
};
|
||||
|
||||
main_out tint_symbol_inner(vec4 x_2_param, int x_3_param) {
|
||||
x_2 = x_2_param;
|
||||
x_3 = x_3_param;
|
||||
main_1();
|
||||
main_out tint_symbol_4 = main_out(x_4);
|
||||
return tint_symbol_4;
|
||||
}
|
||||
|
||||
tint_symbol_3 tint_symbol(tint_symbol_2 tint_symbol_1) {
|
||||
main_out inner_result = tint_symbol_inner(tint_symbol_1.x_2_param, tint_symbol_1.x_3_param);
|
||||
tint_symbol_3 wrapper_result = tint_symbol_3(0);
|
||||
wrapper_result.x_4_1 = inner_result.x_4_1;
|
||||
return wrapper_result;
|
||||
}
|
||||
layout(location = 0) in int x_3_param;
|
||||
layout(location = 0) out int x_4_1;
|
||||
void main() {
|
||||
tint_symbol_2 inputs;
|
||||
inputs.x_3_param = x_3_param;
|
||||
inputs.x_2_param = gl_FragCoord;
|
||||
tint_symbol_3 outputs;
|
||||
outputs = tint_symbol(inputs);
|
||||
x_4_1 = outputs.x_4_1;
|
||||
}
|
||||
|
||||
|
||||
Error parsing GLSL shader:
|
||||
ERROR: 0:56: 'int' : must be qualified as flat in
|
||||
ERROR: 0:56: '' : compilation terminated
|
||||
ERROR: 2 compilation errors. No code generated.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue