GLSL: fix sample_index, sample_mask and bitcasts

In GLSL, gl_SampleID and gl_SampleMask[In] require the
GL_OES_sample_variables extension, so output:

"#extension GL_OES_sample_variables : require"

in the header if those builtins is used.

Note that extensions must be inserted before the default precision
declaration, but helpers must be inserted after it, so we set a flag
and emit extensions, then the precision declaration, then helpers.

Further fixes:
- use gl_SampleMaskIn for input builtins, gl_SampleMask for output,
  necessitating the addition of a storage class to GLSLBuiltinToString()
- fix the handling of gl_SampleMaskIn: it's array<i32> in GLSL, not
  array<u32> as in SPIR-V
- centralize conversions for GLSL builtins used as input variables in
  FromGLSLBuiltin()
- implement bitcasts on assignment to GLSL builtin output variables,
  centralized in ToGLSLBuiltin()
- update the extension handling in the GLSL writer to check for both
  sample_index and sample_mask.
- call UnwrapRef() in GLSL's EmitBitcast(). In the test case, we were
  not recognizing the argument as a uint, yielding float() instead of
  uintBitsToFloat().

Bug: tint:1408, tint:1412, tint:1414

Change-Id: Ie01541eb6e7cdf4e21347341f988bff916346797
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78920
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-04 16:41:33 +00:00 committed by Tint LUCI CQ
parent 009d129103
commit a924ffe70c
35 changed files with 196 additions and 800 deletions

View File

@ -184,24 +184,23 @@ struct CanonicalizeEntryPointIO::State {
// corresponding gl_ builtin name
auto* builtin = ast::GetAttribute<ast::BuiltinAttribute>(attributes);
if (cfg.shader_style == ShaderStyle::kGlsl && builtin) {
name = GLSLBuiltinToString(builtin->builtin, func_ast->PipelineStage());
name = GLSLBuiltinToString(builtin->builtin, func_ast->PipelineStage(),
ast::StorageClass::kInput);
}
auto symbol = ctx.dst->Symbols().New(name);
// Create the global variable and use its value for the shader input.
const ast::Expression* value = ctx.dst->Expr(symbol);
if (HasSampleMask(attributes)) {
if (builtin) {
if (cfg.shader_style == ShaderStyle::kGlsl) {
value = FromGLSLBuiltin(builtin->builtin, value, ast_type);
} else if (builtin->builtin == ast::Builtin::kSampleMask) {
// Vulkan requires the type of a SampleMask builtin to be an array.
// Declare it as array<u32, 1> and then load the first element.
ast_type = ctx.dst->ty.array(ast_type, 1);
value = ctx.dst->IndexAccessor(value, 0);
}
// In GLSL, if the type doesn't match the type of the builtin,
// insert a bitcast
if (cfg.shader_style == ShaderStyle::kGlsl && builtin &&
GLSLBuiltinNeedsBitcast(builtin->builtin)) {
value = ctx.dst->Bitcast(CreateASTTypeFor(ctx, type), value);
}
ctx.dst->Global(symbol, ast_type, ast::StorageClass::kInput,
std::move(attributes));
@ -251,9 +250,12 @@ struct CanonicalizeEntryPointIO::State {
// In GLSL, if it's a builtin, override the name with the
// corresponding gl_ builtin name
auto* builtin = ast::GetAttribute<ast::BuiltinAttribute>(attributes);
if (cfg.shader_style == ShaderStyle::kGlsl && builtin) {
name = GLSLBuiltinToString(builtin->builtin, func_ast->PipelineStage());
if (cfg.shader_style == ShaderStyle::kGlsl) {
if (auto* b = ast::GetAttribute<ast::BuiltinAttribute>(attributes)) {
name = GLSLBuiltinToString(b->builtin, func_ast->PipelineStage(),
ast::StorageClass::kOutput);
value = ToGLSLBuiltin(b->builtin, value, type);
}
}
OutputValue output;
@ -626,9 +628,11 @@ struct CanonicalizeEntryPointIO::State {
/// Retrieve the gl_ string corresponding to a builtin.
/// @param builtin the builtin
/// @param stage the current pipeline stage
/// @param storage_class the storage class (input or output)
/// @returns the gl_ string corresponding to that builtin
const char* GLSLBuiltinToString(ast::Builtin builtin,
ast::PipelineStage stage) {
ast::PipelineStage stage,
ast::StorageClass storage_class) {
switch (builtin) {
case ast::Builtin::kPosition:
switch (stage) {
@ -660,26 +664,67 @@ struct CanonicalizeEntryPointIO::State {
case ast::Builtin::kSampleIndex:
return "gl_SampleID";
case ast::Builtin::kSampleMask:
if (storage_class == ast::StorageClass::kInput) {
return "gl_SampleMaskIn";
} else {
return "gl_SampleMask";
}
default:
return "";
}
}
/// Check if the GLSL version if a builtin doesn't match the WGSL type
/// @param builtin the WGSL builtin to check
/// @returns true if the GLSL builtin needs to be cast to the WGSL type
bool GLSLBuiltinNeedsBitcast(ast::Builtin builtin) {
/// Convert a given GLSL builtin value to the corresponding WGSL value.
/// @param builtin the builtin variable
/// @param value the value to convert
/// @param ast_type (inout) the incoming WGSL and outgoing GLSL types
/// @returns an expression representing the GLSL builtin converted to what
/// WGSL expects
const ast::Expression* FromGLSLBuiltin(ast::Builtin builtin,
const ast::Expression* value,
const ast::Type*& ast_type) {
switch (builtin) {
case ast::Builtin::kVertexIndex:
case ast::Builtin::kInstanceIndex:
case ast::Builtin::kSampleIndex:
// GLSL uses i32 for these, so bitcast to u32.
value = ctx.dst->Bitcast(ast_type, value);
ast_type = ctx.dst->ty.i32();
break;
case ast::Builtin::kSampleMask:
// gl_SampleMask is an array of i32. Retrieve the first element and
// bitcast it to u32.
value = ctx.dst->IndexAccessor(value, 0);
value = ctx.dst->Bitcast(ast_type, value);
ast_type = ctx.dst->ty.array(ctx.dst->ty.i32(), 1);
break;
default:
break;
}
return value;
}
/// Convert a given WGSL value to the type expected when assigning to a
/// GLSL builtin.
/// @param builtin the builtin variable
/// @param value the value to convert
/// @param type (out) the type to which the value was converted
/// @returns the converted value which can be assigned to the GLSL builtin
const ast::Expression* ToGLSLBuiltin(ast::Builtin builtin,
const ast::Expression* value,
const sem::Type*& type) {
switch (builtin) {
case ast::Builtin::kVertexIndex:
case ast::Builtin::kInstanceIndex:
case ast::Builtin::kSampleIndex:
case ast::Builtin::kSampleMask:
// In GLSL, these are i32, not u32.
return true;
type = ctx.dst->create<sem::I32>();
value = ctx.dst->Bitcast(CreateASTTypeFor(ctx, type), value);
break;
default:
return false;
break;
}
return value;
}
};

View File

@ -2321,6 +2321,80 @@ fn main() {
EXPECT_EQ(expect, str(got));
}
TEST_F(CanonicalizeEntryPointIOTest, GLSLSampleMaskBuiltins) {
auto* src = R"(
@stage(fragment)
fn fragment_main(@builtin(sample_index) sample_index : u32,
@builtin(sample_mask) mask_in : u32
) -> @builtin(sample_mask) u32 {
return mask_in;
}
)";
auto* expect = R"(
@builtin(sample_index) @internal(disable_validation__ignore_storage_class) var<in> gl_SampleID : i32;
@builtin(sample_mask) @internal(disable_validation__ignore_storage_class) var<in> gl_SampleMaskIn : array<i32, 1>;
@builtin(sample_mask) @internal(disable_validation__ignore_storage_class) var<out> gl_SampleMask : array<i32, 1>;
fn fragment_main(sample_index : u32, mask_in : u32) -> u32 {
return mask_in;
}
@stage(fragment)
fn main() {
let inner_result = fragment_main(bitcast<u32>(gl_SampleID), bitcast<u32>(gl_SampleMaskIn[0]));
gl_SampleMask[0] = bitcast<i32>(inner_result);
}
)";
DataMap data;
data.Add<CanonicalizeEntryPointIO::Config>(
CanonicalizeEntryPointIO::ShaderStyle::kGlsl);
auto got = Run<Unshadow, CanonicalizeEntryPointIO>(src, data);
EXPECT_EQ(expect, str(got));
}
TEST_F(CanonicalizeEntryPointIOTest, GLSLVertexInstanceIndexBuiltins) {
auto* src = R"(
@stage(vertex)
fn vertex_main(@builtin(vertex_index) vertexID : u32,
@builtin(instance_index) instanceID : u32
) -> @builtin(position) vec4<f32> {
return vec4<f32>(f32(vertexID) + f32(instanceID));
}
)";
auto* expect = R"(
@builtin(vertex_index) @internal(disable_validation__ignore_storage_class) var<in> gl_VertexID : i32;
@builtin(instance_index) @internal(disable_validation__ignore_storage_class) var<in> gl_InstanceID : i32;
@builtin(position) @internal(disable_validation__ignore_storage_class) var<out> gl_Position : vec4<f32>;
fn vertex_main(vertexID : u32, instanceID : u32) -> vec4<f32> {
return vec4<f32>((f32(vertexID) + f32(instanceID)));
}
@stage(vertex)
fn main() {
let inner_result = vertex_main(bitcast<u32>(gl_VertexID), bitcast<u32>(gl_InstanceID));
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0 * gl_Position.z) - gl_Position.w);
}
)";
DataMap data;
data.Add<CanonicalizeEntryPointIO::Config>(
CanonicalizeEntryPointIO::ShaderStyle::kGlsl);
auto got = Run<Unshadow, CanonicalizeEntryPointIO>(src, data);
EXPECT_EQ(expect, str(got));
}
} // namespace
} // namespace transform
} // namespace tint

View File

@ -63,6 +63,16 @@ bool IsRelational(tint::ast::BinaryOp op) {
op == tint::ast::BinaryOp::kGreaterThanEqual;
}
bool RequiresOESSampleVariables(tint::ast::Builtin builtin) {
switch (builtin) {
case tint::ast::Builtin::kSampleIndex:
case tint::ast::Builtin::kSampleMask:
return true;
default:
return false;
}
}
} // namespace
namespace tint {
@ -125,7 +135,6 @@ GeneratorImpl::~GeneratorImpl() = default;
bool GeneratorImpl::Generate() {
line() << "#version 310 es";
line() << "precision mediump float;";
auto helpers_insertion_point = current_buffer_->lines.size();
@ -171,9 +180,26 @@ bool GeneratorImpl::Generate() {
}
}
TextBuffer extensions;
if (requires_oes_sample_variables) {
extensions.Append("#extension GL_OES_sample_variables : require");
}
auto indent = current_buffer_->current_indent;
if (!extensions.lines.empty()) {
current_buffer_->Insert(extensions, helpers_insertion_point, indent);
helpers_insertion_point += extensions.lines.size();
}
current_buffer_->Insert("precision mediump float;", helpers_insertion_point++,
indent);
if (!helpers_.lines.empty()) {
current_buffer_->Insert("", helpers_insertion_point++, 0);
current_buffer_->Insert(helpers_, helpers_insertion_point++, 0);
current_buffer_->Insert("", helpers_insertion_point++, indent);
current_buffer_->Insert(helpers_, helpers_insertion_point, indent);
helpers_insertion_point += helpers_.lines.size();
}
return true;
@ -197,8 +223,8 @@ bool GeneratorImpl::EmitIndexAccessor(
bool GeneratorImpl::EmitBitcast(std::ostream& out,
const ast::BitcastExpression* expr) {
auto* src_type = TypeOf(expr->expr);
auto* dst_type = TypeOf(expr);
auto* src_type = TypeOf(expr->expr)->UnwrapRef();
auto* dst_type = TypeOf(expr)->UnwrapRef();
if (!dst_type->is_integer_scalar_or_vector() &&
!dst_type->is_float_scalar_or_vector()) {
@ -1807,8 +1833,12 @@ bool GeneratorImpl::EmitWorkgroupVariable(const sem::Variable* var) {
bool GeneratorImpl::EmitIOVariable(const sem::Variable* var) {
auto* decl = var->Declaration();
if (auto* b = ast::GetAttribute<ast::BuiltinAttribute>(decl->attributes)) {
// Use of gl_SampleID requires the GL_OES_sample_variables extension
if (RequiresOESSampleVariables(b->builtin)) {
requires_oes_sample_variables = true;
}
// Do not emit builtin (gl_) variables.
if (ast::HasAttribute<ast::BuiltinAttribute>(decl->attributes)) {
return true;
}

View File

@ -471,6 +471,7 @@ class GeneratorImpl : public TextGenerator {
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> int_dot_funcs_;
bool requires_oes_sample_variables = false;
};
} // namespace glsl

View File

@ -1,6 +1,5 @@
SKIP: FAILED
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
layout(location = 0) in float a_1;
@ -20,16 +19,9 @@ FragIn tint_symbol(FragIn tint_symbol_1, float b) {
}
void main() {
FragIn tint_symbol_3 = FragIn(a_1, uint(gl_SampleMask[0]));
FragIn tint_symbol_3 = FragIn(a_1, uint(gl_SampleMaskIn[0]));
FragIn inner_result = tint_symbol(tint_symbol_3, b_1);
a_2 = inner_result.a;
gl_SampleMask_1[0] = inner_result.mask;
gl_SampleMask[0] = int(inner_result.mask);
return;
}
Error parsing GLSL shader:
ERROR: 0:21: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:21: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,6 +1,5 @@
SKIP: FAILED
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
void tint_symbol(vec4 position, bool front_facing, uint sample_index, uint sample_mask) {
@ -11,13 +10,6 @@ void tint_symbol(vec4 position, bool front_facing, uint sample_index, uint sampl
}
void main() {
tint_symbol(gl_FragCoord, gl_FrontFacing, uint(gl_SampleID), uint(gl_SampleMask[0]));
tint_symbol(gl_FragCoord, gl_FrontFacing, uint(gl_SampleID), uint(gl_SampleMaskIn[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:12: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:12: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,6 +1,5 @@
SKIP: FAILED
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
struct FragmentInputs {
@ -18,14 +17,7 @@ void tint_symbol(FragmentInputs inputs) {
}
void main() {
FragmentInputs tint_symbol_1 = FragmentInputs(gl_FragCoord, gl_FrontFacing, uint(gl_SampleID), uint(gl_SampleMask[0]));
FragmentInputs tint_symbol_1 = FragmentInputs(gl_FragCoord, gl_FrontFacing, uint(gl_SampleID), uint(gl_SampleMaskIn[0]));
tint_symbol(tint_symbol_1);
return;
}
Error parsing GLSL shader:
ERROR: 0:19: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:19: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,6 +1,5 @@
SKIP: FAILED
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
layout(location = 0) flat in int loc0_1;
@ -30,14 +29,7 @@ void tint_symbol(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sam
void main() {
FragmentInputs0 tint_symbol_1 = FragmentInputs0(gl_FragCoord, loc0_1);
FragmentInputs1 tint_symbol_2 = FragmentInputs1(loc3_1, uint(gl_SampleMask[0]));
FragmentInputs1 tint_symbol_2 = FragmentInputs1(loc3_1, uint(gl_SampleMaskIn[0]));
tint_symbol(tint_symbol_1, gl_FrontFacing, loc1_1, uint(gl_SampleID), tint_symbol_2, loc2_1);
return;
}
Error parsing GLSL shader:
ERROR: 0:31: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:31: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,5 +1,3 @@
SKIP: FAILED
#version 310 es
precision mediump float;
@ -13,6 +11,7 @@ void main() {
return;
}
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
uint main2() {
@ -21,13 +20,6 @@ uint main2() {
void main() {
uint inner_result = main2();
gl_SampleMask[0] = inner_result;
gl_SampleMask[0] = int(inner_result);
return;
}
Error parsing GLSL shader:
ERROR: 0:10: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:10: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,6 +1,5 @@
SKIP: FAILED
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
struct FragmentOutputs {
@ -16,13 +15,6 @@ FragmentOutputs tint_symbol() {
void main() {
FragmentOutputs inner_result = tint_symbol();
gl_FragDepth = inner_result.frag_depth;
gl_SampleMask[0] = inner_result.sample_mask;
gl_SampleMask[0] = int(inner_result.sample_mask);
return;
}
Error parsing GLSL shader:
ERROR: 0:17: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:17: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,6 +1,5 @@
SKIP: FAILED
#version 310 es
#extension GL_OES_sample_variables : require
precision mediump float;
layout(location = 0) out int loc0_1;
@ -27,14 +26,7 @@ void main() {
gl_FragDepth = inner_result.frag_depth;
loc1_1 = inner_result.loc1;
loc2_1 = inner_result.loc2;
gl_SampleMask[0] = inner_result.sample_mask;
gl_SampleMask[0] = int(inner_result.sample_mask);
loc3_1 = inner_result.loc3;
return;
}
Error parsing GLSL shader:
ERROR: 0:28: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:28: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,26 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:15: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:15: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,26 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:15: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:15: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,32 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(uint(x_1[0]));
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:21: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:21: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,32 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(x_1[0]);
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:21: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:21: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1 = 0;
void main_1() {
int x_2 = x_1;
return;
}
void tint_symbol(uint x_1_param) {
x_1 = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleID));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1 = 0;
void main_1() {
int x_2 = x_1;
return;
}
void tint_symbol(uint x_1_param) {
x_1 = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleID));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1 = 0;
void main_1() {
int x_2 = x_1;
return;
}
void tint_symbol(uint x_1_param) {
x_1 = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleID));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1 = 0u;
void main_1() {
uint x_2 = x_1;
return;
}
void tint_symbol(uint x_1_param) {
x_1 = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleID));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1 = 0u;
void main_1() {
uint x_2 = x_1;
return;
}
void tint_symbol(uint x_1_param) {
x_1 = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleID));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1 = 0u;
void main_1() {
uint x_2 = x_1;
return;
}
void tint_symbol(uint x_1_param) {
x_1 = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleID));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleID' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
int x_4 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
int x_4 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
int x_3 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = int(x_1_param);
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
uint x_4 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
uint x_4 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
uint x_3 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,27 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
uint x_3 = x_1[0];
return;
}
void tint_symbol(uint x_1_param) {
x_1[0] = x_1_param;
main_1();
}
void main() {
tint_symbol(uint(gl_SampleMask[0]));
return;
}
Error parsing GLSL shader:
ERROR: 0:16: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:16: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
x_1[0] = 12;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(uint(x_1[0]));
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
x_1[0] = 12;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(uint(x_1[0]));
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
int x_1[1] = int[1](0);
void main_1() {
x_1[0] = 12;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(uint(x_1[0]));
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
x_1[0] = 0u;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(x_1[0]);
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
x_1[0] = 0u;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(x_1[0]);
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
x_1[0] = 0u;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(x_1[0]);
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.

View File

@ -1,33 +0,0 @@
SKIP: FAILED
#version 310 es
precision mediump float;
uint x_1[1] = uint[1](0u);
void main_1() {
x_1[0] = 0u;
return;
}
struct main_out {
uint x_1_1;
};
main_out tint_symbol() {
main_1();
main_out tint_symbol_1 = main_out(x_1[0]);
return tint_symbol_1;
}
void main() {
main_out inner_result = tint_symbol();
gl_SampleMask[0] = inner_result.x_1_1;
return;
}
Error parsing GLSL shader:
ERROR: 0:22: 'gl_SampleMask' : required extension not requested: GL_OES_sample_variables
ERROR: 0:22: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.