○
Planned This feature is planned but not yet implemented.
Aspirational: GPU blur execution not yet implemented
Failure Output
error[PARSE003]: empty braces in branch payload - remove braces for void branch or use identity syntax '| done Type'
--> tests/regression/300_ADVANCED_FEATURES/370_VARIANTS/8204_gpu_blur_real/input.kz:20:6
|
20 | | done { }
| ^ Code
// Test 819: GLSL Code in |gpu Proc Body
//
// Tests that the parser can handle ACTUAL GLSL shader code
// inside a |gpu proc variant. The GLSL is treated as opaque
// text by the Koru parser (just like any other proc body).
//
// What this tests:
// ✅ Parser accepts GLSL syntax in proc body
// ✅ GLSL keywords (#version, layout, void, etc.) don't break parser
// ✅ Proc with |gpu variant emits correctly
//
// What this does NOT test:
// ❌ Compiling GLSL → SPIR-V (that's test 820)
// ❌ Wrapper generation (that's test 821)
// ❌ GPU execution (future)
const std = @import("std");
~pub tor compute { }
| done { }
~proc compute|gpu {
#version 450
layout(local_size_x = 16) in;
layout(binding = 0) buffer Data {
float values[];
} data;
void main() {
uint idx = gl_GlobalInvocationID.x;
data.values[idx] = data.values[idx] * 2.0;
}
}