GLSL: only emit default precision qualifier for frag shader.

Other shader types don't need this.
Also fix code style of member var.

Bug: tint:1360
Change-Id: Ic3600ec7c6da9b85b57655fabbf1f2e44b0ea7d3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79640
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:
Stephen White 2022-02-07 18:49:46 +00:00 committed by Tint LUCI CQ
parent 89c730dbf3
commit bf0180bcee
1358 changed files with 1274 additions and 3256 deletions

View File

@ -181,7 +181,7 @@ bool GeneratorImpl::Generate() {
TextBuffer extensions; TextBuffer extensions;
if (requires_oes_sample_variables) { if (requires_oes_sample_variables_) {
extensions.Append("#extension GL_OES_sample_variables : require"); extensions.Append("#extension GL_OES_sample_variables : require");
} }
@ -192,8 +192,10 @@ bool GeneratorImpl::Generate() {
helpers_insertion_point += extensions.lines.size(); helpers_insertion_point += extensions.lines.size();
} }
current_buffer_->Insert("precision mediump float;", helpers_insertion_point++, if (requires_default_precision_qualifier_) {
indent); current_buffer_->Insert("precision mediump float;",
helpers_insertion_point++, indent);
}
if (!helpers_.lines.empty()) { if (!helpers_.lines.empty()) {
current_buffer_->Insert("", helpers_insertion_point++, indent); current_buffer_->Insert("", helpers_insertion_point++, indent);
@ -1831,7 +1833,7 @@ bool GeneratorImpl::EmitIOVariable(const sem::Variable* var) {
if (auto* b = ast::GetAttribute<ast::BuiltinAttribute>(decl->attributes)) { if (auto* b = ast::GetAttribute<ast::BuiltinAttribute>(decl->attributes)) {
// Use of gl_SampleID requires the GL_OES_sample_variables extension // Use of gl_SampleID requires the GL_OES_sample_variables extension
if (RequiresOESSampleVariables(b->builtin)) { if (RequiresOESSampleVariables(b->builtin)) {
requires_oes_sample_variables = true; requires_oes_sample_variables_ = true;
} }
// Do not emit builtin (gl_) variables. // Do not emit builtin (gl_) variables.
return true; return true;
@ -1906,6 +1908,10 @@ bool GeneratorImpl::EmitAttributes(std::ostream& out,
bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) { bool GeneratorImpl::EmitEntryPointFunction(const ast::Function* func) {
auto* func_sem = builder_.Sem().Get(func); auto* func_sem = builder_.Sem().Get(func);
if (func->PipelineStage() == ast::PipelineStage::kFragment) {
requires_default_precision_qualifier_ = true;
}
if (func->PipelineStage() == ast::PipelineStage::kCompute) { if (func->PipelineStage() == ast::PipelineStage::kCompute) {
auto out = line(); auto out = line();
// Emit the layout(local_size) attributes. // Emit the layout(local_size) attributes.

View File

@ -473,7 +473,8 @@ class GeneratorImpl : public TextGenerator {
std::unordered_map<const sem::Struct*, std::string> structure_builders_; std::unordered_map<const sem::Struct*, std::string> structure_builders_;
std::unordered_map<const sem::Vector*, std::string> dynamic_vector_write_; std::unordered_map<const sem::Vector*, std::string> dynamic_vector_write_;
std::unordered_map<const sem::Vector*, std::string> int_dot_funcs_; std::unordered_map<const sem::Vector*, std::string> int_dot_funcs_;
bool requires_oes_sample_variables = false; bool requires_oes_sample_variables_ = false;
bool requires_default_precision_qualifier_ = false;
}; };
} // namespace glsl } // namespace glsl

View File

@ -385,7 +385,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Scalar) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
float tint_degrees(float param_0) { float tint_degrees(float param_0) {
return param_0 * 57.295779513082322865; return param_0 * 57.295779513082322865;
@ -414,7 +413,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, Degrees_Vector) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
vec3 tint_degrees(vec3 param_0) { vec3 tint_degrees(vec3 param_0) {
return param_0 * 57.295779513082322865; return param_0 * 57.295779513082322865;
@ -443,7 +441,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, Radians_Scalar) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
float tint_radians(float param_0) { float tint_radians(float param_0) {
return param_0 * 0.017453292519943295474; return param_0 * 0.017453292519943295474;
@ -472,7 +469,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, Radians_Vector) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
vec3 tint_radians(vec3 param_0) { vec3 tint_radians(vec3 param_0) {
return param_0 * 0.017453292519943295474; return param_0 * 0.017453292519943295474;
@ -659,7 +655,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, StorageBarrier) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
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;
void main() { void main() {
@ -681,7 +676,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, WorkgroupBarrier) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
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;
void main() { void main() {
@ -699,7 +693,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, DotI32) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
int tint_int_dot(ivec3 a, ivec3 b) { int tint_int_dot(ivec3 a, ivec3 b) {
return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
@ -726,7 +719,6 @@ TEST_F(GlslGeneratorImplTest_Builtin, DotU32) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
uint tint_int_dot(uvec3 a, uvec3 b) { uint tint_int_dot(uvec3 a, uvec3 b) {
return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];

View File

@ -40,7 +40,6 @@ TEST_F(GlslGeneratorImplTest_Function, Emit_Function) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"( #version 310 es EXPECT_EQ(gen.result(), R"( #version 310 es
precision mediump float;
void my_func() { void my_func() {
return; return;
@ -78,7 +77,6 @@ TEST_F(GlslGeneratorImplTest_Function, Emit_Function_WithParams) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"( #version 310 es EXPECT_EQ(gen.result(), R"( #version 310 es
precision mediump float;
void my_func(float a, int b) { void my_func(float a, int b) {
return; return;
@ -786,7 +784,6 @@ TEST_F(GlslGeneratorImplTest_Function, Emit_Attribute_EntryPoint_Compute) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
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;
void main() { void main() {
@ -807,7 +804,6 @@ TEST_F(GlslGeneratorImplTest_Function,
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
layout(local_size_x = 2, local_size_y = 4, local_size_z = 6) in; layout(local_size_x = 2, local_size_y = 4, local_size_z = 6) in;
void main() { void main() {
@ -831,7 +827,6 @@ TEST_F(GlslGeneratorImplTest_Function,
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
const int width = int(2); const int width = int(2);
const int height = int(3); const int height = int(3);
@ -858,7 +853,6 @@ TEST_F(GlslGeneratorImplTest_Function,
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
#ifndef WGSL_SPEC_CONSTANT_7 #ifndef WGSL_SPEC_CONSTANT_7
#define WGSL_SPEC_CONSTANT_7 int(2) #define WGSL_SPEC_CONSTANT_7 int(2)
@ -889,7 +883,6 @@ TEST_F(GlslGeneratorImplTest_Function, Emit_Function_WithArrayParams) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
void my_func(float a[5]) { void my_func(float a[5]) {
return; return;
@ -908,7 +901,6 @@ TEST_F(GlslGeneratorImplTest_Function, Emit_Function_WithArrayReturn) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
float[5] my_func() { float[5] my_func() {
return float[5](0.0f, 0.0f, 0.0f, 0.0f, 0.0f); return float[5](0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
@ -974,7 +966,6 @@ TEST_F(GlslGeneratorImplTest_Function,
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Data { struct Data {
float d; float d;

View File

@ -133,7 +133,6 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, EmitExpression_MemberAccessor) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Data { struct Data {
float mem; float mem;

View File

@ -29,7 +29,6 @@ TEST_F(GlslGeneratorImplTest, Generate) {
ASSERT_TRUE(gen.Generate()) << gen.error(); ASSERT_TRUE(gen.Generate()) << gen.error();
EXPECT_EQ(gen.result(), R"(#version 310 es EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
void my_func() { void my_func() {
} }

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void main_1() { void main_1() {
float x_24 = mat3(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f))[1u].y; float x_24 = mat3(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f))[1u].y;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
mat3 m = mat3(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f)); mat3 m = mat3(vec3(1.0f, 2.0f, 3.0f), vec3(4.0f, 5.0f, 6.0f), vec3(7.0f, 8.0f, 9.0f));

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void main_1() { void main_1() {
float x_11 = vec3(1.0f, 2.0f, 3.0f).y; float x_11 = vec3(1.0f, 2.0f, 3.0f).y;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
vec3 v = vec3(1.0f, 2.0f, 3.0f); vec3 v = vec3(1.0f, 2.0f, 3.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void main_1() { void main_1() {
mat3 m = mat3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); mat3 m = mat3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
mat3 m = mat3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f); mat3 m = mat3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void main_1() { void main_1() {
vec3 v = vec3(0.0f, 0.0f, 0.0f); vec3 v = vec3(0.0f, 0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
vec3 v = vec3(0.0f, 0.0f, 0.0f); vec3 v = vec3(0.0f, 0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
float f1(float a[4]) { float f1(float a[4]) {
return a[3]; return a[3];

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
float[4] f1() { float[4] f1() {
float tint_symbol_1[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f); float tint_symbol_1[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct strided_arr { struct strided_arr {
float el; float el;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
int x = 42; int x = 42;

View File

@ -1,7 +1,6 @@
SKIP: FAILED SKIP: FAILED
#version 310 es #version 310 es
precision mediump float;
layout(location = 0) in vec4 position_1; layout(location = 0) in vec4 position_1;
layout(location = 1) in vec4 color_1; layout(location = 1) in vec4 color_1;
@ -64,8 +63,8 @@ void main() {
return; return;
} }
Error parsing GLSL shader: Error parsing GLSL shader:
ERROR: 0:37: '%' : wrong operand types: no operation '%' exists that takes a left-hand operand of type ' temp mediump float' and a right operand of type ' const float' (or there is no acceptable conversion) ERROR: 0:36: '%' : wrong operand types: no operation '%' exists that takes a left-hand operand of type ' temp highp float' and a right operand of type ' const float' (or there is no acceptable conversion)
ERROR: 0:37: '' : compilation terminated ERROR: 0:36: '' : compilation terminated
ERROR: 2 compilation errors. No code generated. ERROR: 2 compilation errors. No code generated.

View File

@ -1,7 +1,6 @@
SKIP: FAILED SKIP: FAILED
#version 310 es #version 310 es
precision mediump float;
layout(location = 0) in vec3 position_1; layout(location = 0) in vec3 position_1;
layout(location = 1) in vec4 color_1; layout(location = 1) in vec4 color_1;
@ -121,7 +120,6 @@ void main() {
return; return;
} }
#version 310 es #version 310 es
precision mediump float;
vec2 rand_seed = vec2(0.0f, 0.0f); vec2 rand_seed = vec2(0.0f, 0.0f);
float rand() { float rand() {
@ -210,14 +208,13 @@ void main() {
return; return;
} }
Error parsing GLSL shader: Error parsing GLSL shader:
ERROR: 0:6: 'frac' : no matching overloaded function found ERROR: 0:5: 'frac' : no matching overloaded function found
ERROR: 0:6: '' : compilation terminated ERROR: 0:5: '' : compilation terminated
ERROR: 2 compilation errors. No code generated. ERROR: 2 compilation errors. No code generated.
#version 310 es #version 310 es
precision mediump float;
struct RenderParams { struct RenderParams {
mat4 modelViewProjectionMatrix; mat4 modelViewProjectionMatrix;
@ -275,7 +272,6 @@ void main() {
return; return;
} }
#version 310 es #version 310 es
precision mediump float;
struct RenderParams { struct RenderParams {
mat4 modelViewProjectionMatrix; mat4 modelViewProjectionMatrix;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
ivec3 a; ivec3 a;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
ivec3 a; ivec3 a;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
int x; int x;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
int x; int x;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
float inner[4]; float inner[4];

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
float inner; float inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
int inner; int inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
mat2 inner; mat2 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
mat2x3 inner; mat2x3 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
mat3x2 inner; mat3x2 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
mat4 inner; mat4 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct S { struct S {
float f; float f;

View File

@ -1,7 +1,6 @@
SKIP: FAILED SKIP: FAILED
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
float f; float f;
@ -27,8 +26,8 @@ void main() {
return; return;
} }
Error parsing GLSL shader: Error parsing GLSL shader:
ERROR: 0:19: 'assign' : cannot convert from 'layout( binding=0 column_major std430) buffer block{layout( column_major std430 offset=0) buffer structure{ global mediump float f} inner}' to 'layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer structure{ global mediump float f} inner}' ERROR: 0:18: 'assign' : cannot convert from 'layout( binding=0 column_major std430) buffer block{layout( column_major std430 offset=0) buffer structure{ global highp float f} inner}' to 'layout( binding=1 column_major std430) buffer block{layout( column_major std430 offset=0) buffer structure{ global highp float f} inner}'
ERROR: 0:19: '' : compilation terminated ERROR: 0:18: '' : compilation terminated
ERROR: 2 compilation errors. No code generated. ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
uint inner; uint inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
ivec2 inner; ivec2 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
uvec3 inner; uvec3 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct tint_symbol_block { struct tint_symbol_block {
vec4 inner; vec4 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
ivec3 a; ivec3 a;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
int x; int x;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
vec4 inner[4]; vec4 inner[4];

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
float inner; float inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
int inner; int inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
mat2 inner; mat2 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
mat2x3 inner; mat2x3 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
mat3x2 inner; mat3x2 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
mat4 inner; mat4 inner;

View File

@ -1,7 +1,6 @@
SKIP: FAILED SKIP: FAILED
#version 310 es #version 310 es
precision mediump float;
struct Inner { struct Inner {
float f; float f;
@ -25,8 +24,8 @@ void main() {
return; return;
} }
Error parsing GLSL shader: Error parsing GLSL shader:
ERROR: 0:17: '=' : cannot convert from 'layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform structure{ global mediump float f} inner}' to ' temp structure{ global structure{ global mediump float f} inner}' ERROR: 0:16: '=' : cannot convert from 'layout( binding=0 column_major shared) uniform block{layout( column_major shared) uniform structure{ global highp float f} inner}' to ' temp structure{ global structure{ global highp float f} inner}'
ERROR: 0:17: '' : compilation terminated ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated. ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
uint inner; uint inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
ivec2 inner; ivec2 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
uvec3 inner; uvec3 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct u_block { struct u_block {
vec4 inner; vec4 inner;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,7 +1,6 @@
SKIP: FAILED SKIP: FAILED
#version 310 es #version 310 es
precision mediump float;
struct modf_result { struct modf_result {
float fract; float fract;
@ -25,8 +24,8 @@ void i() {
} }
Error parsing GLSL shader: Error parsing GLSL shader:
ERROR: 0:12: '{ } style initializers' : not supported with this profile: es ERROR: 0:11: '{ } style initializers' : not supported with this profile: es
ERROR: 0:12: '' : compilation terminated ERROR: 0:11: '' : compilation terminated
ERROR: 2 compilation errors. No code generated. ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
layout(location = 0) in int loc0_1; layout(location = 0) in int loc0_1;
layout(location = 1) in uint loc1_1; layout(location = 1) in uint loc1_1;

View File

@ -19,7 +19,6 @@ bug/chromium/1273230.wgsl:12:9 warning: use of deprecated builtin
^^^^^^^^ ^^^^^^^^
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint numTriangles; uint numTriangles;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct S { struct S {
float f; float f;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
layout(location = 0) out vec2 texcoords_1; layout(location = 0) out vec2 texcoords_1;
struct Uniforms { struct Uniforms {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
ivec4 data[4]; ivec4 data[4];

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct UBO { struct UBO {
int dynamic_idx; int dynamic_idx;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Simulation { struct Simulation {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint i; uint i;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
vec2 v2f = vec2(0.0f, 0.0f); vec2 v2f = vec2(0.0f, 0.0f);
ivec3 v3i = ivec3(0, 0, 0); ivec3 v3i = ivec3(0, 0, 0);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
vec2 v2f = vec2(0.0f, 0.0f); vec2 v2f = vec2(0.0f, 0.0f);
ivec3 v3i = ivec3(0, 0, 0); ivec3 v3i = ivec3(0, 0, 0);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
vec2 v2f = vec2(0.0f, 0.0f); vec2 v2f = vec2(0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
vec2 v2f = vec2(0.0f, 0.0f); vec2 v2f = vec2(0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
vec2 v2f = vec2(0.0f, 0.0f); vec2 v2f = vec2(0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void tint_symbol() { void tint_symbol() {
vec2 v2f = vec2(0.0f, 0.0f); vec2 v2f = vec2(0.0f, 0.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
void f() { void f() {
int c = (1 / 0); int c = (1 / 0);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
layout(location = 0) in vec3 position_param_1; layout(location = 0) in vec3 position_param_1;
layout(location = 2) in vec2 uv_param_1; layout(location = 2) in vec2 uv_param_1;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint numTriangles; uint numTriangles;
@ -121,7 +120,6 @@ void main() {
return; return;
} }
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint numTriangles; uint numTriangles;
@ -212,7 +210,6 @@ void main() {
return; return;
} }
#version 310 es #version 310 es
precision mediump float;
struct Uniforms { struct Uniforms {
uint numTriangles; uint numTriangles;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct LightData { struct LightData {
vec4 position; vec4 position;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
layout(binding = 1, std430) buffer data_block_1 { layout(binding = 1, std430) buffer data_block_1 {
int inner[]; int inner[];

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
float x_200(inout vec2 x_201) { float x_200(inout vec2 x_201) {
float x_212 = x_201.x; float x_212 = x_201.x;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
struct Buf { struct Buf {
uint count; uint count;

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
vec4 tint_symbol() { vec4 tint_symbol() {
vec3 light = vec3(1.200000048f, 1.0f, 2.0f); vec3 light = vec3(1.200000048f, 1.0f, 2.0f);

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

View File

@ -1,5 +1,4 @@
#version 310 es #version 310 es
precision mediump float;
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;
void unused_entry_point() { void unused_entry_point() {

Some files were not shown because too many files have changed in this diff Show More