You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
I run into some array construction issues when running Shadertoys with wgpu. According to the OpenGL spec Chapter 4.1.9 allows you to declare arrays with explicit size even implicitly when using an array constructor.
Repro steps
These versions give you validation error: The type is not constructible
constfloat[] a =float[](0.0, 1.0, 2.0, 3.0);
constfloat[] b =float[4](0.1, 1.1, 2.1, 3.1);
error is different when not constant: Type flags TypeFlags(DATA | COPY | HOST_SHAREABLE) do not meet the required TypeFlags(CONSTRUCTIBLE) But I am not too sure if this is super relevant...
float[] e =float[](0.4, 1.4, 2.4, 3.4);
float[] f =float[4](0.5, 1.5, 2.5, 3.5);
equivalent versions that work:
constfloat[4] c =float[](0.2, 1.2, 2.2, 3.2);
constfloat[4] d =float[4](0.3, 1.3, 2.3, 3.3);
float[4] g =float[](0.6, 1.6, 2.6, 3.6);
float[4] h =float[4](0.7, 1.7, 2.7, 3.7);
Expected behavior Shadertoy with all variants working (older GLSL spec I believe)
Platform
wgpu 0.19.1 via wgpu-native 0.19.1.1 via wgpu-py#65044aa via wgpu-shadertoy
The text was updated successfully, but these errors were encountered:
Description
I run into some array construction issues when running Shadertoys with wgpu. According to the OpenGL spec Chapter 4.1.9 allows you to declare arrays with explicit size even implicitly when using an array constructor.
Repro steps
These versions give you validation error:
The type is not constructible
error is different when not constant:
Type flags TypeFlags(DATA | COPY | HOST_SHAREABLE) do not meet the required TypeFlags(CONSTRUCTIBLE)
But I am not too sure if this is super relevant...equivalent versions that work:
Expected behavior
Shadertoy with all variants working (older GLSL spec I believe)
Platform
wgpu 0.19.1 via wgpu-native 0.19.1.1 via wgpu-py#65044aa via wgpu-shadertoy
The text was updated successfully, but these errors were encountered: