amberscript has a rich declarative language for shader tests. Far beyond what wesl-test can do so far..
What ideas can/should we adapt for wesl-test?
Some amberscript of note:
-
declarative buffer initalizers:
BUFFER myData DATA_TYPE float DATA 1.0 2.0 3.0 4.0 END
-
A rich set of comparators for numeric values:
EXPECT LT, EXPECT LE, EXPECT EQ, etc.
-
Buffer comparisions
EXPECT buf1 RMSE_BUFFER buf2 TOLERANCE 0.01
-
Buffer copying, clearing
CLEAR pipeline
COPY buf1 TO buf2
-
earth mover distance metrics for image snapshot comparisons
-
Probes to check particular values or regions in buffers and images
EXPECT kImgBuffer IDX 0 0 SIZE 127 127 EQ_RGB 255 0 0
EXPECT kComputeBuffer IDX 524280 EQ 255 255
-
Declarative pipelines
PIPELINE compute kComputePipeline
ATTACH kComputeShader
BIND BUFFER kComputeBuffer AS storage DESCRIPTOR_SET 0 BINDING 3
END # pipeline
-
Run pipelines, expiclity and repeatedly
REPEAT 10
RUN pipeline1 10 1 1
RUN pipeline2 2 1 1
END
amberscript has a rich declarative language for shader tests. Far beyond what wesl-test can do so far..
What ideas can/should we adapt for wesl-test?
Some amberscript of note:
declarative buffer initalizers:
A rich set of comparators for numeric values:
EXPECT LT,EXPECT LE,EXPECT EQ, etc.Buffer comparisions
Buffer copying, clearing
earth mover distance metrics for image snapshot comparisons
Probes to check particular values or regions in buffers and images
Declarative pipelines
Run pipelines, expiclity and repeatedly